Still i have a problem. The problem is that 'DrawtoBitmap' gives a snapshot of the size of datagridview only. It doesn't give all the records like we have some hidden records in the datagridview which gets visible only by scroll bars.
I need to have all the records in the datagridview to be converted into a image so that i can embed it into a mail.
My requirement is to display a data obtained from a database onto a windows application. I want to embed that data into email in tabular form.
I would appreciate if there is any other way of achieving this.
some of us are professional developers with alot of work to do and we dont have time to read pointless posts like yours, we keep an eye on these forums to help people to solve problems they are having.
NOW WHO THE HELL DO YOU THINK YOU ARE comming in here, and DEMANDING that we do YOUR WORK for you? are you stupid or something? no one here or anywhere else will do your work for you.
Harvey Saayman - South Africa
.Net, C#, SQL
My post is not pointless, I think you didn't understand it as you may be "stupid or something"
My problem is that, I'm working in an application in which I manually simulate some control appearance and draw them in a high resolution image to be printed, now when drawing a Label I need to determine the point(X, Y) on which I print the Label text, as Label.TextAlign may vary from MiddleCenter, to BottomLeft, to TopRight, etc.
Now, can you - as a "Professional" developer - help me??
I don't think so..
Even if my question is pointless, it's not enough reason for you to insult me
I guess if you want to know where exactly the text is painted within the label, you'll have to get the control's graphics object, determine the text size with its MeasureString methhod, and calculate the position with a lot of if statements according to alignment and things. But that's kind of like reinventing the label.
If you go to the top of this page you will see a textbox labeled SEARCH. Try that, there are loads of articles and code samples. If that doesn't help, try Google, again there are lots of very good examples.