Making Good GUI In VB6 Tutorial 1
Visual Basic Graphical User Interface (GUI)
Is your college first year project a vb6 project ? Are you stumbling to get a good presentable UI ? If so I can help you. I have always seen many projects made in VB6 are not even presentable.
But sometimes VB6 can also do some surprising things.
The major work is done by Labels, Shapes, Fonts And The Background Image
Today in this tutorial you will learn how to use an Label as Button in vb6.
Labels
As i already said that Labels pay a big role in the gui, they help us by providing a flexible option to replace traditional buttons in vb6.
Now, How to use a Label as a button ?
Today in this tutorial you will learn how to use an Label as Button in vb6.
Labels
As i already said that Labels pay a big role in the gui, they help us by providing a flexible option to replace traditional buttons in vb6.
Now, How to use a Label as a button ?
- Create a Label.
- Scale it in a rectangular shape (based on what content it is going to hold).
- Now change the font to a modern font like the Verdana or Segoe UI.
- Change the Font Size to a suitable size as it should be readable and suitable to the Lable's size.
- Select Alignment option in properties and set it to " 2 - Center ".
- Type the text that you want to appear on the face of the button in "Caption".
- Select BackColor option in the properties and use this colours by typing it. (Colours:- Red - &H006060FF& , Teal - &H00AAAA50& , Light Red - &H008080FF& , Light Teal - &H00BBBB50& (if you want it more light just change the 4 B to C or D) or a grey - &H00808080& .
- Select ForeColor and set it to White - &H00FFFFFF& .
For making it work you have to do some additional steps.
- Right click on the label or the button you have created and select View Code.
- Now from the Object list select your label and from the Procedure list select MouseMove.
- Now set the BackColor = (Light Red " &H008080FF& " or Light Teal " &H00BBBB50& " , based on which colour you choosed earlier.)
- Select Form from the Object list and MouseMove from Procedure list.
- Now set the BackColor = (Red " &H006060FF& " or Teal " &H00AAAA50& " , based on which colour you choosed earlier.)
Your code should look like this
End of tutorial 1.
Comments
Post a Comment