Click here to Skip to main content
15,845,681 members
Home / Discussions / C#
   

C#

 
GeneralRe: opacity of a mdichild Pin
Henry Minute5-May-10 2:31
Henry Minute5-May-10 2:31 
AnswerRe: opacity of a mdichild Pin
Peace ON5-May-10 2:35
Peace ON5-May-10 2:35 
QuestionCRC error control Pin
toto_20105-May-10 0:02
toto_20105-May-10 0:02 
AnswerRe: CRC error control Pin
toto_20105-May-10 1:25
toto_20105-May-10 1:25 
AnswerRe: CRC error control Pin
Eddy Vluggen5-May-10 2:00
professionalEddy Vluggen5-May-10 2:00 
QuestionI have a little problem with my application. Pin
Alex Manolescu4-May-10 22:41
Alex Manolescu4-May-10 22:41 
AnswerRe: I have a little problem with my application. Pin
OriginalGriff4-May-10 23:14
mveOriginalGriff4-May-10 23:14 
GeneralRe: I have a little problem with my application. Pin
Alex Manolescu4-May-10 23:37
Alex Manolescu4-May-10 23:37 
Thank you for you're quick reply! Smile | :)
I've read about pictureBox and see that isn't a container. So it was a foolish from me to try adding a user control to a pictureBox control.

I've tryed to Refresh()/Invalidate() + Update() method(s) when I move one of the user control, but the result is still the same.

To be more clear, see my code:

DesenTabel t1, t2;

private void AddUserControls()
{
  t1 = new DesenTabel();
  t2 = new DesenTabel();

  this.Controls.Add(t1);
  this.Controls.Add(t2);
}


private void Form_Paint(object sender, PaintEventArgs e)
{
  // here I draw the line
  e.Graphics.DrawLine(new Pen(new SolidBrush(Color.Black)), t1.Location, t2.Location);
}

private void t1_Move(object sender, EventArgs e)
{
  // this.Refresh() is equivalent to: 

  this.Invalidate();
  this.Update();
}

private void t2_Move(object sender, EventArgs e)
{
  // this.Refresh() is equivalent to: 

  this.Invalidate();
  this.Update();
}



The line isn't drawing well. It intrerupts on the way of linking the two tables because of the redraw!
How can I get rid of this problem ?

Thank you!
Alex M.

GeneralRe: I have a little problem with my application. Pin
OriginalGriff4-May-10 23:58
mveOriginalGriff4-May-10 23:58 
GeneralRe: I have a little problem with my application. Pin
Alex Manolescu5-May-10 0:07
Alex Manolescu5-May-10 0:07 
GeneralRe: I have a little problem with my application. Pin
Som Shekhar4-May-10 23:40
Som Shekhar4-May-10 23:40 
GeneralRe: I have a little problem with my application. Pin
Alex Manolescu5-May-10 10:14
Alex Manolescu5-May-10 10:14 
GeneralRe: I have a little problem with my application. Pin
Som Shekhar5-May-10 10:16
Som Shekhar5-May-10 10:16 
Questionread and write in file Pin
tek 20094-May-10 22:36
tek 20094-May-10 22:36 
AnswerRe: read and write in file Pin
Abhinav S4-May-10 23:19
Abhinav S4-May-10 23:19 
QuestionRe: read and write in file Pin
tek 20094-May-10 23:38
tek 20094-May-10 23:38 
AnswerRe: read and write in file Pin
Abhinav S5-May-10 0:29
Abhinav S5-May-10 0:29 
AnswerRe: read and write in file Pin
riced5-May-10 1:11
riced5-May-10 1:11 
GeneralRe: read and write in file Pin
tek 20095-May-10 4:49
tek 20095-May-10 4:49 
QuestionNeed help in regex replace method. Pin
Rohit16db4-May-10 22:15
Rohit16db4-May-10 22:15 
AnswerRe: Need help in regex replace method. Pin
OriginalGriff4-May-10 23:39
mveOriginalGriff4-May-10 23:39 
GeneralRe: Need help in regex replace method. Pin
Rohit16db5-May-10 2:40
Rohit16db5-May-10 2:40 
GeneralRe: Need help in regex replace method. Pin
OriginalGriff5-May-10 4:54
mveOriginalGriff5-May-10 4:54 
QuestionHow to retrive message list from p2p Pin
Saiyed Alam4-May-10 21:56
Saiyed Alam4-May-10 21:56 
QuestionListBox Controls Pin
Illegal Operation4-May-10 21:22
Illegal Operation4-May-10 21:22 

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.