以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 求助 窗口最小化最大化问题 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=103128) |
|
-- 作者:jackyfashion -- 发布时间:2017/6/30 22:34:00 -- 求助 窗口最小化最大化问题 |
|
-- 作者:有点蓝 -- 发布时间:2017/6/30 22:50:00 -- 参考:http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=89385&skin=0 |
|
-- 作者:jackyfashion -- 发布时间:2017/6/30 23:15:00 -- 谢谢老师!!! |
|
-- 作者:jackyfashion -- 发布时间:2017/8/28 23:21:00 -- 老师: 您 好! 我的窗口最大化,电脑下边任务栏不见了,修改那个代码才保留见得到任务栏? 请指教!!! 谢谢老师!!!
|
|
-- 作者:有点甜 -- 发布时间:2017/8/29 8:58:00 --
afterLoad事件,写代码 e.Form.BaseForm.ShowInTaskBar = True
|
|
-- 作者:jackyfashion -- 发布时间:2017/8/29 21:15:00 -- 谢谢老师!!! |
|
-- 作者:jackyfashion -- 发布时间:2017/8/29 21:59:00 -- 老师: 您好! 窗口最大化,最大的尺寸可不可以设置在任务栏上边,不要大到挡住任务栏. 我的代码可能是大到挡住任务栏. 请老师指教!!!谢谢!!!
|
|
-- 作者:有点蓝 -- 发布时间:2017/8/29 22:46:00 -- 代码怎么写的? |
|
-- 作者:jackyfashion -- 发布时间:2017/8/29 23:10:00 -- 老师: 您好! AfterLoad e.Form.BaseForm.FormBorderStyle = Windows.Forms.FormBorderStyle.None \'消除窗口的边框 myform = e.Form.BaseForm
Dim dc As Foxtable.FormPanel
= e.Form.Panel \'窗口底层 AddHandler dc.MouseMove,
AddressOf myform_MouseMove \'进入控件事件 AddHandler dc.MouseDown, AddressOf myform_MouseDown 最小化 e.Form.BaseForm.WindowState
= System.Windows.Forms.FormWindowState.Minimized 最大化 If e.Form.BaseForm.WindowState =
System.Windows.Forms.FormWindowState.Maximized Then e.Form.BaseForm.WindowState
= System.Windows.Forms.FormWindowState.Normal
e.Sender.Image = getimage("LLL.png") Else e.Form.BaseForm.WindowState
= System.Windows.Forms.FormWindowState.Maximized e.Sender.Image = getimage("LL.png") End If 退出
Dim vebm
As WinForm.Button = e.Form.Controls("Button5") vebm.PerformClick() Panel MouseMove resizeDir = ResizeDirection.None MouseDown If e.Button = Windows.Forms.MouseButtons.Left And e.Form.BaseForm.WindowState
<> Windows.Forms.FormWindowState.Maximized
Then MoveForm() End If 谢谢! |
|
-- 作者:jackyfashion -- 发布时间:2017/8/29 23:11:00 -- 全局代码 Default Public myform As Windows.Forms.Form
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Boolean Public Declare Function ReleaseCapture Lib "user32" () As Integer
Public Const BorderWidth As Integer = 6 Public _resizeDir As ResizeDirection = ResizeDirection.None
Public Enum ResizeDirection None = 0 Left = 1 TopLeft = 2 Top = 3 TopRight = 4 Right = 5 BottomRight = 6 Bottom = 7 BottomLeft = 8 End Enum
|