[Mono-list] System.Windows.Forms: Control.Visible

Philip Van Hoof spamfrommailing@freax.org
19 Nov 2002 22:38:44 +0100


--=-kYHJeEBM+IRzlr1tvS+A
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi there,

I added the Control.Visible "Set" property. I don't know if everything
is correct, but please do explain me what is wrong if that is the case.
I am still learning about Mono and mcs :) 

* This time, the patch *is* attached

-- 
Philip van Hoof aka freax (http://www.freax.eu.org)
irc: irc.openprojects.net mailto:me at freax dot org
Go not to the Elves for counsel, for they will say both no and yes.

--=-kYHJeEBM+IRzlr1tvS+A
Content-Disposition: attachment; filename=patch.txt
Content-Type: text/x-patch; name=patch.txt; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Index: Control.cs
===================================================================
RCS file: /mono/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs,v
retrieving revision 1.15
diff -u -r1.15 Control.cs
--- Control.cs	18 Nov 2002 04:46:32 -0000	1.15
+++ Control.cs	19 Nov 2002 21:08:42 -0000
@@ -393,7 +393,7 @@
     		public string CompanyName {
     			get {
 					//Better than throwing an execption
-    				return "Comapny Name";
+    				return "Company Name";
     			}
     		}
     		
@@ -912,7 +912,7 @@
   			//Compact Framework
     		public bool Visible {
     			get {
-    				throw new NotImplementedException ();
+    				return Win32.IsWindowVisible (Handle);
     			}
     			set {
     				if (value)
Index: win32functions.cs
===================================================================
RCS file: /mono/mcs/class/System.Windows.Forms/System.Windows.Forms/win32functions.cs,v
retrieving revision 1.1
diff -u -r1.1 win32functions.cs
--- win32functions.cs	18 Nov 2002 04:44:37 -0000	1.1
+++ win32functions.cs	19 Nov 2002 21:08:42 -0000
@@ -731,6 +731,11 @@
 			 CallingConvention = CallingConvention.StdCall, 
 			 CharSet = CharSet.Auto)]
 		internal static extern bool IsWindowEnabled (IntPtr hWnd);
+
+		[DllImport ("user32.dll", 
+			 CallingConvention = CallingConvention.StdCall, 
+			 CharSet = CharSet.Auto)]
+		static internal extern bool IsWindowVisible(IntPtr hWnd);
 
 		[DllImport ("user32.dll", 
 			 CallingConvention = CallingConvention.StdCall, 

--=-kYHJeEBM+IRzlr1tvS+A--