形成可用区域 [英] form useable area

查看:44
本文介绍了形成可用区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获得

表格的工作区域的可用尺寸或坐标?


我能找到的所有内容都会返回显示器屏幕区域,但我需要在开放表格中使用可用的

区域。不包括菜单,工具栏,状态栏。

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)

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)

推荐答案

你看过Form吗? ClientSize?


剩下的就是基础 - 可用区域从(0,0)开始,最高宽度为1,

高度-1。


HTH

Alex


" Paul Mars" < PA ************ @ netzero.com>在消息中写道

新闻:OE *************** @ TK2MSFTNGP11.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...
我怎样才能得到
a形式的工作区域的可用尺寸或坐标?

我能找到的所有东西都会返回显示器屏幕区域,但我需要在打开的窗体内部使用可用的
区域。不包括菜单,工具栏,状态栏。

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(屏幕.PrimaryScreen.Bounds.Height)
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)






Dim frm As New Form1


frm.MdiParent =我

frm.Width = Me.ClientSize.Width - 5

frm.Height = Me.ClientSize .Height - 25

Ken

----------------

" Paul Mars" < PA ************ @ netzero.com>在消息中写道

新闻:OE *************** @ 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...
我怎样才能得到
形式的工作区域的可用尺寸或坐标?

我能找到的所有东西都会返回显示器屏幕区域,但我需要可用的
区域在开放形式内。不包括菜单,工具栏,状态栏。

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(屏幕.PrimaryScreen.Bounds.Height)
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)



是的,这不起作用。


我.Top = CInt(MdiParent.ClientSize.Height)

将Me形式放在屏幕可见底部下方,因此用户需要

滚动查看它。并且

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


将Me形式置于可用中间以下表单屏幕区域。


这两个都适用于在屏幕上设置第一个表单,但在父表单中设置一个

子表单不起作用。


P

" AlexS" < SA *********** @ SPAMsympaticoPLEASE.ca>在消息中写道

news:e
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


这篇关于形成可用区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆