Click here to Skip to main content
16,006,605 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: using the contol.paint event Pin
Luc Pattyn11-Jan-10 9:54
sitebuilderLuc Pattyn11-Jan-10 9:54 
GeneralRe: using the contol.paint event Pin
Martin Beukes11-Jan-10 11:29
Martin Beukes11-Jan-10 11:29 
GeneralRe: using the contol.paint event !!! MODIFIED AGAIN !!! Pin
Luc Pattyn11-Jan-10 11:34
sitebuilderLuc Pattyn11-Jan-10 11:34 
GeneralRe: using the contol.paint event !!! MODIFIED AGAIN !!! Pin
Martin Beukes11-Jan-10 12:20
Martin Beukes11-Jan-10 12:20 
GeneralRe: using the contol.paint event Pin
Luc Pattyn11-Jan-10 12:38
sitebuilderLuc Pattyn11-Jan-10 12:38 
GeneralRe: using the contol.paint event Pin
Martin Beukes11-Jan-10 12:49
Martin Beukes11-Jan-10 12:49 
GeneralRe: using the contol.paint event Pin
Luc Pattyn11-Jan-10 12:56
sitebuilderLuc Pattyn11-Jan-10 12:56 
AnswerRe: using the contol.paint event Pin
DaveyM6911-Jan-10 10:39
professionalDaveyM6911-Jan-10 10:39 
The PaintEventArgs are of no use, but you can call DrawToBitmap on the Control as Luc suggested in your Paint handler... something like this (untested):
private void Control_Paint(object sender, PaintEventArgs e)
{
    Control control = sender as Control;
    if (control != null)
    {
        using(MemoryStream memoryStream = new MemoryStream())
        using (Bitmap bitmap = new Bitmap(memoryStream))
        {
            control.DrawToBitmap(bitmap, control.Bounds);
            // bitmap is now in memoryStream
        }
    }
}


Dave

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Why are you using VB6? Do you hate yourself? (Christian Graus)

QuestionDeployment / Permissions for control embedded in a web page Pin
sitruc711-Jan-10 5:19
sitruc711-Jan-10 5:19 
AnswerRe: Deployment / Permissions for control embedded in a web page Pin
Eddy Vluggen13-Jan-10 8:26
professionalEddy Vluggen13-Jan-10 8:26 
QuestionAccess data in a remote server Pin
jonatan_55611-Jan-10 1:39
jonatan_55611-Jan-10 1:39 
AnswerRe: Access data in a remote server Pin
dan!sh 11-Jan-10 3:39
professional dan!sh 11-Jan-10 3:39 
GeneralRe: Access data in a remote server Pin
jonatan_55611-Jan-10 4:08
jonatan_55611-Jan-10 4:08 
QuestionDesig VB.net Table Pin
Thomas O'Donoghue10-Jan-10 1:51
Thomas O'Donoghue10-Jan-10 1:51 
AnswerRe: Desig VB.net Table Pin
Ashfield10-Jan-10 5:43
Ashfield10-Jan-10 5:43 
Questionarraylist to byte array & viceversa---plz. help me....... Pin
thivya n9-Jan-10 19:16
thivya n9-Jan-10 19:16 
AnswerRe: arraylist to byte array & viceversa---plz. help me....... Pin
Luc Pattyn10-Jan-10 0:57
sitebuilderLuc Pattyn10-Jan-10 0:57 
AnswerRe: arraylist to byte array & viceversa---plz. help me....... Pin
thivya n10-Jan-10 3:01
thivya n10-Jan-10 3:01 
QuestionMessageBox with custom background color Pin
peterdrozd8-Jan-10 5:07
peterdrozd8-Jan-10 5:07 
AnswerRe: MessageBox with custom background color Pin
Richard MacCutchan8-Jan-10 5:21
mveRichard MacCutchan8-Jan-10 5:21 
GeneralRe: MessageBox with custom background color Pin
peterdrozd8-Jan-10 10:54
peterdrozd8-Jan-10 10:54 
GeneralRe: MessageBox with custom background color Pin
Richard MacCutchan8-Jan-10 22:15
mveRichard MacCutchan8-Jan-10 22:15 
AnswerRe: MessageBox with custom background color Pin
Palash Biswas4-Feb-10 2:24
Palash Biswas4-Feb-10 2:24 
QuestionRich text box equivalent textbox Pin
Ajakblackgoat7-Jan-10 20:54
Ajakblackgoat7-Jan-10 20:54 
AnswerRe: Rich text box equivalent textbox [modified] Pin
Eddy Vluggen7-Jan-10 23:38
professionalEddy Vluggen7-Jan-10 23:38 

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.