java用户登录窗口怎么删除_从窗口中删除 Headers 栏 . 窗口过程由不同的用户启动...
我正在使用此代碼(在Windows 2003上)刪除和調(diào)整窗口大小:
Process process = Process.GetProcessById(12121);
IntPtr mwh = process.MainWindowHandle;
SetWindowLong(mwh, GWL_STYLE, WS_VISIBLE);
ShowWindowAsync(mwh, 3);
SetWindowPos(mwh, new IntPtr(0), 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
和聲明:[DllImport(“user32.dll”)] private static extern bool ShowWindowAsync(IntPtr hWnd,int nCmdShow);
[DllImport("USER32.DLL")]
public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true, ExactSpelling = true)]
public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags);
static readonly int GWL_STYLE = -16;
static readonly int SWP_NOMOVE = 0x2;
static readonly int SWP_NOSIZE = 0x1;
static readonly int SWP_FRAMECHANGED = 0x20;
static readonly int WS_VISIBLE = 0x10000000;
當(dāng)我調(diào)整與我開始的過(guò)程相關(guān)的窗口時(shí),一切正常 . 但是,當(dāng)我想與其他用戶窗口這樣做時(shí),它什么都不做 . 如何讓它適用于其他用戶的窗口?
總結(jié)
以上是生活随笔為你收集整理的java用户登录窗口怎么删除_从窗口中删除 Headers 栏 . 窗口过程由不同的用户启动...的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 线程函数的设计以及MsgWaitForM
- 下一篇: 在用户线程/主线程中推荐MsgWaitF