Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
DoClick Method crashes the system and trouble with Send Event
I have tried to use the method "DoClick" for the SRP Button control, but it crashes my system. I used the Send_Message function to call the method as shown below:
This line of code crashes the system every time. I tried using "OLE.DoClick" also with the same result.
I decided to try to use the Send_Event function instead to the OnClick Event, and I am not having any luck there either. I used the following code:
This doesn't crash the system, so in that regard it is an improvement, but there is no response as expected. I also tried the "OLE.OnClick" in the statement with no change in results.
I tried to see if I could get any of the OLE controls that I have from SRP to respond to Send_Event, but had no luck. The Send_Event function DID work fine for all OI controls that I tested.
Just in case you are wondering... I have put in the CREATE event of the Window the following statement to have the system "listening" for the OLE events:
Is there something that I am missing here?
rv = Send_Message(@Window: ".OLE_BUTTON", "DoClick", "0,0", "Left", 0, 0)
This line of code crashes the system every time. I tried using "OLE.DoClick" also with the same result.
I decided to try to use the Send_Event function instead to the OnClick Event, and I am not having any luck there either. I used the following code:
rv = Send_Event(@Window: "OLE_BUTTON", "OnClick", "0,0", "Left", 0, 0)
This doesn't crash the system, so in that regard it is an improvement, but there is no response as expected. I also tried the "OLE.OnClick" in the statement with no change in results.
I tried to see if I could get any of the OLE controls that I have from SRP to respond to Send_Event, but had no luck. The Send_Event function DID work fine for all OI controls that I tested.
Just in case you are wondering... I have put in the CREATE event of the Window the following statement to have the system "listening" for the OLE events:
rv = Send_Message(@Window: ".OLE_BUTTON", "QUALIFY_EVENT", "ALL_OLES", 1)
Is there something that I am missing here?
Comments
rv = Send_Event(@Window: "OLE_BUTTON", "OLE", "OnClick", "0,0", "Left", 0, 0)
Thank you Kevin.