Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ole/Word Automation - In-place activation.
Message
De
09/05/2001 10:56:04
 
 
À
08/05/2001 18:49:16
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00505062
Message ID:
00505303
Vues:
21
Oi Alvaro,

Try this sequence below, and make your adjustments, maybe you can make it work as you wanted. Coding forms by hand is not the worst thing in the world, I use this to create my forms, and it may give you some advantages. Use subclassing at your will, and it turns even beter.

Hope this helps, qualquer coisa me manda um email!

Fernando
 oFormWord = CreateObj ("frmFormWord")
 oFormWord.Show ()

 Clear Events

*=============================================================================

 Define Class frmFormWord as Form
*------ ----- ----------- -- ----

 Top        = 140
 Left       =   4
 Width      = 775
 Height     = 270
 AutoCenter = .T.
 ShowWindow =   0 
 WindowType =   1 
 Caption    = "Ole/Word Automation - In-place activation"

 Add Object cmdQuit as CommandButton with Top           = 246 , ;
                                          Left          = 660 , ;
                                          Height        =  25 , ;
                                          Width         =  75 , ;
                                          Caption       = "\<Quit"

 Add Object cmdPrint as CommandButton with Top          = 246 , ;
                                          Left          = 550 , ;
                                          Height        =  25 , ;
                                          Width         =  75 , ;
                                          Caption       = "\<Print"

 Add Object cmdEdit as CommandButton with Top           = 246 , ;
                                          Left          = 440 , ;
                                          Height        =  25 , ;
                                          Width         =  75 , ;
                                          Caption       = "\<Edit"

 Add Object oleObject as OLEControl   with Top          =   1 , ;
                                           Left         =   4 , ;
                                           Height       = 240 , ;
                                           Width        = 775 , ;
                                           OleClass     = "Word.Document"    , ;
                                           DocumentFile = "C:\TEMP\TESTE.DOC", ;
                                           AutoSize     = .F.
                                           AutoActivate = 0

 Procedure cmdQuit.Click
*          ------- -----
           ThisForm.Release
 EndProc
 
 Procedure Activate
*          --------
 EndProc

 Procedure Init
*          ----
 EndProc

 Procedure QueryUnload
*          -----------
           This.cmdQuit.Click
           NoDefault
           Return .T.
 EndProc

EndDefine
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform