VB 中的sendmessage的用法 高手进
我想用sendmessage给自己窗口发一个WM_CLOSE,达到结束自身的作用,代码是什么我记不得了!请高手帮忙写一下,越简单越好,那些一篇一篇复制张贴的给我滚出去!...
我想用sendmessage给自己窗口发一个WM_CLOSE,达到结束自身的作用,代码是什么我记不得了!请高手帮忙写一下,越简单越好,那些一篇一篇复制张贴的给我滚出去!
展开
2个回答
展开全部
用API文本...把sendmessage函数插入进去!如下:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
这是常数:
Private Const WM_CLOSE = &H10
Pirvate sub command1)Click()
SendMessage me.hwnd,WM_CLOSE,0,0
End Sub
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
这是常数:
Private Const WM_CLOSE = &H10
Pirvate sub command1)Click()
SendMessage me.hwnd,WM_CLOSE,0,0
End Sub
意法半导体(中国)投资有限公司
2023-06-12 广告
2023-06-12 广告
单片机,即单片微控制器,也称为单片微型计算机,是将中央处理器(CPU)、存储器(ROM,RAM)、输入/输出接口和其他功能部件集成在一块 在一个小块的集成电路上,从而实现对整个电路或系统的数字式控制。单片机不是完成某一个逻辑功能的芯片,而是...
点击进入详情页
本回答由意法半导体(中国)投资有限公司提供
展开全部
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_CLOSE = &H10
Private Sub Command1_Click()
SendMessage hwnd, WM_CLOSE, 0, 0
End Sub
Private Const WM_CLOSE = &H10
Private Sub Command1_Click()
SendMessage hwnd, WM_CLOSE, 0, 0
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询