args Start, From, To, Caption, Text, Styles, Cancel, H, W, YSET, HSET, YOC, WOC, HOC, XE, WE, XS, WS, XT, WT, XC if(!H) H = 160 if(!W) W = 44 if(!YSET) YSET = 6 if(!HSET) HSET = 12 if(!YOC) YOC = 22 if(!WOC) WOC = 74 if(!HOC) HOC = 16 if(!XE) XE = 16 if(!WE) WE = 12 if(!XS) XS = 6 if(!WS) WS = 12 if(!XT) XT = 32 if(!WT) WT = 128 if(!XC) XC = 86 static No = Cancel static Num if(!Styles) Styles = "thickframe sysmenu centre" dialog.error_dialog_on() local hDlg = dialog.define(0, 0, H, W, Caption, Styles) if(!hDlg) quit hDlg.define_control(XE, YSET, WE, HSET, "editbox", "ebCnt", Start, "3d border", "", "", 0x0300) hDlg.define_control(XS, YSET, WS, HSET, "spinner", "spCnt", "", "setbuddyint") hDlg.define_control(XT, YSET, WT, HSET, "static", "text", Text) hDlg.define_control(XS, YOC, WOC, HOC, "button", "", "OK", "", cbx("@onOk")) hDlg.define_control(XC, YOC, WOC, HOC, "button", "btQuit", "&Cancel", "", cbx("@onQuit")) hDlg.create(1) local hWnd = hDlg.get("ebCnt", "hwnd") hDlg.send_message("spCnt", "setbuddy", hWnd, 0, 0) hDlg.set_range("spCnt", From, To) hDlg.run("foreground") quit(Num) Function onOk(sUserArg, dlgHan) Num = dlgHan.get_value("spCnt") dlgHan = dlgHan.destroy() quit Function onQuit(sUserArg, dlgHan) Num = No dlgHan = dlgHan.destroy()