Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, May 6, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - Controls
Forum to discuss usage & tips for SalesLogix controls and other 3rd party ActiveX controls. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Controls | New ThreadView:  Search:  
 Author  Thread: TRichEdit - Open file
Thomas Aussem
Posts: 57
 
TRichEdit - Open fileYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 Mar 06 6:47 AM
fiogf49gjkf0d
Hi,

does anyone knows, how I can load a file (RTF or TXT) into a RichEdit-Control. I have tried LoadFile and LoadFromFile, but both didn't work.

Thanks,
Thomas
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: TRichEdit - Open fileYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Mar 06 12:21 AM

otc albuterol substitute

over the counter albuterol walgreens click here
To my knowledge, there's no way to actually load a file. However, you can read an RTF file directly and write it to the RichEdit control as RichText.

Here's a sample:

Dim fso
Dim stream
Dim file

file = "c:\somedir\myfile.rtf"

Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(file) Then
Set stream = fso.OpenTextFile(file, 1)
RichEdit1.RichText = stream.ReadAll
stream.Close
Set stream = Nothing
End If
Set fso = Nothing

Get the idea? It does work. You'll still have all the RTF markup for the text so you'll retain colors, fonts, etc etc etc from the RTF and it will display correctly in the control (even though this is a bit of a workaround - it would be better for it to just include a method to load a doc).

-Ryan
[Reply][Quote]
Thomas Aussem
Posts: 57
 
Re: TRichEdit - Open fileYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Mar 06 3:38 AM

viagra and weed dangerous

viagra laced weed
Thanks, Ryan!
It works very well!

Cheers,
Thomas
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 5/6/2024 8:54:30 PM