关于VB事件在DELPHI中如何处理的问题? ( 积分: 200 )

  • 主题发起人 主题发起人 fzkdhxd
  • 开始时间 开始时间
F

fzkdhxd

Unregistered / Unconfirmed
GUEST, unregistred user!
在VB中的事件可以自已定义,在DELPHI中如何来引用,谢谢各位大虾们:<br>//VB源代码:<br>Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, pVal As SAPbouiCOM.IItemEvent, BubbleEvent As Boolean)<br> &nbsp; &nbsp;<br> &nbsp; &nbsp;'//*************************************************************************<br> &nbsp; &nbsp;'// BubbleEvent sets the behavior of SAP Business One.<br> &nbsp; &nbsp;'// False means that the application will not continue processing this event.<br> &nbsp; &nbsp;'//*************************************************************************<br> &nbsp; &nbsp;<br> &nbsp; &nbsp;If pVal.FormType &lt;&gt; 0 Then<br> &nbsp; &nbsp;<br> &nbsp; &nbsp;'//************************************************************<br> &nbsp; &nbsp;'// the message box form type is 0<br> &nbsp; &nbsp;'// I chose not to deal with events triggered by a message box<br> &nbsp; &nbsp;'//************************************************************<br> &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp;Select Case pVal.EventType<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'//************************************************************<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// every event will open a message box with the event<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// name and the form UID how sent it<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'//************************************************************<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_ITEM_PRESSED:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies a button release (After exit).<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_ITEM_PRESSED has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_KEY_DOWN:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies a key down event.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_KEY_DOWN has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_GOT_FOCUS:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies an item got focus.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_GOT_FOCUS has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_LOST_FOCUS:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies an item lost focus.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_LOST_FOCUS has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_COMBO_SELECT:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies the selection of valid value in Combo Box.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_COMBO_SELECT has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_CLICK:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies Mouse Up on editable item.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_CLICK has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_DOUBLE_CLICK:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies Mouse Up on editable item in time interval define by<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// SAP Business One as double-click.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_DOUBLE_CLICK has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_MATRIX_LINK_PRESSED:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies a link arrow within a matrix was pressed.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_MATRIX_LINK_PRESSED has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_MATRIX_COLLAPSE_PRESSED:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies collapsed or expanded list within a matrix.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_MATRIX_COLLAPSE_PRESSED has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_VALIDATE:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'//Specifies an item validation event.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_VALIDATE has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_FORM_LOAD:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies that SAP Business One application opened a form.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_FORM_LOAD has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_FORM_UNLOAD:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies that SAP Business One application closed a form.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_FORM_UNLOAD has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_FORM_ACTIVATE:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies that the focus is set on the form.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_FORM_DEACTIVATE:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies that the form lost focus.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_FORM_CLOSE:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies that the form was closed by calling the Close event.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_FORM_CLOSE has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_FORM_RESIZE:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies resizing of the form.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_FORM_RESIZE has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_FORM_KEY_DOWN:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies a key press on an area which is not item of the form.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_FORM_KEY_DOWN has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp;End Select<br> &nbsp; &nbsp;End If<br>End Sub<br>该事件如果要在DELPHI中实现,该如何触发?
 
在VB中的事件可以自已定义,在DELPHI中如何来引用,谢谢各位大虾们:<br>//VB源代码:<br>Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, pVal As SAPbouiCOM.IItemEvent, BubbleEvent As Boolean)<br> &nbsp; &nbsp;<br> &nbsp; &nbsp;'//*************************************************************************<br> &nbsp; &nbsp;'// BubbleEvent sets the behavior of SAP Business One.<br> &nbsp; &nbsp;'// False means that the application will not continue processing this event.<br> &nbsp; &nbsp;'//*************************************************************************<br> &nbsp; &nbsp;<br> &nbsp; &nbsp;If pVal.FormType &lt;&gt; 0 Then<br> &nbsp; &nbsp;<br> &nbsp; &nbsp;'//************************************************************<br> &nbsp; &nbsp;'// the message box form type is 0<br> &nbsp; &nbsp;'// I chose not to deal with events triggered by a message box<br> &nbsp; &nbsp;'//************************************************************<br> &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp;Select Case pVal.EventType<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'//************************************************************<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// every event will open a message box with the event<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// name and the form UID how sent it<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'//************************************************************<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_ITEM_PRESSED:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies a button release (After exit).<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_ITEM_PRESSED has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_KEY_DOWN:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies a key down event.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_KEY_DOWN has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_GOT_FOCUS:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies an item got focus.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_GOT_FOCUS has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_LOST_FOCUS:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies an item lost focus.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_LOST_FOCUS has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_COMBO_SELECT:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies the selection of valid value in Combo Box.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_COMBO_SELECT has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_CLICK:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies Mouse Up on editable item.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_CLICK has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_DOUBLE_CLICK:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies Mouse Up on editable item in time interval define by<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// SAP Business One as double-click.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_DOUBLE_CLICK has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_MATRIX_LINK_PRESSED:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies a link arrow within a matrix was pressed.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_MATRIX_LINK_PRESSED has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_MATRIX_COLLAPSE_PRESSED:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies collapsed or expanded list within a matrix.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_MATRIX_COLLAPSE_PRESSED has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_VALIDATE:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'//Specifies an item validation event.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_VALIDATE has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_FORM_LOAD:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies that SAP Business One application opened a form.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_FORM_LOAD has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_FORM_UNLOAD:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies that SAP Business One application closed a form.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_FORM_UNLOAD has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_FORM_ACTIVATE:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies that the focus is set on the form.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_FORM_DEACTIVATE:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies that the form lost focus.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_FORM_CLOSE:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies that the form was closed by calling the Close event.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_FORM_CLOSE has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_FORM_RESIZE:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies resizing of the form.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_FORM_RESIZE has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case et_FORM_KEY_DOWN:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'// Specifies a key press on an area which is not item of the form.<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SBO_Application.MessageBox _<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;An et_FORM_KEY_DOWN has been sent by a form with the unique ID: &quot; + FormUID<br> &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp;End Select<br> &nbsp; &nbsp;End If<br>End Sub<br>该事件如果要在DELPHI中实现,该如何触发?
 
如果你的工程是ActiveX DLL就你点击project-&gt;Import type library-&gt;Add找到你的COM组件,再Install就 可以像用其他控件一样使用了。<br><br>如果是ActiveX 控件就Component-&gt;Import ActiveX control-&gt;Add找到你的COM组件,再Install就 可以像用其他控件一样使用了。
 
谢谢delphibbs_lee的回复,COM无法安装,install时系统提示类TprogressBar已经存在,如何来处理了?
 
安装的时候另外新建一个包。就不会重复了。
 
谢谢delphibbs_lee,比较愚笨,请问如何在安装的时候新建包,能不能把过程告之,谢谢啦,很急!
 
你点Install之后,默认是Into existing package。你选into new package。然后填入一个新的名称就好了。希望我没记错:)
 
不对呀,还是会提示已存在类!郁闷,谢谢delphibbs_lee,还有什么办法吗?
 
还是会提示;A CLASS NAMED TPROGRESSBAR ALREADY EXISTS?
 
把已经存在的泄掉啊。打开你的包,找到那个类的文件,点remove,然后重新complie。
 
在导入的时候可以更改类名吗?如果可以的画,就该个名称。这个我没试过。不清楚,你自己试试。
 
还是不行,REMOVE后,重新编译又会加回来,郁闷!还有其他什么好的方法吗?谢谢啦!
 
不会啊。可能你哪里操作不对吧。
 
操作都是正确的,真的泄气了!郁闷死了!
 
SORRY,delphibbs_lee,经过全部将类重命名后,可以注册了,但是事件还需要如何来写了?
 
qq:121881512找我
 
后退
顶部