双击标题栏扩展列表视图 [英] Expansion of list view with double click on title bar

查看:63
本文介绍了双击标题栏扩展列表视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要扩展我的列表视图,当有人双击主窗体标题栏时,同时位于主窗体上的列表视图会随着主窗口的扩展而变大。

我正在使用此代码进行所需的操作。



我尝试过:



I need to expand my listview, when some one double click on the main form title bar, at mean time the list view which is also situated on main form becomes larger as the main window expands.
while i am using this code for desired action.

What I have tried:

Private Sub MDIPar1_DoubleClick(sender As Object, e As EventArgs) Handles Me.DoubleClick
       ListView1.Dock = DockStyle.Fill
   End Sub

推荐答案

尝试使用 Control.Resize Event(System.Windows.Forms) [ ^ ]事件以响应所有大小的更改。只需调查 Form.WindowState属性(系统.Windows.Forms) [ ^ ]查看窗口是否最大化。
Try using Control.Resize Event (System.Windows.Forms)[^] event to react on all size changes. Just investigate the Form.WindowState Property (System.Windows.Forms)[^] to see if the window is maximized or not.


这篇关于双击标题栏扩展列表视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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