Click here to Skip to main content
15,921,990 members
Home / Discussions / C#
   

C#

 
GeneralRe: When to call base.Onstart Pin
Luc Pattyn28-Nov-09 9:23
sitebuilderLuc Pattyn28-Nov-09 9:23 
GeneralRe: When to call base.Onstart Pin
DaveyM6928-Nov-09 11:02
professionalDaveyM6928-Nov-09 11:02 
GeneralRe: When to call base.Onstart [modified] Pin
Jordanwb6-Dec-09 15:08
Jordanwb6-Dec-09 15:08 
AnswerRe: When to call base.Onstart Pin
PIEBALDconsult28-Nov-09 14:18
mvePIEBALDconsult28-Nov-09 14:18 
QuestionPrint by windows CE device Pin
Sajjad Izadi28-Nov-09 7:12
Sajjad Izadi28-Nov-09 7:12 
AnswerRe: Print by windows CE device Pin
Christian Graus28-Nov-09 7:42
protectorChristian Graus28-Nov-09 7:42 
GeneralRe: Print by windows CE device Pin
Sajjad Izadi28-Nov-09 7:45
Sajjad Izadi28-Nov-09 7:45 
QuestionPrinting a datagridview... Pin
JollyMansArt28-Nov-09 7:05
JollyMansArt28-Nov-09 7:05 
I have several columns I want to print the column headers vertically and not horizontal.
I have found a method that works but does not meet the expectations speficied.
Option 1) (This way does not meet specifications but does work)
- I could loop thru the string placing a carrage return after each letter.

Option 2) (This way meets specifications and I can get it to print on the screen. However I can not get it to print onto the printer)
private void dgvReport_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)<br />
        {<br />
            <br />
            if (e.RowIndex == -1 && e.ColumnIndex >= 4)<br />
            {<br />
                e.PaintBackground(e.ClipBounds, true);<br />
                Rectangle rect = <br />
                    this.dgvReport.GetColumnDisplayRectangle(e.ColumnIndex, true);<br />
                Size titleSize =<br />
                    TextRenderer.MeasureText(e.Value.ToString(), e.CellStyle.Font);<br />
                if (this.dgvReport.ColumnHeadersHeight < titleSize.Width)<br />
                    this.dgvReport.ColumnHeadersHeight = titleSize.Width;<br />
<br />
                e.Graphics.TranslateTransform(0, titleSize.Width);<br />
                e.Graphics.RotateTransform(-90.0F);<br />
<br />
                e.Graphics.DrawString(e.Value.ToString(), e.CellStyle.Font, //this.Font,<br />
                    Brushes.Black, new PointF(rect.Y, rect.X));<br />
<br />
                e.Graphics.RotateTransform(90.0F);<br />
                e.Graphics.TranslateTransform(0, -titleSize.Width);<br />
                e.Handled = true;<br />
            } <br />
            <br />
        }


This way actually rotates the column headers to ensure their vertical the same as their horizontal.

How can I print this way (Option 2)
QuestionRe: Printing a datagridview... Please help Pin
JollyMansArt28-Nov-09 10:03
JollyMansArt28-Nov-09 10:03 
QuestionGetting Report from dataBase and showing it in Word. Pin
Said Ali Jalali28-Nov-09 6:18
Said Ali Jalali28-Nov-09 6:18 
AnswerRe: Getting Report from dataBase and showing it in Word. Pin
dan!sh 28-Nov-09 6:31
professional dan!sh 28-Nov-09 6:31 
AnswerRe: Getting Report from dataBase and showing it in Word. Pin
minnie mouse1-Dec-09 12:50
minnie mouse1-Dec-09 12:50 
QuestionWCF catching EndPointNotFoundException Pin
Ryan Minor28-Nov-09 6:00
Ryan Minor28-Nov-09 6:00 
AnswerRe: WCF catching EndPointNotFoundException Pin
Ravi Bhavnani28-Nov-09 7:51
professionalRavi Bhavnani28-Nov-09 7:51 
QuestionHow to decide whether a class is "internal" by .net reflection ? Pin
yoyota28-Nov-09 4:26
yoyota28-Nov-09 4:26 
AnswerCross Post Pin
dan!sh 28-Nov-09 5:50
professional dan!sh 28-Nov-09 5:50 
AnswerRe: How to decide whether a class is "internal" by .net reflection ? Pin
yoyota28-Nov-09 13:55
yoyota28-Nov-09 13:55 
QuestionHow to represent an image, voice & vedio trafic after we capture it from the app. layer at TCP ??? Pin
3bood.ghzawi28-Nov-09 4:20
3bood.ghzawi28-Nov-09 4:20 
AnswerRe: How to represent an image, voice & vedio trafic after we capture it from the app. layer at TCP ??? Pin
Christian Graus28-Nov-09 5:28
protectorChristian Graus28-Nov-09 5:28 
QuestionEditable data grid view? Pin
Emmet_Brown28-Nov-09 4:05
Emmet_Brown28-Nov-09 4:05 
AnswerRe: Editable data grid view? Pin
JollyMansArt28-Nov-09 8:51
JollyMansArt28-Nov-09 8:51 
GeneralRe: Editable data grid view? Pin
Emmet_Brown29-Nov-09 0:28
Emmet_Brown29-Nov-09 0:28 
QuestionReflected Assembly -&gt; Class Instance should have no Access to the System (Sandbox) Pin
softwarejaeger27-Nov-09 23:43
softwarejaeger27-Nov-09 23:43 
AnswerRe: Reflected Assembly -&gt; Class Instance should have no Access to the System (Sandbox) Pin
0x3c028-Nov-09 0:57
0x3c028-Nov-09 0:57 
AnswerRe: Reflected Assembly -&gt; Class Instance should have no Access to the System (Sandbox) Pin
PIEBALDconsult28-Nov-09 4:55
mvePIEBALDconsult28-Nov-09 4:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.