Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: SPY-3 on November 21, 2003, 11:56 PM

Title: questions
Post by: SPY-3 on November 21, 2003, 11:56 PM
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 [email protected] ?
Title: Re:questions
Post by: SPY-3 on November 21, 2003, 11:58 PM
and how can i make txtmain.text print to a printer?
if i havent said yet im using visual basics 6
Title: Re:questions
Post by: Stealth on November 22, 2003, 02:37 AM
Quote4) If you call it Visual Basics or abbreviate it as "vB", I will have you killed.

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.
Title: Re:questions
Post by: SPY-3 on November 22, 2003, 04:10 AM
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
Title: Re:questions
Post by: Arta on November 22, 2003, 09:33 AM
oh my god... my eyes...
Title: Re:questions
Post by: Grok on November 22, 2003, 10:35 AM
* 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.
Title: Re:questions
Post by: Spht on November 22, 2003, 11:25 AM
Quote from: Grok on November 22, 2003, 10:35 AM
* 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.

Is refreshing window necessary?
Title: Re:questions
Post by: drivehappy on November 22, 2003, 03:15 PM
What can it hurt? It's not like the guy is squeezing every last cycle out of the CPU.
Title: Re:questions
Post by: Spht on November 22, 2003, 03:24 PM
Quote from: drivehappy on November 22, 2003, 03:15 PM
What can it hurt? It's not like the guy is squeezing every last cycle out of the CPU.

Forcing a re-paint of the UI everytime text is added sounds a little extreme to me.
Title: Re:questions
Post by: Banana fanna fo fanna on November 22, 2003, 06:56 PM
Quote from: Spht on November 22, 2003, 03:24 PM
Quote from: drivehappy on November 22, 2003, 03:15 PM
What can it hurt? It's not like the guy is squeezing every last cycle out of the CPU.

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

It's fucking annoying when your whole desktop flickers each time someone talks. Or maybe it's my slow computer...
Title: Re:questions
Post by: j0k3r on November 22, 2003, 07:21 PM
Quote from: St0rm.iD on November 22, 2003, 06:56 PM
Quote from: Spht on November 22, 2003, 03:24 PM
Quote from: drivehappy on November 22, 2003, 03:15 PM
What can it hurt? It's not like the guy is squeezing every last cycle out of the CPU.

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

It's fucking annoying when your whole desktop flickers each time someone talks. Or maybe it's my slow computer...
It would do that on my 2.4ghz too. When you redraw something (anything really) over and over it flickers.
Title: Re:questions
Post by: Spht on November 23, 2003, 10:43 AM
Quote from: St0rm.iD on November 22, 2003, 06:56 PM
Quote from: Spht on November 22, 2003, 03:24 PM
Quote from: drivehappy on November 22, 2003, 03:15 PM
What can it hurt? It's not like the guy is squeezing every last cycle out of the CPU.

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

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

I believe that's a known issue with locking updates on resizable objects.
Title: Re:questions
Post by: SPY-3 on August 24, 2004, 06:49 AM
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
Title: Re:questions
Post by: hismajesty on August 24, 2004, 09:10 AM
Quote from: SPY-3 on August 24, 2004, 06:49 AMim shocked ppl still posted here

QuoteReply #11 on: November 23, 2003, 10:43 am

That hardly classifies still imho.