Is there an easy way to enforce a minimum number of characters that can be entered in a field before moving on to the next dialog? We have a registration number in the form
XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
I can set a MaxLength of 29 characters on the text field to ensure that it is not too long, but if it's too short I'd like a message box to pop up and say something like "Serial number is not long enough. Please check your typing and re-enter." (OK, something a bit more polite than that, but you get the idea.)
I have seen other posts that mention either creating a plug-in or calling an external DLL, but this seems like overkill for my needs - is there a "string length " call somewhere I could make?
Thanks,
Eric
Serial # - Enforcing minimum number of characters typed in
Update: I tried calling the kernel32.dll function lstrlenA to get the string length, but it didn't work; I got the error "Unable to load plug-in library. Please rebuild your project and make sure all required plug-ins are installed. Action skipped." I suspect this is because I don't have all of the parameters for the Call DLL Function set up exactly right.
Here is the call I'm making in clipboard form:
~InstallAware Clipboard Data~
~Call DLL Function~
~{7D9B000F-F296-47BA-BE84-B47848AA8D70}~
~kernel32.dll,lstrlenA,long,SERIALNUMBERLENGTH,"allocated string buffer (MAX_PATH length)",$SERIALNUMBER$,$~
~~mIDEFunc.dll\\mEXEFunc.dll~ ~
Anyone have a clue on what's going wrong here?
Thanks,
Eric
Here is the call I'm making in clipboard form:
~InstallAware Clipboard Data~
~Call DLL Function~
~{7D9B000F-F296-47BA-BE84-B47848AA8D70}~
~kernel32.dll,lstrlenA,long,SERIALNUMBERLENGTH,"allocated string buffer (MAX_PATH length)",$SERIALNUMBER$,$~
~~mIDEFunc.dll\\mEXEFunc.dll~ ~
Anyone have a clue on what's going wrong here?
Thanks,
Eric
Why don't you split it on X/Total Length textboxes?It's very easy to do it that way.. Look the example shipped with InstallAWARE.
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
InstallAware Software Corporation
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
InstallAware Software Corporation
Who is online
Users browsing this forum: No registered users and 48 guests