General information
Category:
ActiveX controls
Title:
Return data from activex dll?
Very new to this so please bear with me...
I'm trying to send and return the text from a textbox control on a form from an
activex dll called from vfp5. My vfp app calls the inits the dll, sends the
string "hello" and creates the form. "hello" appears in the textbox. Then I type "hello again" in the textbox and click a command button (MyButton).
The button click crashes the dll. I'm sure I'm doing something wrong but
don't know what it is.
Here's what I have so far...
rem start of dll class
Public MyText As String
Public Function Start()
MyScreen.Show (1)
MyScreen.Text1.Text = MyText
End Function
Public Function GetMyText()
GetMyText = MyText
End Function
Public Function SetMyText(SomeText As String)
MyText = SomeText
End Function
rem end of dll class
rem start click of command button MyButton on form MyScreen
MyTextUtil.MyText=Text1.text
rem end click of command button MyButton on form MyScreen
* start of vfp call
oVBObj = CREATEOBJECT("MyDll.MyTextUtil")
oVBObj.SetMyText('hello')
oVBObj.Start()
=messagebox(oVBObj.GetMyText)
* end of vfp call
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only