473,624 Members | 2,346 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Get Form position on screen

Hi all

Is there a way in which I can get the Form's position on the screen in
pixels? I am having to position another form in relation to an MDI Child
form, so I cannot use the Location property, because the MDI Child is
usually 0,0 (Top left in the parent container) so if I position my other
form in that location it goes to the top left of the entire screen. I have
tried using the overloaded ShowDialog method to make the MDI Child form the
parent of my other form and set the StartPosition to CenterParent, but this
does not work, it places the form in the centre of the screen. Anyway, I
don't want it to be exactly in the middle, so I do need to set it manually.

What I would like is simply a way of finding out where on the screen,
regardless of who owns the form, a particular form's position is.

Kind Regards,
Steve
Jul 21 '05 #1
0 2162

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

Similar topics

1
2454
by: Scott M | last post by:
Hi, I am writing a small game that is using a form 800 * 600. The form can be scrolled vertically up to a height of 1200 (basically the form can be scrolled down one screen vertically). The user controls a picturebox (my sprite) with the cursor keys When the sprite hits the y value of 600 the screen scrolls down to display the bottom part of the screen (by focusing on a hidden
16
3181
by: Picho | last post by:
Hi all, Is there any .NET way (I am not rulling out API usage) to add button(s) to a form's title bar? I found some non-.NET solutions that did actually work in VB6 but not in the ..NET forms... I tried painting, but the paintaing area provided by the form is only the client area - no visible way to paint on the title bar.
4
9393
by: John | last post by:
Hi I have a small pop non-dialog form that I need to appear towards the right side of the screen. Is there a way to achieve this? Regards
11
18828
by: Jozef | last post by:
I have some old code that I use from the Access 95 Developers handbook. The code works very well, with the exception that it doesn't seem to recognize wide screens, and sizes tab controls so that they are too big and wind up covering up some of the fields on the main form. Is there any good code out there that works in a similar fashion that will also either a) stretch the form width wise on widescreens or b), rely on height rather than...
0
2239
by: 23s | last post by:
Is there any way I can send a vertical value to a form's scroll position? I have a full-screen form that, at launch, contains an empty tab sheet. At run time, the user can dynamically append a rich textbox to the tab sheet. The rich textbox is placed at 0,0 (upper left corner) within the tab sheet and is initially 1 "line" tall to accomodate the user's first line of text. The rich text box is, in actuality, a user control of mine...
2
1981
by: Oenone | last post by:
In VB6 I used to use the Load event of a Form to set its position on the screen (based on wherever the user put the form the last time they used it). This was ideal as it fired before the form became visible. Since moving to VB.NET I'm finding that the Form is already displayed on screen when the Load method executes. This means that I get a slight but noticeable flicker when the form is first opened, as it moves from the default...
0
539
by: Steve | last post by:
Hi all Is there a way in which I can get the Form's position on the screen in pixels? I am having to position another form in relation to an MDI Child form, so I cannot use the Location property, because the MDI Child is usually 0,0 (Top left in the parent container) so if I position my other form in that location it goes to the top left of the entire screen. I have tried using the overloaded ShowDialog method to make the MDI Child form...
14
3411
by: Galen Somerville | last post by:
My current screen resolution is set to 1024 x 768. My form size always comes up as 1032 x 748. I have tried the help sample ' Retrieve the working rectangle from the Screen class ' using the PrimaryScreen and the WorkingArea properties. Dim workingRectangle As System.Drawing.Rectangle = _ Screen.PrimaryScreen.WorkingArea ' Set the size of the form slightly less than size of
3
55943
by: Andrew Hall | last post by:
Hi all Can anyone advise how to get the position of an open form and how to set the position of an opening form within the access window. I have: MA Access97 (because I do not have the funds to obtain a more recent version nor the time to learn the new interface) Form1 and form2. Both forms are an identical size because of the length of the captions of the controls on the forms.
0
8233
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
8170
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,...
1
8334
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
8474
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
5561
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
4173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2604
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
1784
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1482
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.