Darkchild
The Doctor
Well, here is the tutorial as I promised!
Today we are going to learn about the VB6 GUI!
Q: What on earth is GUI?
A: GUI stands for Graphical User Interface
Q: How does the VB6 GUI look like?
A: Here's a screenshot:
(Yes, this is THE madamp5 project )
As you can see, there are lots of buttons! And windows and information, What are these for? You're going to learn MOST of them today!
Well...As you can see in the image above, there is a graphical interface designer, where you can put buttons, labels, and etc.. (which we will talk about later on). The window you design in VB is called a FORM.
On the right of the window(the one that has a form) there is a CODE WINDOW
--------VERY IMPORTANT---------
Note : Visual Basic 6 is a event oriented programming language, so, certain things ONLY happen when you press a button or...move the mouse... Etc...
--------VERY IMPORTANT---------
Now the objects!
As you can see there are loads and loads of possible objects in visual basic!
and now I will explain the use of ALL of them!
(from left to right)
First there's the mouse cursor, used for moving/resizing objects.
next there's the picture box, which is used to show pictures on VB6. (and sometimes for arrays) This component is more advanced than the image component, because it has more functions, let's say it's a Image V2.0
next there's the label box (Appears as a big "A") this is used to display text with no borders and can have fonts and colors of all type!
next there's the TextBox, this object is for the user to input data or the program to export data, for example, if you want to make a login screen you need the textbox to write the PASSWORD (one of the proprieties of this object is PasswordChar, which is the character he'll show instead of the normal text! Object Proprieties will be explained later!)
next there's the frame, this has no particular usage, except for better organizing your program or making it look more professional!
And now my favorite object! The command button!!! I love this thing!
It is a button, that's it! You press it, code is executed! (I love buttons xD)
Now for the checkbox...I think you all know what this is for, you can read/set it's values and it is like a boolean, it can be only true or false (1 or 0 in value)
The option button! as you all know Option buttons allow you to ONLY BE ABLE TO SELECT ONE ITEM, so in each form... you can ONLY have one option for a set of option buttons (this is automatic, by inserting them in a form, they will automatically start working, in a sense that, if you select one, all the others will be deselected!)
The combo box! What is it? I think this screenshot can explain it :
The listbox! This is a component used for making lists, you can edit/read/add all /alues on the list, can be used for storage of information (Still, variables are safer xD)
I personally never used these, they are for "scrolling" OR another use for them is adjustable progress bars (in the old days [windows 3.1 days that is] these were commonly used for adjustable progress bars in media players )
Let's imagine you want something to occur every...let's say...500 milliseconds, it's by using this timer that you will get there!
there are 2 key proprieties in this component which are:
-Interval
-Enabled
in interval, you input the amount of milliseconds you want the timer to execute it's code and in Enabled is if it will keep looping the code or not.
Drive list box, a very easy way to get a list of all drives on a computer! it works as a combo box, and as a list at the same time, but values cannot be altered! :O This component is "Read Only" if ya know what I mean xD
Another great component, Dir List box, This can be used for old school file browsing/file "recon" and as the drive list box, it's read only
File List Box, same as Drive List or DirList it's a list of files bla bla bla read only bla bla bla...
---VERY IMPORTANT!----
NOTE : YOU MUST INPUT WHICH DIRECTORY TO USE IN DIR/FILE LIST BOX!! AND THEN RUN ITS INTERNAL REFRESH FUNCTION!
---VERY IMPORTANT!----
You can make shapes on your App, good for decoration, you can make circles, squares, rectangles, etc..!
You can make lines too and change their position/look/direction in code, which may be useful!
Image, simply for imagery, supports strech too! (and gif (non animated), BMP, WMF, jpg)
These two... I never used them xD OLE is for objects and the other one for databases
Now...WHAT ARE COMPONENTS!
Components are the various "objects" you can put on your program, be it an image, a label, a button, whatever! these are components!
Q: Are these the only ones I can use? :S there's not that many of them....
A: No, fortunately there are more, but there's a catch...For aditional components, you need the corresponding OCX file, if you put that program on a computer that doesn't have the required OCX files, the program WILL NOT RUN!
so be carefull using these!
Now, how to add them:
All you need to do is go to the menu bar and select "project" then components like so :
and this window should appear:
now just select what you want, press apply and tadaah!
new things!!! :O
Well then, that's all for today (Omg!! so many pics and text!!!)
Hope you liked it, be sure to post your questions, if any
Today we are going to learn about the VB6 GUI!
Q: What on earth is GUI?
A: GUI stands for Graphical User Interface
Q: How does the VB6 GUI look like?
A: Here's a screenshot:
(Yes, this is THE madamp5 project )
As you can see, there are lots of buttons! And windows and information, What are these for? You're going to learn MOST of them today!
Well...As you can see in the image above, there is a graphical interface designer, where you can put buttons, labels, and etc.. (which we will talk about later on). The window you design in VB is called a FORM.
On the right of the window(the one that has a form) there is a CODE WINDOW
--------VERY IMPORTANT---------
Note : Visual Basic 6 is a event oriented programming language, so, certain things ONLY happen when you press a button or...move the mouse... Etc...
--------VERY IMPORTANT---------
Now the objects!
As you can see there are loads and loads of possible objects in visual basic!
and now I will explain the use of ALL of them!
(from left to right)
First there's the mouse cursor, used for moving/resizing objects.
next there's the picture box, which is used to show pictures on VB6. (and sometimes for arrays) This component is more advanced than the image component, because it has more functions, let's say it's a Image V2.0
next there's the label box (Appears as a big "A") this is used to display text with no borders and can have fonts and colors of all type!
next there's the TextBox, this object is for the user to input data or the program to export data, for example, if you want to make a login screen you need the textbox to write the PASSWORD (one of the proprieties of this object is PasswordChar, which is the character he'll show instead of the normal text! Object Proprieties will be explained later!)
next there's the frame, this has no particular usage, except for better organizing your program or making it look more professional!
And now my favorite object! The command button!!! I love this thing!
It is a button, that's it! You press it, code is executed! (I love buttons xD)
Now for the checkbox...I think you all know what this is for, you can read/set it's values and it is like a boolean, it can be only true or false (1 or 0 in value)
The option button! as you all know Option buttons allow you to ONLY BE ABLE TO SELECT ONE ITEM, so in each form... you can ONLY have one option for a set of option buttons (this is automatic, by inserting them in a form, they will automatically start working, in a sense that, if you select one, all the others will be deselected!)
The combo box! What is it? I think this screenshot can explain it :
The listbox! This is a component used for making lists, you can edit/read/add all /alues on the list, can be used for storage of information (Still, variables are safer xD)
I personally never used these, they are for "scrolling" OR another use for them is adjustable progress bars (in the old days [windows 3.1 days that is] these were commonly used for adjustable progress bars in media players )
Let's imagine you want something to occur every...let's say...500 milliseconds, it's by using this timer that you will get there!
there are 2 key proprieties in this component which are:
-Interval
-Enabled
in interval, you input the amount of milliseconds you want the timer to execute it's code and in Enabled is if it will keep looping the code or not.
Drive list box, a very easy way to get a list of all drives on a computer! it works as a combo box, and as a list at the same time, but values cannot be altered! :O This component is "Read Only" if ya know what I mean xD
Another great component, Dir List box, This can be used for old school file browsing/file "recon" and as the drive list box, it's read only
File List Box, same as Drive List or DirList it's a list of files bla bla bla read only bla bla bla...
---VERY IMPORTANT!----
NOTE : YOU MUST INPUT WHICH DIRECTORY TO USE IN DIR/FILE LIST BOX!! AND THEN RUN ITS INTERNAL REFRESH FUNCTION!
---VERY IMPORTANT!----
You can make shapes on your App, good for decoration, you can make circles, squares, rectangles, etc..!
You can make lines too and change their position/look/direction in code, which may be useful!
Image, simply for imagery, supports strech too! (and gif (non animated), BMP, WMF, jpg)
These two... I never used them xD OLE is for objects and the other one for databases
Now...WHAT ARE COMPONENTS!
Components are the various "objects" you can put on your program, be it an image, a label, a button, whatever! these are components!
Q: Are these the only ones I can use? :S there's not that many of them....
A: No, fortunately there are more, but there's a catch...For aditional components, you need the corresponding OCX file, if you put that program on a computer that doesn't have the required OCX files, the program WILL NOT RUN!
so be carefull using these!
Now, how to add them:
All you need to do is go to the menu bar and select "project" then components like so :
and this window should appear:
now just select what you want, press apply and tadaah!
new things!!! :O
Well then, that's all for today (Omg!! so many pics and text!!!)
Hope you liked it, be sure to post your questions, if any