QuickStart guide for the Impatient

Download Dumont from:
 http://www.showoff-db.org/DumontDLL/src/release/
Copy everything from that directory and place it in a directory somewhere on your computer. My personal preference is to place it in a directory called c:/Commence/DumontDLL where it can be commonly available to all users. This may change for Windows Vista which aparently has stricter requirements of where and when other programs can run, but I can't comment on that now because I don't have access to a Vista machine.

Register the DumontDLL
 run 'register.bat'
That batch file takes care of registering Dumont on your system so that it is available to vbScript.

Hook a form
 $OBJECT=Form
 Option Explicit
 
 dim ddll: set ddll = createObject("DumontDLL")
 dim dfrm: set dfrm = ddll.Form(Form)
 
 Sub Form_OnLoad()
   dfrm.onLoad
 End Sub
 
 Sub Form_OnSave()
   dfrm.onSave
 End Sub
 
 Sub Form_OnCancel()
   dfrm.onCancel
 End Sub
 
 Sub Form_OnEnterTab(ByVal TabName)
   dfrm.onEnterTab TabName
 End Sub
 
 Sub Form_OnLeaveTab(ByVal TabName)
   dfrm.onLeaveTab TabName
 End Sub
 
 Sub Form_OnEnterField(ByVal FieldName)
   dfrm.onEnterField FieldName
 End Sub
 
 Sub Form_OnLeaveField(ByVal FieldName)
   if( dfrm.onLeaveField(FieldName) ) then _
     Form_OnChangeField(FieldName)
 End Sub
 
 Sub Form_OnEnterControl(ByVal ControlID)
   dfrm.onEnterControl ControlID
 End Sub
 
 Sub Form_OnLeaveControl(ByVal ControlID)
   dfrm.onLeaveControl ControlID
 End Sub
 
 Sub Form_OnActiveXControlEvent(ByVal ControlID, ByVal EventName, ByVal ParameterArray )
   dfrm.onActiveXControlEvent ControlID, EventName, ParameterArray
 End Sub
 
 Sub Form_OnClick(ByVal ControlID)
   dfrm.onClick ControlID
 End Sub
 
 Sub Form_OnChange(ByVal ControlID)
   dfrm.onChange ControlID
 End Sub
 
 Sub Form_OnKeyPress(ByVal ControlID, ByVal KeyAscii)
   dfrm.onKeyPress ControlID, KeyAscii
 End Sub
 
 '
 ' This subroutine gets called any time a field changes value.  It does
 '  not get called when nothing on the form is changed.
 '
 Sub Form_OnChangeField(ByVal FieldName)
   'respond to field-specific changes
 End Sub
That code basically hooks the DumontDLL into your form so that it can take care internally the things it needs to take care of. These things include keeping track of all the changes to all the fields on the form, and writing that change log to another category and so on. It is only able to do these things if you call the DumontDLL manually on every event provided by Commence. In the future this may change, in other words Dumont may be able to do this automatically, but for now, this is the way it is.

Review the Form Object
Review the specifications on the QCommenceForm Form object. This object is the primary object that you will be accessing your new Commence-wrapped Dumont Form object. It has lots of enhanced features for things.




~ ~ ~ ~ ~ ~
Source Code without Comments is like a Cranberry Garland
without the berries. Comment your Code!
 
Commence Database User Support Group Forum
http://newsgroup.showoff-db.org/
~ ~ ~ ~ ~ ~
Author: Mark Petryk
Lorimark Solutions, LLC
mark@lorimarksolutions.com