Inherit a value in an event handler from another

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi.

How do you inherit a value in an event handler from another?
(The inherited varible has already been defined)

Many thanks.
 
Xero,

One of the behaviours from a value is that you cannot inherit it at all, so
maybe you can tell in another way what you want to archieve?

Cor
 
What I am trying to do is to create a form which possesses two buttons.

When you click Button1, two input boxes will appear, one after another. The
values entered in the first and second are then stored in two varibles, named
'a' and 'b' respectively.

After entering the two numbers, the user will return to the form. There when
he clicks the other button (Button2), a dialog box will appear, showing the
values 'a' and 'b', which are numbers that the user entered when he clicked
Button1.

Many thanks.

Xero
 
Xero,

This looks a lot like student stuff which we normally don't answer, however
your problem is that those values have to be global in your class (the
form).

You do that by setting in outside a method, the nices done in the top of the
program (Where I set it mostly direct under the "Windows Form Designer
generated code".
private a as string
private b as string

Than it can be used everywhere in your class (the form).

I hope this helps?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top