Buttons and if + form problem

  • Thread starter Thread starter zoneal
  • Start date Start date
Z

zoneal

Ok I got 3 problems and I aint very good at this, but here goes.

First problem:

I got an application with an listbox and a richtextbox and three
buttons, when I press the diffrent button the listbox xhanges(nothing
wrong with that), then I have assigned cases to the diffrent rows of
the listbox for when I klick on 1 row it will show diffrent things in
the richtextbox, but the problem is I dont know how to show diffrent
cases for diffrent button, I dont want all button to show the same case
so how do I do this?

Second problem:

I have made a form based program and when I klick on one of the button
in the main menu another form pops up, but the problem in when I close
the popped up form and want it to pop up again the program crashes and
say something about "Cant access disposed forms" how can I make it so
it will show again?

Third Problem:

It is related to the second problem and what I need to do is a button
that closes only the popped up form and not the whole application,
anyone know how to do this?

I will be forever greatful if anyone can help me on my way.
 
(e-mail address removed) wrote in @c13g2000cwb.googlegroups.com:
the listbox for when I klick on 1 row it will show diffrent things in
the richtextbox, but the problem is I dont know how to show diffrent
cases for diffrent button, I dont want all button to show the same case
so how do I do this?

This statement isnt really clear.
I have made a form based program and when I klick on one of the button
in the main menu another form pops up, but the problem in when I close
the popped up form and want it to pop up again the program crashes and
say something about "Cant access disposed forms" how can I make it so
it will show again?

It sounds like you are trying to show it, but without creating it again.
It is related to the second problem and what I need to do is a button
that closes only the popped up form and not the whole application,
anyone know how to do this?

Just dispose of that form.



--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Get your ASP.NET in gear with IntraWeb!
http://www.atozed.com/IntraWeb/
 
Why don't you just create a basic sub that accepts an integer for the ListBox
row number (SelectedIndex)?

Private Sub MySub (ByVal iRow As Integer)
If iRow < ListBox1.Items.Count Then
Select Case iRow
Case 0
'Do Something with rich text box
Case 1
' Do something else with rich text box
 

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