Forum Replies Created
I downloaded it again and got the same error.
Trying to register it with Regsvr32 per your instructions also failed, with the message that “utilityobject.dll is not an executable file and no registration helper is registered for this file type.”
I downloaded the updated utilityobject.dll replaced the existing utilityobject.dll file in the Formativ program directory but it now gives me an AddTypeLib (LIBID_UtilityServer) failed when I try to run any macro, including the DYnamic Dialog Test example.
I got the same funky scrollbars when I used a caption in a MultiLineLabelControl.
Your promptness in addressing these problems is a good omen for the future of what promises to be a very valuable product.
Thanks, and I’ll be sure to keep constructive suggestions coming to improve Formativ as I encounter problems or have good ideas.
Using the constants and switching the button labels doesn’t really help because the upper-right [X] (close) returns 2, the same as button2 and the Btn2 constant, so using Button 2 as OK would mean that a close dialog action would be interpreted as OK instead as cancel, so I still have to suppress button 1.
Although Button6 may internally be asigned to 7, that’s not what I’m seeing, because using the following code, button 6 doesn’t even appear, so I can’t tell what it would return and can’t use it.
The combined effect of these problems effectively leaves me with only four usable buttons.
Also, if enable SigDlg.AutoSize = TRUE in the following, it causes an out of range error in the last line. What’s going on there?
set SigDlg = Utilities.NewControlBoxDialog
.Caption = CAPTION
.Title = “Select Signature”
.Button1Visible = FALSE ‘returns 1 if used
.Button2Caption = “&None” ‘2, same as Close [X]
.Button3Visible = TRUE
.Button3Caption = “&Personal” ‘3
.Button4Visible = TRUE
.Button4Caption = “&Casual” ‘4
.Button5Visible = TRUE
.Button5Caption = “&Disclaimer” ‘6 (not 5)
.Button6Visible = TRUE
.Button6Caption = “&View/Edit” ‘doesn’t work
‘ SigDlg.AutoSize = TRUE
SigDlg.Height = 120
SigDlg.ShowWizardImage = FALSE
rButton = SigDlg.Execute
msgBox (rButton & “sdffs” & Btn2)
SigList = Array(“Unused”,”Cancel”,”Personal”,”Casual”,”Button5bug”,”Disclaimer”)
SigFile = SIGNATURE_LOCATION & SigList(rButton – 1) & “.sig”
Originally posted by Support 2:
Thanks for your feedback. The return values of the buttons are effectively arbitrary numbers. It is correct that Button 5 returns a value of 6 and you will find that Button 6 returns a value of 7. This design is based on the value of constants used within the ‘behind the scenes’ code in the Utility Object DLL.
The best way to make your code appear more intuitive is to use the inbuilt Formativ constants for the button return values, i.e. Btn1 for Button 1, Btn5 for Button 5 and so on. For example,
if rButton = Btn5 then
In regards to the OK and Cancel button positioning, you can simply change the captions of the first two buttons (buttons 1 & 2) to achieve your desired interface requirements and use the Btn1 and Btn2 constants when you check the dialog return value.
I hope this helps clarify the operation of the dialog buttons. Please let me know if you have any other questions.
Oh, duh, just set:
Button1Visible = FALSE
and button two becomes the rightmost button, putting Cancel where it ought to be.
That helps, but greater control would still be nice, and button 5 still returns a 6…