Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Box Scrolling Status
;dBoxInit() ;dBoxOpen(Caption) ;dBoxText(linenr,string) ;dBoxButton(string) ;dBoxScrollUp(number of lines up) ;dBoxScrollDown(number of lines down) ;dBoxClear() ;dBoxClose() #DefineSubRoutine dBoxInit() dboxtextline=ArrDimension(31) For dboxlinenr=0 To 30 dBoxtextline[dboxlinenr]="" Next dboxlinenr IntControl(1008,1,0,0,0) IntControl(12,5,0,0,0) IntControl(29,@TAB,0,0,0) Return 0 #EndSubRoutine #DefineSubRoutine dBoxOpen(dboxCaption) ;Disable CloseButton IntControl(12,10,"",0,0) BoxesUp("355,225,700,800",@NORMAL) BoxUpdates(1,1) BoxCaption(1,dBoxCaption) hwnd=DllHwnd("%dBoxCaption%") ;Window Title of desired window goes here sysmenu=DllCall(StrCat(DirWindows(1),"USER32.DLL"),long:"GetSystemMenu",long:hwnd,long:0) DllCall(StrCat(DirWindows(1),"USER32.DLL"),long:"RemoveMenu",long:sysmenu,long:61536,long:0);close BoxColor(1,"192,192,192",4) BoxDrawRect(1,"0,0,1000,1000",1) BoxColor(1,"255,255,255",0) BoxDrawRect(1,"20,10,980,920",1) BoxDataTag(1,"TOP") Return 0 #EndSubRoutine #DefineSubRoutine dBoxClose() DllCall(StrCat(DirWindows(1),"USER32.DLL"),long:"GetSystemMenu",long:hwnd,long:1) ; enable close button BoxDestroy(1) Return 0 #EndSubRoutine #DefineSubRoutine dBoxText(dBoxPutLinenr,dBoxPutLinetxt) BoxDataClear(1,"TOP") dBoxtextline[dBoxPutLinenr]=dBoxPutLinetxt dBoxline_T=0 dBoxLine_B=28 BoxTextFont(1,"Helvetica",23,40,32) For dboxlinenr=0 To 30 dBoxline_T=dBoxline_T+28 dBoxline_b=dBoxline_B+28 BoxDrawText(1,"50,%dBoxline_T%,975,%dBoxline_B%",dBoxtextline[dboxlinenr],@TRUE,0) Next BoxUpdates(1,2) #EndSubRoutine #DefineSubRoutine dBoxButton(dBoxButtonText) BoxButtonDraw(1,4,dBoxButtonText,"300,945,700,992") BoxButtonWait() Return 0 #EndSubRoutine #DefineSubRoutine dBoxScrollUp(dBoxlinesUp) For dboxscrl=1 To dBoxLinesUp For dboxlinenr=0 To 29 dBoxtextline[dboxlinenr]=dBoxtextline[dboxlinenr+1] dBoxtextline[30]="" Next BoxDataClear(1,"TOP") dBoxline_T=0 dBoxLine_B=28 BoxTextFont(1,"Helvetica",23,40,32) For dboxlinenr=0 To 30 dBoxline_T=dBoxline_T+28 dBoxline_b=dBoxline_B+28 BoxDrawText(1,"50,%dBoxline_T%,975,%dBoxline_B%",dBoxtextline[dboxlinenr],@TRUE,0) Next BoxUpdates(1,2) Next Return 0 #EndSubRoutine #DefineSubRoutine dBoxScrollDown(dBoxlinesDown) For dboxscrl=1 To dBoxLinesDown For dboxlinenr=30 To 1 By -1 dBoxtextline[dboxlinenr]=dBoxtextline[dboxlinenr-1] dBoxtextline[0]="" Next BoxDataClear(1,"TOP") dBoxline_T=0 dBoxLine_B=28 BoxTextFont(1,"Helvetica",23,40,32) For dboxlinenr=0 To 30 dBoxline_T=dBoxline_T+28 dBoxline_b=dBoxline_B+28 BoxDrawText(1,"50,%dBoxline_T%,975,%dBoxline_B%",dBoxtextline[dboxlinenr],@TRUE,0) Next BoxUpdates(1,2) Next Return 0 #EndSubRoutine #DefineSubRoutine dBoxClear() BoxDataClear(1,"TOP") dBoxline_T=0 dBoxLine_B=28 For dboxlinenr=0 To 30 dBoxtextline[dboxlinenr]="" dBoxline_T=dBoxline_T+28 dBoxline_b=dBoxline_B+28 BoxDrawText(1,"50,%dBoxline_T%,975,%dBoxline_B%",dBoxtextline[dboxlinenr],@TRUE,0) Next BoxUpdates(1,2) Return 0 #EndSubRoutine ;---------------------------------------------------------------------------------------------------------------------- ;Sample of how to use this function lib dBoxInit() ; alway call first to initialize dBoxOpen("My Procesor") ; creates background dBoxText(5,"This line is on row 5") dBoxText(9,"This line is on row 9") Delay(3) dBoxClear() dBoxText(15,"This line is on row 15") dBoxText(23,"This line is on row 23") Delay(3) dBoxScrollUp(5) Delay(2) dBoxScrollDown(5) dBoxButton("Done") dBoxClose()
Article ID: W16188
File Created: 2004:03:30:15:43:12
Last Updated: 2004:03:30:15:43:12