Click here to Skip to main content
15,905,683 members
Home / Discussions / C#
   

C#

 
QuestionCopying UserControl Variables Pin
TheBlindWatchmaker21-Jul-06 7:22
TheBlindWatchmaker21-Jul-06 7:22 
AnswerRe: Copying UserControl Variables Pin
atuldeore21-Jul-06 9:11
atuldeore21-Jul-06 9:11 
GeneralRe: Copying UserControl Variables Pin
TheBlindWatchmaker21-Jul-06 10:19
TheBlindWatchmaker21-Jul-06 10:19 
QuestionEmail sending in Win Application Pin
alimohammed21-Jul-06 5:30
alimohammed21-Jul-06 5:30 
GeneralRe: Email sending in Win Application Pin
atuldeore21-Jul-06 5:49
atuldeore21-Jul-06 5:49 
GeneralRe: Email sending in Win Application Pin
alimohammed21-Jul-06 5:55
alimohammed21-Jul-06 5:55 
GeneralRe: Email sending in Win Application Pin
atuldeore21-Jul-06 6:01
atuldeore21-Jul-06 6:01 
AnswerRe: Email sending in Win Application Pin
Judah Gabriel Himango21-Jul-06 6:00
sponsorJudah Gabriel Himango21-Jul-06 6:00 
GeneralRe: Email sending in Win Application Pin
alimohammed21-Jul-06 6:06
alimohammed21-Jul-06 6:06 
QuestionDataset.LoadXml() Pin
moon_stick21-Jul-06 5:06
moon_stick21-Jul-06 5:06 
QuestionImplementing disabled text in a UserControl ? [modified] Pin
LongRange.Shooter21-Jul-06 4:36
LongRange.Shooter21-Jul-06 4:36 
AnswerRe: Implementing disabled text in a UserControl ? Pin
atuldeore21-Jul-06 5:32
atuldeore21-Jul-06 5:32 
Questionlistbox sort by dates with dd.mm.yyyy format Pin
fracalifa21-Jul-06 4:17
fracalifa21-Jul-06 4:17 
AnswerRe: listbox sort by dates with dd.mm.yyyy format Pin
Andrew Rissing21-Jul-06 4:33
Andrew Rissing21-Jul-06 4:33 
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 

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.