Scrolling Text
Scrolling Text
Scrolling Text
Scrolling Text
Scrolling Text
Scrolling Text Scrolling Text Scrolling Text Scrolling Text Scrolling Text Scrolling Text Scrolling Text Scrolling Text
Scrolling Text Scrolling Text
Scrolling Text
Go Back  Xtreme Visual Basic Talk > > > Scrolling Text


Reply
 
Thread Tools Display Modes
  #1  
Old 07-24-2005, 01:58 PM
Feline Feline is offline
Newcomer
 
Join Date: Jul 2005
Posts: 22
Default Scrolling Text


I'm creating an RPGMaker style program and matching engine. The NPCs can, if the user chooses, display text in a box on the bottom of the screen that scrolls until the box is filled up, either in characters or with X amount of lines. The program then waits for the "Enter" key to continue scrolling through the box with more text. I'm wondering how I would go about making such a scrolling box. Any ideas?
Reply With Quote
  #2  
Old 07-24-2005, 02:03 PM
Iceplug's Avatar
IceplugScrolling Text Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Default

I typically use an array of lines if I'm drawing the textbox and just do an array shift to go to the next line. The process is more cumbersome with a TextBox control since you aren't using the scrolling as it is intended.
A grotesque way of doing it might be to move the textbox up by decreasing the value of its Top property, but this could cause problems if the textbox ends up on top of the viewing area. An alternative would be to clear the textbox, do the array of lines solution and just concatenate the elements in the string array together with vbNewlines.

Are you planning on drawing your text or are you going to use a textbox? If you don't have any knowledge of drawing text, then go for the textbox.
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
  #3  
Old 07-25-2005, 09:57 PM
StressedGeezer's Avatar
StressedGeezer StressedGeezer is offline
Junior Contributor
 
Join Date: Apr 2004
Location: Cambridge, England
Posts: 259
Default

Are you trying to make the textbox similar to the old Dungeon Master text box, where new messages come in at the bottom and push the other messages up? If so, have a look at the zip that I posted in this thread - there's a bit of code that does exactly that. Obviously you'll need to edit it to suit your own purposes, but I think it's close to what you might need.

Just run the demo, and the first lines of text that appear after the demo starts are generated using the code you'll be interested in.

Sorry about using the graphic fonts but you can always change that

EDIT: oops, I thought this was the DX forum, sorry! Maybe you should go with Iceplug's advice if you are not using DX
__________________
Geezer

Last edited by StressedGeezer; 07-25-2005 at 10:04 PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Scrolling Text
Scrolling Text
Scrolling Text Scrolling Text
Scrolling Text
Scrolling Text
Scrolling Text Scrolling Text Scrolling Text Scrolling Text Scrolling Text Scrolling Text Scrolling Text
Scrolling Text
Scrolling Text
 
Scrolling Text
Scrolling Text
 
-->