AnsweredAssumed Answered

Message Box API (Visual Basic Express 2008)

Question asked by 1-QMVHPK on Apr 29, 2010
Latest reply on May 3, 2010 by Brendan Collins

Hi guys,

 

I'm writting an executable file using Visual Basic Express 2008. I was wondering if I can automatically click the "OK" button using VB Express code.

 

I found the following codes in Solidwork API Help but I'm not smart enough to intepret them :

 

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

SldWorks::SendMsgToUser2

 

 

Description

This method displays a message box containing a message to the user, who is required to interact with it before continuing.

 

Syntax (OLE Automation)

result = SldWorks.SendMsgToUser2 ( message, icon, buttons )

 

 

Input:

(BSTR) message

Message for user

Input:

(long) icon

Icon to show in the message box as defined in  swMessageBoxIcon_e

Input:

(long) buttons

Buttons to show in the message box as defined in swMessageBoxBtn_e

Return:

(long) result

Value corresponding to the button the user clicked as defined in swMessageBoxResult_e

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Can somebody help me out.....especially with the "Return" (I bold them out).

 

Again, what I need to know is, how to automatically click "Ok" button using VB....

 

Thanks so much guys......

 

 

Sincerely,

Eddy

Outcomes