Visit the Ironworks Gaming Website Email the Webmaster Graphics Library Rules and Regulations Help Support Ironworks Forum with a Donation to Keep us Online - We rely totally on Donations from members Donation goal Meter

Ironworks Gaming Radio

Ironworks Gaming Forum

Go Back   Ironworks Gaming Forum > Ironworks Gaming Forums > General Discussion > General Conversation Archives (11/2000 - 01/2005)
FAQ Calendar Arcade Today's Posts Search

 
 
Thread Tools Search this Thread
Old 03-10-2003, 02:14 AM   #1
LennonCook
Jack Burton
 

Join Date: November 10, 2001
Location: Bathurst & Orange, in constant flux
Age: 37
Posts: 5,452
How do you force a newline in a rich text box ??
LennonCook is offline  
Old 03-10-2003, 03:47 AM   #2
Jay&SilentBob
Elite Waterdeep Guard
 

Join Date: February 2, 2003
Location: Jay and Silent Bob Strike Back
Age: 46
Posts: 22
When I saw this thread the one and only thought to come to my head was has comeone else discovered the wonders of VB beer
__________________
<b>YOU KNOW WHAT?<br />THERE IS NO EASTER BUNNY! <br />OVER THERE THATS JUST A GUY IN A SUIT!</b>
Jay&SilentBob is offline  
Old 03-10-2003, 05:08 AM   #3
wellard
Dracolisk
 

Join Date: November 1, 2002
Location: Australia ..... G\'day!
Posts: 6,123
Quote:
Originally posted by Jay&SilentBob:
When I saw this thread the one and only thought to come to my head was has comeone else discovered the wonders of VB beer
As I write this, the ice cold VB beside me winks with a c'mon sultry look upon its dew laden exterior [img]graemlins/heee.gif[/img]

lennon cook please explain *p.hanson voice*
__________________


fossils - natures way of laughing at creationists for over 3 billion years
wellard is offline  
Old 03-10-2003, 09:56 AM   #4
Night Stalker
Lord Ao
 

Join Date: June 24, 2002
Location: Nevernever Land
Age: 49
Posts: 2,002
Run time or design time. At run time the RTbox traps all standard ASCII keys but tab. So to add a new line at run time, just type the 'enter' key.
You must make sure the custom property "Mulit-line" is true (checked).
__________________
[url]\"http://www.duryea.org/pinky/gurkin.wav\" target=\"_blank\">AYPWIP?</a> .... <img border=\"0\" alt=\"[1ponder]\" title=\"\" src=\"graemlins/1ponder.gif\" /> <br />\"I think so Brain, but isn\'t a cucumber that small called a gherkin?\"<br /><br />Shut UP! Pinky!
Night Stalker is offline  
Old 03-10-2003, 12:42 PM   #5
Djinn Raffo
Ra
 

Join Date: March 11, 2001
Location: Ant Hill
Age: 49
Posts: 2,397
Not sure if this is what you mean or not but..

& vbCrLf

or

& vbNewLine

and their are a couple of others as well.

if your rich text box is named txtRTB

you would say

txtRTB = txtRTB & vbCrLf

or if you were using a string variable

strString = "A line of text" & vbCrLf & "Another Line of text"
txtRTB = strString

would look like this:

A line of text
Another line of text

[ 03-10-2003, 12:43 PM: Message edited by: Djinn Raffo ]
Djinn Raffo is offline  
Old 03-10-2003, 02:07 PM   #6
Downunda
Set - Egyptian God of Chaos
 

Join Date: January 7, 2002
Location: Christchurch, New Zealand
Age: 45
Posts: 2,975
I too thought the question was regarding the emerald coloured beverage of choice for many Australians but then I read Sookmas post and figured it actually stood for Very Boring Question
__________________
\"Doing stuff is overrated, like Hitler, he did lots of stuff, but doesn\'t everybody wish he\'d just stayed at home and smoked pot?!?\"
Downunda is offline  
Old 03-10-2003, 03:39 PM   #7
LennonCook
Jack Burton
 

Join Date: November 10, 2001
Location: Bathurst & Orange, in constant flux
Age: 37
Posts: 5,452
Thanks, Djinni [img]smile.gif[/img]
Downunder - just wait until you see what 'boring' things this does

One other question... my program doesn`t like Object.SetFocus in one case, but does it properly when I use the same code elsewhere in the code...
The only two differences I can find between the one that does work and the one that doesn`t:
- The one that doesn`t is in a subprogram that fires on Form_Load
- The one that doesn`t work is at the End of that subprogram, ie. last thing before the End Sub.
Could either of those have anything to do with it ??
The error it returns is "Invalid Function".
LennonCook is offline  
Old 03-10-2003, 04:28 PM   #8
andrewas
Harper
 

Join Date: October 2, 2001
Location: Aberdeen, Scotland
Age: 42
Posts: 4,774
At form load, the object might not exist yet. Assuming thats the one that isnt working, your not exactly very clear on that point.
__________________
[img]\"http://www.sighost.us/members/Zvijer/andrewas.gif\" alt=\" - \" />
andrewas is offline  
Old 03-10-2003, 04:52 PM   #9
Night Stalker
Lord Ao
 

Join Date: June 24, 2002
Location: Nevernever Land
Age: 49
Posts: 2,002
Question Mark

If you can avoid it, don't use an untyped object or variant. While flexible, you don't know the type until runtime.

Now for your ? ....

It seems there is an invalid object reference in your sub. Are you passing the proper object? Does your object have the proper scope? e.i Is it a module global or a local to the _Load event? If it's local to _Load, then it is out of scope in the sub. Also, use a typed object variable. If the object is a textbox, declare it as a textbox ... this will help you at design time.

MAKE SURE YOU HAVE THIS STATEMENT IN EACH CODE MODULE AS THE FIRST LINE
.

code:
OPTION EXPLICIT
[/QUOTE]This forces variables to be specifically declared. Otherwise, if not declared in a particular scope, VB will create a new variable as variant. Goto to Tools '--> Options
and make sure the "Require variable declaration" option is checked. This makes VB put the statement in.

Always declare variables like this

code:
dim var as type
[/QUOTE]If you leave out the type, it is declared as a variant.
__________________
[url]\"http://www.duryea.org/pinky/gurkin.wav\" target=\"_blank\">AYPWIP?</a> .... <img border=\"0\" alt=\"[1ponder]\" title=\"\" src=\"graemlins/1ponder.gif\" /> <br />\"I think so Brain, but isn\'t a cucumber that small called a gherkin?\"<br /><br />Shut UP! Pinky!
Night Stalker is offline  
Old 03-10-2003, 04:59 PM   #10
Night Stalker
Lord Ao
 

Join Date: June 24, 2002
Location: Nevernever Land
Age: 49
Posts: 2,002
Question Mark

No, all controls have been created by the time the _Load event fires. For more info check the topic "Life Cycle of Visual Basic Forms" in the Help section.
__________________
[url]\"http://www.duryea.org/pinky/gurkin.wav\" target=\"_blank\">AYPWIP?</a> .... <img border=\"0\" alt=\"[1ponder]\" title=\"\" src=\"graemlins/1ponder.gif\" /> <br />\"I think so Brain, but isn\'t a cucumber that small called a gherkin?\"<br /><br />Shut UP! Pinky!
Night Stalker is offline  
 


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

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 On
HTML code is On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Another Video Card Question becomes Antivirus Question!!! Bahamut General Conversation Archives (11/2000 - 01/2005) 19 12-27-2003 11:40 PM
One BIZZZARE question and one normal everyday question Sythe Baldurs Gate II: Shadows of Amn & Throne of Bhaal 3 09-10-2002 02:44 AM
Early ch6 question - poss spoiler info in question... Fljotsdale Baldurs Gate II Archives 5 03-18-2001 12:33 AM
Dragon spire crystal question + question about Giant killing for the warriorguild Malakez Wizards & Warriors Forum 4 02-20-2001 03:52 PM
spell lvl question, buying spells question, and role ascension question Paupa Wizards & Warriors Forum 1 12-31-2000 04:59 PM


All times are GMT -4. The time now is 08:17 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved