Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP User Interface in Visual Basic
Message
From
28/08/2002 03:15:36
Handi Rusli
PT. Alam Sumbervita
Jakarta, Indonesia
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
VFP User Interface in Visual Basic
Miscellaneous
Thread ID:
00694337
Message ID:
00694337
Views:
49
Hi,

Anybody knows how to create out-of-process(.exe) Automation Server with User Interface in VFP 7 ??

I have a problem when trying to open it from VB, VFP form always closed immediately after I call it from VB environment (it looks like no Read Events in VFP).

Here's the code :



Private Sub Command1_Click()
Dim abc As Object
Set abc = CreateObject("handi.formcoba")
abc.Show (1)
End Sub



**************************************************
*-- Class: formcoba (c:\belajar\com_server.vcx)
*-- ParentClass: form
*-- BaseClass: form
*-- Time Stamp: 08/28/02 11:40:14 AM
*
DEFINE CLASS formcoba AS form OLEPUBLIC


Height = 279
Width = 280
ShowWindow = 2
DoCreate = .T.
AutoCenter = .T.
Caption = "Form"
WindowType = 1
AlwaysOnTop = .T.
Name = "formcoba"


ADD OBJECT text1 AS textbox WITH ;
Height = 23, ;
Left = 168, ;
Top = 120, ;
Width = 72, ;
Name = "Text1"


ADD OBJECT command1 AS commandbutton WITH ;
Top = 204, ;
Left = 36, ;
Height = 27, ;
Width = 84, ;
Caption = "\ Name = "Command1"


ADD OBJECT label1 AS label WITH ;
AutoSize = .T., ;
FontBold = .T., ;
FontName = "Verdana", ;
FontSize = 16, ;
Caption = "Testing COM Server", ;
Height = 27, ;
Left = 12, ;
Top = 24, ;
Width = 233, ;
Name = "Label1"


PROCEDURE Refresh
STORE {} to thisform.text1.Value
RETURN
ENDPROC


PROCEDURE Init
SET DATE ITALIAN
SET TALK OFF
SET CENTURY ON
ENDPROC


PROCEDURE command1.Click
=MESSAGEBOX("Form ini dibuat dengan Microsoft Visual FoxPro")
RETURN
ENDPROC


ENDDEFINE
*
*-- EndDefine: formcoba
**************************************************

is there something wrong with my code ?? Any comments will be appreciated, thank's :-)
Handi Rusli
"Treat people with respect and courtesy, and one will be blessed. Complete task heartily, with best effort and responsibility, and one can achieve the greatest."
Next
Reply
Map
View

Click here to load this message in the networking platform