[Mono-winforms-list] GetConsoleWindow

RavonTUS RavonTUS at Yahoo.com
Tue Feb 19 10:44:11 EST 2008


Greetings,

I am trying to convert a C# script, that uses the following code, to Mono
1.2.6.  This script, in Windows.Net, opens a new console windows.  

        [DllImport("Kernel32")]
		private static extern IntPtr GetConsoleWindow();

		private void Button_HideConsole_Click(object sender, System.EventArgs e) {
			IntPtr hWnd = GetConsoleWindow();
			if (hWnd != IntPtr.Zero) {
				if (IsWindowVisible(hWnd))
					ShowWindow(hWnd, SW_HIDE);
				else
					ShowWindow(hWnd, SW_NORMAL);
			} else {
				MessageBox.Show("Error - count not find the Console Handle", "Error");
			}

			UpdateHideConsoleButton();
		}

What is the proper replacement for 'GetConsoleWindow' in Mono?  I am a
beginner and hope I am asking this correctly.  I have searched around, but I
do not think I am looking for the right thing.  Any suggestions?

-Ravon
-- 
View this message in context: http://www.nabble.com/GetConsoleWindow-tp15561423p15561423.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.



More information about the Mono-winforms-list mailing list