By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,558 Members | 1,673 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,558 IT Pros & Developers. It's quick & easy.

let me repaharse to u.....

P: n/a
Private ChildFormsActivate As EventHandler = Nothing
Private Sub ChildForms_Activate(ByVal sender As Object, ByVal e As
EventArgs)
//
//
End Sub

Private Sub NewForm(ByVal f As Form)
If (ChildFormsActivate Is Nothing) Then
AddHandler ChildFormsActivate, AddressOf ChildForms_Activate
<=====the ChildFormsActivate is not an event of form1

f.MdiParent = Me
End If

Programmer wrote:
VB
AddHandler BtnName.EventName AddressOf FunctionName

The Function Must have the same args as the default event of the button ex
(sender as object , e as EventArgs)

"Supra" <su*****@rogers.com> wrote in message
news:O$*************@TK2MSFTNGP15.phx.gbl...

in VC#:
private void NewForm(Form f)
{
if(ChildFormsActivate==null)
ChildFormsActivate=new EventHandler(ChildForms_Activate)
//
//
in vb.net
Private Sub NewForm(ByVal f As Form)
If (ChildFormsActivate Is Nothing) Then
ChildFormsActivate = New EventHandler(ChildForms_Activate)
<=== i don't know how to used "ADDRESSOF"
//
//
regards




Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Supra" <su*****@rogers.com> schrieb:
Private ChildFormsActivate As EventHandler = Nothing
Private Sub ChildForms_Activate(ByVal sender As Object, ByVal e As
EventArgs)
//
//
End Sub

Private Sub NewForm(ByVal f As Form)
If (ChildFormsActivate Is Nothing) Then
AddHandler ChildFormsActivate, AddressOf ChildForms_Activate
<=====the ChildFormsActivate is not an event of form1


'ChildFormsActivate' is not an event defined in 'Form' and its base classes.
Use 'MdiChildActivate' instead.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2

P: n/a
:-)

Herfried K. Wagner [MVP] wrote:
"Supra" <su*****@rogers.com> schrieb:
Private ChildFormsActivate As EventHandler = Nothing
Private Sub ChildForms_Activate(ByVal sender As Object, ByVal e As
EventArgs)
//
//
End Sub

Private Sub NewForm(ByVal f As Form)
If (ChildFormsActivate Is Nothing) Then
AddHandler ChildFormsActivate, AddressOf ChildForms_Activate
<=====the ChildFormsActivate is not an event of form1

'ChildFormsActivate' is not an event defined in 'Form' and its base
classes. Use 'MdiChildActivate' instead.


Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.