|
[求助]请问:如何将灰色按钮激活,用VB,最好能讲讲原理哦!
通过代码测试的。 |
|
[求助]请问:如何将灰色按钮激活,用VB,最好能讲讲原理哦!
呵呵,最来是有点忙,是有一段时间没有来了。 WindowFromPoint貌似对Disabled化的控件没有效果。 你的代码会卡机的原因是因为你的代码没有判断窗口有没有Disabled化,所有被你的程序捕捉后的窗口都被的代码Enable或Disabled化了,Enable的变成Disabled,Disabled又变回Enable重复循环了。 |
|
[求助]请问:如何将灰色按钮激活,用VB,最好能讲讲原理哦!
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Function IsWindowEnabled Lib "user32" (ByVal hwnd As Long) As Long Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long Private Declare Function GetForegroundWindow Lib "user32" () As Long Private Declare Function ScreenToClient Lib "user32" (ByVal hwnd As Long, lpPoint As POINTAPI) As Long Private Declare Function ChildWindowFromPoint Lib "user32" (ByVal hWndParent As Long, ByVal xpt As Long, ByVal ypt As Long) As Long Private Type POINTAPI x As Long y As Long End Type Private Const SWP_FRAMECHANGED = &H20 ' The frame changed: send WM_NCCALCSIZE Private Const SWP_NOMOVE = &H2 Private Const SWP_NOZORDER = &H4 Private Const SWP_NOSIZE = &H1 Private Const GWL_STYLE = (-16) Private Const WS_DISABLED = &H8000000 Private Const HWND_NOTOPMOST = -2 Private Const HWND_TOPMOST = -1 Private Sub Command1_Click() If Timer1.Enabled = False Then Timer1.Enabled = True SetWindowPos hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE Else Timer1.Enabled = False SetWindowPos hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE End If End Sub Private Sub Form_Load() Timer1.Enabled = False End Sub Private Sub Timer1_Timer() Dim pt As POINTAPI GetCursorPos pt hWindow = GetForegroundWindow ScreenToClient hWindow, pt Text1.Text = "x:" & pt.x & " - " & "y:" & pt.y hChildWindow = ChildWindowFromPoint(hWindow, pt.x, pt.y) Text2.Text = hChildWindow If IsWindowEnabled(hChildWindow) = 0 Then nStyle = GetWindowLong(hChildWindow, GWL_STYLE) nStyle = nStyle Xor WS_DISABLED SetWindowLong hChildWindow, GWL_STYLE, nStyle SetWindowPos hChildWindow, 0, 0, 0, 0, 0, SWP_FRAMECHANGED Or SWP_NOMOVE Or SWP_NOSIZE Or SWP_NOZORDER End If End Sub |
|
[求助]奇怪了,汇编DLL中取全局变量指针的问题
我这里测试了一下,没有出现你这样的问题。 |
|
[求助]请问:如何将灰色按钮激活,用VB,最好能讲讲原理哦!
在VB窗口中放两个Command按钮,其中将Command2按钮Enable属性改为FALSE禁止属性。在Command1按钮事件中写入如下代码。 Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As Long, ByVal lpWindowName As String) As Long Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hpWin As Long, ByVal hcWin As Long, ByVal lpClassName As Long, ByVal lpWindowName As String) As Long Private Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable As Long) As Long Private Sub Command1_Click() hWin = FindWindow(0, "Form1") hButton = FindWindowEx(hWin, 0, 0, "Command2") i = EnableWindow(hButton, 1) End Sub |
|
[求助]请问:如何将灰色按钮激活,用VB,最好能讲讲原理哦!
用FindWindow之类的API函数找到要激活的窗口或控件句柄。再用EnableWindow函数激活窗口就行了。 |
|
[求助]Hook Api CreateWindowEx 怎么不可以改变宽度和高度?
CreateWindowEx函数的x/y和S用WindowPos的cx/cy都是窗口在屏幕中的坐标,而不是窗口的宽度和高度,你要修改窗口的宽度和高度,应该修改Width和Height参数才对。 |
|
THREAD_ALL_ACCESS 到底等于多少啊 在哪个头文件里呢
你得到的权限不够高。必须使用“SeDebugPrivilege”的权限才行。 LookupPrivilegevalue(Nil ,'SeDebugPrivilege' ,tkp.Privileges[0].Luid) ; |
|
THREAD_ALL_ACCESS 到底等于多少啊 在哪个头文件里呢
function OpenThread(dwDesiredAccess:DWORD;bInheritHandle:BOOL;dwProcessId:DWORD):THandle;stdcall; external 'kernel32.dll'; |
|
|
|
[求助]RadAsm下调用DeleteMenu和RemoveMenu的运行效果相同
; 试试这样写 .data IDM_6_4 db 'NewMenu',0 .code invoke InsertMenu,hMenu6,0,MF_POPUP or MF_BYPOSITION,hSubMenu,addr IDM_6_4 |
|
[讨论]ida中局部变量如何转换成结构
双击var_10变量,进入变量编辑模式。选取var_10变量,点击[编辑]->[结构体变量]菜单,在弹出的对话框中选择你的test结构,点击OK按钮,再在弹出的对话框上点击Yes即可。 |
|
[求助]RadAsm下调用DeleteMenu和RemoveMenu的运行效果相同
AppendMenu函数InsertMenu都可以, |
|
[求助]RadAsm下调用DeleteMenu和RemoveMenu的运行效果相同
DeleteMenu和RemoveMenu的运行效果不同,DeleteMenu后,如果菜单项还有子菜单,会连同子菜单也一并删除掉,而RemoveMenu不会删除子菜单。子菜单还是可以使用的。只不过你没有完全理解清楚前面的说明的意思。RemoveMenu虽然没有删除子菜单,但是,子菜单的父菜单项已经被RemoveMenu函数删除了,子菜单没有了凭依,当然不会再在其它菜单项上显示出来,你要他再显示出来,你必须为这个子菜单再给他指定一个父菜单才行,当然,这也必须在你使用RemoveMenu函数前用GetSubMenu函数取得这个子菜单的句柄并保存才能在后面使用(或用其它方法取得这个句标)。 |
|
[求助]用SendMessage(hMsg,WM_DROPFILES来发送文件到指定的窗口
貌似单纯发送WM_DROPFILES消息是没用的,还必须操作COM中的IDrop***等接口才行。 |
|
[求助]masm32编程,wsprintf函数获取时间 问题
当然不对,你必须先将那些变量转换成DWORD类型再使用。如例子 .data? dwYear dd ? dwMonth dd ? dwDayOfWeek dd ? dwDay dd ? dwHour dd ? dwMinute dd ? dwSecond dd ? dwMilliseconds dd ? stTime SYSTEMTIME <> .code invoke GetLocalTime,addr stTime movzx eax,stTime.wYear mov dwYear,eax movzx eax,stTime.wMonth mov dwMonth,eax movzx eax,stTime.wDayOfWeek mov dwDayOfWeek,eax ....... invoke wsprintf,addr szSQL, addr szReceive, dwYeardwMonth,.... |
|
[求助]masm32编程,wsprintf函数获取时间 问题
问题在于SYSTEMTIME结构的成员变量都是WORD类型的,wsprintf函数会使用push word ptr [xxxxxxxx]的操作,但wsprintf函数的清栈操作是DWORD类型,用WORD类型的入栈,而用DWORD类型出栈,会出现堆栈的不平衡而出错。解决这个问题就是必须先将SYSTEMITEM的结构成员转换成DWORD类型再用wsprintf操作。 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值