Question Scrolling Text...

PRo-Beaniie

Well-known member
Joined
Mar 17, 2011
Messages
55
Location
Hertford, Hertfordshire, United Kingdom
Programming Experience
3-5
i was in the middle of writing out a all the instructions for my game when i had a idea why not scroll the instructions in a box. The text i would have in this box is somthing like this...

USE THE ARROW KEYS LOCATED ON THE RIGHT OF YOUR KEYBOARD TO CONTROL THE AIRCRAFT. PRESS SPACE TO FIRE PRIMARY WEAPON AND B TO FIRE SECONDARY WEAPON ...
I would like the size of the box to be 136, 122 and the text to scroll in blocks ... is this possible ???:confused:
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,570
Location
Sydney, Australia
Programming Experience
10+

Bryce Gough

Active member
Joined
Mar 8, 2011
Messages
36
Location
Perth, Australia
Programming Experience
1-3
I used HTML to create the scrolling effect, here's how to do it:

1) Double click in solution explorer "My Project"
2) Go resources, and go to the drop down menu "Add Resource" and select add new text file, name it "HTML".
3) Write the below text into the text box that comes up, and change "My Text" to your instructions:
VB.NET:
<body style="color: #222;text-shadow: 0px 2px 3px #555;" bgcolor="whitesmoke">
<marquee direction="up" scrolldelay="210" onmouseover='this.stop()' onmouseout='this.start()'>
My Text
</body>
(This will make it so it scrolls, and when mouseover the text stops scrolling.

4) Go to your form and add a web browser. (and resize it)
5) Double click your form to bring up the Form1_Load, and write:
VB.NET:
Webbrowser1.Documenttext = My. Resources.HTML

Hope I helped :D

And also, what is "text to scroll in blocks"??
I'll help you if you tell me what it means...
 

PRo-Beaniie

Well-known member
Joined
Mar 17, 2011
Messages
55
Location
Hertford, Hertfordshire, United Kingdom
Programming Experience
3-5
This is perect, works fine just what i was after. However know i have this withing my form my keyboard controls no longer work this s because the browser is using them too... also i would like to change the font and the font size in the marquee do you know how to change this ?...


* i have now managed to fix the Controls... :)
 
Last edited:
Top Bottom