Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Type writer text

Posted on 1998-10-25
2
Medium Priority
?
301 Views
Last Modified: 2010-05-18
Hi
I've been trying to fix a intro to a small game..
I'd like it to scroll character by character..like a Type writer text, the first letter is fixed..does'nt move, then
the next letter adds, and the next.

I've fooled around with len left and right function +1 -1
But it seems like they are fooling around with me

Can anyone help me out
coffeeman@swipnet.se
0
Comment
Question by:az1
2 Comments
 
LVL 1

Accepted Solution

by:
rakkas earned 150 total points
ID: 1441573
Hi!

here's an example. In this one It prints to a label named label1. You should use the timer function instead of the for-loop so the time will be the same on all systems and computers.


Dim sText As String
sText = "This is a message..."
For i = 1 To Len(sText)
    Label1.Caption = Mid(sText, 1, i)
    DoEvents 'Let the system do some stuff, ie draw your string to the screen!!
        For a = 1 To 1000000 'use a timer or something instead of this for-loop to make a pause
        Next a
Next i
0
 

Author Comment

by:az1
ID: 1441574
thanks
It works like a charm
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question