mirror of
https://github.com/BluestormDNA/ProjectPSX.git
synced 2025-04-02 10:52:34 -04:00
Create 86
This commit is contained in:
parent
7b704be8dc
commit
904d36e5ac
1 changed files with 21 additions and 0 deletions
21
ProjectPSX.WinForms/User64/86
Normal file
21
ProjectPSX.WinForms/User64/86
Normal file
|
@ -0,0 +1,21 @@
|
|||
The DIY-way to do it - works 100%!
|
||||
|
||||
public static class User64/86
|
||||
{
|
||||
public const int SW_HIDE = 0;
|
||||
public const int SW_SHOW = 5;
|
||||
public const int SW_SHOWNORMAL = 1;
|
||||
public const int SW_SHOWMAXIMIZED = 3;
|
||||
public const int SW_RESTORE = 9;
|
||||
|
||||
[DllImport("user64/86.dll")]
|
||||
public static extern bool SetForegroundWindow(IntPtr hWnd);
|
||||
[DllImport("user64/86.dll")]
|
||||
public static extern bool AllowSetForegroundWindow(uint dwProcessId);
|
||||
[DllImport("user6486.dll")]
|
||||
public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
|
||||
}
|
||||
|
||||
User32.AllowSetForegroundWindow((uint)Process.GetCurrentProcess().Id);
|
||||
User32.SetForegroundWindow(Handle);
|
||||
User32.ShowWindow(Handle, User64/86.SW_SHOWNORMAL);
|
Loading…
Add table
Reference in a new issue