的ShowWindow和放大器;功能在Win 10中无法正常工作(已解决) [英] ShowWindow& FUNCTION does not work correctly in Win 10 (resolved)

查看:297
本文介绍了的ShowWindow和放大器;功能在Win 10中无法正常工作(已解决)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

程序使用多个Windows函数,除了最大化和最小化之外的所有工作:

Program uses several Windows functions and all work except maximize and minimize:

DECLARE DYNAMIC LIBRARY" user32"

 功能FindWindowA%& (BYVAL ClassName AS _OFFSET,WindowName $)'按标题查找流程句柄

 功能GetKeyState%(BYVAL nVirtKey AS LONG)'Windows虚拟键按下

 功能ShowWindow& (BYVAL hwnd AS _OFFSET,BYVAL nCmdShow AS LONG)'最大化/最小化过程

 功能GetForegroundWindow%& '找到目前专注的流程处理

 功能SetForegroundWindow& (BYVAL hwnd AS _OFFSET)'设置前景窗口过程(焦点)

END DECLARE

DECLARE DYNAMIC LIBRARY "user32"
  FUNCTION FindWindowA%& (BYVAL ClassName AS _OFFSET, WindowName$) 'find process handle by title
  FUNCTION GetKeyState% (BYVAL nVirtKey AS LONG) 'Windows virtual key presses
  FUNCTION ShowWindow& (BYVAL hwnd AS _OFFSET, BYVAL nCmdShow AS LONG) 'max/minimize process
  FUNCTION GetForegroundWindow%& 'find currently focused process handle
  FUNCTION SetForegroundWindow& (BYVAL hwnd AS _OFFSET) 'set foreground window process(focus)
END DECLARE




还使用FindWindowA%& (BYVAL ClassName AS _OFFSET,WindowName $)'按标题查找流程句柄

Also uses FindWindowA%& (BYVAL ClassName AS _OFFSET, WindowName$) 'find process handle by title

OFFSET是一个长值由指针使用。

OFFSET is a long value used by pointers.

x& = ShowWindow&(hwnd%&,2)'最小化

x& = ShowWindow&(hwnd%&, 2) 'minimize

ShowWindow(hwnd%&,1)'最大化

ShowWindow(hwnd%&, 1) 'maximize

程序停留在屏幕上并且没有最小化或最大化程序在Windows 7上正常运行!

Program stays on screen and does not minimize or maximize Program ran fine on Windows 7!

我是否需要新的DLL函数或什么?如果Windows 10中不再使用上述任何内容,请告诉我!

Do I need a new DLL function or what? Please tell me if ANY of the above are no longer used in Windows 10!

推荐答案

您使用哪个版本的visual stuido来运行该程序?当您在Windows 10上运行该程序时,您收到了什么错误消息?

Which version of visual stuido did you use to run the program? When you run the program on windows 10, what error message did you get?


这篇关于的ShowWindow和放大器;功能在Win 10中无法正常工作(已解决)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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