|
-
Nov 14th, 2000, 03:34 AM
#1
Thread Starter
Junior Member
I would greatly appreciate some help with this problem I'm having. I am a newby to VB 6.0. I am building a project in college that requires an about frm and a rules frm. I n the rules frm I just want to display the yahtzee game rules and the scoring rules. I did a forum search and could not come up with anything like I'm looking to do. I sure would like some help with this.
Thanx,
Neo1008
-
Nov 14th, 2000, 03:52 AM
#2
Hyperactive Member
What is it you want to do?
A labels caption length can be unlimited (unlike controls and forms), so you could put all you rules etc in one label. Or you could have seperate labels for each paragraph etc.
I'm not sure i understand what it is your asking...
td.
"One logical slip and an entire scientific edifice comes tumbling down." - Robert M. Pirsig
[email protected]
"but if Einstein is right and God is in the details, reality requires that we sometimes get religion." - Scott Meyers.
-
Nov 14th, 2000, 04:03 AM
#3
Hyperactive Member
To produce a result similar to the below:
Code:
1) This is a rule
2) This is another rule
3) Yet another rule
Investigate the use of the vbCrLf function.
Clue...Stands for Visual Basic Carriage Return Line Feed.
Hope this was of help...
-
Nov 14th, 2000, 04:07 AM
#4
Addicted Member
You have to place a control on the form. The control that you place on the form will contain the text you want to display, so you could use a Label, Textbox, RichTextBox, etc.
The Label control does not have a scrollbar, so only use this if all the text can fit into the control.
The Textbox Control does have a scrollbar, and can hold quite a large amount of text. But all the text will look the same (i.e. you cannot have different colors, fonts, etc.)
The RichTextBox can display formatted text, and would probably be the best control for a commercial app, but it is more complex and if I were you I'd use the TextBox.
The Textbox has a Text property and that is where you would want to place your text.
Create a sub procedure that places the text into the textbox. Use vbCrLf to add line breaks to the text:
Code:
Private Sub DisplayRules
Dim Txt as String
Txt = "YAHTZEE" & vbCrLf & vbCrLf
Txt = Txt & "The Object of the Game" & vbCrLf
Txt = Txt & "More rules and stuff" & vbCrLf
.
.
.
TxtRules.Text = Txt
End Sub
Hope this helps
Shrog
http://shrog.iwarp.com
-
Nov 14th, 2000, 04:07 AM
#5
Hyperactive Member
or even the Constant vbCrLf
;-)
td.
"One logical slip and an entire scientific edifice comes tumbling down." - Robert M. Pirsig
[email protected]
"but if Einstein is right and God is in the details, reality requires that we sometimes get religion." - Scott Meyers.
-
Nov 14th, 2000, 04:10 AM
#6
Hyperactive Member
There is a greater overhead when using text boxes, so only use them if you need scroll bars etc, text editing etc.
If it's just to show text, use labels.
td.
"One logical slip and an entire scientific edifice comes tumbling down." - Robert M. Pirsig
[email protected]
"but if Einstein is right and God is in the details, reality requires that we sometimes get religion." - Scott Meyers.
-
Nov 14th, 2000, 04:23 AM
#7
Addicted Member
Big Overhead
I don't think that overhead is an issue here.
1. The user is not looking for fast performance when reading rules to a game.
2. You'll have a hard time trying to fit everything into a label without scrollbars.
3. Rules are often displayed in a help file, with formatting and hyperlinks. A textbox is very light in comparison.
4. The user will only have one little textbox open. The overhead of this doesn't make a difference unless the user opens hundreds of instances, or if hundreds of users use it over a network.
Shrog
-
Nov 14th, 2000, 04:29 AM
#8
Thread Starter
Junior Member
Labels
VB dudes are the coolest. HEHEHEHEHEHEHE!!!!! [^]
This is what I'm looking to do, and it is not commercial. It's just a simple little class project called Yahtzee. We have to build a Yahtzee game that consist of a slshfrm, main frm, aboutfrm, rules frm. I have the splash and mainfrm and the about frm. I just need to put some text in the rule frm that is quite alot of text. I just want the user to be able to read it, and if need be scroll it down and up to view the rules and score chart.
I think the text box is a good idea. I will try that out and let all of you know what comes of it and make the whole program down loadable from my server when done. It will be for free for you guys. HEHEHEHEHEHEHE!!!!!!
Thanx for such a quick response.
Neo1008.
If there are anymore suggestions just post it.[^]
Free Your Creative Spirit
-----------------------------------
-
Nov 14th, 2000, 04:39 AM
#9
Hyperactive Member
Shrog, it was a rule of thumb.
td.
"One logical slip and an entire scientific edifice comes tumbling down." - Robert M. Pirsig
[email protected]
"but if Einstein is right and God is in the details, reality requires that we sometimes get religion." - Scott Meyers.
-
Nov 14th, 2000, 04:47 AM
#10
Thread Starter
Junior Member
lables
I hope this is not going to start an argument.
[Edited by Neo1008 on 11-14-2000 at 04:51 AM]
Free Your Creative Spirit
-----------------------------------
-
Nov 14th, 2000, 04:53 AM
#11
Addicted Member
No, of course not. No offense was meant.
I'm glad that we could help.
Good luck!
Shrog
-
Nov 14th, 2000, 04:56 AM
#12
Thread Starter
Junior Member
lables
cool I glad to heart that.
Free Your Creative Spirit
-----------------------------------
-
Nov 14th, 2000, 10:22 PM
#13
Thread Starter
Junior Member
A rich text box
where is the rich text control located in VB 6.0
Free Your Creative Spirit
-----------------------------------
-
Nov 15th, 2000, 12:50 AM
#14
transcendental analytic
Press Ctrl+T, Check the Microsoft Rich Text Control in the list and press ok
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 15th, 2000, 02:40 AM
#15
Thread Starter
Junior Member
Labels,RichTextBoxes
Free Your Creative Spirit
-----------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|