How to solve the double screen problem?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ygy

    How to solve the double screen problem?

    Hi,I want to make a control.It is made of a label(show the data) ,a
    image(as button) and a trackbar(change the label value).When i click the
    image,the trackbar show under the label.My control is like the
    numericUpDown,a nd i add a image button ,click the button,show the trackbar.I
    can use the trackbar to change the value of the label.I use the code to
    confirm the location of the trackbar:
    (The TrackFormCtrl is a form class which contains a trackbar.)

    trackForm = new TrackFormCtrl() ;

    int X1=this.Parent. PointToScreen(t his.Location).X ;
    int W1=Screen.FromC ontrol(this).Wo rkingArea.Width ;
    trackForm.Locat ion = this.Parent.Poi ntToScreen(new Point(this.Left ,
    this.Bottom));

    if (X1+trackForm.W idth>W1)
    trackForm.Locat ion = new Point(W1 - trackForm.Width - 5,
    trackForm.Locat ion.Y);


    When I use double screen,and drag the label and the image button from the
    first screen to the second screen,click the image button,but the trackbar
    show in the origin screen.I need the trackbar showing in the screen under
    the label.How should i do?
    Thank you!


Working...