Click here to Skip to main content
15,887,416 members
Home / Discussions / C#
   

C#

 
AnswerRe: listbox sort by dates with dd.mm.yyyy format [modified] Pin
LongRange.Shooter21-Jul-06 4:39
LongRange.Shooter21-Jul-06 4:39 
GeneralRe: listbox sort by dates with dd.mm.yyyy format Pin
fracalifa21-Jul-06 5:19
fracalifa21-Jul-06 5:19 
QuestionVisual Studio crashes [modified] Pin
SJ_Phoenix21-Jul-06 4:01
SJ_Phoenix21-Jul-06 4:01 
AnswerRe: Visual Studio crashes Pin
Mike Dimmick21-Jul-06 4:05
Mike Dimmick21-Jul-06 4:05 
QuestionTableAdapter and it's commands Pin
zaboboa21-Jul-06 3:58
zaboboa21-Jul-06 3:58 
AnswerRe: TableAdapter and it's commands Pin
Not Active21-Jul-06 4:14
mentorNot Active21-Jul-06 4:14 
GeneralRe: TableAdapter and it's commands Pin
zaboboa21-Jul-06 4:25
zaboboa21-Jul-06 4:25 
Questioninvalidate() in winforms Pin
serimcc21-Jul-06 3:33
serimcc21-Jul-06 3:33 
Hi I want to drive a line to form by a method(not onpaint) and then when i resize or something else it will stay there.But something wrong.
<br />
        private void button1_Click(object sender, EventArgs e)<br />
        {<br />
            Draw();<br />
<br />
        }<br />
        void Draw()<br />
        {<br />
            Graphics g = this.CreateGraphics();<br />
            g.DrawLine(Pens.Coral, 30, 30, 270, 60);<br />
            this.Invalidate();<br />
            this.Update();<br />
            <br />
          }<br />

Here how can i do this.When i call invalidate and update i know that it calls to onpaint event and it draws but after that it calls to onpaintbacckground event and i can not see the line.
If i disable onpaintbackground with this:
<br />
protected override void OnPaintBackground(PaintEventArgs pevent)<br />
{<br />
			<br />
}<br />

It doesn't solve my problem.Also i set control setstyles but again it doesn't solve the problem.
1-)What is function of invalidate()
2-)How can i draw a line with a method and it will stay during lifetime of my form.I mean it doesnt change or destroy while resizing or somethin that.(Like writing onpaint event.)

I am looking for your answers
Thanks
AnswerRe: invalidate() in winforms Pin
Robert Rohde21-Jul-06 3:54
Robert Rohde21-Jul-06 3:54 
GeneralRe: invalidate() in winforms Pin
serimcc21-Jul-06 4:07
serimcc21-Jul-06 4:07 
GeneralRe: invalidate() in winforms Pin
LongRange.Shooter21-Jul-06 4:24
LongRange.Shooter21-Jul-06 4:24 
GeneralRe: invalidate() in winforms Pin
Josh Smith21-Jul-06 4:09
Josh Smith21-Jul-06 4:09 
GeneralRe: invalidate() in winforms Pin
Judah Gabriel Himango21-Jul-06 6:02
sponsorJudah Gabriel Himango21-Jul-06 6:02 
GeneralRe: invalidate() in winforms Pin
Josh Smith21-Jul-06 8:12
Josh Smith21-Jul-06 8:12 
GeneralRe: invalidate() in winforms Pin
Judah Gabriel Himango21-Jul-06 9:01
sponsorJudah Gabriel Himango21-Jul-06 9:01 
GeneralRe: invalidate() in winforms Pin
Josh Smith22-Jul-06 3:36
Josh Smith22-Jul-06 3:36 
GeneralRe: invalidate() in winforms Pin
Judah Gabriel Himango22-Jul-06 6:49
sponsorJudah Gabriel Himango22-Jul-06 6:49 
QuestionDecoupling components Pin
WillemM21-Jul-06 2:37
WillemM21-Jul-06 2:37 
QuestionC# async Socket howto read nutil buffer is empty Pin
TUX2K21-Jul-06 2:12
TUX2K21-Jul-06 2:12 
AnswerRe: C# async Socket howto read nutil buffer is empty [modified] Pin
WillemM21-Jul-06 2:45
WillemM21-Jul-06 2:45 
GeneralRe: C# async Socket howto read nutil buffer is empty Pin
TUX2K21-Jul-06 3:08
TUX2K21-Jul-06 3:08 
GeneralRe: C# async Socket howto read nutil buffer is empty Pin
WillemM21-Jul-06 3:11
WillemM21-Jul-06 3:11 
GeneralRe: C# async Socket howto read nutil buffer is empty Pin
TUX2K21-Jul-06 3:51
TUX2K21-Jul-06 3:51 
GeneralRe: C# async Socket howto read nutil buffer is empty Pin
WillemM21-Jul-06 4:28
WillemM21-Jul-06 4:28 
GeneralRe: C# async Socket howto read nutil buffer is empty Pin
TUX2K21-Jul-06 4:53
TUX2K21-Jul-06 4:53 

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.