473,608 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Nov 15 '05 #1
4 18283
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" <00*@000.com> wrote in message
news:7b******** *************** *********@4ax.c om...
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

Nov 15 '05 #2
Frank Drebin <no*****@imsick ofspam.com> wrote in message
news:m2******** **************@ newssvr28.news. prodigy.com...
When you have the form in designer view - set the top in left in the
properties box - and see what code it changes..

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.
Nov 15 '05 #3
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" <00*@000.com> wrote in message
news:7b******** *************** *********@4ax.c om...
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

Nov 15 '05 #4

mia lanui <mi**@email.com > wrote in message
news:fh******** *********@nwrdn y02.gnilink.net ...
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()


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

Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2545
by: rob | last post by:
Hiya, I am having a problem of getting the position of the cursor in a microsoft forms 2.0 box. I need the position + linenumber. I am making a simple text editor which supports unicode. Does anyone knows how to do it ? Thanx in advance
10
7839
by: John | last post by:
I have a table with two rows. On the first row is a text box and in the second row is an image. I have set the table cellpadding to 0 and cellspacing to 0. The table is leaving extra spaces in the rows on the top and bottom of the picture and image. I need to make the height of the rows to be the same as the textbox and image. How do I do this? I have tried even setting the height of the table and all the <td> and <tr> tags to 1 but have...
39
5657
by: Zak McGregor | last post by:
Hi all Are there any good solutions to aligning form field names and input boxes without resorting to tables? I am struggling to do this nicely at the moment. Thanks Ciao Zak
3
2141
by: max | last post by:
I can generate this error by NOT assigning a tableName to the view: at System.Windows.Forms.DataGrid.AddNewRow() at System.Windows.Forms.DataGridAddNewRow.OnEdit() Is there any possibility of getting an event from the AddNewRow()? I would like to make some changes to the row prior to the user typing in the DataGrid. Thanks,
2
1738
by: Richard Walters | last post by:
hi guys (and girls), Does anyone know how, and indeed if possible to save a forms positions when closed. I have a small Access application and find it annoying having to move the forms into the right positions on the screen, only to have to do it again when the form is reloaded. Is there anyway to save the position of the form so that it opens in the same location the next time, maybe by storing the position references anywhere. Many...
2
3624
by: Richard Walters | last post by:
hi guys (and girls), Does anyone know if there is a way to save the position of a form at runtime. I am developing a small access application and the forms keep reappearing in the preset position not where the users move them to. I know you can change the centre property, move the form and then save it and it will reopen in that position, but I would like to allow the users to choose the locations of their forms. Is there a way of coding...
6
1771
by: salmobytes | last post by:
After a javascript-generated post event (this is a post, not ajax messaging) the current screen has to be redrawn. But on *long forms* (longer than a single screen) then the current screen positioning is lost, and the current form ends up redrawn, with a different vertical positioning--after the post event. However, If I sent the x,y mouse position as post parameters, and if the current widget (that generated the post) had
3
2285
by: tomb | last post by:
I wasn't sure which of these 2 groups is the right one to post to, so please excuse the duplicate post. Does anyone know how to resolve this? I can't figure this out. In my web site I have 3 forms for data input. One of the forms shows the cursor blinking, but the other 2 do not. I found that the 2 forms in question are using a position:absolute style, and the 1 form does not. When I remove that style item the forms work fine. I...
5
1214
vdraceil
by: vdraceil | last post by:
My form layout window(vb6.0) doesnt show any forms in it,but i want to position my forms..is there any settings i should change?or is there any alternative to position my forms(by coding)?
5
3997
by: ankit1999 | last post by:
I have a problem, everytime i'm run this page http://click2travel.in/index.php i get the this error,,,
0
8059
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8495
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8330
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6815
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6011
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5475
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4023
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2474
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1589
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.