The LibraryItemDialog method is a private function in the client-side Critique component. It is called from the ChooseTitle method and it reads an entry in the registry of the reviewer's computer to determine if the Visual Basic frmChooseSetting form (the Add Critique to Library dialog box) is displayed when the LitCrit Outlook application first starts. A call is made to GetSetting, a Visual Basic function, which returns a registry entry if the reviewer has previously chosen not to display the Add Critique to Library dialog box. Three constants — APPNAME ("LitCrit"), SECTION ("Enhanced"), and KEY ("ShowDialog") — are passed to the GetSetting function:
setting = GetSetting(APPNAME, SECTION, KEY)
When the GetSetting function returns a blank, indicating the user has not dismissed the Add Critique to Library dialog box, the dialog box (frmChooseSetting) appears.
If setting = "" Then
frmChooseSetting.Show vbModal
'If user selects the check box then save the setting in registry
If frmChooseSetting.isChecked Then
SaveSetting APPNAME, SECTION, KEY, frmChooseSetting.Response
End If
Else
frmChooseSetting.Response = setting
End If
If the user checks Set this response as default, the result of clicking Yes or No is written to the registry using the SaveSetting function.
The complete code for the LibraryItemDialog method is available in Critique.cls Client Side COM Component in the code section.