473,987 Members | 48,882 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form positionning top left

Hi,

When creating a form, how can we set its property .left and .top to be
handled when the form is showed. Because, if I first assign values to
..left and .top, and secondly I call .show(), then the form does not
display at the correct screen location.

ex:
System.windows. forms.form myForm = new System.windows. forms.form();
myForm.left = 200;
myForm.top = 200;
myForm.show();
//The form does NOT appear at specified screen coordinate.

ex:
System.windows. forms.form myForm = new System.windows. forms.form();
myForm.show();
myForm.left = 200;
myForm.top = 200;
//The form does appear at specified screen coordinate and the user can
see the form's initial position, then reappear to the .left and .top
coordinate.

Any idea?

Thank you,
Marty
Nov 17 '05 #1
2 4833
Here are some things to check:

1. Ensure that the "StartPosit ion" property of the form is set to "Manual".

2. You didn't say wehre you have this code. If it's in Form_Load and not
working then try placing into the constructor instead.

--
Robert W.
Vancouver, BC
www.mwtech.com

"Marty" wrote:
Hi,

When creating a form, how can we set its property .left and .top to be
handled when the form is showed. Because, if I first assign values to
..left and .top, and secondly I call .show(), then the form does not
display at the correct screen location.

ex:
System.windows. forms.form myForm = new System.windows. forms.form();
myForm.left = 200;
myForm.top = 200;
myForm.show();
//The form does NOT appear at specified screen coordinate.

ex:
System.windows. forms.form myForm = new System.windows. forms.form();
myForm.show();
myForm.left = 200;
myForm.top = 200;
//The form does appear at specified screen coordinate and the user can
see the form's initial position, then reappear to the .left and .top
coordinate.

Any idea?

Thank you,
Marty

Nov 17 '05 #2
Thank you Robert,
the "Manual" worked just fine :)
Marty

Robert W. wrote:
Here are some things to check:

1. Ensure that the "StartPosit ion" property of the form is set to "Manual".

2. You didn't say wehre you have this code. If it's in Form_Load and not
working then try placing into the constructor instead.

Nov 17 '05 #3

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

Similar topics

2
2657
by: Kiteman - Canada | last post by:
Is there an event triggered when a form is dragged by its titlebar? I have two forms on screen - the main form is draggable and I need the secondary form to automatically reposition itself adjacent to the main form if the main form is relocated. Tom
4
4314
by: Eric | last post by:
Hey Everyone.. I have a form that has approximately 7 text fields and 1 checkbox. Generally when this form is submitted(to itself BTW) it works fine, however, when the checkbox is only field that has been modified/clicked the form doesn't always submit. When it does work, a Stored procedure is passed form variables and updates to the db are made. When it doesn't, its as if the form wasn't submitted, it reloads and resets the page, but...
15
2006
by: seajay | last post by:
Hello, I've designed a website with using any tables, everything is postionned using css, content goes into divs. However I've noticed that the website looks different across browsers. I would like to know how to invoid this without having to include a CSS for every browser. Here's a link to the page http://www.myexersize.com/biography/
1
1018
by: Sam | last post by:
Hi, When I load my form my scrollbar is always positionned automatically at the bottom for some reasons... How can I force it to be always at the top? Thx
2
1233
by: Sam | last post by:
Hi, When I load my form my scrollbar is always positionned automatically at the bottom for some reasons... top? I've used user32.dll: Private Const SB_VERT As Integer = 1
1
1778
Chrisjc
by: Chrisjc | last post by:
I am currently working on a form I need a few things from this form. First of all here is the link to what I have so far... ( http://www.triplesource.net/php/Decal%20Offer.html ) And posted below is the code for ( submit.php ) Now the first part of the form is just a HTML page with an action pointing to ( SUBMIT.php ) Now a problem I am having is one the e-mailing... the whole form to me... but also befor that I think I should say I have * as...
5
1450
by: Sylvain Chevillard | last post by:
Hello. I observed something strange in Firefox which let me study precisely the section 10.3.7 of the specifications of CSS2 and I have a question about it. The specifications refer to a special value "static-position" which is defined as the value a hypothetical box would have when positionned with "static" argument. But the position of such a hypothetical box depends on some properties
6
6209
ak1dnar
by: ak1dnar | last post by:
I have created HTML form and a Java script to validate the form. Here is my requirement. When user select one from any list menu others should set to ALL. Its working here but the problem is we will say that user will first select one from Brand as IBM then he will select Type as Laptop. then what will happen again brand will set to All. I need to avoid happening this.. again i want to repeat the same for all the other menus. please be...
2
4467
by: punitshrivastava | last post by:
Hi to All. I am Punit Shrivastava.I am working in Asp.As i am new in this technology please help me. I want to create enquiry form in Asp. For this i code like this: <form name="enquiry" method="post" action="enquiry.php"> <table width="494" border="0" cellspacing="0" cellpadding="2" height="511"> <tr> <td colspan="2" align="left" valign="top" height="29"> <p align="left"><font face="Verdana" color="#FFFFFF">Fields...
0
10222
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11485
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11700
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10981
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...
1
8532
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
7688
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
6490
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4817
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3820
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.