If the text is out of range, the CA will display a message box. This works great in some of my dialogs, but in other dialogs, the Modal Message Box goes to the background the FIRST time it is displayed. Subsequent times it displays properly.
The dialogs are nearly identical as are the custom actions. I cannot explain why sometimes the dialog boxes go to the background. I think this may be a bug in IS Developer 7.
Any ideas?
Here is an example of the installscript:
#define MB_SETFOREGROUND 0x00010001
//////////////////////////////////////////////////////////////////////////////
//
// Function: ValidateNumWeeks
//
///////////////////////////////////////////////////////////////////////////////
function ValidateNumWeeks(hMSI)
// To Do: Declare local variables.
NUMBER strSize, nVar;
STRING svValue,szValue;
begin
//DB Server Name
MsiSetProperty (hMSI, "VALIDNUMWEEKS", "1");
MsiGetProperty(hMSI,"WEEKSRETAIN",svValue,strSize);
if (StrToNum (nVar, svValue) < 0) then
MessageBox ("Please enter a valid string.", INFORMATION);
endif;
if (nVar < 1) then
MessageBeep (0);
MsiSetProperty (hMSI, "VALIDNUMWEEKS", "0");
MessageBox(MSG_BAD_NUMWEEKS, INFORMATION|MB_SETFOREGROUND);
return;
endif;
if (nVar > 52) then
MessageBeep (0);
MsiSetProperty (hMSI, "VALIDNUMWEEKS", "0");
MessageBox(MSG_BAD_NUMWEEKS, INFORMATION|MB_SETFOREGROUND);
return;
endif;
end;
Edited by cmahood, 27 July 2004 - 19:02.