Results 1 to 3 of 3

Thread: blinker control and resizing at run time

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2000
    Posts
    16

    Thumbs up

    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. #2
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    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

    Dim

  3. #3
    Hyperactive Member WP's Avatar
    Join Date
    Aug 2000
    Location
    Belgium
    Posts
    278

    Smile

    Sended mail

    WP

    Visual Basic 6.0 EE SP5 / .Net
    Windows XP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width