yo, i gots another question. here it is:
if i have a program with multiple windows, is there a code i can get so when i click it and if it is already open, it will got to the already open window and put it on top but if it is now open it will open it?? and where do i insert the code? is there a such code i can add in
Also, how do i get the scroll bars to work so they scroll down my form? can someone please give me the source codes and please tell me where to put them, or can someone send me an example?
and here is one last little question, if i have multiple windows how can i get it where when i open one and there is another one in the background, if someone clicks it is will show up and make the first one go to the background where the second one was?
please help! i need the code very bad for my chat network!
my icq# is 52007722
aim s/n is : usukdonkeyballs2
09-12-2000, 04:51 AM
Your first question is a bit unclear. Here is what I *think* you meant:
You want to make a particular window (or form) visible when you click on a button.
This is easy. Just put form1.show in the button_click event where form1 is the name of the form you are interested in. Alternatively, you *might* be asking how to load or show a window when you click on a program icon on the desktop. For that, you have to use the App.PrevInstance property to see if you are already running. Then show the previous instance and unload the new instance.
Your second question is a bit more understandable. You want a viewport. There are controls available that do this. Videosoft makes one for instance. Making your own is a lot more work but essentially, you would put your controls on a picturebox, add scrollbars, and scroll the picturebox.
Your third question seems odd. You want to bring a form in the background to the foreground when you click on it. That's already the default behaviour. Unless you mean that you want the forms to switch coordinates as well...in that case, you would have to just keep track of the coordinates of each form and switch them when necessary. Check out the form_activate event. Also, the ActiveForm property could be useful if you are talking about MDI children.
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
The questions are a bit vague, the only thing I got to add at this stage is for question 1, you want to click on a button that represents a form, and then bring that form to the front. If I got you right; you can use the Zorder event, this will manipulate the order that a form takes on the screen.
Hope it help!
hold up, i sort of stink puttin` a question in one big post so could anyone help me out with it contacting we with icq, aim or msn instant messenger? because then i could put it in littler parts and it will be more understandable. my icq# is 52007722, aim s/n is usukdonkeyballs2 and msn s/n is cowXtux. also my e-mail is email@example.com.
please repsonde soon, thanks!
p.s. well, here is one of my questions made easier, how do you make my scrollbar work in vb4?
hope that was easier, sorry about the first ones.
09-12-2000, 11:46 PM
Cow, :) I will give you some scroll bar code, however you should consider reading up on the basics out of the programmers guide. Not that people here aren't willing to help, this place is great for help, but i think you are wanting to accomplish more than you think and understanding some basics will make it much easier for you.
the scroll bar example when used in a picture box is attached. Just fill in the path to a picture larger than picturebox 1.
hope this helps
yeah, sorry everyone. it is just hard cause i am not always that good at learning stuff from books so that is why i want to take a class on it but i gots to wait till summer and that is like 7 months or something and i want to learn visual basic so bad!!!! i am sorry everyone, but just to say, you have all been very helpful, i have learned a lot from you guys! thank you!
09-14-2000, 11:41 PM
Cow, I didn't mean to make it sound like your questions are a burden, please ask all the questions you need to, and don't feel sorry about any of them. If people don't want to read them, they don't have to.
The point I was trying to make is that understanding the basics is the most important part of learning VB. It is nice when people share code with you, but later on when something needs changed, or something dont work right under a different circumstance, if you don't understand the basics in the code, you can't fix it.
:) good luck in your learning.
o, i see man. thank you!
i am very good with experiementing with codes, so when i see a code i can study it for a little bit and get the basics or the purpose of the code easily. that is why i am constantly asking for codes, because when i study them, i learn them very well. sorry if it seems like i am being lazy just asking for all the codes. i appreciate all of your help everyone! i am learning so much, you all rock ;)