Hi I have a problem with my usercontrol. I used this example from this board: http://www.vbdotnetforums.com/showthread.php?t=6754&highlight=RaiseEvent+switchTo%28Me%2C+MyApplication.MyForms.
But I have the buttons in my usercontrol and it give my a fault:
Fault:
Value of type 'TestWindows.usrNavigation' cannot be converted to 'System.Windows.Forms.Form'.
On this codeline:
I understand that the usercontrol don't recognize 'Me'. But how can I let it work?
Thanks
David_nyh
But I have the buttons in my usercontrol and it give my a fault:
Fault:
Value of type 'TestWindows.usrNavigation' cannot be converted to 'System.Windows.Forms.Form'.
On this codeline:
VB.NET:
[SIZE=2][COLOR=#0000ff]Public[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Event[/COLOR][/SIZE][SIZE=2] switchTo([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] ssender [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Form, [/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] formName [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] MyForms)[/SIZE]
[SIZE=2][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] LinkLabel1_LinkClicked([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] sender [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.Object, [/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] e [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.Windows.Forms.LinkLabelLinkClickedEventArgs) [/SIZE][SIZE=2][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=2] LinkLabel1.LinkClicked[/SIZE]
[SIZE=2][COLOR=#0000ff]RaiseEvent[/COLOR][/SIZE][SIZE=2] switchTo([/SIZE][SIZE=2][COLOR=red][U]Me[/U][/COLOR][/SIZE][SIZE=2], MyApplication.MyForms.frmStart)[/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE]
I understand that the usercontrol don't recognize 'Me'. But how can I let it work?
Thanks
David_nyh