473,473 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

form useable area

How can I get the useable dimensions or coordinates of the working area of a
form?

All that I can find return the monitor screen area, but I need the usable
area inside the open form. Not incl. menu, toolbar, status bar.
Dim x As Integer = MdiParent.Height

Me.SetDesktopBounds(0, 0, 0, 0)

'Me.SetDesktopLocation(0, 0)

'Me.Top = CInt(MdiParent.ClientSize.Height)

'Me.Top = CInt(Screen.PrimaryScreen.Bounds.Height)
Nov 20 '05 #1
12 4570
Did you look at Form.ClientSize ?

The rest is basics - usable area starts at (0,0) and up to Width-1 and
Height-1.

HTH
Alex

"Paul Mars" <pa************@netzero.com> wrote in message
news:OE***************@TK2MSFTNGP11.phx.gbl...
How can I get the useable dimensions or coordinates of the working area of a form?

All that I can find return the monitor screen area, but I need the usable
area inside the open form. Not incl. menu, toolbar, status bar.
Dim x As Integer = MdiParent.Height

Me.SetDesktopBounds(0, 0, 0, 0)

'Me.SetDesktopLocation(0, 0)

'Me.Top = CInt(MdiParent.ClientSize.Height)

'Me.Top = CInt(Screen.PrimaryScreen.Bounds.Height)

Nov 20 '05 #2
Hi,

Dim frm As New Form1

frm.MdiParent = Me
frm.Width = Me.ClientSize.Width - 5
frm.Height = Me.ClientSize.Height - 25
Ken
----------------
"Paul Mars" <pa************@netzero.com> wrote in message
news:OE***************@TK2MSFTNGP11.phx.gbl...
How can I get the useable dimensions or coordinates of the working area of
a
form?

All that I can find return the monitor screen area, but I need the usable
area inside the open form. Not incl. menu, toolbar, status bar.
Dim x As Integer = MdiParent.Height

Me.SetDesktopBounds(0, 0, 0, 0)

'Me.SetDesktopLocation(0, 0)

'Me.Top = CInt(MdiParent.ClientSize.Height)

'Me.Top = CInt(Screen.PrimaryScreen.Bounds.Height)

Nov 20 '05 #3
yes and that does not work.

Me.Top = CInt(MdiParent.ClientSize.Height)
puts the Me form down below the visible bottom of screen, so then user needs
to scroll to see it. And
Me.Top = CInt((MdiParent.ClientSize.Height - Size.Height) / 2)

puts the Me form below the middle of useable form screen area.

Both these will work for setting the first form on my screen, but setting a
child form inside a parent is not working.

P
"AlexS" <sa***********@SPAMsympaticoPLEASE.ca> wrote in message
news:e$****************@TK2MSFTNGP12.phx.gbl...
Did you look at Form.ClientSize ?

The rest is basics - usable area starts at (0,0) and up to Width-1 and
Height-1.

HTH
Alex

"Paul Mars" <pa************@netzero.com> wrote in message
news:OE***************@TK2MSFTNGP11.phx.gbl...
How can I get the useable dimensions or coordinates of the working area of
a
form?

All that I can find return the monitor screen area, but I need the

usable area inside the open form. Not incl. menu, toolbar, status bar.
Dim x As Integer = MdiParent.Height

Me.SetDesktopBounds(0, 0, 0, 0)

'Me.SetDesktopLocation(0, 0)

'Me.Top = CInt(MdiParent.ClientSize.Height)

'Me.Top = CInt(Screen.PrimaryScreen.Bounds.Height)


Nov 20 '05 #4
Hi,

Dim frm As New Form1

frm.MdiParent = Me
frm.Width = Me.ClientSize.Width - 5
frm.Height = Me.ClientSize.Height - 25
Ken
----------------
"Paul Mars" <pa************@netzero.com> wrote in message
news:OE***************@TK2MSFTNGP11.phx.gbl...
How can I get the useable dimensions or coordinates of the working area of
a
form?

All that I can find return the monitor screen area, but I need the usable
area inside the open form. Not incl. menu, toolbar, status bar.
Dim x As Integer = MdiParent.Height

Me.SetDesktopBounds(0, 0, 0, 0)

'Me.SetDesktopLocation(0, 0)

'Me.Top = CInt(MdiParent.ClientSize.Height)

'Me.Top = CInt(Screen.PrimaryScreen.Bounds.Height)

Nov 20 '05 #5
in my project
MDIParent.ClientSize.Height - 100 or
Screen.PrimaryScreen.Bounds.Height - 180

either one works. I just thought that there would(should) be a way to return
the useable open space. I guess not. This still works if I change
resolution. I hope that it works on different computers.

Paul

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:eo**************@TK2MSFTNGP11.phx.gbl...
Hi,

Dim frm As New Form1

frm.MdiParent = Me
frm.Width = Me.ClientSize.Width - 5
frm.Height = Me.ClientSize.Height - 25
Ken
----------------
"Paul Mars" <pa************@netzero.com> wrote in message
news:OE***************@TK2MSFTNGP11.phx.gbl...
How can I get the useable dimensions or coordinates of the working area of a
form?

All that I can find return the monitor screen area, but I need the usable area inside the open form. Not incl. menu, toolbar, status bar.
Dim x As Integer = MdiParent.Height

Me.SetDesktopBounds(0, 0, 0, 0)

'Me.SetDesktopLocation(0, 0)

'Me.Top = CInt(MdiParent.ClientSize.Height)

'Me.Top = CInt(Screen.PrimaryScreen.Bounds.Height)


Nov 20 '05 #6
"Paul Mars" <pa************@netzero.com> schrieb
yes and that does not work.

Me.Top = CInt(MdiParent.ClientSize.Height)
puts the Me form down below the visible bottom of screen, so then
user needs to scroll to see it. And
Me.Top = CInt((MdiParent.ClientSize.Height - Size.Height) / 2)

puts the Me form below the middle of useable form screen area.

Both these will work for setting the first form on my screen, but
setting a child form inside a parent is not working.

What's your intention? Where do you want to move the child to?
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #7
in my project
MDIParent.ClientSize.Height - 100 or
Screen.PrimaryScreen.Bounds.Height - 180

either one works. I just thought that there would(should) be a way to return
the useable open space. I guess not. This still works if I change
resolution. I hope that it works on different computers.

Paul

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:eo**************@TK2MSFTNGP11.phx.gbl...
Hi,

Dim frm As New Form1

frm.MdiParent = Me
frm.Width = Me.ClientSize.Width - 5
frm.Height = Me.ClientSize.Height - 25
Ken
----------------
"Paul Mars" <pa************@netzero.com> wrote in message
news:OE***************@TK2MSFTNGP11.phx.gbl...
How can I get the useable dimensions or coordinates of the working area of a
form?

All that I can find return the monitor screen area, but I need the usable area inside the open form. Not incl. menu, toolbar, status bar.
Dim x As Integer = MdiParent.Height

Me.SetDesktopBounds(0, 0, 0, 0)

'Me.SetDesktopLocation(0, 0)

'Me.Top = CInt(MdiParent.ClientSize.Height)

'Me.Top = CInt(Screen.PrimaryScreen.Bounds.Height)


Nov 20 '05 #8
"Paul Mars" <pa************@netzero.com> schrieb
yes and that does not work.

Me.Top = CInt(MdiParent.ClientSize.Height)
puts the Me form down below the visible bottom of screen, so then
user needs to scroll to see it. And
Me.Top = CInt((MdiParent.ClientSize.Height - Size.Height) / 2)

puts the Me form below the middle of useable form screen area.

Both these will work for setting the first form on my screen, but
setting a child form inside a parent is not working.

What's your intention? Where do you want to move the child to?
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #9
1 - minimize a child form to lower left. There is a minimize method, but it
is not working.

2 - A child is displayed in center of Parent, then it is made larger. When
it is made larger, I want it still center of Parent. Then it is made smaller
again and it needs to be re-centered.

paul

"Armin Zingler" <az*******@freenet.de> wrote in message
news:40***********************@news.freenet.de...

What's your intention? Where do you want to move the child to?

Nov 20 '05 #10
1 - minimize a child form to lower left. There is a minimize method, but it
is not working.

2 - A child is displayed in center of Parent, then it is made larger. When
it is made larger, I want it still center of Parent. Then it is made smaller
again and it needs to be re-centered.

paul

"Armin Zingler" <az*******@freenet.de> wrote in message
news:40***********************@news.freenet.de...

What's your intention? Where do you want to move the child to?

Nov 20 '05 #11
"Paul Mars" <pa************@netzero.com> schrieb
1 - minimize a child form to lower left. There is a minimize method,
but it is not working.
I didn't find a Minimize method. Though, when I manually minimize the child,
it's located at the bottom left of the parent, as expected. This also works
when setting the minimized WindowState in code.
2 - A child is displayed in center of Parent, then it is made larger.
When it is made larger, I want it still center of Parent. Then it is
made smaller again and it needs to be re-centered.


This is done by

Me.Top = CInt((MdiParent.ClientSize.Height - Size.Height) / 2)

It works here. The only thing you have to subtract is a 4 pixel border not
covered by MDI child windows, so it's:

Me.Top = (MdiParent.ClientSize.Height - 4 - Size.Height) \ 2

Now it's centered (vertically). I'm not sure if it's always 4 pixels.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #12
"Paul Mars" <pa************@netzero.com> schrieb
1 - minimize a child form to lower left. There is a minimize method,
but it is not working.
I didn't find a Minimize method. Though, when I manually minimize the child,
it's located at the bottom left of the parent, as expected. This also works
when setting the minimized WindowState in code.
2 - A child is displayed in center of Parent, then it is made larger.
When it is made larger, I want it still center of Parent. Then it is
made smaller again and it needs to be re-centered.


This is done by

Me.Top = CInt((MdiParent.ClientSize.Height - Size.Height) / 2)

It works here. The only thing you have to subtract is a 4 pixel border not
covered by MDI child windows, so it's:

Me.Top = (MdiParent.ClientSize.Height - 4 - Size.Height) \ 2

Now it's centered (vertically). I'm not sure if it's always 4 pixels.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #13

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

Similar topics

16
by: David Lauberts | last post by:
Hi Wonder if someone has some words of wisdom. I have a access 2002 form that contains 2 graph objects that overlay each other and would like to export them as a JPEG to use in a presentation....
2
by: Paul Mars | last post by:
How can I get the useable dimensions or coordinates of the working area of a form? All that I can find return the monitor screen area, but I need the usable area inside the open form. Not incl....
14
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...
3
by: blackrunner | last post by:
ERROR in my Query?! ERROR: Element GESCHLECHT is undefined in FORM. i think everything ok. Maby somebody can help me here Element GESCHLECHT is undefined in FORM. The error occurred...
14
by: jmDesktop | last post by:
I have a food menu. Each area, like beverages, grill, etc. have items under them, Coke, Tea, Coffee would be under beverages for example. I want to add a new drink to beverages. In my database...
1
by: deshaipet | last post by:
Hi friends - I created a automatic storage tablespace with a pagesize of 16 K and initial size of 64 MB. create large tablespace test_tbsp1 pagesize 16k managed by automatic storage autoresize...
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
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,...
0
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,...
1
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...
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...
0
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...
0
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.