Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a texteditor without using word
Message
 
To
24/03/2004 05:47:33
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00889162
Message ID:
00889176
Views:
20
This message has been marked as the solution to the initial question of the thread.
You can use ShellExecute() to modify the text, something like that:
cText = ALLTRIM(thisform.EditBox.Value)
FILETOSTR(cText, "MyFile.DOC")
DECLARE INTEGER ShellExecute IN SHELL32.DLL INTEGER nWinHandle,;
                                            STRING cOperation,;
                                            STRING cFileName,;
                                            STRING cParameters,;
                                            STRING cDirectory,;
                                            INTEGER nShowWindow
result = ShellExecute(0, 'Open', SYS(5)+CURDIR()+"\MyFile.DOC" , '', '', 1)
DO CASE
   CASE result ==  0	     && The system is out of memory or resources.
        msg = "Not enough memmory"
  CASE result ==  2	     && Bad Association (for example, invalid URL)
       msg = "Invalid path"
  CASE result == 29	     && Failure to load application
       msg = "Error during loadint the programm"
  CASE result == 30	     && Application is busy 
       msg = "The application is busy"
  CASE result == 31         && No application association
       msg = "There is no application assossiated to DOC files"
ENDCASE
IF INLIST(result, 0, 2, 29, 30, 31)
   MessageBox(msg, 0 + 64, "Error")
ENDIF
but You must do some cikle to watch when the application is closed to take back edited text (sorry I never do that)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform