MonkH Posted May 27, 2005 Share Posted May 27, 2005 im new to asp.net i am just playing about with it atm downloaded asp.net2.0 earlyer today and its so simple with IntelliSense i made a little timer by just doing a loop of the time Do While Not Counter1 = Counter2 Counter1 = CInt(Right(CStr(Now), 2)) 'pixel1 = pixel1 Me.TextBox1.Width = System.Web.UI.WebControls.Unit.Parse(CStr(Counter1)) Me.Label1.Text = CStr(Counter1) & CStr(Counter2) Loopnow what i want it to do is every second it changes the size of textbox1.width so it gradually gets bigger untill the timer finishshow can i achive this?the whole code to this is Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click MsgBox(myTimer(CInt(Me.TextBox1.Text))) End Sub Function myTimer(ByVal iCount As Integer) As String If CInt(Right(CStr(Now), 2)) <= 49 Then Counter2 = CInt(Right(CStr(Now), 2)) + iCount End If Me.Label1.Text = CStr(Counter1) & CStr(Counter2) Do While Not Counter1 = Counter2 Counter1 = CInt(Right(CStr(Now), 2)) 'pixel1 = pixel1 Me.TextBox1.Width = System.Web.UI.WebControls.Unit.Parse(CStr(Counter1)) Me.Label1.Text = CStr(Counter1) & CStr(Counter2) Loop Me.Label1.Text = CStr(Counter1) & CStr(Counter2) sStr1 = "Stoned" Return sStr1 End Functionits quite messy code i know anyone help resize it continusly?? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now