Click here to Skip to main content
15,906,279 members
Home / Discussions / C#
   

C#

 
GeneralContext Menu Owner Pin
greekius6-Apr-08 8:01
greekius6-Apr-08 8:01 
GeneralRe: Context Menu Owner Pin
Luc Pattyn6-Apr-08 8:08
sitebuilderLuc Pattyn6-Apr-08 8:08 
GeneralRe: Context Menu Owner Pin
greekius6-Apr-08 8:29
greekius6-Apr-08 8:29 
GeneralRe: Context Menu Owner Pin
Giorgi Dalakishvili6-Apr-08 8:10
mentorGiorgi Dalakishvili6-Apr-08 8:10 
GeneralRe: Context Menu Owner Pin
greekius6-Apr-08 8:41
greekius6-Apr-08 8:41 
GeneralRe: Context Menu Owner Pin
Giorgi Dalakishvili6-Apr-08 8:52
mentorGiorgi Dalakishvili6-Apr-08 8:52 
Questionhow to change an existing console application into a service dll Pin
stephan_0076-Apr-08 7:21
stephan_0076-Apr-08 7:21 
AnswerRe: how to change an existing console application into a service dll Pin
Giorgi Dalakishvili6-Apr-08 7:57
mentorGiorgi Dalakishvili6-Apr-08 7:57 
GeneralRe: how to change an existing console application into a service dll Pin
stephan_0076-Apr-08 8:11
stephan_0076-Apr-08 8:11 
GeneralSyncronizing TreeView nodes and RichTextBox [modified] Pin
Mark F.6-Apr-08 7:08
Mark F.6-Apr-08 7:08 
GeneralRe: Syncronizing TreeView nodes and RichTextBox Pin
Luc Pattyn6-Apr-08 7:30
sitebuilderLuc Pattyn6-Apr-08 7:30 
GeneralGet the SID of the user created a file Pin
Yevgeny Efter6-Apr-08 6:27
Yevgeny Efter6-Apr-08 6:27 
GeneralRe: Get the SID of the user created a file Pin
half-life6-Apr-08 7:42
half-life6-Apr-08 7:42 
GeneralSocketServer getting delay to listen client when if restart the server PC Pin
jklanka6-Apr-08 6:24
jklanka6-Apr-08 6:24 
GeneralC#, using MS Interop, how to reasonably use an instance for spell check Pin
Letmelogin6-Apr-08 5:34
Letmelogin6-Apr-08 5:34 
GeneralOutOfMemoryException despite having 600+ MB of RAM free Pin
Jordanwb6-Apr-08 4:25
Jordanwb6-Apr-08 4:25 
QuestionRe: OutOfMemoryException despite having 600+ MB of RAM free Pin
CPallini6-Apr-08 4:39
mveCPallini6-Apr-08 4:39 
GeneralRe: OutOfMemoryException despite having 600+ MB of RAM free Pin
Jordanwb6-Apr-08 4:46
Jordanwb6-Apr-08 4:46 
GeneralRe: OutOfMemoryException despite having 600+ MB of RAM free Pin
CPallini6-Apr-08 6:23
mveCPallini6-Apr-08 6:23 
GeneralRe: OutOfMemoryException despite having 600+ MB of RAM free Pin
Jordanwb6-Apr-08 6:31
Jordanwb6-Apr-08 6:31 
GeneralRe: OutOfMemoryException despite having 600+ MB of RAM free Pin
Guffa6-Apr-08 6:11
Guffa6-Apr-08 6:11 
QuestionInvalidate picturebox with rectangle on Pin
Casper Hansen6-Apr-08 3:49
Casper Hansen6-Apr-08 3:49 
Hello.

I have a simple picturebox where there is a image loaded in

Im drawing a rectangle on the picturebox and when I press a button I want to invalidate it (remove the rectangle), but it doesnt seem to work

The rectangle is drawn fine and the image loads up to, but when I press my button nothing happens

Here is the code im using:
        private void drawOnPic()<br />
        {<br />
            // Attach grapich to picturebox<br />
            Graphics g = Graphics.FromImage(pictureBox1.Image);<br />
<br />
            // Create a new pen that we shall use for drawing the line<br />
            Pen PenStyle = new Pen(Color.Red, 1);<br />
<br />
            // Draw a 50x50 pixels rectangle (x, y, width, hight)<br />
            g.DrawRectangle(PenStyle, 20, 20, 50, 50);<br />
        }<br />
<br />
        private void button1_Click(object sender, EventArgs e)<br />
        {<br />
            pictureBox1.Invalidate();<br />
        }<br />
<br />
        private void Form1_Load(object sender, EventArgs e)<br />
        {<br />
            drawOnPic();<br />
        }

GeneralRe: Invalidate picturebox with rectangle on Pin
Luc Pattyn6-Apr-08 5:05
sitebuilderLuc Pattyn6-Apr-08 5:05 
Questionhow to validate a textbox in a window Form Pin
yangliuxiaowu6-Apr-08 1:40
yangliuxiaowu6-Apr-08 1:40 
AnswerRe: how to validate a textbox in a window Form Pin
Luc Pattyn6-Apr-08 5:08
sitebuilderLuc Pattyn6-Apr-08 5:08 

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.