-
Hi...
Did anyone know how can i make a button with a picture and in this picture how can i put a transper area.
I dont want the "Usemaskcolor" property.
I want a button to make the mouse in and mouse out events in proportion of colored mask make to be true or false
I dont know if you can unterstant me.
I just want a button with graphical face and to click on it
in proportion of an colored mask.
-
I know it but can you please wait for 6 to 7 hours b'coz at preesent I'm going to college to give exams. I will post the code as soon as I come back.;)
At present the time is 8:51 AM here and the date is 4/5/2000.
Kinjal
-
do you want my ocx or do you want me to explain how to make your own?
-
Hi! I am back!
Here is the code for graphical button whose color changes when an event like click occurs and on the next click the color changes back to what it was previously.
To Start with: :D
--------------
First place a Timer control and one text box on the form. Then put any shape on the form you desire like rounded rectangle which I 've used in this example. On the same position place an image box and one label. Set the BackStyle property of the label to Transparent and Caption to whatever name you desire to give to the button.
Note: Imagebox,Label and the shape should be overlapping each other.
Code:
-----
Gereral declarations:
---------------------
Public Img1 As Boolean
Dim a, b As Integer
------------------------------------------------------------
Private Sub Form_Load()
Shape1.FillColor = RGB(155, 0, 0)
End Sub
------------------------------------------------------------
Private Sub Image1_Click()
If Img1 = False Then
Text1.Text = "Hello Everybody !"
Timer1.Enabled = True
Img1 = True
Else
Text1.Text = ""
Timer1.Enabled = True
Img1 = False
End If
End Sub
------------------------------------------------------------
Private Sub Timer1_Timer()
a = a + 1
b = b + 1
If Img1 = True Then
Shape1.FillColor = RGB(155 + (a * 10), 0, 0)
Else
Shape1.FillColor = RGB(255 - (b * 10), 0, 0)
End If
If a > 10 Or b > 10 Then
Timer1.Enabled = False
a = 0
b = 0
End If
End Sub
Hope I understood your question and this is what you needed ;). You can also modify this code to make the buttons more graphical. Still if you don't understand the code give me your Email Add. I'll send you the example which I prepared for you.
Good luck!
:p Kinjal :p
-
For Kedaman
Kedaman
If you can send the ocx file in [email protected]