This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: MSI Custom dialog question
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2008
09:13 AM
MSI Custom dialog question
I normall use the installscript installs but we are looking at doing some MSI installs so I'm prototyping some of the custom stuff we do and I have hit the first small speedbump.
I'm creating a custom dialog for our registration info and on that dialog our product key has 5 field of 5 charactors each. How do I make the cursor move the the nect field when the user has entered the 5 charators in the first field and then the next. I do not want the user to have to press the tab key I just want the cursor to move. I have a dialog in installscript that does this but cannot figure it out in MSI.
Thanks
Brandon
I'm creating a custom dialog for our registration info and on that dialog our product key has 5 field of 5 charactors each. How do I make the cursor move the the nect field when the user has entered the 5 charators in the first field and then the next. I do not want the user to have to press the tab key I just want the cursor to move. I have a dialog in installscript that does this but cannot figure it out in MSI.
Thanks
Brandon
(7) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2008
10:16 AM
There's no real way to do this in MSI dialogs. You might be able to hack it by finding the window and playing some tricks with messages, but it would be a rather fragile solution even if it can work. If you're strongly set on having this behavior, and want to do it right, you'll need to examine using an InstallScript or C++ (etc.) dialog, either one out of the sequence (risking size and position mismatches), or as part of a full external UI.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2008
10:30 AM
One option might be to use a MaskedEdit control, about which please see the MSI help library...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2008
10:37 AM
What about using the masked edit control? We use this with success in the basic MSI setup.
When you add a masked edit in design mode it looks like a single field - you have to sort of look beyond that. How you control the number 'boxes' displayed is by the Masked Edit format itself.
For instance the Masked Edit <^^^^-^^^^-^^^^-^^^^> will display four fields with hyphens between each field. The windows installer will move the cursor from one field to the next once the correct number of characters are in place.
Note that the implementation of the masked edit field is weak lacking any level of flexibility and limited control over the character set and such. For instance I do not have an effective way to prevent users from typing in the hyphen character. However, if all you need is a way to switch between fields automagically then the masked edit is your control of choice.
When you add a masked edit in design mode it looks like a single field - you have to sort of look beyond that. How you control the number 'boxes' displayed is by the Masked Edit format itself.
For instance the Masked Edit <^^^^-^^^^-^^^^-^^^^> will display four fields with hyphens between each field. The windows installer will move the cursor from one field to the next once the correct number of characters are in place.
Note that the implementation of the masked edit field is weak lacking any level of flexibility and limited control over the character set and such. For instance I do not have an effective way to prevent users from typing in the hyphen character. However, if all you need is a way to switch between fields automagically then the masked edit is your control of choice.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2008
10:38 AM
Curses! Robert beat me to the post!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2008
10:44 AM
Oh, the masked edit moves you from field to field automatically? I stand corrected. Much better solution than that which I alluded to above.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2008
05:00 PM
Sorry I'm feeling very new here again. How will a masked edit field move me from field to field automagicly?
Brandon
Brandon
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 17, 2008
03:50 AM
I am not sure I know enough about the masked edit control to explain how it works. I **think** it works because it is technically only ONE field. However, when you use a character that is considered a constant in the masked edit field, the masked edit control uses the constant as a separator for each visible field to the end user.
Look up in the InstallShield help MaskedEdit Control[Windows Installer]. It will give you the technical specs on the format characters and such.
Look up in the InstallShield help MaskedEdit Control[Windows Installer]. It will give you the technical specs on the format characters and such.
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)