Can someone point me in the right direction? I have the following code I need to convert to VFP6. This code starts another application and fills in some data fields. I need to do the same form Fox. I am particularly concerned with the object declaration. What would be the equivalent in Fox? In the VB6 project, I had to add a reference to a library. Any recommendations or helpful hints would be appreciated. Here is the code.
'DECLARE THE OBJECT WITH EVENTS
Private WithEvents LASQform1 As las.LASQForm2
Dim file_name As String
'HERE WE INITIALIZE THE DATA, SET THE CLIENT DATA, AND
'FINALLY LAUNCH LASER APP
Private Sub LaunchButton_Click()
Set LASQform1 = Nothing
Set LASQform1 = New LASQForm2 'CLEAR THE OBJECT
ViewButton.Enabled = False
'CALL INITIALIZE FIRST TO PREPARE LASER APP FOR A NEW CLIENT
LASQform1.InitializeData 'ALWAYS CALL THIS BEFORE SETTING PROPERTIES!!
Call Set_BasicScreenValues
'CALL EXECUTE TO HAVE LASER APP SHOW ITSELF WITH NEW DATA
LASQform1.Execute
CloseButton.Enabled = True
Exit Sub
Problem: MsgBox "Error: Unable to establish a connection with Laser App. Make sure Type Library is registered."
End Sub
Private Sub Set_BasicScreenValues()
With LASQform1
.SetField "Client_id", "24624dfsh"
.SetField "ClientLastName", Text3.Text
.SetField "ClientFirstName", Text1.Text
.SetField "ClientMi", Text2.Text
End With
End Sub
Thanks,
Auguy
'DECLARE THE OBJECT WITH EVENTS
Private WithEvents LASQform1 As las.LASQForm2
Dim file_name As String
'HERE WE INITIALIZE THE DATA, SET THE CLIENT DATA, AND
'FINALLY LAUNCH LASER APP
Private Sub LaunchButton_Click()
Set LASQform1 = Nothing
Set LASQform1 = New LASQForm2 'CLEAR THE OBJECT
ViewButton.Enabled = False
'CALL INITIALIZE FIRST TO PREPARE LASER APP FOR A NEW CLIENT
LASQform1.InitializeData 'ALWAYS CALL THIS BEFORE SETTING PROPERTIES!!
Call Set_BasicScreenValues
'CALL EXECUTE TO HAVE LASER APP SHOW ITSELF WITH NEW DATA
LASQform1.Execute
CloseButton.Enabled = True
Exit Sub
Problem: MsgBox "Error: Unable to establish a connection with Laser App. Make sure Type Library is registered."
End Sub
Private Sub Set_BasicScreenValues()
With LASQform1
.SetField "Client_id", "24624dfsh"
.SetField "ClientLastName", Text3.Text
.SetField "ClientFirstName", Text1.Text
.SetField "ClientMi", Text2.Text
End With
End Sub
Thanks,
Auguy