473,763 Members | 1,882 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fire event

Hi,

My app is controled by a treeview.
Each node brings a subform for input and calculations to the front. The
subforms are loaded as controls on the main form.

Dim ctl As Control

For Each ctl In Me.Controls
If TypeOf ctl Is Form Then
If ctl.Tag.ToStrin g = sTabKey.ToStrin g Then

ctl.BringToFron t()
ctl.Show()

End If
End If
Next

Which event can I use to fire my update sub on the subform when the subform
is showen? I tryed gotfocus, but it didn't work.
Thanks,

Jerry
Aug 1 '06 #1
8 2064
Why not to use a form method:

ctl.BringToFron t()
ctl.Show()
ctl.MyUpdateSub (Args)

-tom

Jerry ha scritto:
Hi,

My app is controled by a treeview.
Each node brings a subform for input and calculations to the front. The
subforms are loaded as controls on the main form.

Dim ctl As Control

For Each ctl In Me.Controls
If TypeOf ctl Is Form Then
If ctl.Tag.ToStrin g = sTabKey.ToStrin g Then

ctl.BringToFron t()
ctl.Show()

End If
End If
Next

Which event can I use to fire my update sub on the subform when the subform
is showen? I tryed gotfocus, but it didn't work.
Thanks,

Jerry
Aug 1 '06 #2
I tryed that Tom,
it didn't work. The main form says MyUpdateSub is not a member of
system.windows. form.control. Can I change that?

Jerry
<to************ **@uniroma1.its chrieb im Newsbeitrag
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
Why not to use a form method:

ctl.BringToFron t()
ctl.Show()
ctl.MyUpdateSub (Args)

-tom

Jerry ha scritto:
>Hi,

My app is controled by a treeview.
Each node brings a subform for input and calculations to the front. The
subforms are loaded as controls on the main form.

Dim ctl As Control

For Each ctl In Me.Controls
If TypeOf ctl Is Form Then
If ctl.Tag.ToStrin g = sTabKey.ToStrin g Then

ctl.BringToFron t()
ctl.Show()

End If
End If
Next

Which event can I use to fire my update sub on the subform when the
subform
is showen? I tryed gotfocus, but it didn't work.
Thanks,

Jerry

Aug 1 '06 #3
:)
of course it isn't. You are supposed to create it. Make sure it will be
visible outside the form
(public / friend ...).

Public Sub MyUpdateSub()
'...
'your update code
End Sub

-tom

Jerry ha scritto:
I tryed that Tom,
it didn't work. The main form says MyUpdateSub is not a member of
system.windows. form.control. Can I change that?

Jerry
<to************ **@uniroma1.its chrieb im Newsbeitrag
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
Why not to use a form method:

ctl.BringToFron t()
ctl.Show()
ctl.MyUpdateSub (Args)

-tom

Jerry ha scritto:
Hi,

My app is controled by a treeview.
Each node brings a subform for input and calculations to the front. The
subforms are loaded as controls on the main form.

Dim ctl As Control

For Each ctl In Me.Controls
If TypeOf ctl Is Form Then
If ctl.Tag.ToStrin g = sTabKey.ToStrin g Then

ctl.BringToFron t()
ctl.Show()

End If
End If
Next

Which event can I use to fire my update sub on the subform when the
subform
is showen? I tryed gotfocus, but it didn't work.
Thanks,

Jerry
Aug 1 '06 #4

And if you want to keep your code generic in your loop - as you have below -
I would create a base class - MySubForm (inherited from
System.Window.F orm) - add the MyUpdateSub procedure (or a function or
event - for this example it is a procedure) and inherit all your 'subforms'
from this class. That way you will ensure that all your sub-forms will have
a call to MyUpdateSub ... and you can still utilize your 'generic' control
loop from finding / displaying / updating the select treenode form...

So...

1. Create a new form in your project ... Call it something like
mySubFormBase

2. Add a PUBLIC OVERRIDABLE procedure / event ... MyUpdateSubFrom ... or
whatever ... MySubFormMakeVi sible
Public Overridable Sub MySubFormUpdate ()

End Sub

3. Save the form...

4. If you use namespaces ... add the mySubFormBase to your base namespace...

5. Now, BACKUP YOUR CURRENT FORMS ... make copies of them ...

6. For each of you sub forms ... open the <SubFormName>.d esigner.vb file...

7 REPLACE THE LINE:

INHERITS System.Windows. Forms.Form

with

INHERITS <yourProjectNam e>.MySubFormBas e
or
INHERITS <yourProjectNam e>.<yourNameSpa ce>.MySubFormBa se

where <yourProjectNam e = the name of your project
and
where yourNameSpace = the name of your namespace

8. Change your code in the your loop to ...

Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is <myProjectName> .MySubFormBase Then
If ctl.Tag.ToStrin g = sTabKey.ToStrin g Then
ctl.BringToFron t()
ctl.Show()
ctl.MyUpdateSub Form() ' If Procedue ...
End If
End If
Next

9. In each subform code the following procedure...

Public Overrides Sub sMySubFormUpdat e()

MyBase.MySubFor mUpdate()

End Sub

This will work ...

now in all your subforms ... simply ...override the mySubFormUpdate
procedure with the appropriate code...

Public Class Form1

Public Overrides Sub MySubFormUpdate ()

MyBase.MySubFor mUpdate()

' Your code here ... update code

End Sub

End Class

If you take the approach and create a MySubFormUpdate procedure for each of
you sub forms, I am not sure how you would reference / call this from within
your Control Loop where ctl is a system.windows. form object ... Not sure how
you would 'dynamically' reference the procedure ?

JEff
<to************ **@uniroma1.itw rote in message
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
:)
of course it isn't. You are supposed to create it. Make sure it will be
visible outside the form
(public / friend ...).

Public Sub MyUpdateSub()
'...
'your update code
End Sub

-tom

Jerry ha scritto:
>I tryed that Tom,
it didn't work. The main form says MyUpdateSub is not a member of
system.windows .form.control. Can I change that?

Jerry
<to*********** ***@uniroma1.it schrieb im Newsbeitrag
news:11******* *************** @p79g2000cwp.go oglegroups.com. ..
Why not to use a form method:

ctl.BringToFron t()
ctl.Show()
ctl.MyUpdateSub (Args)

-tom

Jerry ha scritto:

Hi,

My app is controled by a treeview.
Each node brings a subform for input and calculations to the front.
The
subforms are loaded as controls on the main form.

Dim ctl As Control

For Each ctl In Me.Controls
If TypeOf ctl Is Form Then
If ctl.Tag.ToStrin g = sTabKey.ToStrin g Then

ctl.BringToFron t()
ctl.Show()

End If
End If
Next

Which event can I use to fire my update sub on the subform when the
subform
is showen? I tryed gotfocus, but it didn't work.
Thanks,

Jerry

Aug 1 '06 #5
Thanks Tom,
but I had tried that too. Didn't work....

Jeff, this looks nice. I'll try this first thing tomorrow. Thanks for your
effort and yours too Tom.

Jerry

"jeff" <jhersey at allnorth dottt comschrieb im Newsbeitrag
news:ep******** ******@TK2MSFTN GP03.phx.gbl...
>
And if you want to keep your code generic in your loop - as you have
below - I would create a base class - MySubForm (inherited from
System.Window.F orm) - add the MyUpdateSub procedure (or a function or
event - for this example it is a procedure) and inherit all your
'subforms' from this class. That way you will ensure that all your
sub-forms will have a call to MyUpdateSub ... and you can still utilize
your 'generic' control loop from finding / displaying / updating the
select treenode form...

So...

1. Create a new form in your project ... Call it something like
mySubFormBase

2. Add a PUBLIC OVERRIDABLE procedure / event ... MyUpdateSubFrom ... or
whatever ... MySubFormMakeVi sible
Public Overridable Sub MySubFormUpdate ()

End Sub

3. Save the form...

4. If you use namespaces ... add the mySubFormBase to your base
namespace...

5. Now, BACKUP YOUR CURRENT FORMS ... make copies of them ...

6. For each of you sub forms ... open the <SubFormName>.d esigner.vb
file...

7 REPLACE THE LINE:

INHERITS System.Windows. Forms.Form

with

INHERITS <yourProjectNam e>.MySubFormBas e
or
INHERITS <yourProjectNam e>.<yourNameSpa ce>.MySubFormBa se

where <yourProjectNam e = the name of your project
and
where yourNameSpace = the name of your namespace

8. Change your code in the your loop to ...

Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is <myProjectName> .MySubFormBase Then
If ctl.Tag.ToStrin g = sTabKey.ToStrin g Then
ctl.BringToFron t()
ctl.Show()
ctl.MyUpdateSub Form() ' If Procedue ...
End If
End If
Next

9. In each subform code the following procedure...

Public Overrides Sub sMySubFormUpdat e()

MyBase.MySubFor mUpdate()

End Sub

This will work ...

now in all your subforms ... simply ...override the mySubFormUpdate
procedure with the appropriate code...

Public Class Form1

Public Overrides Sub MySubFormUpdate ()

MyBase.MySubFor mUpdate()

' Your code here ... update code

End Sub

End Class

If you take the approach and create a MySubFormUpdate procedure for each
of you sub forms, I am not sure how you would reference / call this from
within your Control Loop where ctl is a system.windows. form object ... Not
sure how you would 'dynamically' reference the procedure ?

JEff
<to************ **@uniroma1.itw rote in message
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
>:)
of course it isn't. You are supposed to create it. Make sure it will be
visible outside the form
(public / friend ...).

Public Sub MyUpdateSub()
'...
'your update code
End Sub

-tom

Jerry ha scritto:
>>I tryed that Tom,
it didn't work. The main form says MyUpdateSub is not a member of
system.window s.form.control. Can I change that?

Jerry
<to********** ****@uniroma1.i tschrieb im Newsbeitrag
news:11****** *************** *@p79g2000cwp.g ooglegroups.com ...
Why not to use a form method:

ctl.BringToFron t()
ctl.Show()
ctl.MyUpdateSub (Args)

-tom

Jerry ha scritto:

Hi,

My app is controled by a treeview.
Each node brings a subform for input and calculations to the front.
The
subforms are loaded as controls on the main form.

Dim ctl As Control

For Each ctl In Me.Controls
If TypeOf ctl Is Form Then
If ctl.Tag.ToStrin g = sTabKey.ToStrin g Then

ctl.BringToFron t()
ctl.Show()

End If
End If
Next

Which event can I use to fire my update sub on the subform when the
subform
is showen? I tryed gotfocus, but it didn't work.
Thanks,

Jerry


Aug 1 '06 #6
Jeff,

just got through reading the rest. Your right, how am I going to reference
the others. This looks very good.

Thanks,

Jerry
"Jerry" <je******@gmx.n etschrieb im Newsbeitrag
news:ea******** *****@news.t-online.com...
Thanks Tom,
but I had tried that too. Didn't work....

Jeff, this looks nice. I'll try this first thing tomorrow. Thanks for your
effort and yours too Tom.

Jerry

"jeff" <jhersey at allnorth dottt comschrieb im Newsbeitrag
news:ep******** ******@TK2MSFTN GP03.phx.gbl...
>>
And if you want to keep your code generic in your loop - as you have
below - I would create a base class - MySubForm (inherited from
System.Window. Form) - add the MyUpdateSub procedure (or a function or
event - for this example it is a procedure) and inherit all your
'subforms' from this class. That way you will ensure that all your
sub-forms will have a call to MyUpdateSub ... and you can still utilize
your 'generic' control loop from finding / displaying / updating the
select treenode form...

So...

1. Create a new form in your project ... Call it something like
mySubFormBas e

2. Add a PUBLIC OVERRIDABLE procedure / event ... MyUpdateSubFrom ... or
whatever ... MySubFormMakeVi sible
Public Overridable Sub MySubFormUpdate ()

End Sub

3. Save the form...

4. If you use namespaces ... add the mySubFormBase to your base
namespace...

5. Now, BACKUP YOUR CURRENT FORMS ... make copies of them ...

6. For each of you sub forms ... open the <SubFormName>.d esigner.vb
file...

7 REPLACE THE LINE:

INHERITS System.Windows. Forms.Form

with

INHERITS <yourProjectNam e>.MySubFormBas e
or
INHERITS <yourProjectNam e>.<yourNameSpa ce>.MySubFormBa se

where <yourProjectNam e = the name of your project
and
where yourNameSpace = the name of your namespace

8. Change your code in the your loop to ...

Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is <myProjectName> .MySubFormBase Then
If ctl.Tag.ToStrin g = sTabKey.ToStrin g Then
ctl.BringToFron t()
ctl.Show()
ctl.MyUpdateSub Form() ' If Procedue ...
End If
End If
Next

9. In each subform code the following procedure...

Public Overrides Sub sMySubFormUpdat e()

MyBase.MySubFor mUpdate()

End Sub

This will work ...

now in all your subforms ... simply ...override the mySubFormUpdate
procedure with the appropriate code...

Public Class Form1

Public Overrides Sub MySubFormUpdate ()

MyBase.MySubFor mUpdate()

' Your code here ... update code

End Sub

End Class

If you take the approach and create a MySubFormUpdate procedure for each
of you sub forms, I am not sure how you would reference / call this from
within your Control Loop where ctl is a system.windows. form object ...
Not sure how you would 'dynamically' reference the procedure ?

JEff
<to*********** ***@uniroma1.it wrote in message
news:11******* *************** @p79g2000cwp.go oglegroups.com. ..
>>:)
of course it isn't. You are supposed to create it. Make sure it will be
visible outside the form
(public / friend ...).

Public Sub MyUpdateSub()
'...
'your update code
End Sub

-tom

Jerry ha scritto:

I tryed that Tom,
it didn't work. The main form says MyUpdateSub is not a member of
system.windo ws.form.control . Can I change that?

Jerry
<to********* *****@uniroma1. itschrieb im Newsbeitrag
news:11***** *************** **@p79g2000cwp. googlegroups.co m...
Why not to use a form method:

ctl.BringToFron t()
ctl.Show()
ctl.MyUpdateSub (Args)

-tom

Jerry ha scritto:

Hi,

My app is controled by a treeview.
Each node brings a subform for input and calculations to the front.
The
subforms are loaded as controls on the main form.

Dim ctl As Control

For Each ctl In Me.Controls
If TypeOf ctl Is Form Then
If ctl.Tag.ToStrin g = sTabKey.ToStrin g Then

ctl.BringToFron t()
ctl.Show()

End If
End If
Next

Which event can I use to fire my update sub on the subform when the
subform
is showen? I tryed gotfocus, but it didn't work.
Thanks,

Jerry




Aug 1 '06 #7

The others? Other sub forms ... as I mentioned, you will need to change all
the subform parent class inorder for this work ... you can not selectively
choose to do it for some forms and not others that you want to control with
your treeview...othe rwise you will need to change your control's loop ...

the 'ctl's that you loop through must be from the same 'base' class ...
create a base class form, add your 'overridable' procedure, and when you
iterate through the controls on a 'master' window looking for the 'subforms'
check for the following...

If TypeOf ctl Is <myProjectName> .MySubFormBase Then
Instead of ...

If TypeOf ctl Is System.Windows. Form Then

This will ensure...

a. you have a subform that has your procedure
b. generically code against your procedure.

Jeff.

"Jerry" <je******@gmx.n etwrote in message
news:ea******** *****@news.t-online.com...
Jeff,

just got through reading the rest. Your right, how am I going to reference
the others. This looks very good.

Thanks,

Jerry
"Jerry" <je******@gmx.n etschrieb im Newsbeitrag
news:ea******** *****@news.t-online.com...
>Thanks Tom,
but I had tried that too. Didn't work....

Jeff, this looks nice. I'll try this first thing tomorrow. Thanks for
your effort and yours too Tom.

Jerry

"jeff" <jhersey at allnorth dottt comschrieb im Newsbeitrag
news:ep******* *******@TK2MSFT NGP03.phx.gbl.. .
>>>
And if you want to keep your code generic in your loop - as you have
below - I would create a base class - MySubForm (inherited from
System.Window .Form) - add the MyUpdateSub procedure (or a function or
event - for this example it is a procedure) and inherit all your
'subforms' from this class. That way you will ensure that all your
sub-forms will have a call to MyUpdateSub ... and you can still utilize
your 'generic' control loop from finding / displaying / updating the
select treenode form...

So...

1. Create a new form in your project ... Call it something like
mySubFormBa se

2. Add a PUBLIC OVERRIDABLE procedure / event ... MyUpdateSubFrom ... or
whatever ... MySubFormMakeVi sible
Public Overridable Sub MySubFormUpdate ()

End Sub

3. Save the form...

4. If you use namespaces ... add the mySubFormBase to your base
namespace.. .

5. Now, BACKUP YOUR CURRENT FORMS ... make copies of them ...

6. For each of you sub forms ... open the <SubFormName>.d esigner.vb
file...

7 REPLACE THE LINE:

INHERITS System.Windows. Forms.Form

with

INHERITS <yourProjectNam e>.MySubFormBas e
or
INHERITS <yourProjectNam e>.<yourNameSpa ce>.MySubFormBa se

where <yourProjectNam e = the name of your project
and
where yourNameSpace = the name of your namespace

8. Change your code in the your loop to ...

Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is <myProjectName> .MySubFormBase Then
If ctl.Tag.ToStrin g = sTabKey.ToStrin g Then
ctl.BringToFron t()
ctl.Show()
ctl.MyUpdateSub Form() ' If Procedue ...
End If
End If
Next

9. In each subform code the following procedure...

Public Overrides Sub sMySubFormUpdat e()

MyBase.MySubFor mUpdate()

End Sub

This will work ...

now in all your subforms ... simply ...override the mySubFormUpdate
procedure with the appropriate code...

Public Class Form1

Public Overrides Sub MySubFormUpdate ()

MyBase.MySubFor mUpdate()

' Your code here ... update code

End Sub

End Class

If you take the approach and create a MySubFormUpdate procedure for each
of you sub forms, I am not sure how you would reference / call this from
within your Control Loop where ctl is a system.windows. form object ...
Not sure how you would 'dynamically' reference the procedure ?

JEff
<to********** ****@uniroma1.i twrote in message
news:11****** *************** *@p79g2000cwp.g ooglegroups.com ...
:)
of course it isn't. You are supposed to create it. Make sure it will be
visible outside the form
(public / friend ...).

Public Sub MyUpdateSub()
'...
'your update code
End Sub

-tom

Jerry ha scritto:

I tryed that Tom,
it didn't work. The main form says MyUpdateSub is not a member of
system.wind ows.form.contro l. Can I change that?
>
Jerry
>
>
<to******** ******@uniroma1 .itschrieb im Newsbeitrag
news:11**** *************** ***@p79g2000cwp .googlegroups.c om...
Why not to use a form method:

ctl.BringToFron t()
ctl.Show()
ctl.MyUpdateSub (Args)

-tom

Jerry ha scritto:

Hi,
>
My app is controled by a treeview.
Each node brings a subform for input and calculations to the front.
The
subforms are loaded as controls on the main form.
>
Dim ctl As Control
>
For Each ctl In Me.Controls
If TypeOf ctl Is Form Then
If ctl.Tag.ToStrin g = sTabKey.ToStrin g Then
>
ctl.BringToFron t()
ctl.Show()
>
End If
End If
Next
>
Which event can I use to fire my update sub on the subform when the
subform
is showen? I tryed gotfocus, but it didn't work.
>
>
Thanks,
>
Jerry




Aug 1 '06 #8
For example ...

If you have two or more 'types' of these subforms ... you need to code
accordingly...

Instead of having a If TypeOf ... change it to ...

Select Case TypeOf Ctl

Case System.Windows. Form

Case <myProject>.MyS ubFormBase

Case ...

End Select

Since VB only knows that the procedure exists for the BaseSubForm's ... you
can only call it from the appropriate case ...

So, if you have 'seven' sub forms but only 3 need to use the update
procedure, than only those three need to inherit from you base class -
MySubFormBase ...

However, I would recommend 'inheriting' all you subforms from the same base
class form ... that way you will always have this functionality available.

IMHO, it is good practice to always inherit ALL your forms from a custom
base class .... even if in the beginning u do not intend on extending it ...
this will allow you to easily extend all your forms to include this type of
functionality ...

Jeff
"jeff" <jhersey at allnorth dottt comwrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>
The others? Other sub forms ... as I mentioned, you will need to change
all the subform parent class inorder for this work ... you can not
selectively choose to do it for some forms and not others that you want to
control with your treeview...othe rwise you will need to change your
control's loop ...

the 'ctl's that you loop through must be from the same 'base' class ...
create a base class form, add your 'overridable' procedure, and when you
iterate through the controls on a 'master' window looking for the
'subforms' check for the following...

If TypeOf ctl Is <myProjectName> .MySubFormBase Then
Instead of ...

If TypeOf ctl Is System.Windows. Form Then

This will ensure...

a. you have a subform that has your procedure
b. generically code against your procedure.

Jeff.

"Jerry" <je******@gmx.n etwrote in message
news:ea******** *****@news.t-online.com...
>Jeff,

just got through reading the rest. Your right, how am I going to
reference the others. This looks very good.

Thanks,

Jerry
"Jerry" <je******@gmx.n etschrieb im Newsbeitrag
news:ea******* ******@news.t-online.com...
>>Thanks Tom,
but I had tried that too. Didn't work....

Jeff, this looks nice. I'll try this first thing tomorrow. Thanks for
your effort and yours too Tom.

Jerry

"jeff" <jhersey at allnorth dottt comschrieb im Newsbeitrag
news:ep****** ********@TK2MSF TNGP03.phx.gbl. ..

And if you want to keep your code generic in your loop - as you have
below - I would create a base class - MySubForm (inherited from
System.Windo w.Form) - add the MyUpdateSub procedure (or a function or
event - for this example it is a procedure) and inherit all your
'subforms' from this class. That way you will ensure that all your
sub-forms will have a call to MyUpdateSub ... and you can still utilize
your 'generic' control loop from finding / displaying / updating the
select treenode form...

So...

1. Create a new form in your project ... Call it something like
mySubFormBas e

2. Add a PUBLIC OVERRIDABLE procedure / event ... MyUpdateSubFrom ...
or whatever ... MySubFormMakeVi sible
Public Overridable Sub MySubFormUpdate ()

End Sub

3. Save the form...

4. If you use namespaces ... add the mySubFormBase to your base
namespace. ..

5. Now, BACKUP YOUR CURRENT FORMS ... make copies of them ...

6. For each of you sub forms ... open the <SubFormName>.d esigner.vb
file...

7 REPLACE THE LINE:

INHERITS System.Windows. Forms.Form

with

INHERITS <yourProjectNam e>.MySubFormBas e
or
INHERITS <yourProjectNam e>.<yourNameSpa ce>.MySubFormBa se

where <yourProjectNam e = the name of your project
and
where yourNameSpace = the name of your namespace

8. Change your code in the your loop to ...

Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is <myProjectName> .MySubFormBase Then
If ctl.Tag.ToStrin g = sTabKey.ToStrin g Then
ctl.BringToFron t()
ctl.Show()
ctl.MyUpdateSub Form() ' If Procedue ...
End If
End If
Next

9. In each subform code the following procedure...

Public Overrides Sub sMySubFormUpdat e()

MyBase.MySubFor mUpdate()

End Sub

This will work ...

now in all your subforms ... simply ...override the mySubFormUpdate
procedure with the appropriate code...

Public Class Form1

Public Overrides Sub MySubFormUpdate ()

MyBase.MySubFor mUpdate()

' Your code here ... update code

End Sub

End Class

If you take the approach and create a MySubFormUpdate procedure for
each of you sub forms, I am not sure how you would reference / call
this from within your Control Loop where ctl is a system.windows. form
object ... Not sure how you would 'dynamically' reference the procedure
?

JEff
<to********* *****@uniroma1. itwrote in message
news:11***** *************** **@p79g2000cwp. googlegroups.co m...
:)
of course it isn't. You are supposed to create it. Make sure it will
be
visible outside the form
(public / friend ...).
>
Public Sub MyUpdateSub()
'...
'your update code
End Sub
>
-tom
>
Jerry ha scritto:
>
>I tryed that Tom,
>it didn't work. The main form says MyUpdateSub is not a member of
>system.win dows.form.contr ol. Can I change that?
>>
>Jerry
>>
>>
><to******* *******@uniroma 1.itschrieb im Newsbeitrag
>news:11*** *************** ****@p79g2000cw p.googlegroups. com...
Why not to use a form method:
>
ctl.BringToFron t()
ctl.Show()
ctl.MyUpdateSub (Args)
>
-tom
>
Jerry ha scritto:
>
>Hi,
>>
>My app is controled by a treeview.
>Each node brings a subform for input and calculations to the
>front. The
>subforms are loaded as controls on the main form.
>>
>Dim ctl As Control
>>
> For Each ctl In Me.Controls
> If TypeOf ctl Is Form Then
> If ctl.Tag.ToStrin g = sTabKey.ToStrin g Then
>>
> ctl.BringToFron t()
> ctl.Show()
>>
> End If
> End If
> Next
>>
>Which event can I use to fire my update sub on the subform when
>the
>subform
>is showen? I tryed gotfocus, but it didn't work.
>>
>>
>Thanks,
>>
>Jerry
>
>




Aug 2 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1889
by: Kevin Ly | last post by:
Consider the test case below. The onmouseout event does NOT fire when my mouse/cusor is moved off the left side of the browser. It does if it is moved off the top, bottom, and the right side that HAS THE SCROLLBAR (does not if the right side does not have the scrollbar on). Also, if you move around each "this is a test" line, the onmouseout event fires. How odd? Fortunately, I can have logic to handle this. The big problem is why...
9
4007
by: HJ | last post by:
Hi all, I notice that the Form_Dirty event does not fire in Access 2002 (SP-1) when the first character is typed into a new record. In previous versions of Access it does fire. For existing records that are being edited, the event does fire. Has this (previous) behaviour been changed by Microsoft?
5
6829
by: Carlo Marchesoni | last post by:
From an aspx page (A.aspx) I open another one (B.aspx - for table lookup). When the user selects an entry in B.aspx I would like to force a button's event in A.aspx to be fired. I guess the only way is using javascript - does anybody have a sample for this ? Thanks
2
3896
by: Sam Miller | last post by:
Hi, I have a button event that won't fire. I left it on Friday and it worked fine. I came back in on Monday and it won't fire. I tried putting another button and just putting a response.write on its click handler but it won't fire either telling me no button click events will fire. But my calendar control on the same page does fire. In the debugger I put a break point in the calendar event and the button
2
1512
by: Ofer | last post by:
I finally learned that DataGrid1.EditItemIndex = {row I want} -1 DataGrid1.DataBind() will make that row get to edit mode. I am stiil looking for ways to programticaly do other things: 1) show the last page 2) fire select 3) fire delete 4) what is the last row in the last page
6
2208
by: Shimon Sim | last post by:
I have Panel control on the page. I am handling Init event for it. It doesn't seem to fire at all. Why? Thank you Shimon.
5
10371
by: Verde | last post by:
This is admittedly an apparently odd request... but please indulge me if you don't mind: Suppose I have two <asp:Button.../> on a page (Button1 and Button2). User clicks Button1 and triggers a PostBack. How can I then fire the click event of Button2 during the same PostBack? I know this seems like a totally bad situation I'm creating out of naiveity. But please indulge. It would save me from having to provide a lengthy explanation for...
4
5296
by: Ty Salistean | last post by:
So, here is a wierd question that we have been discussing for a bit now. Does an event fire even though nothing is subscribed to listen to the event? For instance, does the Click event of a button fire even though nothing is subscribed to listen to the event. The answer is NO in a traditional Publisher/Subscriber design pattern (at least I think it is). I have stated that if nothing is subscribed, then the event never gets
19
4757
by: Daniela Roman | last post by:
Hello, I try to fire an event under a button click event and maybe anybody can give a clue please. I have let's say a WEB grid with PageIndexChanged event: private void DataGrid1_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
6
19270
by: sjoshi | last post by:
I have a derived class OraBackup which has a method that calls stored procedure on Oracledb to get status of backup job. Now the base class publishes an event like this: public delegate void PercentEventHandler(object sender, JobCompletedEventArgs e); public event PercentEventHandler PercentCompleted; And fires it:
0
9566
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10149
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10003
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7370
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6643
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5271
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3918
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3529
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2797
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.