Click here to Skip to main content
15,915,611 members
Home / Discussions / C#
   

C#

 
GeneralRe: Trying to draw using System.Drawing.Drawing2D Pin
Luc Pattyn1-Mar-07 12:42
sitebuilderLuc Pattyn1-Mar-07 12:42 
GeneralRe: Trying to draw using System.Drawing.Drawing2D Pin
laura13161-Mar-07 12:50
laura13161-Mar-07 12:50 
GeneralRe: Trying to draw using System.Drawing.Drawing2D Pin
Christian Graus1-Mar-07 12:55
protectorChristian Graus1-Mar-07 12:55 
GeneralRe: Trying to draw using System.Drawing.Drawing2D Pin
Luc Pattyn1-Mar-07 13:30
sitebuilderLuc Pattyn1-Mar-07 13:30 
GeneralRe: Trying to draw using System.Drawing.Drawing2D Pin
Christian Graus1-Mar-07 13:33
protectorChristian Graus1-Mar-07 13:33 
GeneralRe: Trying to draw using System.Drawing.Drawing2D Pin
Luc Pattyn1-Mar-07 13:46
sitebuilderLuc Pattyn1-Mar-07 13:46 
AnswerRe: Trying to draw using System.Drawing.Drawing2D Pin
Luc Pattyn1-Mar-07 12:40
sitebuilderLuc Pattyn1-Mar-07 12:40 
QuestionHow do I pass and reference a Panel? Pin
dino20941-Mar-07 12:05
dino20941-Mar-07 12:05 
I have a form with a panel called test_panel1. I need to display
a bitmap on that panel and I have this code that works.
<br />
<br />
        private void SetBitmap(Bitmap bmap)<br />
<br />
        {<br />
   <br />
                Graphics graph = this.test_panel1.CreateGraphics();<br />
                graph.DrawImage(bmap, 0, 0);         <br />
            <br />
        }<br />

I now need to add another panel, lets call it test_panel2
and I need to do the same thing. But I'd like to call SetBitmap
and pass it the panel to put the bitmap on

Something like:
SetBitmap(mybitmap,test_panel2) or SetBitmap(mybitmap,test_panel1)

and have the function look like
<br />
       private void SetBitmap(Bitmap bmap,Panel pnl)<br />
        {<br />
   <br />
                Graphics graph = this.pnl.CreateGraphics();<br />
                graph.DrawImage(bmap, 0, 0);         <br />
            <br />
        }<br />

But C# doesn't like it and I don't know what the proper way to do this is?

Any help is very very welcomed.
AnswerRe: How do I pass and reference a Panel? Pin
Dawid Mazuruk1-Mar-07 12:17
Dawid Mazuruk1-Mar-07 12:17 
GeneralRe: How do I pass and reference a Panel? Pin
dino20941-Mar-07 12:21
dino20941-Mar-07 12:21 
GeneralRe: How do I pass and reference a Panel? Pin
Christian Graus1-Mar-07 12:37
protectorChristian Graus1-Mar-07 12:37 
GeneralRe: How do I pass and reference a Panel? Pin
Luc Pattyn1-Mar-07 12:32
sitebuilderLuc Pattyn1-Mar-07 12:32 
GeneralRe: How do I pass and reference a Panel? Pin
Christian Graus1-Mar-07 12:36
protectorChristian Graus1-Mar-07 12:36 
AnswerRe: How do I pass and reference a Panel? Pin
Christian Graus1-Mar-07 12:38
protectorChristian Graus1-Mar-07 12:38 
QuestionSaving data in access database Pin
conemajstor1-Mar-07 11:22
conemajstor1-Mar-07 11:22 
QuestionImage Formats Pin
Dobromir Dimitrov1-Mar-07 11:16
Dobromir Dimitrov1-Mar-07 11:16 
AnswerRe: Image Formats Pin
Christian Graus1-Mar-07 12:35
protectorChristian Graus1-Mar-07 12:35 
AnswerRe: Image Formats Pin
Luc Pattyn1-Mar-07 12:37
sitebuilderLuc Pattyn1-Mar-07 12:37 
AnswerRe: Image Formats Pin
Hayder Marzouk1-Mar-07 22:19
Hayder Marzouk1-Mar-07 22:19 
QuestionBuild Problem1 Pin
greekius1-Mar-07 10:22
greekius1-Mar-07 10:22 
AnswerRe: Build Problem1 Pin
Luc Pattyn1-Mar-07 10:59
sitebuilderLuc Pattyn1-Mar-07 10:59 
GeneralRe: Build Problem1 Pin
greekius1-Mar-07 21:21
greekius1-Mar-07 21:21 
GeneralRe: Build Problem1 Pin
Luc Pattyn1-Mar-07 23:11
sitebuilderLuc Pattyn1-Mar-07 23:11 
QuestionInvoke method on a datagridview control ! Pin
Hussam Fattahi1-Mar-07 9:54
Hussam Fattahi1-Mar-07 9:54 
AnswerRe: Invoke method on a datagridview control ! Pin
Luc Pattyn1-Mar-07 10:18
sitebuilderLuc Pattyn1-Mar-07 10:18 

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.