Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to modify images via VFP and Paint
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Divers
Thread ID:
00679380
Message ID:
00679953
Vues:
20
Clear Resources didn't work. Here is my code. Please in a program and run. YOu might have to change the directory and file name of your bmp file below. Also, running in VFP7

TAI


frmMyForm = CREATEOBJECT('MyForm') && Create a form
frmMyForm.AddObject("cmdCommand1","cmdMyEditBtn")
frmMyForm.AddObject("cmdCommand2","cmdMyOtherBtn")

frmMyForm.AddObject('cmdCommand3','cmdMyCmdBtn') && Add Command button
frmMyForm.AddObject("oleObject","olePixObject") && Add OLE object
frmMyForm.oleObject.Top = 0
frmMyForm.oleObject.Left = 0
frmMyForm.oleObject.Height = frmMyForm.Height - 50
frmMyForm.oleObject.Width = frmMyForm.Width


*frmMyForm.cmdCommand1.Visible=.T. && Display the "Quit" Command button

frmMyForm.oleObject.Visible=.T. && Display the OLE control

frmMyForm.Show && Display the form

*frmMyForm.oleObject.DoVerb(-2) && -1 for Edit

READ EVENTS && Start event processing

RETURN

DEFINE CLASS myForm AS Form
Closable = .f.
ShowWindow = 2
Width = 800
Height = 600
AutoCenter = .t.

ENDDEFINE

DEFINE CLASS olePixObject as OLEControl
AutoActivate = 0
AutoVerbMenu = .t.
OleClass ="Paint.Picture" && Server name
DocumentFile = "d:\temp\test.bmp" && This file must exist

ENDDEFINE


DEFINE CLASS cmdMyCmdBtn AS CommandButton && Create Command button
Caption = '\ Cancel = .T. && Default Cancel Command button (Esc)
Left = 470 && Command button column
Top = 563 && Command button row
Height = 25 && Command button height
Visible = .t.

PROCEDURE Click
CLEAR EVENTS && Stop event processing, close form
ThisForm.Release()
ENDDEFINE

DEFINE CLASS cmdMyEditBtn AS CommandButton
Caption = "\ Left = 230
Top = 563
Height = 25
Visible = .t.

PROCEDURE Click
ThisForm.oleObject.DoVerb(-1) && -1 for Edit

ENDDEFINE

DEFINE CLASS cmdMyOtherBtn AS CommandButton
Caption = "\ Left = 350
Top = 563
Height = 25
Visible = .t.

PROCEDURE Click
ThisForm.oleObject.DoVerb(-3) && -1 for Edit
CLEAR RESOURCES

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

Click here to load this message in the networking platform