Point in a window

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

    #1

    Point in a window

    I have a Child Window with controls on it

    On one control (Textbox) next to it is a button (datagridview on another
    form
    when the button is clicked i want to place this
    pop up window under the Textbox Control

    any Examples
    Thanks DaveL


  • cfps.Christian

    #2
    Re: Point in a window

    Well if you know which textbox you're clicking you can use:

    Point winPoint = Point.Empty;
    winPoint.X = textbox1.Locati on.X;
    winPoint.Y = textbox1.Locati on.Y + textbox1.Height ;

    newWindow.Locat ion = this.PointToScr eenPoint(winPoi nt);

    Comment

    • daveL

      #3
      Re: Point in a window

      thanks alot , i'll try it out
      its a custom control with a Textbox and a button
      i want to show the datagridview window porton
      under the TextBox

      thanks again
      DaveL

      "cfps.Christian " <ge0193387@otc. eduwrote in message
      news:339647c5-b74e-45f2-8c0b-6f854dea726d@t4 2g2000hsg.googl egroups.com...
      Well if you know which textbox you're clicking you can use:
      >
      Point winPoint = Point.Empty;
      winPoint.X = textbox1.Locati on.X;
      winPoint.Y = textbox1.Locati on.Y + textbox1.Height ;
      >
      newWindow.Locat ion = this.PointToScr eenPoint(winPoi nt);

      Comment

      • daveL

        #4
        Re: Point in a window

        Worked Perfect, thank you

        DaveL

        "cfps.Christian " <ge0193387@otc. eduwrote in message
        news:339647c5-b74e-45f2-8c0b-6f854dea726d@t4 2g2000hsg.googl egroups.com...
        Well if you know which textbox you're clicking you can use:
        >
        Point winPoint = Point.Empty;
        winPoint.X = textbox1.Locati on.X;
        winPoint.Y = textbox1.Locati on.Y + textbox1.Height ;
        >
        newWindow.Locat ion = this.PointToScr eenPoint(winPoi nt);

        Comment

        Working...