Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UserControl
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
00714741
Message ID:
00715197
Views:
18
Hi Cathi,

Fist, I would like to thank you for your excellent help, you always give me your assistant.

Cathi, What I need is the oposit way ... the user control "uc_Buttos" have 5 buttons in the form, when the user clicks on btnAdd for example I should berform the add procedure .. that I need to know how to do this, because when I click in the button the event in the user control event is excuted .. so how to link it to the form I am using now??

What I am trying now, I found a way which is:
In the user control click_event I track which form is active, get the form name by doing this command :
"strFormName = Windows.Forms.Form.ActiveForm.ActiveMdiChild.Name"
then inhiret a new form from the called form:
"Dim j As New Windows.Forms.Form(strFormName)"
then excute the add procedure in the origenal form:
j.AddRecord()

this way is working if I am passing the original form name, but when I pass the variable it's not working.

Maybe my way is wrong ... and maybe it's correct but need a litle modifications.

Please advice

Many thanks to you

ADSC

>To call the click event from a button inside a user control, you would do the following:
>
>
>Me.UserControl11.Button1.PerformClick()
>
>
>>Hi all,
>>
>>I am trying to move my standard buttons like “Add, Save, Delete, Exit” to a “User Control”, then I add this user control to my application forms.
>>
>>The problem, I don’t know how to control the click event for each button on the form because in the form I see the user control as one part.
>>
>>Can anyone help me in doing this.
>>
>>Appreciate any assistance
>>
>>ADSC
<><><><><><><><><><><><><><><><><><><><>
<><> REMEMBER,,,,KNOWLEDGE IS POWER <><>
<><><><><><><><><><><><><><><><><><><><>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform