IonicWind Snippit Manager 2.xx Released! Install it on a memory stick and take it with you! With or without IWBasic!
Started by Ziad Diab Electronics, May 18, 2017, 12:38:31 pm
0 Members and 2 Guests are viewing this topic.
' Multiple windows - GWSdef win,win_cont,win_draw:windowdef dlg_cont,dlg_draw:dialogdef i,j,nwin,wW,wH:intdef nhoriz,nvert,winwid,winhgt:intdef st:stringGetScreenSize wW,wH' open main window ..window win,0,0,wW,wH,0,0,"Creative Basic - Windows Extravaganza",messagessetwindowcolor win,rgb(0,0,50)control win,"B,Exit,(wW-70)/2,0.87*wH,70,30,0,1"nhoriz = 9: nvert = 5winwid = wW/nhorizwinhgt = wH/(nvert*1.2)'Control dialog ==================================================window win_cont,50,50,300,500,0,win,"Draw",hnd_cont'DIALOG dlg_cont,0,0,221,156,0x80C80080,win,"Shape control",hnd_contCONTROL win_cont,"B,Add Shape,75,125,70,20,0x50000000,1"CONTROL win_cont,"E,"hello",121,35,70,20,0x50800000,2"CONTROL win_cont,"E,Edit2,121,60,70,20,0x50800000,3"CONTROL win_cont,"E,Edit3,121,85,70,20,0x50800000,4"CONTROL win_cont,"T,Number of Turnes,21,35,94,20,0x5000010B,6"CONTROL win_cont,"T,Conductor width,21,60,86,20,0x5000010B,7"CONTROL win_cont,"T,Spacing,21,85,70,20,0x5000010B,8"CONTROL win_cont,"C,Group,13,13,192,104,0x50000007,9"'SETFONT win_cont,"Arial",10,100,0,2'ENABLETABS win_cont, 1'SHOWDIALOG dlg_cont'SHOWDILOG shows the "dialog" without disableing the main window unlike DOMODAL'But dialog still above main window'=================================================================window win_draw,50,50,100,100,0,win,"Draw",winmessagesrun = 1waituntil run = 0closewindow winENDsub hnd_contselect @CLASS case @IDCONTROL select @CONTROLID case 1 setcontroltext win_cont,2,"Hello" 'st = getcontroltext(win_cont,4) 'closedialog win_cont,@IDOK move win_cont,100,400 print win_cont,"wow" case 2 case 3 case 4 case 5 endselectendselectreturnSub messagesselect @class case @idclosewindow run = 0 case @idcontrol if @controlID = 1 then run = 0endselectReturnSub winmessagesselect @class case @idclosewindow closewindow @hitwindow case @idcontrol if @controlID = 1 then run = 0endselectReturn
QuoteMDI windowsMultiple Document Interface, or MDI, windows consist of a parent frame window and one or more child windows. Most word processors use the MDI interface as well as Creative BASICâ€™s editor. To create a MDI interface first open a window with @MDIFRAME as one of the creations flags:WINDOW frame,0,0,640,400,@MDIFRAME|@SIZE,0,â€Mainâ€,main Any child windows would use that window as the parent parameter:WINDOW w,0,0,200,100,@SIZE|@MINBOX|@MAXBOX,frame,â€Childâ€,main