472,958 Members | 2,153 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 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 5153
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: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.