I'm using VB .NET 2003 and I cant figure out how to do this, I have a
windows application with 2 Forms and a Timer the Timer is on Form1, I also
have a Button on Form2, I want to click Button1 located on Form2 an have the
Button1_Click event perform Timer1 functions, for example; Button1_Click
...... Timer1.Enabled = False, sounds simple enough but I cant get Form2 to
inherit Form1's Timer component, I tried it a few different ways but I'm
stuck, I can get Form2 to inherit other components like Labels and Textboxes
but I cant get it to inherit he Timer component.
Anyone know how to???
Do you even have to inherit the Timer to do this???

Re: Timer Question??? by hirf-spam-me-here

hirf-spam-me-here
Sun Dec 14 06:33:10 CST 2003

* "Ken" <Bad@mail.com> scripsit:
> I'm using VB .NET 2003 and I cant figure out how to do this, I have a
> windows application with 2 Forms and a Timer the Timer is on Form1, I also
> have a Button on Form2, I want to click Button1 located on Form2 an have the
> Button1_Click event perform Timer1 functions, for example; Button1_Click
> ...... Timer1.Enabled = False, sounds simple enough but I cant get Form2 to
> inherit Form1's Timer component, I tried it a few different ways but I'm
> stuck, I can get Form2 to inherit other components like Labels and Textboxes
> but I cant get it to inherit he Timer component.
> Anyone know how to???
> Do you even have to inherit the Timer to do this???

You will have to pass a reference to the timer or form1 instance to your
form2 instance.

<http://groups.google.com/groups?selm=uh87DfymDHA.3504%40TK2MSFTNGP11.phx.gbl>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Re: Timer Question??? by Ken

Ken
Sun Dec 14 07:38:52 CST 2003

OK now I see Thanks for your help, it gets hard to work with VS NET 2003
when your app- gets large in size, the app- I'm working on is has about 300+
Forms, and 1XXxxxXXXxxx lines of code, it makes me not able to think strate
after looking at it for more than 5 min, junk all over the place .....
TANKS again 4 your help.


"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:%234CzN7jwDHA.2568@TK2MSFTNGP09.phx.gbl...
> * "Ken" <Bad@mail.com> scripsit:
> > I'm using VB .NET 2003 and I cant figure out how to do this, I have a
> > windows application with 2 Forms and a Timer the Timer is on Form1, I
also
> > have a Button on Form2, I want to click Button1 located on Form2 an have
the
> > Button1_Click event perform Timer1 functions, for example; Button1_Click
> > ...... Timer1.Enabled = False, sounds simple enough but I cant get Form2
to
> > inherit Form1's Timer component, I tried it a few different ways but I'm
> > stuck, I can get Form2 to inherit other components like Labels and
Textboxes
> > but I cant get it to inherit he Timer component.
> > Anyone know how to???
> > Do you even have to inherit the Timer to do this???
>
> You will have to pass a reference to the timer or form1 instance to your
> form2 instance.
>
>
<http://groups.google.com/groups?selm=uh87DfymDHA.3504%40TK2MSFTNGP11.phx.gb
l>
>
> --
> Herfried K. Wagner [MVP]
> <http://www.mvps.org/dotnet>