Valhalla Legends Forums Archive | Visual Basic Programming | questions

AuthorMessageTime
SPY-3
ok how do i make a text box auto scroll?
i made chat program but when they send it goes to the top of the scroll bar.
ive tryed all i could think of but it still goes to the top after they
hit enter instead of just staying there and scrolling down as they type.
and how can i make it so textboxes will send the data to Register@CLan-SPY-3.zzn.com ?
November 22, 2003, 5:56 AM
SPY-3
and how can i make txtmain.text print to a printer?
if i havent said yet im using visual basics 6
November 22, 2003, 5:58 AM
Stealth
[quote]4) If you call it Visual Basics or abbreviate it as "vB", I will have you killed.[/quote]

Looks like another victim for CupHead. Read the rules.


And, to answer your second question, look up the Printer object on Google.
To autoscroll a textbox, just move the cursor (read: selection start) to the end of its text contents after adding new text.
November 22, 2003, 8:37 AM
SPY-3
what u mean just move the cursor u want it so i have to use scroolbar or what i want an auto scroll not click scrool 1 thing written its gone up again
November 22, 2003, 10:10 AM
Arta
oh my god... my eyes...
November 22, 2003, 3:33 PM
Grok
* Disable textbox window updates.
* Add the new text.
* Position the caret after the last character. (SelStart, I think)
* Enable textbox window updates.
* Refresh the window.
November 22, 2003, 4:35 PM
Spht
[quote author=Grok link=board=31;threadid=3754;start=0#msg30687 date=1069518917]
* Disable textbox window updates.
* Add the new text.
* Position the caret after the last character. (SelStart, I think)
* Enable textbox window updates.
* Refresh the window.
[/quote]

Is refreshing window necessary?
November 22, 2003, 5:25 PM
drivehappy
What can it hurt? It's not like the guy is squeezing every last cycle out of the CPU.
November 22, 2003, 9:15 PM
Spht
[quote author=drivehappy link=board=31;threadid=3754;start=0#msg30725 date=1069535708]
What can it hurt? It's not like the guy is squeezing every last cycle out of the CPU.
[/quote]

Forcing a re-paint of the UI everytime text is added sounds a little extreme to me.
November 22, 2003, 9:24 PM
St0rm.iD
[quote author=Spht link=board=31;threadid=3754;start=0#msg30727 date=1069536268]
[quote author=drivehappy link=board=31;threadid=3754;start=0#msg30725 date=1069535708]
What can it hurt? It's not like the guy is squeezing every last cycle out of the CPU.
[/quote]

Forcing a re-paint of the UI everytime text is added sounds a little extreme to me.
[/quote]

It's fucking annoying when your whole desktop flickers each time someone talks. Or maybe it's my slow computer...
November 23, 2003, 12:56 AM
j0k3r
[quote author=St0rm.iD link=board=31;threadid=3754;start=0#msg30773 date=1069548974]
[quote author=Spht link=board=31;threadid=3754;start=0#msg30727 date=1069536268]
[quote author=drivehappy link=board=31;threadid=3754;start=0#msg30725 date=1069535708]
What can it hurt? It's not like the guy is squeezing every last cycle out of the CPU.
[/quote]

Forcing a re-paint of the UI everytime text is added sounds a little extreme to me.
[/quote]

It's fucking annoying when your whole desktop flickers each time someone talks. Or maybe it's my slow computer...
[/quote]
It would do that on my 2.4ghz too. When you redraw something (anything really) over and over it flickers.
November 23, 2003, 1:21 AM
Spht
[quote author=St0rm.iD link=board=31;threadid=3754;start=0#msg30773 date=1069548974]
[quote author=Spht link=board=31;threadid=3754;start=0#msg30727 date=1069536268]
[quote author=drivehappy link=board=31;threadid=3754;start=0#msg30725 date=1069535708]
What can it hurt? It's not like the guy is squeezing every last cycle out of the CPU.
[/quote]

Forcing a re-paint of the UI everytime text is added sounds a little extreme to me.
[/quote]

It's fucking annoying when your whole desktop flickers each time someone talks. Or maybe it's my slow computer...
[/quote]

I believe that's a known issue with locking updates on resizable objects.
November 23, 2003, 4:43 PM
SPY-3
i figured this out about a year ago im shocked ppl still posted here but i never did say nvm. but anyway the easiest way for this is when text is added to do something just add TextBox.SelStart = Len(TextBox.Text) to your add chat sub or under TextBox_Change()
Public Sub AddChat(TextBox As TextBox, Text As String)
TextBox.Text = TextBox.Text & Text & vbCrLf
TextBox.SelStart = Len(TextBox.Text)
End Sub

most prob already knew this but if someone wants to know here u go :D
August 24, 2004, 11:49 AM
hismajesty
[quote author=SPY-3 link=board=31;threadid=3754;start=0#msg77138 date=1093348195] im shocked ppl still posted here[/quote]

[quote] Reply #11 on: November 23, 2003, 10:43 am [/quote]

That hardly classifies still imho.
August 24, 2004, 2:10 PM

Search