rem /** rem * GUISample.bbj rem * This sample GUI program is the starting point for the exercises in Chapter 1: GUI to BUI to DWC. rem * It's a simple "Hello World" GUI app that runs in GUI, BUI, and DWC. rem */ wnd! = BBjAPI().openSysGui("X0").addWindow(10,10,450,140,"Hello BBj DWC") st! = wnd!.addStaticText(wnd!.getAvailableControlID(),10,10,200,20,"First Name:") ed_firstname! = wnd!.addEditBox(wnd!.getAvailableControlID(),210,10,200,20,"") st! = wnd!.addStaticText(wnd!.getAvailableControlID(),10,40,200,20,"Last Name:") ed_lastname! = wnd!.addEditBox(wnd!.getAvailableControlID(),210,40,200,20,"") btn! = wnd!.addButton(wnd!.getAvailableControlID(),10,70,400,30,"Say Hello") wnd!.setCallback(BBjAPI.ON_CLOSE,"byebye") btn!.setCallback(BBjAPI.ON_BUTTON_PUSH,"sayhello") process_events byebye: bye sayhello: firstname$=ed_firstname!.getText() lastname$=ed_lastname!.getText() a=msgbox("Hello "+firstname$+" "+lastname$,64,"Hello World") return