1 // Permission is hereby granted, free of charge, to any person obtaining
2 // a copy of this software and associated documentation files (the
3 // "Software"), to deal in the Software without restriction, including
4 // without limitation the rights to use, copy, modify, merge, publish,
5 // distribute, sublicense, and/or sell copies of the Software, and to
6 // permit persons to whom the Software is furnished to do so, subject to
7 // the following conditions:
9 // The above copyright notice and this permission notice shall be
10 // included in all copies or substantial portions of the Software.
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
16 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
17 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
18 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 // Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
23 // Peter Bartok <pbartok@novell.com>
28 using System
.ComponentModel
;
31 using System
.Runtime
.InteropServices
;
32 using System
.Runtime
.Serialization
;
34 namespace System
.Windows
.Forms
{
35 [MonoTODO("Possibly implement this for Win32; find a way for Linux and Mac")]
36 [DefaultEvent("Enter")]
37 [Designer("System.Windows.Forms.Design.AxHostDesigner, " + Consts
.AssemblySystem_Design
, "System.ComponentModel.Design.IDesigner")]
38 [DesignTimeVisible(false)]
40 [ClassInterface (ClassInterfaceType
.AutoDispatch
)]
42 public abstract class AxHost
: Control
, ISupportInitialize
, ICustomTypeDescriptor
{
43 #region AxHost Subclasses
44 #region AxHost.ActiveXInvokeKind Enum
45 public enum ActiveXInvokeKind
{
50 #endregion // AxHost.ActiveXInvokeKind Enum
52 #region AxHost.AxComponentEditor Class
54 public class AxComponentEditor
: System
.Windows
.Forms
.Design
.WindowsFormsComponentEditor
{
55 public AxComponentEditor ()
57 throw new NotImplementedException("COM/ActiveX support is not implemented");
60 public override bool EditComponent (ITypeDescriptorContext context
, object obj
, IWin32Window parent
)
62 throw new NotImplementedException("COM/ActiveX support is not implemented");
65 #endregion // AxHost.AxComponentEditor Class
67 #region AxHost.ClsidAttribute
68 [AttributeUsage(AttributeTargets
.Class
,Inherited
=false)]
69 public sealed class ClsidAttribute
: Attribute
{
72 public ClsidAttribute (string clsid
)
81 #endregion AxHost.ClsidAttribute
83 #region AxHost.ConnectionPointCookie
84 public class ConnectionPointCookie
{
85 public ConnectionPointCookie (object source
, object sink
, Type eventInterface
)
87 throw new NotImplementedException("COM/ActiveX support is not implemented");
90 public void Disconnect ()
92 throw new NotImplementedException("COM/ActiveX support is not implemented");
95 ~
ConnectionPointCookie ()
97 throw new NotImplementedException("COM/ActiveX support is not implemented");
100 #endregion // AxHost.ConnectionPointCookie
102 #region AxHost.InvalidActiveXStateException Class
103 public class InvalidActiveXStateException
: Exception
{
104 private string mName
;
105 private ActiveXInvokeKind mKind
;
107 public InvalidActiveXStateException ()
112 public InvalidActiveXStateException (string name
, ActiveXInvokeKind kind
)
118 public override string ToString ()
120 if(mKind
== ActiveXInvokeKind
.MethodInvoke
)
121 return "Invoke:" + mName
;
122 else if(mKind
== ActiveXInvokeKind
.PropertyGet
)
123 return "PropertyGet:" + mName
;
124 else if(mKind
== ActiveXInvokeKind
.PropertySet
)
125 return "PropertySet:" + mName
;
127 return base.ToString();
130 #endregion // AxHost.InvalidActiveXStateException Class
132 #region AxHost.State Class
134 [TypeConverter("System.ComponentModel.TypeConverter, " + Consts
.AssemblySystem
)]
135 public class State
: ISerializable
{
136 public State (Stream ms
, int storageType
, bool manualUpdate
, string licKey
)
138 //throw new NotImplementedException("COM/ActiveX support is not implemented");
141 protected State (SerializationInfo info
, StreamingContext context
)
145 void ISerializable
.GetObjectData (SerializationInfo si
,StreamingContext context
)
147 //throw new NotImplementedException("COM/ActiveX support is not implemented");
150 #endregion // AxHost.State Class
152 #region AxHost.TypeLibraryTimeStampAttribute Class
153 [AttributeUsage(AttributeTargets
.Assembly
, Inherited
=false)]
154 public sealed class TypeLibraryTimeStampAttribute
: Attribute
{
155 public TypeLibraryTimeStampAttribute (string timestamp
)
157 throw new NotImplementedException("COM/ActiveX support is not implemented");
160 public DateTime Value
{
162 throw new NotImplementedException("COM/ActiveX support is not implemented");
166 #endregion // AxHost.TypeLibraryTimeStampAttribute Class
168 #region AxHost.StateConverter Class
169 public class StateConverter
: System
.ComponentModel
.TypeConverter
{
170 public StateConverter ()
172 throw new NotImplementedException("COM/ActiveX support is not implemented");
175 public override bool CanConvertFrom (ITypeDescriptorContext context
, Type sourceType
)
177 throw new NotImplementedException("COM/ActiveX support is not implemented");
180 public override bool CanConvertTo (ITypeDescriptorContext context
, Type destinationType
)
182 throw new NotImplementedException("COM/ActiveX support is not implemented");
185 public override object ConvertFrom (ITypeDescriptorContext context
, System
.Globalization
.CultureInfo culture
, object value)
187 throw new NotImplementedException("COM/ActiveX support is not implemented");
190 public override object ConvertTo (ITypeDescriptorContext context
, System
.Globalization
.CultureInfo culture
, object value, Type destinationType
)
192 throw new NotImplementedException("COM/ActiveX support is not implemented");
195 #endregion // AxHost.StateConverter Class
196 #endregion // AxHost Subclasses
200 private object instance
;
201 private AboutBoxDelegate aboutDelegate
= null;
202 private AxHost
.State ocxState
= null;
203 static bool runningOnWindows
;
205 #region Protected Constructors
207 protected AxHost (string clsid
) : this(clsid
, 0)
212 protected AxHost (string clsid
, int flags
)
214 this.clsid
= new Guid(clsid
);
215 //this.flags = flags;
216 this.instance
= null;
218 PlatformID pid
= Environment
.OSVersion
.Platform
;
219 runningOnWindows
= ((int) pid
!= 128 && (int) pid
!= 4 && (int) pid
!= 6);
221 #endregion // Public Instance Properties
223 #region Public Instance Properties
225 [EditorBrowsable (EditorBrowsableState
.Never
)]
226 public override Color BackColor
{
228 return base.BackColor
;
231 base.BackColor
= value;
236 [EditorBrowsable (EditorBrowsableState
.Never
)]
237 [DesignerSerializationVisibility (DesignerSerializationVisibility
.Hidden
)]
238 public override Image BackgroundImage
{
240 return base.BackgroundImage
;
244 base.BackgroundImage
= value;
249 [EditorBrowsable (EditorBrowsableState
.Never
)]
250 [DesignerSerializationVisibility (DesignerSerializationVisibility
.Hidden
)]
251 public override ImageLayout BackgroundImageLayout
{
253 return base.BackgroundImageLayout
;
257 base.BackgroundImageLayout
= value;
262 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
263 [DesignerSerializationVisibility (DesignerSerializationVisibility
.Hidden
)]
264 public ContainerControl ContainingControl
{
266 throw new NotImplementedException("COM/ActiveX support is not implemented");
270 throw new NotImplementedException("COM/ActiveX support is not implemented");
275 [EditorBrowsable (EditorBrowsableState
.Never
)]
276 public override ContextMenu ContextMenu
{
278 return base.ContextMenu
;
282 base.ContextMenu
= value;
287 [EditorBrowsable (EditorBrowsableState
.Never
)]
288 public override Cursor Cursor
{
299 [DesignerSerializationVisibility (DesignerSerializationVisibility
.Hidden
)]
300 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
301 public bool EditMode
{
303 throw new NotImplementedException("COM/ActiveX support is not implemented");
308 [EditorBrowsable (EditorBrowsableState
.Never
)]
309 public new virtual bool Enabled
{
315 base.Enabled
= value;
320 [EditorBrowsable (EditorBrowsableState
.Never
)]
321 public override Font Font
{
332 [EditorBrowsable (EditorBrowsableState
.Never
)]
333 public override Color ForeColor
{
335 return base.ForeColor
;
339 base.ForeColor
= value;
344 [DesignerSerializationVisibility (DesignerSerializationVisibility
.Hidden
)]
345 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
346 public bool HasAboutBox
{
348 return aboutDelegate
!= null;
353 [DesignerSerializationVisibility (DesignerSerializationVisibility
.Hidden
)]
354 [EditorBrowsable (EditorBrowsableState
.Never
)]
355 public new ImeMode ImeMode
{
360 base.ImeMode
= value;
365 [DefaultValue (null)]
366 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
367 [RefreshProperties (RefreshProperties
.All
)]
368 public AxHost
.State OcxState
{
374 if (ocxState
== value || value == null)
378 this.ocxState
= value;
383 [EditorBrowsable (EditorBrowsableState
.Never
)]
385 public new virtual bool RightToLeft
{
387 return base.RightToLeft
== System
.Windows
.Forms
.RightToLeft
.Yes
;
391 base.RightToLeft
= (value ? System
.Windows
.Forms
.RightToLeft
.Yes
:
392 System
.Windows
.Forms
.RightToLeft
.No
);
396 public override ISite Site
{
398 throw new NotImplementedException("COM/ActiveX support is not implemented");
403 [EditorBrowsable (EditorBrowsableState
.Never
)]
404 public override string Text
{
405 get { return base.Text; }
406 set { base.Text = value; }
408 #endregion // Protected Constructors
410 #region Protected Instance Properties
411 protected override CreateParams CreateParams
{
412 get { return base.CreateParams; }
415 protected override Size DefaultSize
{
417 return new Size (75, 23);
420 #endregion // Protected Instance Properties
422 #region Protected Static Methods
423 [CLSCompliant(false)]
424 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
425 protected static Color
GetColorFromOleColor (uint color
)
427 throw new NotImplementedException("COM/ActiveX support is not implemented");
430 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
431 protected static Font
GetFontFromIFont (object font
)
433 throw new NotImplementedException("COM/ActiveX support is not implemented");
436 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
437 protected static Font
GetFontFromIFontDisp (object font
)
439 throw new NotImplementedException("COM/ActiveX support is not implemented");
442 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
443 protected static object GetIFontDispFromFont (Font font
)
445 throw new NotImplementedException("COM/ActiveX support is not implemented");
448 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
449 protected static object GetIFontFromFont (Font font
)
451 throw new NotImplementedException("COM/ActiveX support is not implemented");
454 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
455 protected static object GetIPictureDispFromPicture (Image image
)
457 throw new NotImplementedException("COM/ActiveX support is not implemented");
460 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
461 protected static object GetIPictureFromCursor (Cursor cursor
)
463 throw new NotImplementedException("COM/ActiveX support is not implemented");
466 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
467 protected static object GetIPictureFromPicture (Image image
)
469 throw new NotImplementedException("COM/ActiveX support is not implemented");
472 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
473 protected static double GetOADateFromTime (DateTime time
)
475 throw new NotImplementedException("COM/ActiveX support is not implemented");
478 [CLSCompliant(false)]
479 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
480 protected static uint GetOleColorFromColor (Color color
)
482 throw new NotImplementedException("COM/ActiveX support is not implemented");
485 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
486 protected static Image
GetPictureFromIPicture (object picture
)
488 throw new NotImplementedException("COM/ActiveX support is not implemented");
491 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
492 protected static Image
GetPictureFromIPictureDisp (object picture
)
494 throw new NotImplementedException("COM/ActiveX support is not implemented");
497 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
498 protected static DateTime
GetTimeFromOADate (double date
)
500 throw new NotImplementedException("COM/ActiveX support is not implemented");
502 #endregion // Protected Static Methods
504 #region Public Instance Methods
505 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
507 public void BeginInit ()
511 public void DoVerb (int verb
)
513 throw new NotImplementedException("COM/ActiveX support is not implemented");
516 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
518 public void EndInit ()
522 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
523 public object GetOcx ()
528 public bool HasPropertyPages ()
530 throw new NotImplementedException("COM/ActiveX support is not implemented");
533 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
534 public void InvokeEditMode ()
536 throw new NotImplementedException("COM/ActiveX support is not implemented");
539 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
540 public void MakeDirty ()
542 throw new NotImplementedException("COM/ActiveX support is not implemented");
545 public override bool PreProcessMessage (ref Message msg
)
547 throw new NotImplementedException("COM/ActiveX support is not implemented");
550 public void ShowAboutBox ()
552 if (aboutDelegate
!= null)
553 this.aboutDelegate();
556 public void ShowPropertyPages ()
558 throw new NotImplementedException("COM/ActiveX support is not implemented");
561 public void ShowPropertyPages (Control control
)
563 throw new NotImplementedException("COM/ActiveX support is not implemented");
565 #endregion // Public Instance Methods
567 #region Protected Instance Methods
568 protected virtual void AttachInterfaces ()
573 protected override void CreateHandle ()
575 if(IsRunningOnWindows
&& !base.IsHandleCreated
) {
576 GetActiveXInstance ();
579 base.CreateHandle ();
581 throw new NotSupportedException ();
585 private void GetActiveXInstance()
587 if (this.instance
== null) {
589 CoCreateInstance (ref clsid
, null, 1, ref IID_IUnknown
, out obj
);
594 protected virtual object CreateInstanceCore (Guid clsid
)
596 throw new NotImplementedException("COM/ActiveX support is not implemented");
600 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
601 protected virtual void CreateSink ()
603 throw new NotImplementedException("COM/ActiveX support is not implemented");
606 protected override void DestroyHandle ()
608 base.DestroyHandle();
611 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
612 protected virtual void DetachSink ()
614 throw new NotImplementedException("COM/ActiveX support is not implemented");
617 protected override void Dispose (bool disposing
)
620 if(this.instance
!= null)
621 Marshal
.ReleaseComObject (this.instance
);
622 this.instance
= null;
624 base.Dispose(disposing
);
627 [EditorBrowsable (EditorBrowsableState
.Never
)]
628 public new void DrawToBitmap (Bitmap bitmap
, Rectangle targetBounds
)
630 throw new NotImplementedException("COM/ActiveX support is not implemented");
633 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
634 protected new virtual Rectangle
GetScaledBounds (Rectangle bounds
, SizeF factor
, BoundsSpecified specified
)
636 throw new NotImplementedException("COM/ActiveX support is not implemented");
639 protected override bool IsInputChar (char charCode
)
641 throw new NotImplementedException("COM/ActiveX support is not implemented");
644 protected override void OnBackColorChanged (EventArgs e
)
646 base.OnBackColorChanged(e
);
649 protected override void OnFontChanged (EventArgs e
)
651 base.OnFontChanged(e
);
654 protected override void OnForeColorChanged (EventArgs e
)
656 base.OnForeColorChanged(e
);
659 protected override void OnHandleCreated (EventArgs e
)
661 throw new NotImplementedException("COM/ActiveX support is not implemented");
664 protected virtual void OnInPlaceActive ()
666 throw new NotImplementedException("COM/ActiveX support is not implemented");
669 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
670 protected override void OnLostFocus (EventArgs e
)
672 throw new NotImplementedException("COM/ActiveX support is not implemented");
675 protected override bool ProcessDialogKey (Keys keyData
)
677 return base.ProcessDialogKey(keyData
);
680 protected override bool ProcessMnemonic (char charCode
)
682 throw new NotImplementedException("COM/ActiveX support is not implemented");
685 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
686 protected bool PropsValid ()
688 throw new NotImplementedException("COM/ActiveX support is not implemented");
691 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
692 protected void RaiseOnMouseDown (short button
, short shift
, int x
, int y
)
694 throw new NotImplementedException("COM/ActiveX support is not implemented");
697 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
698 protected void RaiseOnMouseDown (short button
, short shift
, float x
, float y
)
700 throw new NotImplementedException("COM/ActiveX support is not implemented");
703 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
704 protected void RaiseOnMouseDown (object o1
, object o2
, object o3
, object o4
)
706 throw new NotImplementedException("COM/ActiveX support is not implemented");
709 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
710 protected void RaiseOnMouseMove (short button
, short shift
, int x
, int y
)
712 throw new NotImplementedException("COM/ActiveX support is not implemented");
715 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
716 protected void RaiseOnMouseMove (short button
, short shift
, float x
, float y
)
718 throw new NotImplementedException("COM/ActiveX support is not implemented");
721 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
722 protected void RaiseOnMouseMove (object o1
, object o2
, object o3
, object o4
)
724 throw new NotImplementedException("COM/ActiveX support is not implemented");
727 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
728 protected void RaiseOnMouseUp (short button
, short shift
, int x
, int y
)
730 throw new NotImplementedException("COM/ActiveX support is not implemented");
733 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
734 protected void RaiseOnMouseUp (short button
, short shift
, float x
, float y
)
736 throw new NotImplementedException("COM/ActiveX support is not implemented");
739 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
740 protected void RaiseOnMouseUp (object o1
, object o2
, object o3
, object o4
)
742 throw new NotImplementedException("COM/ActiveX support is not implemented");
745 protected void SetAboutBoxDelegate (AxHost
.AboutBoxDelegate d
)
747 this.aboutDelegate
= d
;
750 protected override void SetBoundsCore (int x
, int y
, int width
, int height
, BoundsSpecified specified
)
752 base.SetBoundsCore(x
, y
, width
, height
, specified
);
755 protected override void SetVisibleCore (bool value)
757 throw new NotImplementedException("COM/ActiveX support is not implemented");
760 protected override void WndProc (ref Message m
)
762 this.DefWndProc(ref m
);
764 #endregion // Protected Instance Methods
768 [EditorBrowsable (EditorBrowsableState
.Never
)]
769 public new event EventHandler BackColorChanged
{
770 add { throw new NotSupportedException("BackColorChanged"); }
775 [EditorBrowsable (EditorBrowsableState
.Never
)]
776 public new event EventHandler BackgroundImageChanged
{
777 add { throw new NotSupportedException("BackgroundImageChanged"); }
782 [EditorBrowsable (EditorBrowsableState
.Never
)]
783 public new event EventHandler BindingContextChanged
{
784 add { throw new NotSupportedException("BackgroundImageChanged"); }
789 [EditorBrowsable (EditorBrowsableState
.Never
)]
790 public new event UICuesEventHandler ChangeUICues
{
791 add { throw new NotSupportedException("ChangeUICues"); }
796 [EditorBrowsable (EditorBrowsableState
.Never
)]
797 public new event EventHandler Click
{
798 add { throw new NotSupportedException("Click"); }
803 [EditorBrowsable (EditorBrowsableState
.Never
)]
804 public new event EventHandler ContextMenuChanged
{
805 add { throw new NotSupportedException("ContextMenuChanged"); }
810 [EditorBrowsable (EditorBrowsableState
.Never
)]
811 public new event EventHandler CursorChanged
{
812 add { throw new NotSupportedException("CursorChanged"); }
817 [EditorBrowsable (EditorBrowsableState
.Never
)]
818 public new event EventHandler DoubleClick
{
819 add { throw new NotSupportedException("DoubleClick"); }
824 [EditorBrowsable (EditorBrowsableState
.Never
)]
825 public new event DragEventHandler DragDrop
{
826 add { throw new NotSupportedException("DragDrop"); }
831 [EditorBrowsable (EditorBrowsableState
.Never
)]
832 public new event DragEventHandler DragEnter
{
833 add { throw new NotSupportedException("DragEnter"); }
838 [EditorBrowsable (EditorBrowsableState
.Never
)]
839 public new event EventHandler DragLeave
{
840 add { throw new NotSupportedException("DragLeave"); }
845 [EditorBrowsable (EditorBrowsableState
.Never
)]
846 public new event DragEventHandler DragOver
{
847 add { throw new NotSupportedException("DragOver"); }
852 [EditorBrowsable (EditorBrowsableState
.Never
)]
853 public new event EventHandler EnabledChanged
{
854 add { throw new NotSupportedException("EnabledChanged"); }
859 [EditorBrowsable (EditorBrowsableState
.Never
)]
860 public new event EventHandler FontChanged
{
861 add { throw new NotSupportedException("FontChanged"); }
866 [EditorBrowsable (EditorBrowsableState
.Never
)]
867 public new event EventHandler ForeColorChanged
{
868 add { throw new NotSupportedException("ForeColorChanged"); }
873 [EditorBrowsable (EditorBrowsableState
.Never
)]
874 public new event GiveFeedbackEventHandler GiveFeedback
{
875 add { throw new NotSupportedException("GiveFeedback"); }
880 [EditorBrowsable (EditorBrowsableState
.Never
)]
881 public new event HelpEventHandler HelpRequested
{
882 add { throw new NotSupportedException("HelpRequested"); }
887 [EditorBrowsable (EditorBrowsableState
.Never
)]
888 public new event EventHandler ImeModeChanged
{
889 add { throw new NotSupportedException("ImeModeChanged"); }
894 [EditorBrowsable (EditorBrowsableState
.Never
)]
895 public new event KeyEventHandler KeyDown
{
896 add { throw new NotSupportedException("KeyDown"); }
901 [EditorBrowsable (EditorBrowsableState
.Never
)]
902 public new event KeyPressEventHandler KeyPress
{
903 add { throw new NotSupportedException("KeyPress"); }
908 [EditorBrowsable (EditorBrowsableState
.Never
)]
909 public new event KeyEventHandler KeyUp
{
910 add { throw new NotSupportedException("KeyUp"); }
915 [EditorBrowsable (EditorBrowsableState
.Never
)]
916 public new event LayoutEventHandler Layout
{
917 add { throw new NotSupportedException("Layout"); }
922 [EditorBrowsable (EditorBrowsableState
.Never
)]
923 public new event MouseEventHandler MouseDown
{
924 add { throw new NotSupportedException("MouseDown"); }
929 [EditorBrowsable (EditorBrowsableState
.Never
)]
930 public new event EventHandler MouseEnter
{
931 add { throw new NotSupportedException("MouseEnter"); }
936 [EditorBrowsable (EditorBrowsableState
.Never
)]
937 public new event EventHandler MouseHover
{
938 add { throw new NotSupportedException("MouseHover"); }
943 [EditorBrowsable (EditorBrowsableState
.Never
)]
944 public new event EventHandler MouseLeave
{
945 add { throw new NotSupportedException("MouseLeave"); }
950 [EditorBrowsable (EditorBrowsableState
.Never
)]
951 public new event MouseEventHandler MouseMove
{
952 add { throw new NotSupportedException("MouseMove"); }
957 [EditorBrowsable (EditorBrowsableState
.Never
)]
958 public new event MouseEventHandler MouseUp
{
959 add { throw new NotSupportedException("MouseUp"); }
964 [EditorBrowsable (EditorBrowsableState
.Never
)]
965 public new event MouseEventHandler MouseWheel
{
966 add { throw new NotSupportedException("MouseWheel"); }
971 [EditorBrowsable (EditorBrowsableState
.Never
)]
972 public new event PaintEventHandler Paint
{
973 add { throw new NotSupportedException("Paint"); }
978 [EditorBrowsable (EditorBrowsableState
.Never
)]
979 public new event QueryAccessibilityHelpEventHandler QueryAccessibilityHelp
{
980 add { throw new NotSupportedException("QueryAccessibilityHelp"); }
985 [EditorBrowsable (EditorBrowsableState
.Never
)]
986 public new event QueryContinueDragEventHandler QueryContinueDrag
{
987 add { throw new NotSupportedException("QueryContinueDrag"); }
992 [EditorBrowsable (EditorBrowsableState
.Never
)]
993 public new event EventHandler RightToLeftChanged
{
994 add { throw new NotSupportedException("RightToLeftChanged"); }
999 [EditorBrowsable (EditorBrowsableState
.Never
)]
1000 public new event EventHandler StyleChanged
{
1001 add { throw new NotSupportedException("StyleChanged"); }
1006 [EditorBrowsable (EditorBrowsableState
.Never
)]
1007 public new event EventHandler BackgroundImageLayoutChanged
{
1008 add { throw new NotSupportedException("BackgroundImageChanged"); }
1013 [EditorBrowsable (EditorBrowsableState
.Never
)]
1014 public new event EventHandler MouseClick
{
1015 add { throw new NotSupportedException("BackgroundImMouseClickageChanged"); }
1020 [EditorBrowsable (EditorBrowsableState
.Never
)]
1021 public new event EventHandler MouseDoubleClick
{
1022 add { throw new NotSupportedException("MouseDoubleClick"); }
1027 [EditorBrowsable (EditorBrowsableState
.Never
)]
1028 public new event EventHandler TextChanged
{
1029 add { throw new NotSupportedException("TextChanged"); }
1032 #endregion // Events
1035 protected delegate void AboutBoxDelegate ();
1036 #endregion // Delegates
1039 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
1040 AttributeCollection ICustomTypeDescriptor
.GetAttributes ()
1042 throw new NotImplementedException("COM/ActiveX support is not implemented");
1045 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
1046 string ICustomTypeDescriptor
.GetClassName ()
1048 throw new NotImplementedException("COM/ActiveX support is not implemented");
1051 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
1052 string ICustomTypeDescriptor
.GetComponentName ()
1054 throw new NotImplementedException("COM/ActiveX support is not implemented");
1057 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
1058 TypeConverter ICustomTypeDescriptor
.GetConverter ()
1060 throw new NotImplementedException("COM/ActiveX support is not implemented");
1063 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
1064 EventDescriptor ICustomTypeDescriptor
.GetDefaultEvent ()
1066 throw new NotImplementedException("COM/ActiveX support is not implemented");
1069 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
1070 PropertyDescriptor ICustomTypeDescriptor
.GetDefaultProperty ()
1072 throw new NotImplementedException("COM/ActiveX support is not implemented");
1075 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
1076 object ICustomTypeDescriptor
.GetEditor (Type editorBaseType
)
1078 throw new NotImplementedException("COM/ActiveX support is not implemented");
1081 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
1082 EventDescriptorCollection ICustomTypeDescriptor
.GetEvents ()
1084 throw new NotImplementedException("COM/ActiveX support is not implemented");
1087 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
1088 EventDescriptorCollection ICustomTypeDescriptor
.GetEvents (Attribute
[] attributes
)
1090 throw new NotImplementedException("COM/ActiveX support is not implemented");
1093 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
1094 PropertyDescriptorCollection ICustomTypeDescriptor
.GetProperties ()
1096 throw new NotImplementedException("COM/ActiveX support is not implemented");
1099 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
1100 PropertyDescriptorCollection ICustomTypeDescriptor
.GetProperties (Attribute
[] attributes
)
1102 throw new NotImplementedException("COM/ActiveX support is not implemented");
1105 [EditorBrowsable (EditorBrowsableState
.Advanced
)]
1106 object ICustomTypeDescriptor
.GetPropertyOwner (PropertyDescriptor pd
)
1108 throw new NotImplementedException("COM/ActiveX support is not implemented");
1110 #endregion // Interfaces
1112 internal static bool IsRunningOnWindows
{
1113 get { return runningOnWindows; }
1116 static Guid IID_IUnknown
= new Guid("00000000-0000-0000-C000-000000000046");
1118 [DllImport("ole32.dll")]
1119 static extern int CoCreateInstance (
1120 [In
] ref Guid rclsid
,
1121 [In
, MarshalAs (UnmanagedType
.IUnknown
)] object pUnkOuter
,
1122 [In
] uint dwClsContext
,
1124 [Out
, MarshalAs (UnmanagedType
.Interface
)] out object ppv
);