Here is the syntax of the showModalDialog function. In the syntax of the show modal dialog the parameter which are enclosed in [ and ] are optional you can omit these parameters.
vReturnValue = object.showModalDialog(sURL [, vArguments] [, sFeatures])
Here is the detail of the parameter to the showModalDialog function.
- sURL:Required. String that specifies the URL of the document to load and display.
- vArguments:Optional. Variant that specifies the arguments to use when displaying the document. Use this parameter to pass a value of any type, including an array of values. The dialog box can extract the values passed by the caller from the dialogArguments property of the window object.
- sFeatures:String that specifies the window ornaments for the dialog box, using one or more of the following semicolon-delimited values:
Returns the value of the returnValue property as set by the window of the document specified in sURL, and type of the return value is Variant.
Now on the main form If user entered values and press sign in button then it will return values of the user login name and password, even if user didn't entered anything and press sign in button then the empty string is returned. On main form I have check for the null value of the returned variable, mean if user click on the close button on the modal dialog or click the cancel button then it will execute the else statement but if the return object is not null then get the value and assign to the label controls. You can download the source code from here.
All and any comments / bugs / suggestions are welcomed!