Post
by JRL » Fri May 12, 2006 4:04 pm
Rain,
Yes it works with non modal dialogs as well.
You are getting 10 as a result because the "msbutton1" object is the first thing in the dialog list so it is the focused object. Of course if you press enter it will be the object executed. If you first select an edit box then press enter you shoud get 20 as your result. Or you could rearrange the dialog objects so that the edit boxes are first in the list.
Dialog>Dialog1
Caption=Dialog1
Width=434
Height=233
Top=202
Left=276
Edit=msEdit1,160,16,121,msEdit1
Edit=msEdit2,64,144,121,msEdit2
Button=msButton1,64,32,75,25,10
Button=msButton2,272,40,75,25,20
Button=msButton3,168,104,75,25,30
Default=msButton2
EndDialog>Dialog1
Show>Dialog1,r
MessageModal>r
hope this helps,
Dick