473,418 Members | 2,295 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

Open a form upper right corner

Roy
Hi all,

I need to open a form in the uppper righ of the screen. My approach is:
create a function that returns Width of user's machine resolution:

dim x as integer = GetWidthOfUsersMonitorResolution
dim widthOfform as integer = 400 'Widh of my form
and then
Me.Location = New System.Drawing.Point(x-y, 0)

Does the approach make sense? If so, How should I get the width of user's
resolution.
Or there is a better way that I'm unaware.
Thanks in advance
Roy
Nov 23 '05 #1
2 5182
The following should work:
Me.Location = New
Point(System.Windows.Forms.Screen.PrimaryScreen.Wo rkingArea.Width - Me.Width,
0)

You might need to look in a bit more details if your running on 2 screens!
"Roy" wrote:
Hi all,

I need to open a form in the uppper righ of the screen. My approach is:
create a function that returns Width of user's machine resolution:

dim x as integer = GetWidthOfUsersMonitorResolution
dim widthOfform as integer = 400 'Widh of my form
and then
Me.Location = New System.Drawing.Point(x-y, 0)

Does the approach make sense? If so, How should I get the width of user's
resolution.
Or there is a better way that I'm unaware.
Thanks in advance
Roy

Nov 23 '05 #2
Roy
Thanks Simon, it worked just perfect.

"Simon" wrote:
The following should work:
Me.Location = New
Point(System.Windows.Forms.Screen.PrimaryScreen.Wo rkingArea.Width - Me.Width,
0)

You might need to look in a bit more details if your running on 2 screens!
"Roy" wrote:
Hi all,

I need to open a form in the uppper righ of the screen. My approach is:
create a function that returns Width of user's machine resolution:

dim x as integer = GetWidthOfUsersMonitorResolution
dim widthOfform as integer = 400 'Widh of my form
and then
Me.Location = New System.Drawing.Point(x-y, 0)

Does the approach make sense? If so, How should I get the width of user's
resolution.
Or there is a better way that I'm unaware.
Thanks in advance
Roy

Nov 23 '05 #3

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

Similar topics

2
by: fleemo17 | last post by:
I thought this would be very simple to set up in CSS, but I'm having difficulty making it work in several browsers. I'd simply like to have an image float at the upper right hand corner of my web...
3
by: Tom | last post by:
I have a small window that I want positioned at the lower right of an open MDI window. I know how to size it and place it (via .Left and .Top during the form load event) but what I can't figure out...
3
by: K.Kishore | last post by:
Hi all, When iam clicking 'X' option it is asking a popup to save or No. I am selecting "No" (Since I dont want to save) But i want it not tosave without prompting. For this the following code i...
2
by: J Rice | last post by:
Hi, I'm trying to work out how to float a <divbox in the lower right corner of a paragraph. I have no trouble getting it to work in the upper right or upper left corners and having the text wrap...
4
by: Andre Majorel | last post by:
How do you align an <imgagainst the bottom-right corner of an enclosing block so that the text in the block flows around it ? <!-- Block begins here --> <p> En ce qui concerne la conjoncture...
1
by: Zabto | last post by:
Hola All, I've got two questions: 1. What are the buttons on the top right corner of a windows form called? (Minimize, maximize, close.) 2. How do I bastardize the form and put my own help...
2
nev
by: nev | last post by:
I would like to display a msgbox if the user clicks the upper-leftcorner of the dgv. I was wondering if the upper-left corner has its own event like column/row headers have columnheadermouseclick or...
2
by: JB | last post by:
Hi All, I'd like to display a "resize handle" in the bottom right corner of a form like in the windows explorer for instance (the 3 diagonal lines in the corner). Can anybody tell me how to do...
11
by: Simon van Beek | last post by:
Dear reader, By opening an application I get always the main Access window with the closing cross in the above right corner. Is there a possibility to make this closing cross invisible? ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
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...

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.