Mr. X. replied to Tom Shelton
19-Mar-10 02:27 PM

OK.
Thanks.
I put the code you gave me,
and with or without it step 4 does not work :
Maybe I need a code sample, of how to create simple user-control and put it
on my form.
I saw the user-control of mine on the toolbox, and just did : drag & drop.
What I get is an exception.
Too long, so I can give it on brief :
Failed to create component 'MenuButton'. The error message follows :
'System.MissingMethodException : Constructor on type 'myApp.MenuButton' not
found at
System.RuntimeType.CreateInstanceImp(BindingFlag ...) ...
at ...
at ...
at ...
at System.Drawing.Design.ToolboxItem.CreateComponentsCore(IDesigner Host
host, IDictionary defaultValues) at Sy ...
****
I cannot see the whole exception, but it seems I did not declare the
constructor as I should do.
What I have written in code :
-------------------------------------
Public Sub New(ByVal aImageFile As String, ByVal aText As String)
InitializeComponent()
End sub
I need sample code, or tutorial to create a simple user-control, please.
Thanks :)