-
1.Can any one help me to do a blinker control in VISUAL BASIC?
I have got a textbox for which I want to change the colour dynamically at run time.It should be in green colour for 5 secs and red colour for next 5 secs.like that it should go on blinking till i quit running. i AM A NERD PROGRAMMER IN VB and interested inlearning and developing an application like above.
2.Can any one help me to solve the following problem :
I want to resize my textbox and controls according to my wish as in any windows based application.I want to select the controls and then resize it according to my wish at run time.
Any person with the ability to solve and give me the coding can contact me at [email protected].
I thank any one who solves the above problems.
-
2.
Code:
Text1.Width = Text2.Text
Text1.Height = TExt3.Text
That will allow you to specify the width and height of the text box.
1.
You should start a loop with a timer interval set to five seconds and after each interval is reached change the color of the text box. Or have a sleep event like so:
Code:
Private Declare Sub Sleep Lib "Kernel32" (ByVal dwMilliseconds As Long)
Private Sub Command1_Click()
Text1.BackColor = vbGreen
Sleep 5000
Text1.BackColor = vbRed
Sleep 5000
Command1_Click
End Sub
I would recomed going the timer way instead of the one shown above.
Gl,
D!m
-