[HELP] Status in textbox

Posts 1–15 of 21 · Page 1 of 2
[HELP] Status in textbox
How can I make vb post The time then what i've done in a textbox?

Example. I press a button

12:34:56. - You pressed button1


And this appear in a textbox(?) and if I press the button alot, the texbox auto scroll down, so the newest you've done always is on the top

Ask if you didn't understand : )
textbox1.text &= Date.Now & ": Button1 clicked"
Quote Originally Posted by Blubb1337 View Post
textbox1.text &= Date.Now & ": Button1 clicked"
If i add another button, and add the code to that button too. Will the textbox still show that i pressed button1 ? I need it to be like a "history textbox" everything i do need to be shown in the textbox.

Sorry if i'm a complete idiot!
Quote Originally Posted by Blubb1337 View Post
textbox1.text &= Date.Now & ": Button1 clicked"
Thats partly what he means,
he wants to know how to create a "LOG"
Yep see the &-Operator here ->

&=

This is just add them, not replace.
I have another Question too, my Code: Label1.Text = Date.Now
This Code is the Form Code.
How can i make that it releases the Time every secon?
Thats it wont stops.
Use a timer?

Timer1.Interval = 1000
Quote Originally Posted by Blubb1337 View Post
Use a timer?

Timer1.Interval = 1000
I thought of that.

Must i set it to Enabled and must i add any Code?
Quote Originally Posted by Prfction View Post
How can I make vb post The time then what i've done in a textbox?

Example. I press a button

12:34:56. - You pressed button1


And this appear in a textbox(?) and if I press the button alot, the texbox auto scroll down, so the newest you've done always is on the top

Ask if you didn't understand : )
Auto Scroll
Code:
textbox1.SelectionLength = 0
       textbox1.SelectionStart = Len(textbox1.Text)
    textbox1.ScrollToCaret()
Hay
My Code is:

In Form Event:

Label1.Text = Date.Now

How can i make with a timer that it releases the time every secon?
Quote Originally Posted by tempta43 View Post
Thats partly what he means,
he wants to know how to create a "LOG"
And I gave him the correct answer.

Quote Originally Posted by Sydney View Post
Hay
My Code is:

In Form Event:

Label1.Text = Date.Now

How can i make with a timer that it releases the time every secon?
Code:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
label1.text = date.now
    End Sub
Enable the timer <_>
Quote Originally Posted by Blubb1337 View Post
And I gave him the correct answer.



Code:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
label1.text = date.now
    End Sub
Enable the timer <_>
Thanks
Works
BUMP!


I need the status to creat it self on a new line, now it just continues like this

23:12:34-Bot started23:12:36-You did something23:12:38-you did something

I want it like this:


23:12:38 - You did something
23:12:36 - You did something
23:12:34 - Bot Started


See?

The newest always on top and on a new line...


Another Question:


How can i get Vb click on a dropdown box, then select something ?
Quote Originally Posted by Prfction View Post
BUMP!


I need the status to creat it self on a new line, now it just continues like this

23:12:34-Bot started23:12:36-You did something23:12:38-you did something

I want it like this:


23:12:38 - You did something
23:12:36 - You did something
23:12:34 - Bot Started


See?

The newest always on top and on a new line...


Another Question:


How can i get Vb click on a dropdown box, then select something ?
If you want it like you said then use a listbox. Just change the code to:

[php]ListBox1.Items.Add(Date.Now + ": I pressed a button!")[/php]

And for your second question, try Googling GetCursorPos and SetCursorPos (or something like that).
Quote Originally Posted by Samueldo View Post
If you want it like you said then use a listbox. Just change the code to:

[php]ListBox1.Items.Add(Date.Now + ": I pressed a button!")[/php]

And for your second question, try Googling GetCursorPos and SetCursorPos (or something like that).
I'll try it !
Posts 1–15 of 21 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us