sub getPayerData winHdl 'handle of calling window WindowWidth = 380: WindowHeight = 300 : BackgroundColor$ = "yellow" stylebits #gpdWin, _DS_CENTER,0,0,0 statictext #gpdWin.statictext0, "", 25, 32, 170, 20 statictext #gpdWin.statictext6, "b", 25, 55, 8, 20 statictext #gpdWin.statictext5, "Payer identification number ", 25, 32, 170, 20 combobox #gpdWin.cbPIN, payers$(, [gpdNACSZ],25, 52, 320, 250 statictext #gpdWin.statictext76, "c", 10, 105, 8, 20 statictext #gpdWin.statictext20, "Payer Name and Address", 25, 82, 160, 20 textbox #gpdWin.tbPayerName, 25, 102, 320, 20 statictext #gpdWin.statictext77, "d", 10, 135, 8, 20 textbox #gpdWin.tbPayerAdrs, 25, 132, 320, 20 statictext #gpdWin.statictext78, "e", 10, 165, 8, 20 textbox #gpdWin.tbPayerCSZ, 25, 162, 320, 20 Stylebits #gpdWin, 0, _WS_MAXIMIZEBOX or _WS_MINIMIZEBOX, 0, 0 button #gpdWin.btnAdd, "&Add ", [gpdAdd], UL, 100, 200, 80, 25 button #gpdWin.btnAcpt, "&Accept ", [gpdEnd], UL, 200, 200, 80, 25 open "GET PAYER DATA" for window as #gpdWin #gpdWin, "trapclose [gpdEnd]" #gpdWin.cbPIN,"font 10"; [gpdLoop] wait [gpdNACSZ] #gpdWin.cbPIN, "selection? x$" #gpdWin.tbPayerName, word$(x$,1,"|") #gpdWin.tbPayerAdrs, word$(x$,2,"|") #gpdWin.tbPayerCSZ, word$(x$,3,"|") #gpdWin.cbPIN, "!";word$(x$,4,"|") gpdName$ = word$(x$,1,"|") gpdAdrs$ = word$(x$,2,"|") gpdCSZ$ = word$(x$,3,"|") gpdPIN$ = word$(x$,4,"|") wait [gpdAdd] #gpdWin.cbPIN, "contents? gpdPIN$" #gpdWin.tbPayerName, "!contents? gpdName$" #gpdWin.tbPayerAdrs, "!contents? gpdAdrs$" #gpdWin.tbPayerCSZ, "!contents? gpdCSZ$" payerCtr = payerCtr + 1 payers$(payerCtr) = gpdName$ +"|"+ gpdAdrs$ +"|"+ gpdCSZ$ +"|"+ gpdPIN$ notice "Payer Added to table"+chr$(13)+payers$(payerCtr) sort payers$(),1,payerCtr #gpdWin.cbPIN, "reload" wait [gpdEnd] ' if gpdName$ = "" then ' notice "No Payer Name data" ' goto [gpdLoop] ' end if ' close #gpdWin [getHdSp] 'get head or spouse or both and add to window title WindowWidth = 140: WindowHeight = 140 : BackgroundColor$ = "red" radiobutton #filer.rbHead, headFirstName$,[filerEnd],[filerLoop],20,20,120,20 radiobutton #filer.rbSpouse, spouseFirstName$,[filerEnd],[filerLoop],20,45,120,20 radiobutton #filer.rbBoth, "Both", [filerEnd],[filerLoop],20,70,70,20 Stylebits #filer, 0, _WS_MAXIMIZEBOX or _WS_MINIMIZEBOX, 0, 0 open "Select Filer(s)" for window as #filer #filer, "trapclose [filerEnd]" [filerLoop] wait [filerEnd] #filer.rbHead, "value? rbHd$" : notice "head "+ rbHd$ if rbHd$ = "set" then winName$ = headFirstName$ divHdSp$ = headFirstName$ end if #filer.rbSpouse, "value? rbSp$" : notice "spouse "+ rbSp$ if rbSp$ = "set" then winName$ = spouseFirstName$ divHdSp$ = spouseFirstName$ end if #filer.rbBoth, "value? rbBoth$" : notice "both "+ rbBoth$ if rbBoth$ = "set" then winName$ = headFirstName$ + " and " + spouseFirstName$ divHdSp$ = "Both" end if notice winName$ 'close #filer ' hWin = hwnd(#div) 'change window caption caption$ = " 1099 DIVIDENDS: "; upper$(gpdName$);" ";upper$(winName$) calldll #user32, "SetWindowTextA",winHdl as ulong,caption$ as ptr,result as boolean end sub close #filer close #gpdWin
|