, ben gizlemek istediğiniz/Microsoft Speech Recognition Uygulama aza indirmek: alt text http://img143.imageshack.us/img143/9380/minimize.pngC# kullanarak bir işlem nasıl gizlenir/gösterilir? Benim yazılımın çalıştırılması sırasında
ve ben göstermek istiyorum sonunda
/C# kullanarak maksimize!
Bu işlem benim tarafımdan başlatılmadı, bu nedenle süreç startInfo denetimini veremiyorum. Hepsiyle
- ShowWindow
- animatedWindows
- SetWindowPos:
ben gibi user32.dll yöntemlerini kullanmayı denedik Aynı problemim var.
Ben pencereleri gizleyebilir (Hintçe ben yöntemlerle SW_HIDE seçeneği ile iki kez birini aramak zorunda), ancak bir SW_SHOW bayrağıyla yöntemini çağırdığınızda, sadece .. gösterileri değil
nasıl Süreci gizledikten sonra maksimize edebilir miyim?
Şimdiden teşekkürler! İşte
kod bazı parçaları, şimdi SetWindowPlacement kullanmak için uygulanan:{ [DllImport("user32.dll")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool GetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl); [DllImport("user32.dll", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] static extern bool SetWindowPlacement(IntPtr hWnd, [In] ref WINDOWPLACEMENT lpwndpl); [DllImport("user32.dll")] public static extern Boolean ShowWindowAsync(IntPtr hWnd, Int32 nCmdShow); [DllImport("user32.dll")] public static extern Boolean SetForegroundWindow(IntPtr hWnd); [DllImport("user32.dll")] public static extern Boolean ShowWindow(IntPtr hWnd, Int32 nCmdShow); [DllImport("user32.dll")] public static extern Boolean AnimateWindow(IntPtr hWnd, uint dwTime, uint dwFlags); [DllImport("dwmapi.dll")] public static extern int DwmSetWindowAttribute(IntPtr hwnd, uint dwAttribute, IntPtr pvAttribute, IntPtr lol); //Definitions For Different Window Placement Constants const UInt32 SW_HIDE = 0; const UInt32 SW_SHOWNORMAL = 1; const UInt32 SW_NORMAL = 1; const UInt32 SW_SHOWMINIMIZED = 2; const UInt32 SW_SHOWMAXIMIZED = 3; const UInt32 SW_MAXIMIZE = 3; const UInt32 SW_SHOWNOACTIVATE = 4; const UInt32 SW_SHOW = 5; const UInt32 SW_MINIMIZE = 6; const UInt32 SW_SHOWMINNOACTIVE = 7; const UInt32 SW_SHOWNA = 8; const UInt32 SW_RESTORE = 9; public sealed class AnimateWindowFlags { public const int AW_HOR_POSITIVE = 0x00000001; public const int AW_HOR_NEGATIVE = 0x00000002; public const int AW_VER_POSITIVE = 0x00000004; public const int AW_VER_NEGATIVE = 0x00000008; public const int AW_CENTER = 0x00000010; public const int AW_HIDE = 0x00010000; public const int AW_ACTIVATE = 0x00020000; public const int AW_SLIDE = 0x00040000; public const int AW_BLEND = 0x00080000; } public struct WINDOWPLACEMENT { public int length; public int flags; public int showCmd; public System.Drawing.Point ptMinPosition; public System.Drawing.Point ptMaxPosition; public System.Drawing.Rectangle rcNormalPosition; } //this works param = new WINDOWPLACEMENT(); param.length = Marshal.SizeOf(typeof(WINDOWPLACEMENT)); param.showCmd = (int)SW_HIDE; lol = SetWindowPlacement(theprocess.MainWindowHandle, ref param); // this doesn't work WINDOWPLACEMENT param = new WINDOWPLACEMENT(); param.length = Marshal.SizeOf(typeof(WINDOWPLACEMENT)); param.showCmd = SW_SHOW; lol = GetWindowPlacement(theprocess.MainWindowHandle, ref param);
NOT: SAPI API, bu en aza indirmek ve bu pencereyi maksimize en aza indirmek için bir komut var mı?
Ben şunu mension unuttum:
Böyle bir şey adının winwow Konuşma Tanıma bilerek ve sonra kullanarak bunu. Bunu ben de kullandım! –
güncellendi. – hawk