Aditya-
This is snipped out of my scalebar program, it seems to work...
Part of your Dialog will have something like this:
Control EditText
Value "0"
Position 15,12
Width 10x
ID 14
Into <int_variable>
'.your other dialog controls
'.
'.
Control OKButton
Position 8x,15y
ID 9
calling Check_OK
just make sure you assign an ID number and call the sub Check_OK.
In your new sub Check_OK - note the last part(& declare it at the
beginning):
Sub Check_OK
If Val(ReadControlValue(14)) < 0 then 'note the 14 is the cotrol ID
Note "You MUST enter a POSITIVE Value before continuing."
Alter Control 14 Active
Dialog Preserve
ElseIf ReadControlValue(14) = str$(0) then
Note "You MUST enter a Value before continuing."
Alter Control 14 Active
Dialog Preserve
ElseIf Val(ReadControlValue(14)) = 0 then
Note "Please type a number, not text!"
Alter Control 14 Active
Dialog Preserve
End IF
End Sub
Hope that helps!
Jason
����������������������
Jason Adam
Computer Draftsperson
Monopros Limited
One William Morgan Drive
Toronto, ON M4H 1N6
Tel: 416.423.5811
Fax: 416.423.9944
> -----Original Message-----
> From: Adi [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, August 20, 1999 7:29 AM
> To: [EMAIL PROTECTED]
> Subject: MI MB
>
> Dear List members,
>
> Is it possible in MB to recognize the difference between Integer and
> String ? Actually in a edittext box I want integer value to be entered.
> But if somebody write any character by mistake, I want to stop it.
>
> Any idea !!
>
> Thanks in advance
> ===================================================
> Aditya
> Executive (Systems)
> Information Systems Department
> GCMMF, Anand
> E-mail me at Mailto:[EMAIL PROTECTED]
> Web Site: http://www.amul.com
> ===================================================
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]