Windows窗体的任务栏属性 [英] Task Bar Properties for windows form

查看:134
本文介绍了Windows窗体的任务栏属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在vb.net中开发一个小型应用程序.

我将边框样式的属性设置为none,并创建了自定义标题栏.
现在我没有任务栏属性.这意味着在任务栏中,当我右键单击鼠标时,并没有关闭,最大化,最小化还原选项.

我怎样才能做到这一点?通过编码或设置表单的属性?

在此先感谢.

Hello All,

I am developing a small application in vb.net.

I set the property of the border style to the none and created custom title bar.
Now I am not getting taskbar properties. This means in task bar when I right click the mouse button am not getting close, maximize, minimize restore options.

How can I do that? Through coding or setting properties of the form?

Thanks in Advance.

推荐答案

您需要尝试:
you need to try:
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Integer,
ByVal bRevert As Boolean) As Integer
Private Declare Function AppendMenu Lib "user32" Alias "AppendMenuA"
(ByVal hMenu As Integer, ByVal wFlags As Integer, ByVal wIDNewItem As
Integer, ByVal lpNewItem As String) As Integer







Dim hSysMenu As Integer
hSysMenu = GetSystemMenu(Me.Handle.ToInt32, False)

'appends new menu items
AppendMenu(hSysMenu, 0, 1000, "Tray Me")


这篇关于Windows窗体的任务栏属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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