Forms Position

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Patrick De Ridder

    #1

    Forms Position

    I have a form1. From it I can select form2.
    Like so:

    DataIO MyIO = new DataIO;
    MyIO.Show();

    I want MyIO to appear in a certain position on form1.
    Say in position (0,0)

    Which line of code would do the job?

    MyIO.Location = new Point(0,0);

    does not do the job.

    Pleas help.



    ....
    Gato
  • Frank Drebin

    #2
    Re: Forms Position

    When you have the form in designer view - set the top in left in the
    properties box - and see what code it changes..

    "Patrick De Ridder" <000@000.com> wrote in message
    news:7b25kvg4vt qqt1uit7psbafkh pco0c2jc8@4ax.c om...[color=blue]
    > I have a form1. From it I can select form2.
    > Like so:
    >
    > DataIO MyIO = new DataIO;
    > MyIO.Show();
    >
    > I want MyIO to appear in a certain position on form1.
    > Say in position (0,0)
    >
    > Which line of code would do the job?
    >
    > MyIO.Location = new Point(0,0);
    >
    > does not do the job.
    >
    > Pleas help.
    >
    >
    >
    > ...
    > Gato[/color]


    Comment

    • Patrick De Ridder

      #3
      Re: Forms Position

      Frank Drebin <noemail@imsick ofspam.com> wrote in message
      news:m2w0b.2754 1$Vx2.12603503@ newssvr28.news. prodigy.com...[color=blue]
      > When you have the form in designer view - set the top in left in the
      > properties box - and see what code it changes..
      >[/color]
      I have been trying to interpret your instruction, but I am afraid it doesn't
      make sense to me. Sorry, could you be a little bit more specific, or
      rephrase your instruction? Many thanks.
      --
      Patrick.


      Comment

      • mia lanui

        #4
        Re: Forms Position

        Hi, there is a property on the Form, StartPosition.

        Example:

        Form f = new Form();
        f.StartPosition = FormStartPositi on.Manual;
        f.Location = new Point(100,100);
        f.Show()

        HTH


        "Patrick De Ridder" <000@000.com> wrote in message
        news:7b25kvg4vt qqt1uit7psbafkh pco0c2jc8@4ax.c om...[color=blue]
        > I have a form1. From it I can select form2.
        > Like so:
        >
        > DataIO MyIO = new DataIO;
        > MyIO.Show();
        >
        > I want MyIO to appear in a certain position on form1.
        > Say in position (0,0)
        >
        > Which line of code would do the job?
        >
        > MyIO.Location = new Point(0,0);
        >
        > does not do the job.
        >
        > Pleas help.
        >
        >
        >
        > ...
        > Gato[/color]


        Comment

        • Patrick De Ridder

          #5
          Re: Forms Position


          mia lanui <mial@email.com > wrote in message
          news:fhA0b.9792 $N37.1798@nwrdn y02.gnilink.net ...[color=blue]
          > Hi, there is a property on the Form, StartPosition.
          >
          > Example:
          >
          > Form f = new Form();
          > f.StartPosition = FormStartPositi on.Manual;
          > f.Location = new Point(100,100);
          > f.Show()[/color]

          That's great, thank you. Couldn't find it MSDN.
          --
          Patrick.



          Comment

          Working...