如何调整 vb6 程序的大小,使其自动适应任何屏幕分辨率? [英] How can I resize my vb6 program so that it automatically fits in any screen resolution?

查看:48
本文介绍了如何调整 vb6 程序的大小,使其自动适应任何屏幕分辨率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能有一个以 1280*1024 正确打开的 vb6 程序,但是当切换到其他分辨率时说 640*480 我只能看到一半的屏幕.如何重新调整我的 vb6 程序的大小,使其自动适应任何屏幕分辨率?

How can I have a vb6 program which opens correctly in 1280*1024 but when switched to other resolutions say 640*480 i can only see half of the screen. how to re-size my vb6 program so that it automatically fits in any screen resolution?

推荐答案

您需要使用 Screen 对象,这将始终以像素为单位为您提供当前分辨率:

You need to use the Screen object, this will always give you the current resolution in pixels:

Dim screenwidth,screenheight As Single

screenwidth = Screen.Width \ Screen.TwipsPerPixelX
screenheight = Screen.Height \ Screen.TwipsPerPixelY

这篇关于如何调整 vb6 程序的大小,使其自动适应任何屏幕分辨率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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