软件显示问题

发布于 2024-10-20 01:02:44 字数 246 浏览 0 评论 0原文

使用 VB6

我的默认软件显示设置为“800 x 600”

具有不同显示设置(例如“800 x 600”、“1366 x 768”、“1280 x 768”)

的客户端 使用超过“800 x 600”显示设置的软件的客户端软件未安装全屏。软件正在显示显示器尺寸的 75% 宽度。

当我根据显示手动调整软件大小时,图像显示得非常大。

如何根据显示器显示尺寸全屏显示软件。

需要代码帮助

Using VB6

My Default Software display setting as "800 x 600"

Clients having different display setting like "800 x 600", "1366 x 768", "1280 x 768"

Client using the software more than "800 x 600" display setting means software is not fitted with full screen. Software is displaying 75% width of the monitor size.

When i manually resize the software according to the display, the images are displaying very large.

How to display the software in a full screen according to the monitor display size.

Need Code Help

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

雾里花 2024-10-27 01:02:44

简单的选择是允许用户最大化您的表单,这将导致它填满整个屏幕,无论他们的计算机当前的分辨率设置如何。

这种方法的唯一问题是它不会拉伸/调整表单上的控件的大小以匹配其新大小。布局看起来和以前一样,但现在它将被挤在左上角,下面和右侧有一大片空白空间。因此,诀窍是每当表单本身的大小发生变化时,动态调整表单上的控件的大小。

不幸的是,VB 6 对此没有任何内置支持。您别无选择,只能自己编写代码来处理调整所有控件的大小。执行此操作的最佳位置是表单的 Resize 事件。您可以通过检查其 ScaleWidthScaleHeight 属性来确定表单的当前大小。每个控件都公开一个类似的 WidthHeight 属性,您可以使用它们来设置相对于其容器窗体大小的大小。您需要设计一些基本的数学逻辑来确定大小。快速谷歌搜索应该会找到其他人如何做到这一点的几个例子,但没有可用的闪亮模型。

Microsoft Outlook 等电子邮件程序就是一个例子。您可能有一个 TreeView,它占据了表单高度的 100%,但只占据了其宽度的 50%;占据表单高度 50% 和宽度 50% 的 ListView;位于其下方的 TextBox 占据表单高度的 50% 和宽度的 50%。这将产生类似于如下所示的流体布局:

--------------------------------
|              |               |
|              |               |
|              |   ListView    |
|              |               |
|              |               |
|   TreeView   |---------------|
|              |               |
|              |               |
|              |    TextBox    |
|              |               |
|              |               |
--------------------------------

The simple option is to allow the users the ability to maximize your form, which will cause it to fill the entire screen, regardless of their computer's current resolution settings.

The only problem with this approach is that it won't stretch/resize the controls on your form to match its new size. The layout will look the same as it did before, but now it will be crammed into the upper-left corner, with a vast expanse of empty space below and to the right of it. So the trick is dynamically resizing the controls on your form whenever the form itself changes size.

Unfortunately, VB 6 doesn't have any built-in support for this. You have no choice but to write the code to handle resizing all of your controls yourself. The best place to do this is your form's Resize event. You can determine the current size of your form by checking its ScaleWidth and ScaleHeight properties. Each of your controls expose a similar Width and Height property that you can use to set their sizes, relative to the size of their container form. You'll need to devise some rudimentary mathematical logic to determine the sizes. A quick Google search should turn up several examples of how others have done this, but there's no shining model available.

One example can be found in e-mail programs like Microsoft Outlook. You might have a TreeView that takes up 100% of the form's height, but only 50% of its width; a ListView that takes up 50% of the form's height and 50% of its width; and a TextBox positioned under that taking up 50% of the form's height and 50% of its width. That would produce a fluid layout similar to that shown below:

--------------------------------
|              |               |
|              |               |
|              |   ListView    |
|              |               |
|              |               |
|   TreeView   |---------------|
|              |               |
|              |               |
|              |    TextBox    |
|              |               |
|              |               |
--------------------------------
只有一腔孤勇 2024-10-27 01:02:44

只需将主窗体更改为最大化(将属性窗口状态设置为2 - 最大化),然后确保其中包含的任何控件根据需要调整大小或移动。

Just change your main form to be maximized (set the property window state to 2 - Maximized) and then make sure that any controls it contains resizes or moves as needed.

肤浅与狂妄 2024-10-27 01:02:44

您可以使用move方法来调整控件的大小。
调整大小时使用scalewidth、scaleheight、scalemode、twipsperpixel 属性。

但是,在调整 SSTab 中的控件大小时,移动方法将无法正常工作,这需要更多的努力来克服。您可以参考 this< /a>

另一种方法是以最小分辨率(即 800X600)设计表单,以便表单
将以所有其他分辨率显示。

You can use the move method to resize the controls.
Make use of scalewidth,scaleheight,scalemode,twipsperpixel properties while resizing.

But move method wont work correctly when resizing controls in an SSTab which needs some more effort overcome that.You can refer this

Other way is to design the forms in the least resolution (i.e 800X600) so that form
will be displayed in all other resolutions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文