PDA

Click to See Complete Forum and Search --> : Three (3) Extreme "Newbie" Questions...


TrouserMuppet
Jan 22nd, 2000, 06:11 AM
I recently dove into the world of VB programming(about 4 days ago), and I have a few simple, for you guys at least, questions that I was hoping someone(s) could help me out with.

1) How do you get the Drive, Dir, and File list boxes to work together, i.e. how do you get the dirlistbox to display different contents when you switch drives in the drivelistbox.

2) How can you launch an external program from within your application without it being minimized. I've managed to launch an applications using Shell(path), but it always launches minimized.

3) Last, and probably the simplest, how do you open a new form by, say, pushing a cmdButton?

If you can answer at least one, or more, of these questions for me, I would greatly appreciate it!

Thank you!
-TM

Fox
Jan 22nd, 2000, 06:45 AM
OK, here are my answers:

1)
In Drive1_Change() put this code:
-
Dir1.Path = Drive1.Drive
-

and in Dir1_Change() this:
-
File1.Path = Dir1.Path
-


2)
Shell "Notepad.exe", vbNormalFocus
-No comment-


3)
Put <Form>.Show in the Button. I'll show you an example:

-
Private Sub Command1_Click()
Form2.Show
End Sub
-

If you have more questions, feel free to ask them ;)

------------------
fox_mccloud@gmx.net
...
Every program can be reduced to one instruction which doesn't work.

TrouserMuppet
Jan 22nd, 2000, 06:51 AM
Thanks Fox, I really appreciate it!