473,893 Members | 1,640 Online
Bytes | Software Development & Data Engineering Community
+ 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.Heigh t

Me.SetDesktopBo unds(0, 0, 0, 0)

'Me.SetDesktopL ocation(0, 0)

'Me.Top = CInt(MdiParent. ClientSize.Heig ht)

'Me.Top = CInt(Screen.Pri maryScreen.Boun ds.Height)
Nov 20 '05 #1
12 4617
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******** *******@TK2MSFT NGP11.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.Heigh t

Me.SetDesktopBo unds(0, 0, 0, 0)

'Me.SetDesktopL ocation(0, 0)

'Me.Top = CInt(MdiParent. ClientSize.Heig ht)

'Me.Top = CInt(Screen.Pri maryScreen.Boun ds.Height)

Nov 20 '05 #2
Hi,

Dim frm As New Form1

frm.MdiParent = Me
frm.Width = Me.ClientSize.W idth - 5
frm.Height = Me.ClientSize.H eight - 25
Ken
----------------
"Paul Mars" <pa************ @netzero.com> wrote in message
news:OE******** *******@TK2MSFT NGP11.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.Heigh t

Me.SetDesktopBo unds(0, 0, 0, 0)

'Me.SetDesktopL ocation(0, 0)

'Me.Top = CInt(MdiParent. ClientSize.Heig ht)

'Me.Top = CInt(Screen.Pri maryScreen.Boun ds.Height)

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

Me.Top = CInt(MdiParent. ClientSize.Heig ht)
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.Hei ght - 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***********@ SPAMsympaticoPL EASE.ca> wrote in message
news:e$******** ********@TK2MSF TNGP12.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******** *******@TK2MSFT NGP11.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.Heigh t

Me.SetDesktopBo unds(0, 0, 0, 0)

'Me.SetDesktopL ocation(0, 0)

'Me.Top = CInt(MdiParent. ClientSize.Heig ht)

'Me.Top = CInt(Screen.Pri maryScreen.Boun ds.Height)


Nov 20 '05 #4
Hi,

Dim frm As New Form1

frm.MdiParent = Me
frm.Width = Me.ClientSize.W idth - 5
frm.Height = Me.ClientSize.H eight - 25
Ken
----------------
"Paul Mars" <pa************ @netzero.com> wrote in message
news:OE******** *******@TK2MSFT NGP11.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.Heigh t

Me.SetDesktopBo unds(0, 0, 0, 0)

'Me.SetDesktopL ocation(0, 0)

'Me.Top = CInt(MdiParent. ClientSize.Heig ht)

'Me.Top = CInt(Screen.Pri maryScreen.Boun ds.Height)

Nov 20 '05 #5
in my project
MDIParent.Clien tSize.Height - 100 or
Screen.PrimaryS creen.Bounds.He ight - 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***@bellsout h.net> wrote in message
news:eo******** ******@TK2MSFTN GP11.phx.gbl...
Hi,

Dim frm As New Form1

frm.MdiParent = Me
frm.Width = Me.ClientSize.W idth - 5
frm.Height = Me.ClientSize.H eight - 25
Ken
----------------
"Paul Mars" <pa************ @netzero.com> wrote in message
news:OE******** *******@TK2MSFT NGP11.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.Heigh t

Me.SetDesktopBo unds(0, 0, 0, 0)

'Me.SetDesktopL ocation(0, 0)

'Me.Top = CInt(MdiParent. ClientSize.Heig ht)

'Me.Top = CInt(Screen.Pri maryScreen.Boun ds.Height)


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

Me.Top = CInt(MdiParent. ClientSize.Heig ht)
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.Hei ght - 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.Clien tSize.Height - 100 or
Screen.PrimaryS creen.Bounds.He ight - 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***@bellsout h.net> wrote in message
news:eo******** ******@TK2MSFTN GP11.phx.gbl...
Hi,

Dim frm As New Form1

frm.MdiParent = Me
frm.Width = Me.ClientSize.W idth - 5
frm.Height = Me.ClientSize.H eight - 25
Ken
----------------
"Paul Mars" <pa************ @netzero.com> wrote in message
news:OE******** *******@TK2MSFT NGP11.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.Heigh t

Me.SetDesktopBo unds(0, 0, 0, 0)

'Me.SetDesktopL ocation(0, 0)

'Me.Top = CInt(MdiParent. ClientSize.Heig ht)

'Me.Top = CInt(Screen.Pri maryScreen.Boun ds.Height)


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

Me.Top = CInt(MdiParent. ClientSize.Heig ht)
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.Hei ght - 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*******@free net.de> wrote in message
news:40******** *************** @news.freenet.d e...

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

Nov 20 '05 #10

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

Similar topics

16
11898
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. I can do this individually for each graph but this does not help me as I need both on the same JPEG. I thought I would try an export the form that contains both but I am having trouble. (My VBA is self taught and a little knowledge is...
2
325
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. menu, toolbar, status bar. Dim x As Integer = MdiParent.Height Me.SetDesktopBounds(0, 0, 0, 0)
14
3443
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
4317
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 in \anmeldung2.cfm: line 404
14
1815
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 I have an "area" like above, Bevs, Grill, Chicken... In my menu items I have an ID from the area so, table areas id 1 areaname beverages id 2 areaname grill
1
3053
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 yes initialsize 64 M increasesize 64 M maxsize 2 G no extent size 16 prefetchsize 16 bufferpool test_bp1 file system caching dropped table recovery on so, the number of pages should be (initialsize/pagesize)= (64 MB /16 K) = 4096 pages ========
0
9832
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
10927
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
10469
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
9645
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8022
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
5858
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...
0
6066
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4684
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
2
4280
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.