David,
You're looking for the checkedboxClicked event:
Case "MyCheckbox"
If DEvent = checkboxClicked Then
You can find most all of the potential dialog events in the DialogEvent
enumeration documentation.
Since the checkboxClicked event will happen regardless of whether a
check box is checked or unchecked, you can minimize the amount of code
you have by doing the following:
Case "MyCheckbox"
If DEvent = checkboxClicked Then
Showbox = dControl.Checked
DialogEventHandler = True
Exit Function
End If
The dControl object is the fourth parameter to the DialogEventHandler,
and in the case of "MyCheckbox", if references the check box control.
When Showbox will be true when the check box is checked, and False when
it's not.
Aaron
On 2/24/2013 6:26 PM, David wrote:
In my XML file, I have created a Dialog, that does hold a Checkbox.
The Checkbox has been given the ID MyCheckbox.
In the VBS code, I have a variable:
Dim Showbox
which is a Boolean, and hence should be set to True, if the MyCheckbox
is checked, otherwise set to False.
In the
Function DialogEventHandler
I have the following code. But, I don't know, which term to use, to
check for the checbox state. In the sample, I have marked it with the
term WhatToPutHere. Please, can anyone enlighten me a bit here? I
tried to look in the Developer's Reference, but apparently did not
look the right place, as I did find no answer, and therefore hoped for
some assistance from the community. Maybe I am doing something wrong
in my code, but I just don't know what. :)
Case "MyCheckbox"
If DEvent = WhatToPutHere? Then
Showbox = True
DialogEventHandler = True
Exit Function
Else
Showbox = False
DialogEventHandler = True
Exit Function
End If 'MyCheckbox.
--
Aaron Smith
Web Development * App Development * Product Support Specialist
GW Micro, Inc. * 725 Airport North Office Park, Fort Wayne, IN 46825
260-489-3671 * gwmicro.com
To insure that you receive proper support, please include all past
correspondence (where applicable), and any relevant information
pertinent to your situation when submitting a problem report to the GW
Micro Technical Support Team.