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

run event on other form

P: n/a
Hi

VB.Net Desktop

What's a good way to run an event on a different form? I've got a form 'on
top' and when I click a button I's like the underlying form to reload.

Thanks
Graeme
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
explicitly calling the method is the easiest way (you, generally,
cannot raise the event directly, but a method call should work -- check
the access modifier though)

Nov 21 '05 #2

P: n/a
Saladin,

When you place globaly
\\\
private withevents mynewform as new form2
///
Than you can catch the events from that form (the top not its controls).
Therefore you can create on that in form2 an own event
\\\
public event myevent
///
And when it is needed
\\\
raiseevent myevent
///
However in the way you describe it, it looks for me a confusing way of using
it in that way.

I hope this helps,

Cor
Nov 21 '05 #3

P: n/a
Thanks Cor. Most of the stuff I do is confusing, especially to me. But I
plod on and hopefully eventually get there! When I said 'reload' the
underlying form, I really just need to click a button to reload a datagrid.
So I'll see how I get on with your help. Cheers, Graeme

"Cor Ligthert" <no************@planet.nl> wrote in message
news:eN*************@TK2MSFTNGP14.phx.gbl...
Saladin,

When you place globaly
\\\
private withevents mynewform as new form2
///
Than you can catch the events from that form (the top not its controls).
Therefore you can create on that in form2 an own event
\\\
public event myevent
///
And when it is needed
\\\
raiseevent myevent
///
However in the way you describe it, it looks for me a confusing way of
using it in that way.

I hope this helps,

Cor

Nov 21 '05 #4

P: n/a
thanks cor. easy when one knows how!
"Cor Ligthert" <no************@planet.nl> wrote in message
news:eN*************@TK2MSFTNGP14.phx.gbl...
Saladin,

When you place globaly
\\\
private withevents mynewform as new form2
///
Than you can catch the events from that form (the top not its controls).
Therefore you can create on that in form2 an own event
\\\
public event myevent
///
And when it is needed
\\\
raiseevent myevent
///
However in the way you describe it, it looks for me a confusing way of
using it in that way.

I hope this helps,

Cor

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.