最小化纸盘问题 [英] Minimise to Tray Problem

查看:114
本文介绍了最小化纸盘问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经编写了自己的TabBar.每个栏包含多个我自己的TabButton.

如果我尽可能调整其出现的大小,然后重新调整大小,则TabBar会正确显示.

如果我将其最小化为Tray然后再对其进行归一化,它将在每个TabButton中显示红叉等.

在Paint事件中,我添加了代码

I have written my own TabBar. Each bar comprises a number of my own TabButtons.

If I resize the form on which it occurs as small as I can, and then resize it, the TabBar displays properly.

If I minimize it to Tray and then Normalise it, it displays the red crosses etc in each TabButton.

in the Paint event I added the code

If Width = 0 Or Height = 0 Then Exit Sub

但没有区别.

有什么想法吗?

but no difference.

Any ideas please?

推荐答案

Stuart,

首先,我将更改您的代码以在调整大小事件之后检查Form.WindowState,如果需要,请调用一个子程序,该子程序将根据需要调整元素的大小.如果状态为最小化",则清除,您无需调用调整大小的代码.
Stuart,

First of, I would change your code to inspect the Form.WindowState following a resize event, and if required call a sub that will resize the elements as appropriate. If the state is ''minimized'' then clear you do not need to call the resize code.


我已完成所有操作,问题仍然存在.
我什至添加了一个变量,以便最小化Paint事件.
I''ve done all that and the problem is still there.
I have even added a vriable so that the Paint event is skipped if minimized.


这篇关于最小化纸盘问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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