5
A
回答
13
您可以使用:
My.Computer.Screen.Bounds
或:
Screen.PrimaryScreen.Bounds
Bounds是提供大小的矩形。或者,您可以查看WorkingArea,其中不包括任务栏和停靠窗口。
0
对于WPF可以使用:
System.Windows.SystemParameters.PrimaryScreenWidth
System.Windows.SystemParameters.PrimaryScreenHeight
1
您可以使用类似:
My.Computer.Screen.Bounds.Size.Width
My.Computer.Screen.Bounds.Size.Height
-1
插入此代码到的Form_Load。我把一些决议...
Dim dw As Double
Dim dh as Double
Width = Screen.PrimaryScreen.Bounds.Width
If (Width = 1366) Then
dw = 1
ElseIf (Width = 1920) Then
dw = 1.4055
ElseIf (Width = 1280) Then
dw = 0.9379
End If
For Each c As Control In Me.Controls
c.Width = CInt(CDbl(c.Width * dw))
Next
Height = My.Computer.Screen.Bounds.Size.Height
If (Height = 768) Then
dh = 1
ElseIf (Height = 1080) Then
dh = 1.4062
ElseIf (Height = 1024) Then
dh = 1.3333
End If
For Each g As Control In Me.Controls
g.Height = CInt(CDbl(g.Height * dh))
Next
+0
考虑向您的代码添加解释 – arghtype 2014-10-31 13:20:09
0
昏暗的高度整数= Screen.PrimaryScreen.Bounds.Height 昏暗的宽度整数= Screen.PrimaryScreen.Bounds.Width
相关问题
- 1. Android |获取屏幕高度,宽度和屏幕宽度,高度
- 2. 获取屏幕宽度和高度
- 3. Android,获取屏幕宽度和高度?
- 4. Javascript屏幕宽度/高度到PHP
- 5. python获取屏幕宽度高度cron
- 6. 我想能够在Android中获取屏幕高度和宽度
- 7. ImageView宽度= 0.75x屏幕宽度和高度= 1.5 x新的ImageView宽度XML
- 8. 引导控件根据屏幕宽度更改位置高度
- 9. 如何使用appJar获取屏幕宽度和高度?
- 10. 检测在节点WebKit的全屏幕宽度和高度
- 11. 如何在运行时计算屏幕高度和宽度?
- 12. 更改屏幕的高度和宽度尺寸
- 13. Android Animate Scale图像以适合屏幕宽度和高度
- 14. 渲染游戏世界小于屏幕宽度和高度
- 15. 得到报告屏幕宽度和高度
- 16. 旋转屏幕后,宽度和高度不会改变本机
- 17. 如何制作响应屏幕宽度和高度的div/box?
- 18. 手机的确切屏幕宽度和高度是多少?
- 19. 调整宽度和高度的iframe根据屏幕尺寸
- 20. 获取屏幕宽度和高度的片段
- 21. 根据jFreeChart.createBufferedImage(宽度,高度,信息)中的客户端屏幕分辨率动态设置宽度和高度
- 22. 在css中使用java脚本获取屏幕高度和宽度
- 23. div全屏(宽度和高度)html/css?
- 24. 无论屏幕高度/宽度如何让图像留在屏幕底部?
- 25. 如何检测Flex中的屏幕宽度/高度变化
- 26. C#winforms无法在屏幕中间画图,即使使用正确的屏幕高度和宽度
- 27. 使用自定义宽度和高度,jQuery Mobile对话框中心屏幕
- 28. 在xml中创建一个宽度和高度为屏幕一半的对象
- 29. 在OpenGL GLUT程序中动态查找屏幕宽度和高度
- 30. 媒体屏幕和最小宽度:965px和最大宽度:965px
所以对于右下角比如什么可不可能是? – Cyclone 2009-08-28 00:00:27
没关系,明白了!谢谢! – Cyclone 2009-08-28 00:25:41