|
Post by xxgeek on Jul 9, 2023 11:27:06 GMT -5
Problems are arising due to each of us editing into new versions differing fixes. Rod, you have missed a couple of posted fixes with ffulv1.16.bas, just to let you know. Ah, now I remember, I saw that limit earlier and added code to check the number of lines in the imported file, and create the array bas$() with the number it needs. But, "palegray" shouldn't be a problem, it is only being copied, plus it works when freeform is used, does it not? Check this out, it is code TSH73 posted earlier (probably before ver ffulv1.16 though) I knew I imported freeform404.bas and exported it in the past(working normally when run too), and after a lot of digging I found the working exported freeform404.bas file. Then I went about figuring out which version of fful created it, lots of fun. This version (author- TSH73), creates exported files to a file of same name as import, but adds a + sign to the filename. eg: freeform404.bas exports as freeform404+.bas ver$="1.16-TSH-xx" 'was - ver$="1.11_3_6" created by TSH73 'added please wait 'increased array for bas$ (gets #lines of imported file for array size) ' 'freeform ultra lite v1.x 'https://libertybasiccom.proboards.com/thread/2308/freeform-ultra-lite-v1 'https://justbasiccom.proboards.com/thread/991/freeform-ultra-v1
'nomainwin dim info$(10,10) dim form$(10) form$(1)="Restore" form$(2)="New" form$(3)="Save .ffu" form$(4)="Load .ffu" form$(5)="-----------" form$(6)="Write .bas" form$(7)="Import .bas" form$(8)="Export .bas" form$(9)="File" dim tool$(14) tool$(1)="StatictText" tool$(2)="TextBox" tool$(3)="ListBox" tool$(5)="ComboBox" tool$(6)="Button" tool$(7)="BmpButton" tool$(8)="GraphicBox" tool$(9)="RadioButton" tool$(10)="CheckBox" tool$(11)="GroupBox" tool$(12)="Texteditor" tool$(13)="Menu" tool$(14)="Add New" dim hnd$(30) hnd$(1)="#1" dim grid$(20) grid$(1)="1" g=2 for n= 5 to 30 step 5 grid$(g)=str$(n) g=g+1 next grid$(g)="Invisible" grid$(g+1)="Visible" grid$(g+2)="Set Grid" grid=10 gridvisible=1 gridcolor$="buttonface" projectctrh=25 ctrh=25 dim color$(10) color$(1)="Control Back" color$(2)="Project Back" color$(3)="Project Fore" color$(4)="Grid Color" color$(5)="Set Color" projectback$="white" projectfore$="black" 'ctrc$="white" dim font$(10) font$(1)="Control Font" font$(2)="ResetControl" font$(3)="Project Font" font$(4)="Set Font"'default is Consolas 9" dim wind$(20)'window type names wind$(1)="window" wind$(2)="window_nf" wind$(3)="window_popup" wind$(4)="dialog" wind$(5)="dialog_modal" wind$(6)="dialog_nf" wind$(7)="dialog_nf_modal" wind$(8)="dialog_fs" wind$(9)="dialog_nf_fs" wind$(10)="dialog_popup" wind$(11)="graphics" wind$(12)="graphics_fs" wind$(13)="graphics_fs_nsb" wind$(14)="graphics_nsb" wind$(15)="graphics_nf_nsb" wind$(16)="text" wind$(17)="text_fs" wind$(18)="text_nsb" wind$(19)="text_nsb_ins"
dim v$(2000) for n= 100 to 2000 step 20 v$(n)=str$(n) next dim obj(200,6) 'x,y,width/height,type,textheight X=1 Y=2 W=3 H=4 T=5 TH=6
dim obj$(200,8) 'name,text,resource,font,backcolor,basline Ctr=1 Tex=2 Res=3 Fon=4 Bak=5 Bas=7 Lbl=8 'for any controls with labels. () If 2 (set reset), then "[set],[reset]"
'set default starting position obj=0 projectfile$="Untitled.bas" projectwind$="window_nf" projecttitl$="Untitled" projectform$="#1" projectctrl$="" projecttext$="" projectreso$="" projectfont$="Consolas 9" projectback$="white" projectfore$="black" projecttbcl$="white" projectlbcl$="white" projectcbcl$="white" projecttecl$="white" projectctrh=25 projectgrid=10 projectw=320 projecth=360 insertx=grid inserty=grid*2
'open a small properties window and hide it WindowWidth=230 'WindowHeight=260 WindowHeight=285 '+25 UpperLeftX=(DisplayWidth)/2+425 UpperLeftY=(DisplayHeight)/2 statictext #prop.st1 "File",5,10,30,25 textbox #prop.tbfile,45,5,150,25 statictext #prop.st2 "Wind",5,32,30,25 combobox #prop.cbwind,wind$(,[windowtype],47,29,146,25 statictext #prop.st3 "Titl",5,54,30,25 textbox #prop.tbtitl,45,49,150,25 statictext #prop.st4 "Form",5,76,30,25 textbox #prop.tbform,45,71,150,25 statictext #prop.st5 "Ctrl",5,98,30,25 textbox #prop.tbctrl,45,93,150,25 statictext #prop.st6 "Text",5,120,30,25 textbox #prop.tbtext,45,115,150,25 statictext #prop.st7 "Reso",5,142,30,25 textbox #prop.tbreso,45,137,150,25 statictext #prop.st8 "Lbls",5,164,30,25 textbox #prop.tblbls,45,159,150,25 statictext #prop.st9 "xywh",5,186,30,25 textbox #prop.tbxywh,45,181,150,25 statictext #prop.st10 "Font",5,208,30,25 textbox #prop.tbfont,45,203,150,25 statictext #prop.st11 "Colo",5,230,30,25 textbox #prop.tbcolo,45,225,150,25
open "Properties" for window_nf as #prop #prop "font Consolas 9" #prop "trapclose [show]" #prop.cbwind "select window_nf" #prop.tbfile "!disable" #prop.tbxywh "!disable" #prop.tbfont "!disable" #prop.tbcolo "!disable" gosub [propertyupdate] #prop "hide"
'open the main form window 'this window is resizable, the graphicox will resize but the 'client area, which is a drawn representation of the window 'will only change size if you change the project w/h dimensions WindowWidth=862 WindowHeight=705 'gb is offset by 25 UpperLeftX=(DisplayWidth-WindowWidth)/2 UpperLeftY=(DisplayHeight-WindowHeight)/2 combobox #fful.tool,tool$(,[tool],5,2,85,30 combobox #fful.form,form$(,[form],95,2,85,30 combobox #fful.hand,hnd$(,[hand],185,2,85,30 button #fful.project,"Preview",[preview],UL,275,0,60,25 combobox #fful.w,v$(,[formsize],340,2,60,30 combobox #fful.h,v$(,[formsize],405,2,60,30 combobox #fful.grid,grid$(,[grid],470,2,90,30 combobox #fful.color,color$(,[color],565,2,90,30 combobox #fful.font,font$(,[font],660,2,90,30 button #fful.help,"Help",[help],UL,755,0,80,25 graphicbox #fful.gb,5,25,830,630 open "Freeform Ultra Lite v";ver$ for window as #fful #fful "trapclose [quitfful]" #fful "font Consolas 9" #fful "resizehandler [resize]" #fful.tool "select Add New" #fful.form "select File" #fful.hand "selectindex 1" #fful.grid "select Set Grid" #fful.color "select Set Color" #fful.font "select Set Font" #fful.w "select ";projectw #fful.h "select ";projecth #fful.gb "autoresize" #fful.gb "vertscrollbar on 0 ";projectw #fful.gb "horizscrollbar on 0 ";projecth #fful.gb "font ";projectfont$ #fful.gb "down" gosub [drawgrid] gosub [drawall] #fful.gb "when rightButtonDown [show]" #fful.gb "when leftButtonDown [select]" #fful.gb "when characterInput [keys]" #fful.gb "setfocus" #prop "show" show=1 wait
[show] if show then #prop "hide" show=0 else #prop "show" show=1 end if wait
'the user clicked on the form design window 'either to chose a control or to deselect a control [select] xs=MouseX ys=MouseY
'hide property window if it is open if show then #prop "hide" show=0 end if
'before we move on update the currently selected control from properties 'get the project data and only the editable contents of controls if selected=0 then 'the form name #xxxx #prop.tbform "!contents? t$" if t$<>projectform$ then projectform$=t$ dim hnd$(10) hnd$(1)=projectform$ #fful.hand "reload" #fful.hand "select ";projectform$ end if 'the form/windo title text #prop.tbtitl "!contents? t$" if t$<>projecttitl$ then projecttitl$=t$ end if #prop.tbctrl "!contents? t$" : obj$(selected,Ctr)=t$ #prop.tbtext "!contents? t$" : obj$(selected,Tex)=t$ #prop.tbreso "!contents? t$" : obj$(selected,Res)=t$ #prop.tblbls "!contents? t$" : obj$(selected,Lbl)=t$ 'find the object selected selected=0 action=1 '1=move 2=expand bmps dont expand for cn=obj to 1 step -1 if xs>obj(cn,X) and xs<(obj(cn,X)+obj(cn,W)) and ys>obj(cn,Y) and ys<(obj(cn,Y)+obj(cn,H)) then if xs>obj(cn,X)+obj(cn,W)/1.4 and ys>obj(cn,Y)+obj(cn,H)/1.4 then action=2 if obj(cn,T)=6 then action=1 selected=cn exit for end if next if selected=0 then gosub [propertyupdate] action=0 end if if selected>0 and action=1 then #fful.gb "when leftButtonMove [track]" #fful.gb "when leftButtonUp [stop]" offsetX=xs-obj(selected,X) offsetY=ys-obj(selected,Y) end if if selected>0 and obj(selected,T)<>6 and action=2 then 'dont resize bmp #fful.gb "when leftButtonMove [tracksize]" #fful.gb "when leftButtonUp [stopsize]" offsetX=xs-(obj(selected,X)+obj(selected,W)) offsetY=ys-(obj(selected,Y)+obj(selected,H)) end if if selected>0 then gosub [drawit] else insertx=int((xs+(grid/2))/grid)*grid inserty=int((ys+(grid/2))/grid)*grid gosub [drawall] end if wait
[track] #fful.gb "rule xor" gosub [drawit] xt=int((MouseX-offsetX+(grid/2))/grid)*grid if xt<0 then xt=0 if xt+obj(selected,W)>projectw then xt=projectw-obj(selected,W) obj(selected,X)=xt yt=int((MouseY-offsetY+(grid/2))/grid)*grid if yt<0 then yt=0 if yt+obj(selected,H)>projecth then yt=projecth-obj(selected,H) obj(selected,Y)=yt gosub [drawit] wait
[stop] #fful.gb "when leftButtonMove" #fful.gb "when leftButtonUp" action=0 #fful.gb "rule over" gosub [drawall] wait
[tracksize] #fful.gb "rule xor" gosub [drawit] xs=int((MouseX-offsetX+(grid/2))/grid)*grid if xs>projectw then xs=projectw if xs<obj(selected,X) then xs=obj(selected,X)+grid ys=int((MouseY-offsetY+(grid/2))/grid)*grid if ys>projecth then ys=projecth if ys<obj(selected,Y)+ctrh then ys=obj(selected,Y)+ctrh obj(selected,W)=xs-obj(selected,X)'width obj(selected,H)=ys-obj(selected,Y)'height gosub [drawit] wait
[stopsize] #fful.gb "when leftButtonMove" #fful.gb "when leftButtonUp" action=0 #fful.gb "rule over" gosub [drawall] wait
[keys] k1=asc(right$(Inkey$,1)) k2=asc(left$(Inkey$,1)) if k1=46 then 'delete selected if obj(selected,T)=12 then menuset=0 obj(selected,T)=0 selected=0 gosub [drawall] end if if k1=3 then 'copy cpy(1)=obj(selected,X) 'x cpy(2)=obj(selected,Y) 'y cpy(3)=obj(selected,W) 'w cpy(4)=obj(selected,H) 'h cpy(5)=obj(selected,T) 'type cpy(6)=obj(selected,TH) 'textheight cpy$(1)=obj$(selected,Ctr)'name cpy$(2)=obj$(selected,Tex)'text content cpy$(3)=obj$(selected,Res)'resource array or file path cpy$(4)=obj$(selected,Fon)'ctrl specific font or "" cpy$(5)=obj$(selected,Bak)'ctrl specific backcolor end if if k1=22 then 'paste if cpy(5)<>0 then obj=obj+1 obj(obj,X)=insertx obj(obj,Y)=inserty inserty=inserty+cpy(4)+grid obj(obj,W)=cpy(3) obj(obj,H)=cpy(4) obj(obj,T)=cpy(5) obj(obj,TH)=cpy(6) obj$(obj,Ctr)=left$(cpy$(1),2);obj obj$(obj,Tex)=cpy$(2) obj$(obj,Res)=cpy$(3) 'if obj(obj,T)=5 then obj$(obj,Lbl)="[";obj$(obj,Ctr);"Click]" if inlist(obj(obj,T), "3 4 5 6") then obj$(obj,Lbl)="[";obj$(obj,Ctr);"Click]" if inlist(obj(obj,T), "8 9") then obj$(obj,Lbl)="[";obj$(obj,Ctr);"Set],[";obj$(obj,Ctr);"Reset]"
if obj(obj,T)=6 then loadbmp obj$(obj,Ctr),obj$(obj,Res) obj$(obj,Fon)=cpy$(4) obj$(obj,Bak)=cpy$(5) selected=obj gosub [drawall] end if end if #fful.gb "setfocus" wait
[tool] #fful.tool "selectionindex? i" cpy(5)=0 select case i case 1 'statictext obj=obj+1 obj(obj,X)=insertx obj(obj,Y)=inserty obj(obj,W)=150 obj(obj,H)=ctrh obj(obj,T)=1 obj$(obj,Ctr)="st";obj obj$(obj,Tex)="statictext?" if ctrf$<>projectfont$ then obj$(obj,Fon)=ctrf$ obj(obj,TH)=ctrh end if obj$(obj,Bak)=projectback$ inserty=int((inserty+obj(obj,H)+(grid/2))/grid)*grid case 2 'textbox obj=obj+1 obj(obj,X)=insertx obj(obj,Y)=inserty obj(obj,W)=200 obj(obj,H)=ctrh obj(obj,T)=2 obj$(obj,Ctr)="tb";obj obj$(obj,Tex)="Textbox" if ctrf$<>projectfont$ then obj$(obj,Fon)=ctrf$ obj(obj,TH)=ctrh end if obj$(obj,Bak)=projecttbcl$ inserty=int((inserty+obj(obj,H)+(grid/2))/grid)*grid case 3 'listbox obj=obj+1 obj(obj,X)=insertx obj(obj,Y)=inserty obj(obj,W)=200 obj(obj,H)=ctrh*5 obj(obj,T)=3 obj$(obj,Ctr)="lb";obj obj$(obj,Tex)="Listbox\item2\item3\item4\item5" obj$(obj,Lbl)="[";obj$(obj,Ctr);"Click]" obj$(obj,Res)=obj$(obj,Ctr);"$(" if ctrf$<>projectfont$ then obj$(obj,Fon)=ctrf$ obj(obj,TH)=ctrh end if obj$(obj,Bak)=projectlbcl$ inserty=int((inserty+obj(obj,H)+(grid/2))/grid)*grid case 4 'combobox obj=obj+1 obj(obj,X)=insertx obj(obj,Y)=inserty obj(obj,W)=200 obj(obj,H)=ctrh obj(obj,T)=4 obj$(obj,Ctr)="cb";obj obj$(obj,Tex)="Combobox\item2\item3\item4\item5" obj$(obj,Lbl)="[";obj$(obj,Ctr);"Click]" obj$(obj,Res)=obj$(obj,Ctr);"$(" if ctrf$<>projectfont$ then obj$(obj,Fon)=ctrf$ obj(obj,TH)=ctrh end if obj$(obj,Bak)=projectcbcl$ inserty=int((inserty+obj(obj,H)+(grid/2))/grid)*grid case 5 'button obj=obj+1 obj(obj,X)=insertx obj(obj,Y)=inserty obj(obj,W)=100 obj(obj,H)=ctrh obj(obj,T)=5 obj$(obj,Ctr)="bt";obj obj$(obj,Tex)="Button?" obj$(obj,Lbl)="[";obj$(obj,Ctr);"Click]" if ctrf$<>projectfont$ then obj$(obj,Fon)=ctrf$ obj(obj,TH)=ctrh end if obj$(obj,Bak)="white" inserty=int((inserty+obj(obj,H)+(grid/2))/grid)*grid case 6 'bmp button obj=obj+1 obj(obj,X)=insertx obj(obj,Y)=inserty obj(obj,W)=50 obj(obj,H)=50 obj(obj,T)=6 obj$(obj,Ctr)="bb";obj obj$(obj,Lbl)="[";obj$(obj,Ctr);"Click]" filedialog "Choose an image","*.bmp",file$ if file$<>"" then file$=right$(file$,len(file$)-len(DefaultDir$)-1) open file$ for input as #bmp 'the bmpfileheader bmp$ = Input$(#bmp,lof(#bmp)) if mid$(bmp$,1,2) ="BM" then 'always BM obj(obj,W)=value(mid$(bmp$,19,4))'width obj(obj,H)=value(mid$(bmp$,23,4))'height obj$(obj,Res)=file$ obj$(obj,Tex)="bmp" loadbmp obj$(obj,Ctr),file$ close #bmp inserty=int((inserty+obj(obj,H)+(grid/2))/grid)*grid else obj(obj,T)=0 close #bmp end if else obj(obj,T)=0 end if
case 7 'graphicbox obj=obj+1 obj(obj,X)=insertx obj(obj,Y)=inserty obj(obj,W)=100 obj(obj,H)=100 obj(obj,T)=7 obj$(obj,Ctr)="gb";obj obj$(obj,Tex)="Graphicbox" if ctrf$<>projectfont$ then obj$(obj,Fon)=ctrf$ obj(obj,TH)=ctrh end if inserty=int((inserty+obj(obj,H)+(grid/2))/grid)*grid
case 8 'radiobutton obj=obj+1 obj(obj,X)=insertx obj(obj,Y)=inserty obj(obj,W)=100 obj(obj,H)=ctrh obj(obj,T)=8 obj$(obj,Ctr)="rb";obj obj$(obj,Tex)="Radio?" obj$(obj,Lbl)="[";obj$(obj,Ctr);"Set],[";obj$(obj,Ctr);"Reset]" obj$(obj,Res)="" if ctrf$<>projectfont$ then obj$(obj,Fon)=ctrf$ obj(obj,TH)=ctrh end if
inserty=int((inserty+obj(obj,H)+(grid/2))/grid)*grid case 9 'checkbox obj=obj+1 obj(obj,X)=insertx obj(obj,Y)=inserty obj(obj,W)=100 obj(obj,H)=ctrh obj(obj,T)=9 obj$(obj,Ctr)="ch";obj obj$(obj,Tex)="Check?" obj$(obj,Lbl)="[";obj$(obj,Ctr);"Set],[";obj$(obj,Ctr);"Reset]" obj$(obj,Res)="" if ctrf$<>projectfont$ then obj$(obj,Fon)=ctrf$ obj(obj,TH)=ctrh end if obj$(obj,Bak)=projectback$ inserty=int((inserty+obj(obj,H)+(grid/2))/grid)*grid
case 10 'groupbox obj=obj+1 obj(obj,X)=insertx obj(obj,Y)=inserty obj(obj,W)=100 obj(obj,H)=100 obj(obj,T)=10 obj$(obj,Ctr)="gr";obj obj$(obj,Tex)="Group Box?" if ctrf$<>projectfont$ then obj$(obj,Fon)=ctrf$ obj(obj,TH)=ctrh end if obj$(obj,Bak)=projectback$ inserty=int((inserty+obj(obj,H)+(grid/2))/grid)*grid
case 11 'texteditor obj=obj+1 obj(obj,X)=insertx obj(obj,Y)=inserty obj(obj,W)=200 obj(obj,H)=100 obj(obj,T)=11 obj$(obj,Ctr)="te";obj obj$(obj,Tex)="Texteditor" if ctrf$<>projectfont$ then obj$(obj,Fon)=ctrf$ obj(obj,TH)=ctrh end if obj$(obj,Bak)=projecttecl$ inserty=int((inserty+obj(obj,H)+(grid/2))/grid)*grid
case 12 'menu if menuset=0 then obj=obj+1 obj(obj,X)=0 obj(obj,Y)=0 obj(obj,W)=100 obj(obj,H)=10 obj(obj,T)=12 obj$(obj,Ctr)="mn";obj obj$(obj,Tex)=" Menu Added" menuset=1 end if end select selected=obj gosub [drawall] #fful.tool "select Add New" #fful.gb "setfocus" wait
[form] #fful.form "selectionindex? i" select case i case 1 'restore file$="lastsession.ffu" gosub [loadit] case 2 'new gosub [new] case 3 'save as gosub [saveas] case 4 'load gosub [load] case 6 'write gosub [write] case 7 'import gosub [import] case 8 'export gosub [export] end select #fful.form "select File" gosub [drawall] #fful.gb "setfocus" wait
[drawall] #fful.gb "discard ; redraw bak" ocn=cn projecttbcl$="white" projectlbcl$="white" projectcbcl$="white" projecttecl$="white" for cn=1 to obj gosub [drawit] next cn=ocn #fful.gb "place ";insertx;" ";inserty;" ; north ; turn 180 ; go ";10 #fful.gb "place ";insertx;" ";inserty;" ; turn -90 ; go ";10 #fful.gb "place ";insertx;" ";inserty;" ; turn 45 ; go ";20 #fful.gb "setfocus" return
[drawit] 'redraws control cn
'set the color for the drawn object and action taking place if cn=selected then #fful.gb "color red" 'action 1 or 2 if action=2 then #fful.gb "color green" else #fful.gb "color ";projectfore$ end if
'set the font for the drawn object if obj$(cn,Fon)="" then #fful.gb "font ";projectfont$ ch=projectctrh if obj(cn,H)<ch then obj(cn,H)=ch else #fful.gb "font ";obj$(cn,Fon) ch=obj(cn,TH) if obj(cn,H)<ch then obj(cn,H)=ch end if
'update the properties textboxes for selected control if cn=selected then #prop.tbctrl obj$(cn,Ctr) 'ctrlname #prop.tbtext obj$(cn,Tex) 'text #prop.tbreso obj$(cn,Res) 'resource #prop.tblbls obj$(cn,Lbl) 'label(s) #prop.tbxywh obj(cn,X);" ";obj(cn,Y);" ";obj(cn,W);" ";obj(cn,H) 'xywh if obj$(cn,Fon)="" then #prop.tbfont projectfont$;":";obj(cn,TH) else #prop.tbfont obj$(cn,Fon);":";obj(cn,TH) 'font and height #prop.tbcolo obj$(cn,Bak) end if #fful.gb "place ";obj(cn,X);" ";obj(cn,Y) if obj$(cn,Tex)="" or obj$(cn,Tex)=chr$(34) then obj$(cn,Tex)="Missing Text?" if projecttbcl$ = "" then projecttbcl$ = "white" if projectlbcl$ = "" then projectlbcl$ = "white" if projectcbcl$ = "" then projectcbcl$ = "white" if projecttecl$ = "" then projecttecl$ = "white" select case obj(cn,T) case 1 'statictext #fful.gb "backcolor ";projectback$ #fful.gb "boxfilled ";obj(cn,X)+obj(cn,W);" ";obj(cn,Y)+obj(cn,H) #fful.gb "place ";obj(cn,X)+2;" ";obj(cn,Y)+ch/1.33;" ;\";obj$(cn,Tex) case 2 'textbox #fful.gb "backcolor ";projecttbcl$ #fful.gb "boxfilled ";obj(cn,X)+obj(cn,W);" ";obj(cn,Y)+obj(cn,H) if action=0 then #fful.gb "place ";obj(cn,X)+2;" ";obj(cn,Y)+ch/1.33;" ;\";obj$(cn,Tex) case 3 'listbox #fful.gb "backcolor ";projectlbcl$ #fful.gb "boxfilled ";obj(cn,X)+obj(cn,W);" ";obj(cn,Y)+obj(cn,H) if action=0 then #fful.gb "place ";obj(cn,X)+2;" ";obj(cn,Y)+ch/1.33;" ;\";obj$(cn,Tex) case 4 'combobox #fful.gb "backcolor ";projectcbcl$ #fful.gb "boxfilled ";obj(cn,X)+obj(cn,W);" ";obj(cn,Y)+obj(cn,H) if action=0 then #fful.gb "place ";obj(cn,X)+2;" ";obj(cn,Y)+ch/1.33;" ;\";obj$(cn,Tex) case 5 'button #fful.gb "backcolor white" #fful.gb "boxfilled ";obj(cn,X)+obj(cn,W);" ";obj(cn,Y)+obj(cn,H) 'buttons are always black on white #fful.gb "color black" 'centre button text #fful.gb "stringwidth? ";"A";" width" xp=(obj(cn,W)-width*len(obj$(cn,Tex)))/2 if action=0 then #fful.gb "place ";obj(cn,X)+xp;" ";obj(cn,Y)+ch/1.33;" ;\";obj$(cn,Tex) #fful.gb "color ";projectfore$ #fful.gb "backcolor ";projectback$ case 6 'bmpbutton if action=0 then #fful.gb "drawbmp ";obj$(cn,Ctr) #fful.gb "box ";obj(cn,X)+obj(cn,W);" ";obj(cn,Y)+obj(cn,H) case 7 ' graphicbox #fful.gb "backcolor white" #fful.gb "boxfilled ";obj(cn,X)+obj(cn,W);" ";obj(cn,Y)+obj(cn,H) if action=0 then #fful.gb "place ";obj(cn,X)+2;" ";obj(cn,Y)+ch/1.33;" ;\";obj$(cn,Tex) #fful.gb "backcolor ";projectback$ case 8 'radiobutton #fful.gb "backcolor ";projectback$ #fful.gb "boxfilled ";obj(cn,X)+obj(cn,W);" ";obj(cn,Y)+obj(cn,H) 'radiobutton text is always black #fful.gb "color black" if action=0 then #fful.gb "place ";obj(cn,X)+2;" ";obj(cn,Y)+ch/1.33;" ;\( )";obj$(cn,Tex) #fful.gb "color ";projectfore$ case 9 'checkbox #fful.gb "backcolor ";projectback$ #fful.gb "boxfilled ";obj(cn,X)+obj(cn,W);" ";obj(cn,Y)+obj(cn,H) 'checkbox text is always black #fful.gb "color black" if action=0 then #fful.gb "place ";obj(cn,X)+2;" ";obj(cn,Y)+ch/1.33;" ;\[ ]";obj$(cn,Tex) #fful.gb "color ";projectfore$ case 10 'groupbox #fful.gb "backcolor ";projectback$ 'groupbox is an outline #fful.gb "box ";obj(cn,X)+obj(cn,W);" ";obj(cn,Y)+obj(cn,H) 'group box text is always black #fful.gb "color black" 'groupbox text is offset if action=0 then #fful.gb "place ";obj(cn,X)+5;" ";obj(cn,Y)+ch/1.33-ch/2;" ;\";obj$(cn,Tex) #fful.gb "color ";projectfore$ case 11 ' texteditor #fful.gb "backcolor ";projecttecl$ #fful.gb "boxfilled ";obj(cn,X)+obj(cn,W);" ";obj(cn,Y)+obj(cn,H) if action=0 then #fful.gb "place ";obj(cn,X)+2;" ";obj(cn,Y)+ch/1.33;" ;\";obj$(cn,Tex) case 12 'menu 'pin to top left obj(cn,X)=10 : obj(cn,Y)=-10 : obj(cn,W)=100 : obj(cn,H)=10 #fful.gb "backcolor ";projectback$ #fful.gb "boxfilled ";obj(cn,X)+obj(cn,W);" ";obj(cn,Y)+obj(cn,H) #fful.gb "place ";obj(cn,X)+2;" ";obj(cn,Y)+ch/1.33;" ;\";obj$(cn,Tex) case 21 'tecolor projecttecl$=obj$(cn,Bak) case 22 'tbcolor projecttbcl$=obj$(cn,Bak) case 23 'lbcolor projectlbcl$=obj$(cn,Bak) case 24 'cbcolor projectcbcl$=obj$(cn,Bak) case 30 'font case 31 '!font end select
return
[preview] file$="preview.bas" gosub [writeit] wait
[write] projectfile$=left$(projectfile$,len(projectfile$)-3)+"bas" filedialog "Save .bas",projectfile$,file$ file$=right$(file$,len(file$)-len(DefaultDir$)-1)
[writeit]
if file$<>"" then open file$ for output as #op 'the header #op " 'Project ";projecttitl$ #op " 'Created with Freeform Ultra Lite v";ver$;" ";date$() #op " nomainwin" #op "" if projectback$<>"white" or projectfore$<>"black" then #op " 'Set BackgroundColor$ and ForegroundColor$ of project" #op " BackgroundColor$=";chr$(34);projectback$;chr$(34) #op " ForegroundColor$=";chr$(34);projectfore$;chr$(34) #op "" end if #op " 'Create arrays needed for controls listbox,combobox" for n= 1 to obj if obj(n,T)=3 or obj(n,T)=4 then #op " dim ";obj$(n,Res);"10)" #op " for n = 1 to 10" #op " ";obj$(n,Res);"n)= str$(n)" #op " next" end if next #op "" #op " 'Create controls and open window" #op " nomainwin" #op " WindowWidth = ";projectw #op " WindowHeight = ";projecth #op " UpperLeftX = int((DisplayWidth-WindowWidth)/2)" #op " UpperLeftY = int((DisplayHeight-WindowHeight)/2)" if menuset then #op " menu ";projectform$;", ";chr$(34);"&File";chr$(34);", ";chr$(34);"&Save";chr$(34);", [dummy], ";chr$(34);"&Load";chr$(34);", [dummy]" #op " menu ";projectform$;", ";chr$(34);"&Color";chr$(34);", ";chr$(34);"&Red";chr$(34);", [dummy], ";chr$(34);"&Green";chr$(34);", [dummy]" #op " menu ";projectform$;", ";chr$(34);"Size";chr$(34);", ";chr$(34);"Small";chr$(34);", [dummy], ";chr$(34);"Large";chr$(34);", [dummy]" end if for n=1 to obj select case obj(n,T) case 1 'statictext #op " statictext ";projectform$;".";obj$(n,Ctr);" ";chr$(34);trim$(obj$(n,Tex));chr$(34);",";obj(n,X);",";obj(n,Y)+5;",";obj(n,W);",";obj(n,H) case 2 'textbox #op " textbox ";projectform$;".";obj$(n,Ctr);",";obj(n,X);",";obj(n,Y);",";obj(n,W);",";obj(n,H) case 3 'list box #op " listbox ";projectform$;".";obj$(n,Ctr);",";obj$(n,Res);","; nvl$(obj$(n,Lbl),"[";obj$(n,Ctr);"click]");",";obj(n,X)+1;",";obj(n,Y);",";obj(n,W)-2;",";obj(n,H) case 4 'combobox #op " combobox ";projectform$;".";obj$(n,Ctr);",";obj$(n,Res);","; nvl$(obj$(n,Lbl),"[";obj$(n,Ctr);"click]");",";obj(n,X)+1;",";obj(n,Y);",";obj(n,W)-2;",";obj(n,H) case 5 'button '#op " button ";projectform$;".";obj$(n,Ctr);",";chr$(34);obj$(n,Tex);chr$(34);",[";obj$(n,Ctr);"click], UL, ";obj(n,X);",";obj(n,Y);",";obj(n,W);",";obj(n,H) #op " button ";projectform$;".";obj$(n,Ctr);",";chr$(34);obj$(n,Tex);chr$(34);","; nvl$(obj$(n,Lbl),"[";obj$(n,Ctr);"click]");", UL, ";obj(n,X);",";obj(n,Y);",";obj(n,W);",";obj(n,H) case 6 'bmpbutton #op " bmpbutton ";projectform$;".";obj$(n,Ctr);",";chr$(34);obj$(n,Res);chr$(34);","; nvl$(obj$(n,Lbl),"[";obj$(n,Ctr);"click]");", UL, ";obj(n,X);",";obj(n,Y) case 7 'graphicbox #op " graphicbox ";projectform$;".";obj$(n,Ctr);",";obj(n,X);",";obj(n,Y);",";obj(n,W);",";obj(n,H) case 8 'radiobutton if file$<>"preview.bas" then lbl$=nvl$(obj$(n,Lbl),"[";obj$(n,Ctr);"Set],[";obj$(n,Ctr);"Reset]") else lbl$="[radio],[radio]" end if #op " radiobutton ";projectform$;".";obj$(n,Ctr);",";chr$(34);obj$(n,Tex);chr$(34);",";lbl$;",";obj(n,X);",";obj(n,Y);",";obj(n,W);",";obj(n,H) case 9 'checkbox if file$<>"preview.bas" then lbl$=nvl$(obj$(n,Lbl),"[";obj$(n,Ctr);"Set],[";obj$(n,Ctr);"Reset]") else lbl$="[check],[check]" end if #op " checkbox ";projectform$;".";obj$(n,Ctr);",";chr$(34);obj$(n,Tex);chr$(34);",";lbl$;",";obj(n,X);",";obj(n,Y);",";obj(n,W);",";obj(n,H) case 10 'group box #op " groupbox ";projectform$;".";obj$(n,Ctr);",";chr$(34);obj$(n,Tex);chr$(34);",";obj(n,X);",";obj(n,Y)-5;",";obj(n,W);",";obj(n,H) case 11 'texteditor #op " texteditor ";projectform$;".";obj$(n,Ctr);",";obj(n,X);",";obj(n,Y);",";obj(n,W);",";obj(n,H) case 22 'tbcolor #op " TextboxColor$=";chr$(34);obj$(n,Bak);chr$(34) case 23 'lbcolor #op " ListboxColor$=";chr$(34);obj$(n,Bak);chr$(34) case 24 'cbcolor #op " ComboboxColor$=";chr$(34);obj$(n,Bak);chr$(34) case 21 'tecolor #op " TexteditorColor$=";chr$(34);obj$(n,Bak);chr$(34) end select next #op " open ";chr$(34);projecttitl$;chr$(34);" for ";projectwind$;" as ";projectform$ if instr(projectwind$, "text") then #op " ";projectform$;" ";chr$(34);"!trapclose [quit]";chr$(34) else #op " ";projectform$;" ";chr$(34);"trapclose [quit]";chr$(34) end if #op "" #op " 'Set any listbox or combobox to display the first item on the list" for n= 1 to obj if obj(n,T)=3 or obj(n,T)=4 then #op " ";projectform$;".";obj$(n,Ctr);" ";chr$(34);"selectindex 1";chr$(34) end if next #op " 'apply any control specific fonts" for n= 1 to obj if obj(n,T)<>0 and obj$(n,Fon)<>"" then if obj(n,T)=1 or obj(n,T)=2 or obj(n,T)=5 or obj(n,T)=10 or obj(n,T)=11 then #op " ";projectform$;".";obj$(n,Ctr);" ";chr$(34);"!font ";obj$(n,Fon);chr$(34) end if if obj(n,T)=3 or obj(n,T)=4 or obj(n,T)=7 or obj(n,T)=8 or obj(n,T)=9 then #op " ";projectform$;".";obj$(n,Ctr);" ";chr$(34);"font ";obj$(n,Fon);chr$(34) end if end if next #op " wait" #op ""
labelList$="[quit]" if file$<>"preview.bas" then #op " 'Create the required handlers for each control" '#op " 'Radiobutton and Checkboxes are given a single handler" 'no more check=0 radio=0 for n=1 to obj select case obj(n,T) case 3,4 'listbox, combobox lbl$=nvl$(obj$(n,Lbl),"[";obj$(n,Ctr);"click]") if instr(labelList$, lbl$)=0 then 'label NOT already written 'write label #op " ";lbl$ #op " 'Your handler code here, read the control with" #op " ";projectform$;".";obj$(n,Ctr);" ";chr$(34);"selection? picked$";chr$(34) #op " wait" #op "" 'and remember it labelList$= labelList$+" "+ lbl$ end if ' case 4 'combobox ' #op " [";obj$(n,Ctr);"click]" ' #op " 'Your handler code here, read the control with" ' #op " ";projectform$;".";obj$(n,Ctr);" ";chr$(34);"selection? picked$";chr$(34) ' #op " wait" ' #op "" case 5, 6 'button, bmpbutton lbl$=nvl$(obj$(n,Lbl),"[";obj$(n,Ctr);"click]") if instr(labelList$, lbl$)=0 then 'label NOT already written 'write label '#op " [";obj$(n,Ctr);"click]" #op " ";lbl$ #op " 'Your handler code here" #op " wait" #op "" 'and remember it labelList$= labelList$+" "+ lbl$ end if ' case 6 'bmpbutton ' #op " [";obj$(n,Ctr);"click]" ' #op " 'Your handler code here" ' #op " wait" ' #op "" case 8,9 'radiobutton, checkbox for i = 1 to 2 'set,reset labels lbl$=nvl$(obj$(n,Lbl),"[";obj$(n,Ctr);"Set],[";obj$(n,Ctr);"Reset]") lbl$=word$(lbl$,i,",") if instr(labelList$, lbl$)=0 then 'label NOT already written 'write label #op " ";lbl$ #op " 'Your ";obj$(n,Ctr);" ";word$("set reset",i);" handler code here" #op " wait" #op "" 'and remember it labelList$= labelList$+" "+ lbl$ end if next ' case 8 'radiobutton ' if radio=0 then ' #op " [radio]" ' #op " 'Your handler code here, read all radiobuttons to determine which is set" ' #op " 'this is an example of eading the first radiobutton" ' #op " ";projectform$;".";obj$(n,Ctr);" ";chr$(34);"value? result$";chr$(34) ' #op " wait" ' #op "" ' radio=1 ' end if ' case 9 'checkbox ' if check=0 then ' #op " [check]" ' #op " 'Your handler code here, read all checkboxes in the group in sequence." ' #op " 'this is an example of eading the first checkbox" ' #op " ";projectform$;".";obj$(n,Ctr);" ";chr$(34);"value? result$";chr$(34) ' #op " wait" ' #op "" ' check=1 ' end if end select next else #op " [radio]" #op " wait" #op "" #op " [check]" #op " wait" #op "" end if #op " [quit]" #op " close ";projectform$ #op " end" close #op files "c:\program files (x86)\liberty basic pro v4.5.1\","lbpro.exe", info$() if val(info$(0, 0)) > 0 then run chr$(34);"c:\program files (x86)\liberty basic pro v4.5.1\lbpro.exe";chr$(34);" -R -A ";DefaultDir$;"\";file$ goto [done] end if files "c:\program files (x86)\liberty basic pro v4.04\","lbpro.exe", info$() if val(info$(0, 0)) > 0 then run chr$(34);"c:\program files (x86)\liberty basic pro v4.04\lbpro.exe";chr$(34);" -R -A ";DefaultDir$;"\";file$ goto [done] end if files "c:\program files (x86)\liberty basic v4.5.1\","liberty.exe", info$() if val(info$(0, 0)) > 0 then run chr$(34);"c:\program files (x86)\liberty basic v4.5.1\liberty.exe";chr$(34);" -R -A ";DefaultDir$;"\";file$ goto [done] end if files "c:\program files (x86)\just basic v2.0\","jbasic.exe", info$() if val(info$(0, 0)) > 0 then run chr$(34);"c:\program files (x86)\just basic v2.0\jbasic.exe";chr$(34);" -R -A ";DefaultDir$;"\";file$ goto [done] end if files "c:\program files\just basic v2.0\","jbasic.exe", info$() if val(info$(0, 0)) > 0 then run chr$(34);"c:\program files\just basic v2.0\jbasic.exe";chr$(34);" -R -A ";DefaultDir$;"\";file$ goto [done] end if
I added a popup "please wait" while waiting for imports, and exports to complete to help avoid user premature interactions. Plus added some code to get the number of lines in the imported file, and dim the bas$() array accordingly. Also added the code that checks for the word "open" and added code so gaslouks files' forms can be displayed (missing backcolor issue) The code posted above, needs to be edited and melded fful1.16.bas to give us the current "BEST" version possible so far. I can import LB Pro's freeform404.bas or gaslouks file, and most other bas files without issue, and export them too with the above code as is. But, JB's fformj261006.bas, still causing one slight issue, try it and you'll see it in the exported file or previewing one of the forms, a syntax error will show up when Run Since the beginning I have use those 3 files (because they are large and have multiple controls), along with some others, to test each version, and edit as I saw fit. I figure if those 3 files pass the mustard, we're close to done. Understood Rod, but hey we've gotten this far, let's go all the way. I have the rest of my life, whatever that means Yes, nice. The previous fful version placed the 'Run' button at the far right. I saw wizmo.bas in there earlier and thought, "I don't remember copying that file here", then thought, I don't remember much of anything sometimes" lol - You got me! We need to get together on the same exact version that works best so far using all the same fixes posted earlier. We have an excellent product, just needs finetuned with everything we know so far. However, it's also a good idea to have 2 versions. One to create, and one to edit, .bas files. Separating them WOULD make it much easier to code. So let's make it 3 versions, since we're already all in. It's not like I have anything better to do and it sure helps me learn as I decipher all this code.
|
|
gaslouk
Full Member
Hi from beautiful Greece.
Posts: 131
|
Post by gaslouk on Jul 11, 2023 7:17:05 GMT -5
'********************************************************************************************* '**** Generated using Liberty Basic ToolBox v1.0 - 25/5/2022 13:28:28 **** '*********************************************************************************************
dim a(100) DIM ComboBox1$(10) ComboBox1$(1) = "Item 1" ComboBox1$(2) = "Item 2"
DIM ComboBox2$(10) ComboBox2$(1) = "Item 1" ComboBox2$(2) = "Item 2"
DIM ComboBox3$(10) ComboBox3$(1) = "Item 1" ComboBox3$(2) = "Item 2"
DIM ComboBox4$(10) ComboBox4$(1) = "First Item" ComboBox4$(2) = "Second Item"
DIM ComboBox5$(10) ComboBox5$(1) = "First Item" ComboBox5$(2) = "Second Item"
DIM ComboBox6$(10) ComboBox6$(1) = "First Item" ComboBox6$(2) = "Second Item"
DIM ComboBox7$(10) ComboBox7$(1) = "First Item" ComboBox7$(2) = "Second Item"
DIM ComboBox8$(10) ComboBox8$(1) = "First Item" ComboBox8$(2) = "Second Item"
[InitColors] ForegroundColor$ = "Black" BackgroundColor$ = "Buttonface" TexteditorColor$ = "White" TextboxColor$ = "White" ComboboxColor$ = "White" ListboxColor$ = "White"
GlOBAL hwndListView1 GlOBAL hwndListView11 GlOBAL hwndListView12 GlOBAL hwndListView13 GlOBAL hwndListView111 GlOBAL hwndListView112 True = 1 : False = 0
[WindowSetup] NOMAINWIN WindowWidth = 600 : WindowHeight = 320 UpperLeftX = INT((DisplayWidth-WindowWidth)/2) UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[ControlSetup] Menu #startPage, "Áñ÷åßï", "¢íïéãìá ¸ôïõò", [AnoigmaEtoysWindowSetup], "¸îïäïò", [quit] Menu #startPage, "Åôáéñßá", "ÐñïìçèåõôÝò", [KartaPromitheftiWindowSetup], "Ðñïúüíôá", [KartaProiontosWindowSetup], "ÐåëÜôåò", [KartaPelatiWindowSetup], _ | , "ÓõíåñãÜôåò", [PartnerWindowSetup], "ÐùëçôÝò", [VendersWindowSetup], | , "Ðñïãñáììáôéóìüò áãïñþí", [ProgAgorWindowSetup], "Ðñïãñáììáôéóìüò ðáñáãùãÞò", [PrPaWindowSetup], _ "ÐáñáóôáôéêÜ", [5click], "×ñåüãñáöá", [6click] Menu #startPage, "Ðßíáêåò", "ÁðïèÞêç ðñïúüíôùí", [7click], "ÁðïèÞêç ðñþôùí õëþí", [8click], | , "Åêôõðþóåéò ëéáíéêÞò", [9click], _ "Éóôïñéêü áãïñþí--ðáñáãùãÞò", [10click], "Éóôïñéêü ðñþôùí õëþí", [11click], | , "Êáñôá ðåëÜôç Á", [12click], _ "ÊÜñôá ðåëÜôç Â", [13click], "ÊÜôñá ðåëÜôç ëéáíéêÞò", [14click], | , "ÊáôÜëïãïò ðåëáôþí", [15click], _ "ÊáôÜëïãïò ðñïúüíôùí", [16click], "ÊáôÜëïãïò ðñïìçèåõôþí", [17click], | , "Êßíçóç ðñïúüíôùí", [18click], _ "Óôáôéóôßêá", [19click], "Õðüëïéðá", [20click], "ÅããõÞóåéò", [21click], "Ö.Ð.Á.", [22click] Menu #startPage, "ÄéáãñÜììáôá", "ÄéÜãñáììá áãïñþí", [23click], "ÄéÜãñáììá ðáñáãùãÞò", [24click], "ÄéÜãñáììá ðùëÞóåùí", [25click] Menu #startPage, "Ñõèìßóåéò", "Óôïé÷åßá åôáéñßáò", [26click], "Äéáìüñöùóç åêôýðùóçò", [27click], "Ïñéóìüò åêôõðùôþí", [28click], _ "Ðñüôõðá ðáñáóôáôéêþí", [29click], "ÊïéíÜ óôïé÷åßá ðáñáóôáôéêþí", [30click], "Åéêüíá ðñþôçò óåëßäáò", [31click], _ "Êùäéêïß ðñüóâáóçò", [32click], | , "Äéüñèùóç áðïèÞêçò", [33click], "ËåêôéêÜ êïõìðéÜ", [34click], "Áíôßãñáöï áóöáëåßáò", [35click] Menu #startPage, "ÂïÞèåéá", "Åã÷åéñßäéï ÂïÞèåéáò", [36click], "Ðåñß ôïõ Ëïãéóôéñßïõ", [37click] groupbox #startPage.GroupBox3, " ", 5, 108, 572, 40 groupbox #startPage.GroupBox4, " ", 5, 155, 572, 40 groupbox #startPage.GroupBox5, " ", 130, 210, 318, 40 groupbox #startPage.GroupBox1, " ", 5, 10, 572, 40 groupbox #startPage.GroupBox2, " ", 80, 60, 386, 40 button #startPage.Button1, "¸îïäïò", [quit], UL, 135, 220, 120, 25 button #startPage.Button2, "ÐñïìçèåõôÝò", [KartaPromitheftiWindowSetup], UL, 10, 20, 180, 25 button #startPage.Button3, "Ðñïúüíôá", [KartaProiontosWindowSetup], UL, 200, 20, 180, 25 button #startPage.Button4, "ÐåëÜôåò", [KartaPelatiWindowSetup], UL, 390, 20, 180, 25 button #startPage.Button5, "Ðñïãñáìáôéóìïò Áãïñþí", [ProgAgorWindowSetup], UL, 85, 70, 180, 25 button #startPage.Button6, "Ðñïãñáììáôéóìüò ðáñáãùãÞò", [PrPaWindowSetup], UL, 280, 70, 180, 25 button #startPage.Button7, "Ðáñáóôáôßêá", [Button7.click], UL, 10, 118, 180, 25 button #startPage.Button8, "Ðßíáêåò - ÄéáãñÜììáôá", [Button8.click], UL, 200, 118, 180, 25 button #startPage.Button9, "×ñåüãñáöá", [Button9.click], UL, 390, 118, 180, 25 button #startPage.Button10, "Ñõèìßóåéò", [Button10.click], UL, 10, 165, 180, 25 button #startPage.Button11, "Áíôßãñáöï ÁóöÜëåéáò", [Button11.click], UL, 200, 165, 180, 25 button #startPage.Button12, "ÅðéëïãÞ ¸ôïõò", [EpiloghEtoysWindowSetup], UL, 390, 165, 180, 25 button #startPage.Button13, "ÂïÞèåéá", [Button13.click], UL, 320, 220, 120, 25
Open "ËÏÃÉÓÔÉÑÉÏ" for Window_nf as #startPage #startPage "font Consolas 10" #startPage "trapclose [quit]"
[loop] Wait
[KartaPromitheftiWindowSetup] NOMAINWIN WindowWidth = 559 : WindowHeight = 339 UpperLeftX = INT((DisplayWidth-WindowWidth)/2) UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[ControlSetupKartaPromithefti] button #main1.Button1, "ÁðïèÞêåõóç", [Save.click], UL, 10, 15, 120, 21 button #main1.Button2, "ÄéáãñáöÞ", [Del.click], UL, 140, 15, 120, 21 button #main1.Button3, "Êáèáñéóìüò", [Clear.click], UL, 270, 15, 120, 21 button #main1.Button4, "ÅðéóôñïöÞ", [quitKP], UL, 400, 15, 120, 21 button #main1.Button5, "ÁíáæÞôçóç", [Search.click], UL, 273, 63, 120, 21 statictext #main1.StaticText1, " ¼íïìá:", 15, 200, 150, 21 statictext #main1.StaticText2, " Óõíôïìïãñáößá:", 15, 240, 150, 21 textbox #main1.TextBox1, 20, 65, 230, 21 textbox #main1.TextBox2, 200, 200, 312, 21 textbox #main1.TextBox3, 200, 240, 310, 21
Open "ÊÁÑÔÁ ÐÑÏÌÇÈÅÕÔÇ" for dialog_modal as #main1 print #main1.TextBox1, "" print #main1.TextBox2, "" print #main1.TextBox3, ""
#main1 "font MS Sans Serif 8" #main1 "trapclose [quitKP]" call CreateListViewsKarProm HWND(#main1)
[loop1] Wait
[KartaProiontosWindowSetup] NOMAINWIN WindowWidth = 1070 : WindowHeight = 680 UpperLeftX = INT((DisplayWidth-WindowWidth)/2) UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[KartaProiontosControlSetup] groupbox #main2.GroupBox1, " ", 518, 588, 329, 39 button #main2.Button1, "ÁðïèÞêåõóç", [Button1.click], UL, 15, 15, 100, 21 button #main2.Button2, "ÄéáãñáöÞ", [Button2.click], UL, 130, 15, 100, 21 button #main2.Button3, "Êáèáñéóìüò", [Button3.click], UL, 245, 15, 100, 21 button #main2.Button4, "Ðñþôåò Õëåò", [prylWindowSetup], UL, 360, 15, 100, 21 button #main2.Button5, "ÅðéóôñïöÞ", [KartaProiontosquit], UL, 475, 15, 100, 21 button #main2.Button6, "ÁíáæÞôçóç", [Button6.click], UL, 245, 55, 100, 21 statictext #main2.StaticText1, " ¼íïìá :", 483, 56, 100, 21 statictext #main2.StaticText2, " Êùäéêüò :", 483, 98, 100, 21 statictext #main2.StaticText4, " Êùäéêüò ÐñïìçèåõôÞ :", 483, 133, 100, 31 statictext #main2.StaticText5, "ÌïíÜäá ÌÝôñçóçò :", 483, 182, 100, 25 statictext #main2.StaticText6, " ÐñïìçèåõôÞò :", 483, 217, 109, 21 statictext #main2.StaticText8, " ÐñïÝëåõóç :", 483, 252, 100, 21 statictext #main2.StaticText9, " Åðéôñåðôü üñéï áðïèÞêçò :", 483, 287, 145, 21 statictext #main2.StaticText10, " ÔéìÞ ðñïìçèåõôÞ :", 483, 322, 100, 21 statictext #main2.StaticText11, " ÔéìÞ êüóôïõò :", 483, 357, 100, 21 statictext #main2.StaticText12, " ÔéìÞ ÷ïíäñéêÞò :", 483, 392, 100, 21 statictext #main2.StaticText13, " ÔéìÞ ëéáíéêÞò :", 483, 427, 100, 21 statictext #main2.StaticText14, " ÂÜñïò óõóêåõáóßáò :", 483, 462, 120, 21 statictext #main2.StaticText15, " ¼ãêïò óõóêåõáóßáò :", 483, 497, 120, 21 statictext #main2.StaticText16, " ÐåñéãñáöÞ :", 483, 532, 100, 21 textbox #main2.TextBox1, 15, 55, 200, 21 textbox #main2.TextBox2, 700, 56, 340, 21 textbox #main2.TextBox3, 700, 98, 150, 21 textbox #main2.TextBox4, 700, 140, 150, 21 textbox #main2.TextBox5, 700, 287, 85, 21 textbox #main2.TextBox6, 700, 322, 85, 21 textbox #main2.TextBox7, 700, 357, 85, 21 textbox #main2.TextBox8, 700, 392, 85, 21 textbox #main2.TextBox9, 700, 427, 85, 21 textbox #main2.TextBox10, 700, 462, 85, 21 textbox #main2.TextBox11, 700, 497, 85, 21 textbox #main2.TextBox12, 700, 532, 340, 21 combobox #main2.ComboBox1, ComboBox1$(), [ComboBox1.click], 700, 182, 100, 21 combobox #main2.ComboBox2, ComboBox2$(), [ComboBox2.click], 700, 217, 102, 21 combobox #main2.ComboBox3, ComboBox3$(), [ComboBox3.click], 700, 250, 103, 21 checkbox #main2.CheckBox1, "Ðáñáãþìåíï ðñïúüí", [CheckBox1.click], [CheckBox1.reset], 532, 602, 131, 17 checkbox #main2.CheckBox2, "Êáôüðéí ðáñáããåëßáò", [CheckBox2.click], [CheckBox2.reset], 693, 596, 138, 28
Open "ÊÁÑÔÁ ÐÑÏÚÏÍÔÏÓ" for dialog_modal as #main2 #main2 "font MS Sans Serif 8" #main2 "trapclose [KartaProiontosquit]" #main2.ComboBox1 "selectindex 1" #main2.ComboBox2 "selectindex 1" #main2.ComboBox3 "selectindex 1"
call CreateListViewsKarProi HWND(#main2)
[loop2] Wait
[KartaPelatiWindowSetup] NOMAINWIN WindowWidth = 1070 : WindowHeight = 640 UpperLeftX = INT((DisplayWidth-WindowWidth)/2) UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[KartaPelatiControlSetup] button #main3.Button1, "ÁðïèÞêåõóç", [Button1.click], UL, 15, 15, 100, 21 button #main3.Button2, "ÄéáãñáöÞ", [Button2.click], UL, 130, 15, 100, 21 button #main3.Button3, "Êáèáñéóìüò", [Button3.click], UL, 245, 14, 100, 21 button #main3.Button4, "ÔéìÝò", [Button4.click], UL, 357, 14, 100, 21 button #main3.Button5, "ÅðéóôñïöÞ", [KartaPelatiquit], UL, 475, 15, 100, 21 button #main3.Button6, "ÁíáæÞôçóç", [Button6.click], UL, 245, 55, 100, 21 statictext #main3.StaticText1, " ¼íïìáôåðþíõìï Ðåëáôç :", 483, 76, 148, 21 statictext #main3.StaticText2, " ÅðÜããåëìá :", 483, 108, 100, 21 statictext #main3.StaticText4, " Äéåýèçíóç :", 483, 143, 100, 21 statictext #main3.StaticText5, " Ðüëç :", 483, 182, 100, 21 statictext #main3.StaticText6, " Ôá÷õäñïìéêüò Êùäéêáò :", 483, 217, 143, 21 statictext #main3.StaticText8, " Ä.Ï.Õ. :", 483, 252, 100, 21 statictext #main3.StaticText9, " Á. Ö. Ì. :", 483, 287, 145, 21 statictext #main3.StaticText10, " e-mail :", 483, 322, 100, 21 statictext #main3.StaticText11, " Óôáèåñü ÔçëÝöùíï :", 483, 357, 124, 21 statictext #main3.StaticText12, " Êéíçôü ÔçëÝöùíï :", 483, 392, 100, 21 statictext #main3.StaticText13, " ¸êðôùóç :", 483, 427, 100, 21 statictext #main3.StaticText14, " :", 483, 462, 120, 21 statictext #main3.StaticText15, " :", 483, 497, 120, 21 statictext #main3.StaticText16, " ÐáñáôçñÞóåéò :", 483, 532, 100, 21 textbox #main3.TextBox1, 15, 55, 200, 21 textbox #main3.TextBox2, 700, 76, 340, 21 textbox #main3.TextBox3, 700, 108, 150, 21 textbox #main3.TextBox4, 700, 143, 150, 21 textbox #main3.TextBox5, 700, 287, 85, 21 textbox #main3.TextBox6, 700, 322, 85, 21 textbox #main3.TextBox7, 700, 357, 85, 21 textbox #main3.TextBox8, 700, 392, 85, 21 textbox #main3.TextBox9, 700, 427, 85, 21 textbox #main3.TextBox10, 700, 462, 85, 21 textbox #main3.TextBox11, 700, 497, 85, 21 textbox #main3.TextBox12, 700, 532, 340, 21 combobox #main3.ComboBox4, ComboBox4$(), [ComboBox4.click], 700, 182, 100, 21 combobox #main3.ComboBox5, ComboBox5$(), [ComboBox5.click], 700, 217, 102, 21 combobox #main3.ComboBox6, ComboBox6$(), [ComboBox6.click], 700, 250, 103, 21
Open "ÊÁÑÔÁ ÐÅËÁÔÇ" for dialog_modal as #main3 #main3 "font MS Sans Serif 8" #main3 "trapclose [KartaPelatiquit]" #main3.ComboBox4 "selectindex 1" #main3.ComboBox5 "selectindex 1" #main3.ComboBox6 "selectindex 1"
call CreateListViewsKarPel HWND(#main3)
[KartaPelatiloop] Wait
[prylWindowSetup] NOMAINWIN WindowWidth = 737 : WindowHeight = 575 UpperLeftX = INT((DisplayWidth-WindowWidth)/2) UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[prylControlSetup] statictext #main4.stx1, "¼ôáí ðáñÜãåôáé Ýíá ôåìÜ÷éï áðü ôï Ðñïúüí:", 20, 15, 295, 25 statictext #main4.stx2, "ÅíäéÜìåóï", 20, 50, 80, 20 statictext #main4.stx3, "Ôüôå áðü ôï ðñïúüí:", 20, 80, 265, 20 statictext #main4.stx4, "Êáôáíáëþíåôáé ðïóüôçôá: .........", 20, 140, 265, 20 statictext #main4.stx5, "Óõíïëü:", 480, 460, 75, 20 stylebits #main4.btn1, _BS_MULTILINE, 0, 0, 0 button #main4.btn1, "ÅéóáãùãÞ óôïí ðßíáêá", [EntranceInArray], UL, 415, 135, 175, 25 stylebits #main4.btn2, _BS_MULTILINE, 0, 0, 0 button #main4.btn2, "Áöáßñåóç áðü ôïí ðßíáêá", [MinusFromArray], UL, 35, 460, 195, 25 stylebits #main4.btn3, _BS_MULTILINE, 0, 0, 0 button #main4.btn3, "ÅðéóôñïöÞ", [prylquit], UL, 475, 490, 115, 25 TextboxColor$ = "White" textbox #main4.tbx1, 305, 135, 75, 24 ComboboxColor$ = "White" combobox #main4.cmb1,ComboBox7$(), [What], 20, 110, 370, 300
Open "Ðñþôåò ¾ëåò" for dialog_modal as #main4 #main4 "trapclose [prylquit]" #main4.cmb1 "selectindex 1" #main4 "font consolas 10"
call CreateListViewspryl HWND(#main4)
[prylloop] Wait
[VendersWindowSetup] NOMAINWIN WindowWidth = 440 : WindowHeight = 410 UpperLeftX = INT((DisplayWidth-WindowWidth)/2) UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[VendersControlSetup] button #main5.btn1, "ÁðïèÞêåõóç", [Button1.click], UL, 10, 10, 120, 25 button #main5.btn2, "ÄéáãñáöÞ", [Button2.click], UL, 140, 10, 120, 25 button #main5.btn3, "Êáèáñéóìüò", [Button3.click], UL, 270, 10, 120, 25 button #main5.btn4, "ÐëçñùìÞ ÐùëçôÞ", [Button4.click], UL, 10, 45, 117, 27 button #main5.btn5, "ÊÜñôá ÐùëçôÞ", [Button5.click], UL, 140, 45, 120, 25 button #main5.btn6, "ÅðéóôñïöÞ", [venderQuit], UL, 270, 45, 120, 25 button #main5.btn7, "ÁíáæÞôçóç", [Button7.click], UL, 270, 85, 120, 25 statictext #main5.stx1, " ¼íïìá:", 10, 300, 129, 15 statictext #main5.stx2, " Ðïóïóôü %", 10, 330, 131, 17 textbox #main5.tbx1, 10, 90, 250, 21 textbox #main5.tbx2, 160, 300, 240, 21 textbox #main5.tbx3, 160, 330, 126, 21
Open "ÐùëçôÝò" for dialog_modal as #main5 #main5 "font Consolas 10" #main5 "trapclose [venderQuit]"
call CreateListViewsVenders HWND(#main5)
[vendersloop] Wait
[PartnerWindowSetup] NOMAINWIN WindowWidth = 717 : WindowHeight = 413 UpperLeftX = INT((DisplayWidth-WindowWidth)/2) UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[PartnerControlSetup] Menu #main6, "ÓõíåñãÜôåò", "ÐñïóèÞêç íåïõ óõíåñãÜôç", [newPartner], "ÄéáãñáöÞ ÓõíåñãÜôç", [delPartner], "Åêôýðùóç ÊÜñôáò", [printKard], | , "ÅðéóôñïöÞ", [Partnerquit] Menu #main6, "ÐáñáóôáôéêÜ", "ÍÝï Ðáñáóôáôéêü", [newDeed], "ÄéáãñáöÞ Ðáñáóôáôéêïý", [delDeed] statictext #main6.StaticText1, " ÊÜñôá ÓõíåñãÜôç", 262, 90, 141, 15 button #main6.Button1, "ÐñïóèÞêç íåïõ óõíåñãÜôç", [newPartner], UL, 10, 10, 185, 25 button #main6.Button2, "ÄéáãñáöÞ ÓõíåñãÜôç", [delPartner], UL, 210, 10, 155, 25 button #main6.Button3, "Åêôýðùóç ÊÜñôáò", [printKard], UL, 375, 10, 120, 25 button #main6.Button6, "ÅðéóôñïöÞ", [Partnerquit], UL, 510, 10, 120, 25 button #main6.Button8, "ÍÝï Ðáñáóôáôéêü", [newDeed], UL, 10, 45, 185, 25 button #main6.Button9, "ÄéáãñáöÞ Ðáñáóôáôéêïý", [delDeed], UL, 210, 45, 155, 25 combobox #main6.ComboBox1, ComboBox8$(), [ComboBox1.click], 10, 90, 230, 21
Open "ÓõíåñãÜôåò" for window_nf as #main6 #main6 "font Consolas 10" #main6 "trapclose [Partnerquit]" #main6.ComboBox1 "selectindex 1" #startPage "disable"
call CreateListViewsPartner HWND(#main6)
[Partnerloop] Wait
[AnoigmaEtoysWindowSetup] NOMAINWIN WindowWidth = 236 : WindowHeight = 204 UpperLeftX = INT((DisplayWidth-WindowWidth)/2) UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[AnoigmaEtoysControlSetup] button #main7.Button1, "¢êõñï", [AnoigmaEtoysquit], UL, 10, 120, 90, 25 button #main7.Button2, "ÅíôÜîåé", [openYear], UL, 120, 120, 90, 25 statictext #main7.StaticText1, "Äþóôå ôï Ýôïò Ð.×. 2010", 30, 20, 168, 20 textbox #main7.TextBox1, 60, 60, 100, 21 Open "¢íïéãìá ¸ôïõò" for dialog_modal as #main7 print #main7.TextBox1, "" #main7 "font Consolas 10" #main7 "trapclose [AnoigmaEtoysquit]"
[AnoigmaEtoysloop] Wait
[EpiloghEtoysWindowSetup] button #epet.Button1, "¢êõñï", [EpilogEtoysquit], UL, 10, 120, 90, 25 button #epet.Button2, "ÅíôÜîåé", [epilYear], UL, 120, 120, 90, 25 statictext #epet.StaticText1, "Äþóôå ôï Ýôïò Ð.×. 2010", 30, 20, 168, 20 textbox #epet.TextBox1, 60, 60, 100, 21 Open "ÅðéëïãÞ ¸ôïõò" for dialog_modal as #epet print #epet.TextBox1, "" #epet "font Consolas 10" #epet "trapclose [EpilogEtoysquit]"
[EpilogEtoysloop] Wait
[ProgAgorWindowSetup] NOMAINWIN WindowWidth = 980 : WindowHeight = 700 UpperLeftX = INT((DisplayWidth-WindowWidth)/2) UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[ProgAgorControlSetup] Menu #main8, "Ëßóôá", "¢íïéãìá Ëßóôáò Á'", [openListaA], "¢íïéãìá Ëéóôáò Â'", [openListaB], | , "ÁðïèÞêåõóç Ëßóôáò Á'", [saveListaA], "ÁðïèÞêåõóç Ëßóôáò Â'", [saveListaB], | , "Êáèáñéóìüò Ëßóôáò", [clearLista], "Åêôýðùóç Ëßóôáò", [printLista], | , "ÅðéóôñïöÞ", [backStart] Menu #main8, "Ôáîéíüìçóç", "Ôáîéíüìçóç ÊáôÜ ¼íïìá", [ratingByName], "Ôáîéíüìçóç ÊáôÜ ÐñïìçèåõôÞ", [ratingByProm], "Ôáîéíüìçóç ÊáôÜ Óôïê", [ratingByStock] Menu #main8, "Êáôá÷þñçóç", "Çìåñïìçíßá Êáôá÷þñçóçò", [dateEntry], "Êáôá÷þñçóç ¼ëùí", [entryAll], "Êáôá÷þñçóç ÅðéëåãìÝíùí", [entryCheck] statictext #main8.prag1, "ÁðïèÞêç", 340, 5, 135, 25 statictext #main8.prag2, "Ðïóüôçôá:", 670, 50, 65, 20 statictext #main8.prag6, "Ëßóôá Ðáñáããåëßáò", 360, 245, 135, 20 statictext #main8.prag7, "Óýíïëá áíá ÐñïìçèåõôÞ", 135, 475, 200, 20 statictext #main8.prag8, "Êüóôïò", 830, 490, 85, 20 stylebits #main8.prag4, _BS_MULTILINE, 0, 0, 0 button #main8.prag4, "Åéóáãùãç ðñïúüíôïò óôç ëßóôá", [entrProd], UL, 650, 90, 220, 25 stylebits #main8.prag5, _BS_MULTILINE, 0, 0, 0 button #main8.prag5, "ÅîáãùãÞ ðñïúüíôïò áðü ôç ëßóôá", [outProg], UL, 650, 125, 220, 25 stylebits #main8.prag9, _BS_MULTILINE, 0, 0, 0 button #main8.prag9, "ÅðéóôñïöÞ", [backStart], UL, 795, 595, 125, 25 TextboxColor$ = "White" textbox #main8.prag3, 760, 50, 70, 22
Open "Ðñïãñáììáôéóìüò Áãïñþí" for window as #main8 #main8 "trapclose [backStart]" #main8 "font consolas 10" #startPage "disable"
call CreateListViews HWND(#main8)
[ProgAgorloop] Wait
[PrPaWindowSetup] NOMAINWIN WindowWidth = 956 : WindowHeight = 653 UpperLeftX = INT((DisplayWidth-WindowWidth)/2) UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[PrPaControlSetup] Menu #prpa, "Ëßóôá", "¢íïéãìá Ëßóôáò Á'", [openListaA], "¢íïéãìá Ëéóôáò Â'", [openListaB], | , "ÁðïèÞêåõóç Ëßóôáò Á'", [saveListaA], "ÁðïèÞêåõóç Ëßóôáò Â'", [saveListaB], | , "Êáèáñéóìüò Ëßóôáò", [clearLista], "Åêôýðùóç Ëßóôáò", [printLista], | , "ÅðéóôñïöÞ", [backStart] Menu #prpa, "Ôáîéíüìçóç", "Ôáîéíüìçóç ÊáôÜ ¼íïìá", [ratingByName], "Ôáîéíüìçóç ÊáôÜ ÐñïìçèåõôÞ", [ratingByProm], "Ôáîéíüìçóç ÊáôÜ Óôïê", [ratingByStock] Menu #prpa, "Êáôá÷þñçóç", "Çìåñïìçíßá Êáôá÷þñçóçò", [dateEntry], "Êáôá÷þñçóç ¼ëùí", [entryAll], "Êáôá÷þñçóç ÅðéëåãìÝíùí", [entryCheck] statictext #prpa.prpa1, "ÁðïèÞêç", 245, 5, 105, 20 statictext #prpa.prpa2, "Ðïóüôçôá", 710, 40, 110, 20 statictext #prpa.prpa6, "Ëßóôá Ðáñáããåëßáò", 230, 215, 285, 20 stylebits #prpa.prpa4, _BS_MULTILINE, 0, 0, 0 button #prpa.prpa4, "Åéóáãùãç óôç ëßóôá", [EisagList], UL, 710, 100, 100, 35 stylebits #prpa.prpa5, _BS_MULTILINE, 0, 0, 0 button #prpa.prpa5, "ÅîáãùãÞ áðü ôç ëßóôá", [ejagList], UL, 710, 150, 100, 35 TextboxColor$ = "White" stylebits #prpa.prpa7, _BS_MULTILINE, 0, 0, 0 button #prpa.prpa7, "¸îïäïò", [PrPaquit], UL, 715, 535, 165, 30 TextboxColor$ = "White" textbox #prpa.prpa3, 710, 65, 100, 22
Open "Ðñïãñáìáôéóìüò ÐáñáãùãÞò" for window as #prpa #prpa "trapclose [PrPaquit]" #prpa "font consolas 10" #startPage "disable"
'** Change statusbar message at any time with sub ChangeStatusText '** Call ChangeStatusText hStatus, ID_of_Panel, NewText$ '** The handle of the statusbar is hStatus hStatus = MakeStatusBar(HWND(#prpa), "StatusBar") ' statusbar will not work properly in this window type ' because resizehandler is not available: ' #prpa "resizehandler [ResizeStatus]"
call CreateListViewsPrPa HWND(#prpa)
[PrPaloop] Wait
[epilYear] print #epet.TextBox1, "!contents? year$" DefaultDir$ = "C:\Users\loyka\Documents\YEARS" + "\" + year$ result = mkdir(DefaultDir$) if result <> 0 then notice "Ôï Ýôïò åðéëÝ÷ôçêå." else notice "Ï êáôÜëïãïò äçìçïõñãÞèçêå." close #epet notice DefaultDir$ wait
[openYear] print #main7.TextBox1, "!contents? year$" DefaultDir$ = "C:\Users\loyka\Documents\YEARS" + "\" + year$ result = mkdir(DefaultDir$) if result <> 0 then notice "Ôï Ýôïò õðÜñ÷åé." else notice "Ï êáôÜëïãïò äçìçïõñãÞèçêå." notice DefaultDir$ open "kartaProm.txt" for output as #kartProm close #kartProm close #main7 wait
[wareHouse] 'place listview handling code here LVM.GETITEMA = 4101 : LVM.GETITEMCOUNT = 4100 LVIF.TEXT = 1 : LVM.GETITEMSTATE = 4138 LVIS.SELECTED = 2 : LVIF.STATE = 8 'Returns 0-based index of selected item. Call this routine on a timer 'with resolution of 1000 ms to see which item is selected. calldll #user32, "SendMessageA", hwndListView1 As uLong, LVM.GETITEMCOUNT as long,_ 0 as long, 0 as long, total As Long For index = 0 To total - 1 'check each row LVITEM.mask.struct = LVIF.TEXT Or LVIF.STATE LVITEM.iItem.struct = Index 'row LVITEM.iSubItem.struct = 0 'first column LVITEM.cchTextMax.struct = 32 LVITEM.pszText$.struct = Space$(32) LVITEM.stateMask.struct = LVIS.SELECTED calldll #user32, "SendMessageA", hwndListView1 As uLong, LVM.GETITEMA as long,_ index as long, LVITEM as struct , re As Long state = LVITEM.state.struct 'selected state of item If state And LVIS.SELECTED Then txt$ = winstring(LVITEM.pszText$.struct) 'txt$ now contains text in column 1 of the row selected Exit For End If Next wait
[listOrder] 'place listview handling code here LVM.GETITEMA = 4101 : LVM.GETITEMCOUNT = 4100 LVIF.TEXT = 1 : LVM.GETITEMSTATE = 4138 LVIS.SELECTED = 2 : LVIF.STATE = 8 'Returns 0-based index of selected item. Call this routine on a timer 'with resolution of 1000 ms to see which item is selected. calldll #user32, "SendMessageA", hwndListView2 As uLong, LVM.GETITEMCOUNT as long,_ 0 as long, 0 as long, total As Long For index = 0 To total - 1 'check each row LVITEM.mask.struct = LVIF.TEXT Or LVIF.STATE LVITEM.iItem.struct = Index 'row LVITEM.iSubItem.struct = 0 'first column LVITEM.cchTextMax.struct = 32 LVITEM.pszText$.struct = Space$(32) LVITEM.stateMask.struct = LVIS.SELECTED calldll #user32, "SendMessageA", hwndListView2 As uLong, LVM.GETITEMA as long,_ index as long, LVITEM as struct , re As Long state = LVITEM.state.struct 'selected state of item If state And LVIS.SELECTED Then txt$ = winstring(LVITEM.pszText$.struct) 'txt$ now contains text in column 1 of the row selected Exit For End If Next wait
[allProm] LVM.GETITEMA = 4101 : LVM.GETITEMCOUNT = 4100 LVIF.TEXT = 1 : LVM.GETITEMSTATE = 4138 LVIS.SELECTED = 2 : LVIF.STATE = 8 'Returns 0-based index of selected item. Call this routine on a timer 'with resolution of 1000 ms to see which item is selected. calldll #user32, "SendMessageA", hwndListView3 As uLong, LVM.GETITEMCOUNT as long,_ 0 as long, 0 as long, total As Long For index = 0 To total - 1 'check each row LVITEM.mask.struct = LVIF.TEXT Or LVIF.STATE LVITEM.iItem.struct = Index 'row LVITEM.iSubItem.struct = 0 'first column LVITEM.cchTextMax.struct = 32 LVITEM.pszText$.struct = Space$(32) LVITEM.stateMask.struct = LVIS.SELECTED calldll #user32, "SendMessageA", hwndListView3 As uLong, LVM.GETITEMA as long,_ index as long, LVITEM as struct , re As Long state = LVITEM.state.struct 'selected state of item If state And LVIS.SELECTED Then txt$ = winstring(LVITEM.pszText$.struct) 'txt$ now contains text in column 1 of the row selected Exit For End If Next wait
Sub listview1Click LVM.GETITEMA = 4101 : LVM.GETITEMCOUNT = 4100 LVIF.TEXT = 1 : LVM.GETITEMSTATE = 4138 LVIS.SELECTED = 2 : LVIF.STATE = 8 'Returns 0-based index of selected item. Call this routine on a timer 'with resolution of 1000 ms to see which item is selected. calldll #user32, "SendMessageA", hwndListView1 As uLong, LVM.GETITEMCOUNT as long,_ 0 as long, 0 as long, total As Long For index = 0 To total - 1 'check each row LVITEM.mask.struct = LVIF.TEXT Or LVIF.STATE LVITEM.iItem.struct = Index 'row LVITEM.iSubItem.struct = 0 'first column LVITEM.cchTextMax.struct = 32 LVITEM.pszText$.struct = Space$(32) LVITEM.stateMask.struct = LVIS.SELECTED calldll #user32, "SendMessageA", hwndListView1 As uLong, LVM.GETITEMA as long,_ index as long, LVITEM as struct , re As Long state = LVITEM.state.struct 'selected state of item If state And LVIS.SELECTED Then txt$ = winstring(LVITEM.pszText$.struct) 'txt$ now contains text in column 1 of the row selected Exit For End If Next End Sub
Sub listview111Click LVM.GETITEMA = 4101 : LVM.GETITEMCOUNT = 4100 LVIF.TEXT = 1 : LVM.GETITEMSTATE = 4138 LVIS.SELECTED = 2 : LVIF.STATE = 8 'Returns 0-based index of selected item. Call this routine on a timer 'with resolution of 1000 ms to see which item is selected. calldll #user32, "SendMessageA", hwndListView1 As uLong, LVM.GETITEMCOUNT as long,_ 0 as long, 0 as long, total As Long For index = 0 To total - 1 'check each row LVITEM.mask.struct = LVIF.TEXT Or LVIF.STATE LVITEM.iItem.struct = Index 'row LVITEM.iSubItem.struct = 0 'first column LVITEM.cchTextMax.struct = 32 LVITEM.pszText$.struct = Space$(32) LVITEM.stateMask.struct = LVIS.SELECTED calldll #user32, "SendMessageA", hwndListView1 As uLong, LVM.GETITEMA as long,_ index as long, LVITEM as struct , re As Long state = LVITEM.state.struct 'selected state of item If state And LVIS.SELECTED Then txt$ = winstring(LVITEM.pszText$.struct) 'txt$ now contains text in column 1 of the row selected Exit For End If Next End Sub
Sub listview112Click LVM.GETITEMA = 4101 : LVM.GETITEMCOUNT = 4100 LVIF.TEXT = 1 : LVM.GETITEMSTATE = 4138 LVIS.SELECTED = 2 : LVIF.STATE = 8 'Returns 0-based index of selected item. Call this routine on a timer 'with resolution of 1000 ms to see which item is selected. calldll #user32, "SendMessageA", hwndListView2 As uLong, LVM.GETITEMCOUNT as long,_ 0 as long, 0 as long, total As Long For index = 0 To total - 1 'check each row LVITEM.mask.struct = LVIF.TEXT Or LVIF.STATE LVITEM.iItem.struct = Index 'row LVITEM.iSubItem.struct = 0 'first column LVITEM.cchTextMax.struct = 32 LVITEM.pszText$.struct = Space$(32) LVITEM.stateMask.struct = LVIS.SELECTED calldll #user32, "SendMessageA", hwndListView2 As uLong, LVM.GETITEMA as long,_ index as long, LVITEM as struct , re As Long state = LVITEM.state.struct 'selected state of item If state And LVIS.SELECTED Then txt$ = winstring(LVITEM.pszText$.struct) 'txt$ now contains text in column 1 of the row selected Exit For End If Next End Sub
Sub CreateListViewsKarProm hWin 'ListView controls are complex. Please see API documentation 'for full information on their use. This code will get you started. LVS.REPORT = 1 : LVS.NOSORTHEADER = 32768 LVS.SINGLESEL = 1 : LVM.INSERTCOLUMN = 4123 LVCF.WIDTH = 2 : LVM.INSERTITEM = 4103 LVCF.TEXT = 4 : LVM.SETITEM = 4102 LVIF.TEXT = 1 : LVS.SHOWSELALWAYS = 8 Struct LVITEM,mask As ulong,iItem As long,iSubItem As long,state As ulong,stateMask As ulong,_ pszText$ As ptr,cchTextMax As Long,iImage As Long,lParam As Long,iIndent As Long Struct LVCOLUMN,mask As ulong,fmt As long,cx As long,pszText$ As ptr,cchTextMax As Long,iSubItem As Long,iImage As Long,iOrder As Long style = _WS_CHILD OR _WS_VISIBLE OR LVS.NOSORTHEADER Or LVS.REPORT Or LVS.SINGLESEL Or LVS.SHOWSELALWAYS calldll #comctl32, "InitCommonControls", re as void calldll #user32, "GetWindowLongA", hWin as uLong, _GWL_HINSTANCE as long, hInstance as uLong
calldll #user32, "CreateWindowExA", _WS_EX_CLIENTEDGE As long,"SysListView32" as ptr,_ "" as ptr, style as long, 40 as Long, 105 as Long, 480 as Long, 90 as Long,_ hWin as uLong, 0 as long, hInstance as uLong,"" as ptr, hwndListView1 As uLong calldll #user32, "SendMessageA" , hwndListView1 as uLong, 4150 as Long,_ 32 As Long, 32 As Long, re as Long 'make listview fullrowselect style
LVCOLUMN.mask.struct = LVCF.WIDTH OR LVCF.TEXT LVCOLUMN.cx.struct = 470 'desired width of column in pixels LVCOLUMN.pszText$.struct = "First" 'Add first column header, index is 0. Indexes are 0-based. calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTCOLUMN as Long,_ 0 as long, LVCOLUMN as Struct, re as Long for a=1 to 100 LVITEM.mask.struct = LVIF.TEXT LVITEM.iItem.struct = a 'first row LVITEM.pszText$.struct = "row ";a 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTITEM as Long,_ 0 As Long, LVITEM As struct, re as Long next a 'LVITEM.iItem.struct = a 'second row 'LVITEM.pszText$.struct = "row ";a 'put desired text here 'calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTITEM as Long,_ '0 As Long, LVITEM As struct, re as Long End Sub
Sub CreateListViewsKarProi hWin 'ListView controls are complex. Please see API documentation 'for full information on their use. This code will get you started. LVS.REPORT = 1 : LVS.NOSORTHEADER = 32768 LVS.SINGLESEL = 4 : LVM.INSERTCOLUMN = 4123 LVCF.WIDTH = 2 : LVM.INSERTITEM = 4103 LVCF.TEXT = 4 : LVM.SETITEM = 4102 LVIF.TEXT = 1 : LVS.SHOWSELALWAYS = 8 Struct LVITEM,mask As ulong,iItem As long,iSubItem As long,state As ulong,stateMask As ulong,_ pszText$ As ptr,cchTextMax As Long,iImage As Long,lParam As Long,iIndent As Long Struct LVCOLUMN,mask As ulong,fmt As long,cx As long,pszText$ As ptr,cchTextMax As Long,iSubItem As Long,iImage As Long,iOrder As Long style = _WS_CHILD OR _WS_VISIBLE OR LVS.NOSORTHEADER Or LVS.REPORT Or LVS.SINGLESEL Or LVS.SHOWSELALWAYS calldll #comctl32, "InitCommonControls", re as void calldll #user32, "GetWindowLongA", hWin as uLong, _GWL_HINSTANCE as long, hInstance as uLong
calldll #user32, "CreateWindowExA", _WS_EX_CLIENTEDGE As long,"SysListView32" as ptr,_ "" as ptr, style as long, 30 as Long, 95 as Long, 370 as Long, 470 as Long,_ hWin as uLong, 0 as long, hInstance as uLong,"" as ptr, hwndListView1 As uLong calldll #user32, "SendMessageA" , hwndListView1 as uLong, 4150 as Long,_ 32 As Long, 32 As Long, re as Long 'make listview fullrowselect style
LVCOLUMN.mask.struct = LVCF.WIDTH OR LVCF.TEXT LVCOLUMN.cx.struct = 400 'desired width of column in pixels LVCOLUMN.pszText$.struct = "First" 'Add first column header, index is 0. Indexes are 0-based. calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTCOLUMN as Long,_ 0 as long, LVCOLUMN as Struct, re as Long for a=1 to 100 LVITEM.mask.struct = LVIF.TEXT LVITEM.iItem.struct = a 'first row LVITEM.pszText$.struct = "row ";a 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTITEM as Long,_ 0 As Long, LVITEM As struct, re as Long next a 'LVITEM.iItem.struct = a 'second row 'LVITEM.pszText$.struct = "row ";a 'put desired text here 'calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTITEM as Long,_ '0 As Long, LVITEM As struct, re as Long End Sub
Sub CreateListViewsKarPel hWin 'ListView controls are complex. Please see API documentation 'for full information on their use. This code will get you started. LVS.REPORT = 1 : LVS.NOSORTHEADER = 32768 LVS.SINGLESEL = 4 : LVM.INSERTCOLUMN = 4123 LVCF.WIDTH = 2 : LVM.INSERTITEM = 4103 LVCF.TEXT = 4 : LVM.SETITEM = 4102 LVIF.TEXT = 1 : LVS.SHOWSELALWAYS = 8 Struct LVITEM,mask As ulong,iItem As long,iSubItem As long,state As ulong,stateMask As ulong,_ pszText$ As ptr,cchTextMax As Long,iImage As Long,lParam As Long,iIndent As Long Struct LVCOLUMN,mask As ulong,fmt As long,cx As long,pszText$ As ptr,cchTextMax As Long,iSubItem As Long,iImage As Long,iOrder As Long style = _WS_CHILD OR _WS_VISIBLE OR LVS.NOSORTHEADER Or LVS.REPORT Or LVS.SINGLESEL Or LVS.SHOWSELALWAYS calldll #comctl32, "InitCommonControls", re as void calldll #user32, "GetWindowLongA", hWin as uLong, _GWL_HINSTANCE as long, hInstance as uLong
calldll #user32, "CreateWindowExA", _WS_EX_CLIENTEDGE As long,"SysListView32" as ptr,_ "" as ptr, style as long, 30 as Long, 95 as Long, 370 as Long, 470 as Long,_ hWin as uLong, 0 as long, hInstance as uLong,"" as ptr, hwndListView1 As uLong calldll #user32, "SendMessageA" , hwndListView1 as uLong, 4150 as Long,_ 32 As Long, 32 As Long, re as Long 'make listview fullrowselect style
LVCOLUMN.mask.struct = LVCF.WIDTH OR LVCF.TEXT LVCOLUMN.cx.struct = 400 'desired width of column in pixels LVCOLUMN.pszText$.struct = "First" 'Add first column header, index is 0. Indexes are 0-based. calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTCOLUMN as Long,_ 0 as long, LVCOLUMN as Struct, re as Long for a=1 to 100 LVITEM.mask.struct = LVIF.TEXT LVITEM.iItem.struct = a 'first row LVITEM.pszText$.struct = "row ";a 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTITEM as Long,_ 0 As Long, LVITEM As struct, re as Long next a 'LVITEM.iItem.struct = a 'second row 'LVITEM.pszText$.struct = "row ";a 'put desired text here 'calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTITEM as Long,_ '0 As Long, LVITEM As struct, re as Long End Sub
Sub CreateListViewspryl hWin 'ListView controls are complex. Please see API documentation 'for full information on their use. This code will get you started. LVS.REPORT = 1 : LVS.NOSORTHEADER = 32768 LVS.SINGLESEL = 4 : LVM.INSERTCOLUMN = 4123 LVCF.WIDTH = 2 : LVM.INSERTITEM = 4103 LVCF.TEXT = 4 : LVM.SETITEM = 4102 LVIF.TEXT = 1 : LVS.SHOWSELALWAYS = 8 Struct LVITEM,mask As ulong,iItem As long,iSubItem As long,state As ulong,stateMask As ulong,_ pszText$ As ptr,cchTextMax As Long,iImage As Long,lParam As Long,iIndent As Long Struct LVCOLUMN,mask As ulong,fmt As long,cx As long,pszText$ As ptr,cchTextMax As Long,iSubItem As Long,iImage As Long,iOrder As Long style = _WS_CHILD OR _WS_VISIBLE OR LVS.NOSORTHEADER Or LVS.REPORT Or LVS.SINGLESEL Or LVS.SHOWSELALWAYS calldll #comctl32, "InitCommonControls", re as void calldll #user32, "GetWindowLongA", hWin as uLong, _GWL_HINSTANCE as long, hInstance as uLong
calldll #user32, "CreateWindowExA", _WS_EX_CLIENTEDGE As long,"SysListView32" as ptr,_ "" as ptr, style as long, 25 as Long, 180 as Long, 615 as Long, 260 as Long,_ hWin as uLong, 0 as long, hInstance as uLong,"" as ptr, hwndListView1 As uLong calldll #user32, "SendMessageA" , hwndListView1 as uLong, 4150 as Long,_ 32 As Long, 32 As Long, re as Long 'make listview fullrowselect style
LVCOLUMN.mask.struct = LVCF.WIDTH OR LVCF.TEXT LVCOLUMN.cx.struct = 90 'desired width of column in pixels LVCOLUMN.pszText$.struct = "First" 'Add first column header, index is 0. Indexes are 0-based. calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTCOLUMN as Long,_ 0 as long, LVCOLUMN as Struct, re as Long
'Add second column header. Additional headers are added in this manner. columnIndex = 1 'be sure to increment index for each additional column LVCOLUMN.pszText$.struct = "Second" 'insert header caption here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTCOLUMN as Long,_ columnIndex as long, LVCOLUMN as Struct, re as Long
LVITEM.mask.struct = LVIF.TEXT LVITEM.iItem.struct = 0 'first row LVITEM.iSubItem.struct = 0 'first column LVITEM.pszText$.struct = "row 1 col 1" 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 1 'second row LVITEM.iSubItem.struct = 0 'first column LVITEM.pszText$.struct = "row 2 col 1" 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 0 'first row LVITEM.iSubItem.struct = 1 'second column LVITEM.pszText$.struct = "row 1 col 2" 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.SETITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 1 'second row LVITEM.iSubItem.struct = 1 'second column LVITEM.pszText$.struct = "row 2 col 2" 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.SETITEM as Long,_ 0 As Long, LVITEM As struct, re as Long End Sub
Sub CreateListViewsVenders hWin 'ListView controls are complex. Please see API documentation 'for full information on their use. This code will get you started. LVS.REPORT = 1 : LVS.NOSORTHEADER = 32768 LVS.SINGLESEL = 4 : LVM.INSERTCOLUMN = 4123 LVCF.WIDTH = 2 : LVM.INSERTITEM = 4103 LVCF.TEXT = 4 : LVM.SETITEM = 4102 LVIF.TEXT = 1 : LVS.SHOWSELALWAYS = 8 Struct LVITEM,mask As ulong,iItem As long,iSubItem As long,state As ulong,stateMask As ulong,_ pszText$ As ptr,cchTextMax As Long,iImage As Long,lParam As Long,iIndent As Long Struct LVCOLUMN,mask As ulong,fmt As long,cx As long,pszText$ As ptr,cchTextMax As Long,iSubItem As Long,iImage As Long,iOrder As Long style = _WS_CHILD OR _WS_VISIBLE OR LVS.NOSORTHEADER Or LVS.REPORT Or LVS.SINGLESEL Or LVS.SHOWSELALWAYS calldll #comctl32, "InitCommonControls", re as void calldll #user32, "GetWindowLongA", hWin as uLong, _GWL_HINSTANCE as long, hInstance as uLong
calldll #user32, "CreateWindowExA", _WS_EX_CLIENTEDGE As long,"SysListView32" as ptr,_ "" as ptr, style as long, 15 as Long, 150 as Long, 445 as Long, 130 as Long,_ hWin as uLong, 0 as long, hInstance as uLong,"" as ptr, hwndListView1 As uLong calldll #user32, "SendMessageA" , hwndListView1 as uLong, 4150 as Long,_ 32 As Long, 32 As Long, re as Long 'make listview fullrowselect style
LVCOLUMN.mask.struct = LVCF.WIDTH OR LVCF.TEXT LVCOLUMN.cx.struct = 400 'desired width of column in pixels LVCOLUMN.pszText$.struct = "ÐùëçôÝò" 'Add first column header, index is 0. Indexes are 0-based. calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTCOLUMN as Long,_ 0 as long, LVCOLUMN as Struct, re as Long for a=1 to 100 LVITEM.mask.struct = LVIF.TEXT LVITEM.iItem.struct = a 'first row LVITEM.pszText$.struct = "row ";a 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTITEM as Long,_ 0 As Long, LVITEM As struct, re as Long next a 'LVITEM.iItem.struct = a 'second row 'LVITEM.pszText$.struct = "row ";a 'put desired text here 'calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTITEM as Long,_ '0 As Long, LVITEM As struct, re as Long End Sub
Sub CreateListViewsPartner hWin 'ListView controls are complex. Please see API documentation 'for full information on their use. This code will get you started. LVS.REPORT = 1 : LVS.NOSORTHEADER = 32768 LVS.SINGLESEL = 4 : LVM.INSERTCOLUMN = 4123 LVCF.WIDTH = 2 : LVM.INSERTITEM = 4103 LVCF.TEXT = 4 : LVM.SETITEM = 4102 LVIF.TEXT = 1 : LVS.SHOWSELALWAYS = 8 Struct LVITEM,mask As ulong,iItem As long,iSubItem As long,state As ulong,stateMask As ulong,_ pszText$ As ptr,cchTextMax As Long,iImage As Long,lParam As Long,iIndent As Long Struct LVCOLUMN,mask As ulong,fmt As long,cx As long,pszText$ As ptr,cchTextMax As Long,iSubItem As Long,iImage As Long,iOrder As Long style = _WS_CHILD OR _WS_VISIBLE OR LVS.NOSORTHEADER Or LVS.REPORT Or LVS.SINGLESEL Or LVS.SHOWSELALWAYS calldll #comctl32, "InitCommonControls", re as void calldll #user32, "GetWindowLongA", hWin as uLong, _GWL_HINSTANCE as long, hInstance as uLong
calldll #user32, "CreateWindowExA", _WS_EX_CLIENTEDGE As long,"SysListView32" as ptr,_ "" as ptr, style as long, 20 as Long, 125 as Long, 645 as Long, 215 as Long,_ hWin as uLong, 0 as long, hInstance as uLong,"" as ptr, hwndListView1 As uLong calldll #user32, "SendMessageA" , hwndListView1 as uLong, 4150 as Long,_ 32 As Long, 32 As Long, re as Long 'make listview fullrowselect style
LVCOLUMN.mask.struct = LVCF.WIDTH OR LVCF.TEXT LVCOLUMN.cx.struct = 90 'desired width of column in pixels LVCOLUMN.pszText$.struct = "First" 'Add first column header, index is 0. Indexes are 0-based. calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTCOLUMN as Long,_ 0 as long, LVCOLUMN as Struct, re as Long
'Add second column header. Additional headers are added in this manner. columnIndex = 1 'be sure to increment index for each additional column LVCOLUMN.pszText$.struct = "Second" 'insert header caption here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTCOLUMN as Long,_ columnIndex as long, LVCOLUMN as Struct, re as Long
LVITEM.mask.struct = LVIF.TEXT LVITEM.iItem.struct = 0 'first row LVITEM.iSubItem.struct = 0 'first column LVITEM.pszText$.struct = "row 1 col 1" 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 1 'second row LVITEM.iSubItem.struct = 0 'first column LVITEM.pszText$.struct = "row 2 col 1" 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 0 'first row LVITEM.iSubItem.struct = 1 'second column LVITEM.pszText$.struct = "row 1 col 2" 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.SETITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 1 'second row LVITEM.iSubItem.struct = 1 'second column LVITEM.pszText$.struct = "row 2 col 2" 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.SETITEM as Long,_ 0 As Long, LVITEM As struct, re as Long End Sub
Sub CreateListViewsPrPa hWin 'ListView controls are complex. Please see API documentation 'for full information on their use. This code will get you started. LVS.REPORT = 1 : LVS.NOSORTHEADER = 32768 LVS.SINGLESEL = 4 : LVM.INSERTCOLUMN = 4123 LVCF.WIDTH = 2 : LVM.INSERTITEM = 4103 LVCF.TEXT = 4 : LVM.SETITEM = 4102 LVIF.TEXT = 1 : LVS.SHOWSELALWAYS = 8 Struct LVITEM,mask As ulong,iItem As long,iSubItem As long,state As ulong,stateMask As ulong,_ pszText$ As ptr,cchTextMax As Long,iImage As Long,lParam As Long,iIndent As Long Struct LVCOLUMN,mask As ulong,fmt As long,cx As long,pszText$ As ptr,cchTextMax As Long,iSubItem As Long,iImage As Long,iOrder As Long style = _WS_CHILD OR _WS_VISIBLE OR LVS.NOSORTHEADER Or LVS.REPORT Or LVS.SINGLESEL Or LVS.SHOWSELALWAYS calldll #comctl32, "InitCommonControls", re as void calldll #user32, "GetWindowLongA", hWin as uLong, _GWL_HINSTANCE as long, hInstance as uLong
calldll #user32, "CreateWindowExA", _WS_EX_CLIENTEDGE As long,"SysListView32" as ptr,_ "" as ptr, style as long, 20 as Long, 30 as Long, 630 as Long, 155 as Long,_ hWin as uLong, 0 as long, hInstance as uLong,"" as ptr, hwndListView1 As uLong calldll #user32, "SendMessageA" , hwndListView1 as uLong, 4150 as Long,_ 32 As Long, 32 As Long, re as Long 'make listview fullrowselect style
LVCOLUMN.mask.struct = LVCF.WIDTH OR LVCF.TEXT LVCOLUMN.cx.struct = 90 'desired width of column in pixels LVCOLUMN.pszText$.struct = "First" 'Add first column header, index is 0. Indexes are 0-based. calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTCOLUMN as Long,_ 0 as long, LVCOLUMN as Struct, re as Long
'Add second column header. Additional headers are added in this manner. columnIndex = 1 'be sure to increment index for each additional column LVCOLUMN.pszText$.struct = "Second" 'insert header caption here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTCOLUMN as Long,_ columnIndex as long, LVCOLUMN as Struct, re as Long
LVITEM.mask.struct = LVIF.TEXT LVITEM.iItem.struct = 0 'first row LVITEM.iSubItem.struct = 0 'first column LVITEM.pszText$.struct = "row 1 col 1" 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 1 'second row LVITEM.iSubItem.struct = 0 'first column LVITEM.pszText$.struct = "row 2 col 1" 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 0 'first row LVITEM.iSubItem.struct = 1 'second column LVITEM.pszText$.struct = "row 1 col 2" 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.SETITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 1 'second row LVITEM.iSubItem.struct = 1 'second column LVITEM.pszText$.struct = "row 2 col 2" 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.SETITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
calldll #user32, "CreateWindowExA", _WS_EX_CLIENTEDGE As long,"SysListView32" as ptr,_ "" as ptr, style as long, 10 as Long, 245 as Long, 895 as Long, 275 as Long,_ hWin as uLong, 0 as long, hInstance as uLong,"" as ptr, hwndListView2 As uLong calldll #user32, "SendMessageA" , hwndListView2 as uLong, 4150 as Long,_ 32 As Long, 32 As Long, re as Long 'make listview fullrowselect style
LVCOLUMN.mask.struct = LVCF.WIDTH OR LVCF.TEXT LVCOLUMN.cx.struct = 90 'desired width of column in pixels LVCOLUMN.pszText$.struct = "First" 'Add first column header, index is 0. Indexes are 0-based. calldll #user32, "SendMessageA" , hwndListView2 as uLong, LVM.INSERTCOLUMN as Long,_ 0 as long, LVCOLUMN as Struct, re as Long
'Add second column header. Additional headers are added in this manner. columnIndex = 1 'be sure to increment index for each additional column LVCOLUMN.pszText$.struct = "Second" 'insert header caption here calldll #user32, "SendMessageA" , hwndListView2 as uLong, LVM.INSERTCOLUMN as Long,_ columnIndex as long, LVCOLUMN as Struct, re as Long
LVITEM.mask.struct = LVIF.TEXT LVITEM.iItem.struct = 0 'first row LVITEM.iSubItem.struct = 0 'first column LVITEM.pszText$.struct = "row 1 col 1" 'put desired text here calldll #user32, "SendMessageA" , hwndListView2 as uLong, LVM.INSERTITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 1 'second row LVITEM.iSubItem.struct = 0 'first column LVITEM.pszText$.struct = "row 2 col 1" 'put desired text here calldll #user32, "SendMessageA" , hwndListView2 as uLong, LVM.INSERTITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 0 'first row LVITEM.iSubItem.struct = 1 'second column LVITEM.pszText$.struct = "row 1 col 2" 'put desired text here calldll #user32, "SendMessageA" , hwndListView2 as uLong, LVM.SETITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 1 'second row LVITEM.iSubItem.struct = 1 'second column LVITEM.pszText$.struct = "row 2 col 2" 'put desired text here calldll #user32, "SendMessageA" , hwndListView2 as uLong, LVM.SETITEM as Long,_ 0 As Long, LVITEM As struct, re as Long End Sub
Sub CreateListViews hWin 'ListView controls are complex. Please see API documentation 'for full information on their use. This code will get you started. LVS.REPORT = 1 : LVS.NOSORTHEADER = 32768 LVS.SINGLESEL = 4 : LVM.INSERTCOLUMN = 4123 LVCF.WIDTH = 2 : LVM.INSERTITEM = 4103 LVCF.TEXT = 4 : LVM.SETITEM = 4102 LVIF.TEXT = 1 : LVS.SHOWSELALWAYS = 8 Struct LVITEM,mask As ulong,iItem As long,iSubItem As long,state As ulong,stateMask As ulong,_ pszText$ As ptr,cchTextMax As Long,iImage As Long,lParam As Long,iIndent As Long Struct LVCOLUMN,mask As ulong,fmt As long,cx As long,pszText$ As ptr,cchTextMax As Long,iSubItem As Long,iImage As Long,iOrder As Long style = _WS_CHILD OR _WS_VISIBLE OR LVS.NOSORTHEADER Or LVS.REPORT Or LVS.SINGLESEL Or LVS.SHOWSELALWAYS calldll #comctl32, "InitCommonControls", re as void calldll #user32, "GetWindowLongA", hWin as uLong, _GWL_HINSTANCE as long, hInstance as uLong
calldll #user32, "CreateWindowExA", _WS_EX_CLIENTEDGE As long,"SysListView32" as ptr,_ "" as ptr, style as long, 30 as Long, 40 as Long, 610 as Long, 165 as Long,_ hWin as uLong, 0 as long, hInstance as uLong,"" as ptr, hwndListView1 As uLong calldll #user32, "SendMessageA" , hwndListView1 as uLong, 4150 as Long,_ 32 As Long, 32 As Long, re as Long 'make listview fullrowselect style
LVCOLUMN.mask.struct = LVCF.WIDTH OR LVCF.TEXT LVCOLUMN.cx.struct = 90 'desired width of column in pixels LVCOLUMN.pszText$.struct = "First" 'Add first column header, index is 0. Indexes are 0-based. calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTCOLUMN as Long,_ 0 as long, LVCOLUMN as Struct, re as Long
'Add second column header. Additional headers are added in this manner. columnIndex = 1 'be sure to increment index for each additional column LVCOLUMN.pszText$.struct = "Second" 'insert header caption here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTCOLUMN as Long,_ columnIndex as long, LVCOLUMN as Struct, re as Long
LVITEM.mask.struct = LVIF.TEXT LVITEM.iItem.struct = 0 'first row LVITEM.iSubItem.struct = 0 'first column LVITEM.pszText$.struct = "row 1 col 1" 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 1 'second row LVITEM.iSubItem.struct = 0 'first column LVITEM.pszText$.struct = "row 2 col 1" 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 0 'first row LVITEM.iSubItem.struct = 1 'second column LVITEM.pszText$.struct = "row 1 col 2" 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.SETITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 1 'second row LVITEM.iSubItem.struct = 1 'second column LVITEM.pszText$.struct = "row 2 col 2" 'put desired text here calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.SETITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
calldll #user32, "CreateWindowExA", _WS_EX_CLIENTEDGE As long,"SysListView32" as ptr,_ "" as ptr, style as long, 30 as Long, 270 as Long, 900 as Long, 180 as Long,_ hWin as uLong, 0 as long, hInstance as uLong,"" as ptr, hwndListView2 As uLong calldll #user32, "SendMessageA" , hwndListView2 as uLong, 4150 as Long,_ 32 As Long, 32 As Long, re as Long 'make listview fullrowselect style
LVCOLUMN.mask.struct = LVCF.WIDTH OR LVCF.TEXT LVCOLUMN.cx.struct = 90 'desired width of column in pixels LVCOLUMN.pszText$.struct = "First" 'Add first column header, index is 0. Indexes are 0-based. calldll #user32, "SendMessageA" , hwndListView2 as uLong, LVM.INSERTCOLUMN as Long,_ 0 as long, LVCOLUMN as Struct, re as Long
'Add second column header. Additional headers are added in this manner. columnIndex = 1 'be sure to increment index for each additional column LVCOLUMN.pszText$.struct = "Second" 'insert header caption here calldll #user32, "SendMessageA" , hwndListView2 as uLong, LVM.INSERTCOLUMN as Long,_ columnIndex as long, LVCOLUMN as Struct, re as Long
LVITEM.mask.struct = LVIF.TEXT LVITEM.iItem.struct = 0 'first row LVITEM.iSubItem.struct = 0 'first column LVITEM.pszText$.struct = "row 1 col 1" 'put desired text here calldll #user32, "SendMessageA" , hwndListView2 as uLong, LVM.INSERTITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 1 'second row LVITEM.iSubItem.struct = 0 'first column LVITEM.pszText$.struct = "row 2 col 1" 'put desired text here calldll #user32, "SendMessageA" , hwndListView2 as uLong, LVM.INSERTITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 0 'first row LVITEM.iSubItem.struct = 1 'second column LVITEM.pszText$.struct = "row 1 col 2" 'put desired text here calldll #user32, "SendMessageA" , hwndListView2 as uLong, LVM.SETITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 1 'second row LVITEM.iSubItem.struct = 1 'second column LVITEM.pszText$.struct = "row 2 col 2" 'put desired text here calldll #user32, "SendMessageA" , hwndListView2 as uLong, LVM.SETITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
calldll #user32, "CreateWindowExA", _WS_EX_CLIENTEDGE As long,"SysListView32" as ptr,_ "" as ptr, style as long, 30 as Long, 500 as Long, 415 as Long, 110 as Long,_ hWin as uLong, 0 as long, hInstance as uLong,"" as ptr, hwndListView3 As uLong calldll #user32, "SendMessageA" , hwndListView3 as uLong, 4150 as Long,_ 32 As Long, 32 As Long, re as Long 'make listview fullrowselect style
LVCOLUMN.mask.struct = LVCF.WIDTH OR LVCF.TEXT LVCOLUMN.cx.struct = 90 'desired width of column in pixels LVCOLUMN.pszText$.struct = "First" 'Add first column header, index is 0. Indexes are 0-based. calldll #user32, "SendMessageA" , hwndListView3 as uLong, LVM.INSERTCOLUMN as Long,_ 0 as long, LVCOLUMN as Struct, re as Long
'Add second column header. Additional headers are added in this manner. columnIndex = 1 'be sure to increment index for each additional column LVCOLUMN.pszText$.struct = "Second" 'insert header caption here calldll #user32, "SendMessageA" , hwndListView3 as uLong, LVM.INSERTCOLUMN as Long,_ columnIndex as long, LVCOLUMN as Struct, re as Long
LVITEM.mask.struct = LVIF.TEXT LVITEM.iItem.struct = 0 'first row LVITEM.iSubItem.struct = 0 'first column LVITEM.pszText$.struct = "row 1 col 1" 'put desired text here calldll #user32, "SendMessageA" , hwndListView3 as uLong, LVM.INSERTITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 1 'second row LVITEM.iSubItem.struct = 0 'first column LVITEM.pszText$.struct = "row 2 col 1" 'put desired text here calldll #user32, "SendMessageA" , hwndListView3 as uLong, LVM.INSERTITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 0 'first row LVITEM.iSubItem.struct = 1 'second column LVITEM.pszText$.struct = "row 1 col 2" 'put desired text here calldll #user32, "SendMessageA" , hwndListView3 as uLong, LVM.SETITEM as Long,_ 0 As Long, LVITEM As struct, re as Long
LVITEM.iItem.struct = 1 'second row LVITEM.iSubItem.struct = 1 'second column LVITEM.pszText$.struct = "row 2 col 2" 'put desired text here calldll #user32, "SendMessageA" , hwndListView3 as uLong, LVM.SETITEM as Long,_ 0 As Long, LVITEM As struct, re as Long End Sub
[quit] flags = _MB_ICONQUESTION OR _MB_YESNO
calldll #user32, "MessageBoxA", _ 0 as long, _ "Åßóôå óßãïõñïò/ç ïôß èÝëåôå íá ôåñìáôßóåôå ôçí åöáñìïãÞ ËïãéóôÞñéï;" as ptr, _ "Exit" as ptr, _ flags as long, _ Result as long
'Result returns : 1=ok 2=cancel 3=abort 4=retry 5=ignore 6=yes 7=no if Result = 6 then close #startPage : END end if if Result = 7 then goto [loop] end if
[PrPaquit] flags = _MB_ICONQUESTION OR _MB_YESNO
calldll #user32, "MessageBoxA", _ 0 as long, _ "Åßóôå óßãïõñïò/ç ïôß èÝëåôå íá åðßóôñåøåôå óôçí ðñïçãïýìåíç êáñôÝëá;" as ptr, _ "Exit" as ptr, _ flags as long, _ Result as long
'Result returns : 1=ok 2=cancel 3=abort 4=retry 5=ignore 6=yes 7=no if Result = 6 then close #prpa #startPage "enable" goto [loop2] end if if Result = 7 then goto [PrPaloop] end if
' close #prpa
[KartaPelatiquit] flags = _MB_ICONQUESTION OR _MB_YESNO
calldll #user32, "MessageBoxA", _ 0 as long, _ "Åßóôå óßãïõñïò/ç ïôß èÝëåôå íá åðßóôñåøåôå óôçí áñ÷éêÞ êáñôÝëá;" as ptr, _ "Exit" as ptr, _ flags as long, _ Result as long
'Result returns : 1=ok 2=cancel 3=abort 4=retry 5=ignore 6=yes 7=no if Result = 6 then close #main3 goto [loop] end if if Result = 7 then goto [KartaPelatiloop] end if
[KartaProiontosquit] flags = _MB_ICONQUESTION OR _MB_YESNO
calldll #user32, "MessageBoxA", _ 0 as long, _ "Åßóôå óßãïõñïò/ç ïôß èÝëåôå íá åðßóôñåøåôå óôçí áñ÷éêÞ êáñôÝëá;" as ptr, _ "Exit" as ptr, _ flags as long, _ Result as long
'Result returns : 1=ok 2=cancel 3=abort 4=retry 5=ignore 6=yes 7=no if Result = 6 then close #main2 goto [loop] end if if Result = 7 then goto [loop2] end if
[quitKP] flags = _MB_ICONQUESTION OR _MB_YESNO
calldll #user32, "MessageBoxA", _ 0 as long, _ "Åßóôå óßãïõñïò/ç ïôß èÝëåôå íá åðßóôñåøåôå óôçí áñ÷éêÞ êáñôÝëá;" as ptr, _ "Exit" as ptr, _ flags as long, _ Result as long
'Result returns : 1=ok 2=cancel 3=abort 4=retry 5=ignore 6=yes 7=no if Result = 6 then close #main1 goto [loop] end if if Result = 7 then goto [loop1] end if
[prylquit] flags = _MB_ICONQUESTION OR _MB_YESNO
calldll #user32, "MessageBoxA", _ 0 as long, _ "Åßóôå óßãïõñïò/ç ïôß èÝëåôå íá åðßóôñåøåôå óôçí ðñïçãïýìåíç êáñôÝëá;" as ptr, _ "Exit" as ptr, _ flags as long, _ Result as long
'Result returns : 1=ok 2=cancel 3=abort 4=retry 5=ignore 6=yes 7=no if Result = 6 then close #main4 goto [loop2] end if if Result = 7 then goto [looppryl] end if
[venderQuit] flags = _MB_ICONQUESTION OR _MB_YESNO
calldll #user32, "MessageBoxA", _ 0 as long, _ "Åßóôå óßãïõñïò/ç ïôß èÝëåôå íá åðßóôñåøåôå óôçí ðñïçãïýìåíç êáñôÝëá;" as ptr, _ "Exit" as ptr, _ flags as long, _ Result as long
'Result returns : 1=ok 2=cancel 3=abort 4=retry 5=ignore 6=yes 7=no if Result = 6 then close #main5 goto [loop] end if if Result = 7 then goto [vendersloop] end if
[Partnerquit] flags = _MB_ICONQUESTION OR _MB_YESNO
calldll #user32, "MessageBoxA", _ 0 as long, _ "Åßóôå óßãïõñïò/ç ïôß èÝëåôå íá åðßóôñåøåôå óôçí ðñïçãïýìåíç êáñôÝëá;" as ptr, _ "Exit" as ptr, _ flags as long, _ Result as long
'Result returns : 1=ok 2=cancel 3=abort 4=retry 5=ignore 6=yes 7=no if Result = 6 then close #main6 #startPage "enable" goto [loop] end if if Result = 7 then goto [partnerloop] end if
[EisagList] 'place code here wait
[ejagList] 'place code here wait
[ResizeStatus] 'resize status bar when window is resized SB.SETPARTS = 1028 struct prt,edge1 as long 'change measurements below as needed: sizePanel = Int(WindowWidth/1) 'divide WindowWidth by number of panels prt.edge1.struct = -1 numParts = 1 calldll #user32, "SendMessageA", hStatus as long, SB.SETPARTS as long, numParts As Long, prt As struct, r As Long calldll #user32, "SendMessageA", hStatus as long, _WM_SIZE as long, 0 as long, WindowWidth as long, re as long wait
FUNCTION MakeStatusBar(hWin, caption$) style = _WS_VISIBLE or _WS_CHILD calldll #comctl32,"InitCommonControls", re as void calldll #comctl32,"CreateStatusWindow", style as long, caption$ as ptr, hWin as long, 22 as long, hBar as long
'** Replace text in following lines with desired captions for panels: Call ChangeStatusText hBar, 0, "StatusBar" MakeStatusBar = hBar END FUNCTION
SUB ChangeStatusText hBar, panelID, newText$ 'use this sub to update captions on statusbar SB.SETTEXT = 1025 calldll #user32, "SendMessageA", hBar as long, SB.SETTEXT as long, panelID as long, newText$ as ptr, re as long END SUB
[AnoigmaEtoysquit] flags = _MB_ICONQUESTION OR _MB_YESNO
calldll #user32, "MessageBoxA", _ 0 as long, _ "Åßóôå óßãïõñïò/ç ïôß èÝëåôå íá åðßóôñåøåôå óôçí ðñïçãïýìåíç êáñôÝëá;" as ptr, _ "Exit" as ptr, _ flags as long, _ Result as long
'Result returns : 1=ok 2=cancel 3=abort 4=retry 5=ignore 6=yes 7=no if Result = 6 then close #main7 goto [loop] end if if Result = 7 then goto [AnoigmaEtoysloop] end if
[EpilogEtoysquit] flags = _MB_ICONQUESTION OR _MB_YESNO
calldll #user32, "MessageBoxA", _ 0 as long, _ "Åßóôå óßãïõñïò/ç ïôß èÝëåôå íá åðßóôñåøåôå óôçí ðñïçãïýìåíç êáñôÝëá;" as ptr, _ "Exit" as ptr, _ flags as long, _ Result as long
'Result returns : 1=ok 2=cancel 3=abort 4=retry 5=ignore 6=yes 7=no if Result = 6 then close #epet goto [loop] end if if Result = 7 then goto [epilogEtoysloop] end if
[backStart] flags = _MB_ICONQUESTION OR _MB_YESNO
calldll #user32, "MessageBoxA", _ 0 as long, _ "Åßóôå óßãïõñïò/ç ïôß èÝëåôå íá åðßóôñåøåôå óôçí ðñïçãïýìåíç êáñôÝëá;" as ptr, _ "Exit" as ptr, _ flags as long, _ Result as long
'Result returns : 1=ok 2=cancel 3=abort 4=retry 5=ignore 6=yes 7=no if Result = 6 then close #main8 #startPage "enable" goto [loop] end if if Result = 7 then goto [backStart] end if
[SaveVender] 'place code here wait
[DelVender] 'place code here wait
[ClearVender] 'place code here wait
[payVender] 'place code here wait
[kartaVender] 'place code here wait
[venterQuit] 'place code here wait
[searchVenter] 'place code here wait
[EntranceInArray] 'place code here wait
[MinusFromArray] 'place code here wait
[What] #main4.cmb1 "selection? selected$" wait
[Save.click] print #main1.TextBox2, "!contents? nameProm$" print #main1.TextBox3, "!contents? codeProm$" open "kartaProm.txt" for APPEND as #kartProm print #kartProm, nameProm$ print #kartProm, codeProm$
close #kartProm Wait
[Del.click] 'Place your code here Wait
[Clear.click] 'Place your code here Wait
[Search.click] 'Place your code here Wait
[Button6.click] 'Place your code here Wait
[Button7.click] 'Place your code here Wait
[Button8.click] 'Place your code here Wait
[Button9.click] 'Place your code here Wait
[Button10.click] 'Place your code here Wait
[Button11.click] 'Place your code here Wait
[Button12.click] 'Place your code here Wait
[Button13.click] 'Place your code here Wait
[ComboBox1.click] #main2.ComboBox1 "selection? selected$" Wait
[ComboBox2.click] #main2.ComboBox2 "selection? selected$" Wait
[ComboBox3.click] #main2.ComboBox3 "selection? selected$" Wait
[ComboBox4.click] #main2.ComboBox4 "selection? selected$" Wait
[ComboBox5.click] #main2.ComboBox5 "selection? selected$" Wait
[ComboBox6.click] #main2.ComboBox6 "selection? selected$" Wait
[CheckBox1.click] #main2.CheckBox1 "value? result$" Wait
[CheckBox1.reset] 'Place your code here Wait
[CheckBox2.click] #main2.CheckBox2 "value? result$" Wait
[CheckBox2.reset] 'Place your code here Wait
[CheckBox3.click] #main2.CheckBox3 "value? result$" Wait
[CheckBox3.reset] 'Place your code here Wait
I hope is good gaslouk
GLOBAL TabHndl Global False : False = 0 Global True : True = 1 Global enabled : enabled = True global a$ global b$ dim a$(13) dim b$(13, 2) DIM Combo1$(4) DIM Combo2$(4) DIM Combo3$(4) DIM Combo4$(4) DIM Combo5$(4) DIM Combo6$(4) DIM Combo7$(4) DIM Combo8$(4) DIM Combo9$(4) DIM Combo10$(4) DIM Combo11$(4) DIM Combo12$(4) DIM Combo13$(4) DIM Combo14$(4)
DIM Combo15$(11) DIM Combo16$(11) DIM Combo17$(11) DIM Combo18$(11) DIM Combo19$(11) DIM Combo20$(11) DIM Combo21$(11) DIM Combo22$(11) DIM Combo23$(11) DIM Combo24$(11) DIM Combo25$(11) DIM Combo26$(11) DIM Combo27$(11) DIM Combo28$(11)
Combo1$(0) = " " Combo1$(1) = "1" Combo1$(2) = "X" Combo1$(3) = "2"
Combo2$(0) = " " Combo2$(1) = "1" Combo2$(2) = "X" Combo2$(3) = "2"
Combo3$(0) = " " Combo3$(1) = "1" Combo3$(2) = "X" Combo3$(3) = "2"
Combo4$(0) = " " Combo4$(1) = "1" Combo4$(2) = "X" Combo4$(3) = "2"
Combo5$(0) = " " Combo5$(1) = "1" Combo5$(2) = "X" Combo5$(3) = "2"
Combo6$(0) = " " Combo6$(1) = "1" Combo6$(2) = "X" Combo6$(3) = "2"
Combo7$(0) = " " Combo7$(1) = "1" Combo7$(2) = "X" Combo7$(3) = "2"
Combo8$(0) = " " Combo8$(1) = "1" Combo8$(2) = "X" Combo8$(3) = "2"
Combo9$(0) = " " Combo9$(1) = "1" Combo9$(2) = "X" Combo9$(3) = "2"
Combo10$(0) = " " Combo10$(1) = "1" Combo10$(2) = "X" Combo10$(3) = "2"
Combo11$(0) = " " Combo11$(1) = "1" Combo11$(2) = "X" Combo11$(3) = "2"
Combo12$(0) = " " Combo12$(1) = "1" Combo12$(2) = "X" Combo12$(3) = "2"
Combo13$(0) = " " Combo13$(1) = "1" Combo13$(2) = "X" Combo13$(3) = "2"
Combo14$(0) = " " Combo14$(1) = "1" Combo14$(2) = "X" Combo14$(3) = "2"
Combo15$(1) = "1" Combo15$(2) = "X" Combo15$(3) = "2" Combo15$(4) = "1X" Combo15$(5) = "12" Combo15$(6) = "X1" Combo15$(7) = "X2" Combo15$(8) = "2X" Combo15$(9) = "21" Combo15$(10) = "1X2"
NOMAINWIN
'<----------------------- STATIC TEXT STYLES ----------------> SS.CENTER = HEXDEC("&H00000001") SS.CENTERIMAGE = HEXDEC("&H00000200") SS.SUNKEN = HEXDEC("&H00001000")
'<---------------------- TAB STYLES SUPPORTED ----------------> WS.CHILD = HEXDEC("&H40000000") WS.VISIBLE = HEXDEC("&H10000000") WS.TABSTOP = HEXDEC("&H00010000") TCS.TABS = 0 TCS.SINGLELINE = 0 TCS.RAGGEDRIGHT = HEXDEC("00000800") TCS.FOCUSONBUTTONDOWN = HEXDEC("00001000")
STRUCT tRect, _ X AS LONG, _ Y AS LONG, _ X1 AS LONG, _ Y1 AS LONG
STRUCT tTab, _ TabStyle AS ULONG, _ X AS LONG, _ Y AS LONG, _ X1 AS LONG, _ Y1 AS LONG tTab.TabStyle.struct = 0 tTab.X.struct = 20 tTab.Y.struct = 50 tTab.X1.struct = -20 tTab.Y1.struct = -60
UpperLeftX = 200 UpperRightX = 200 WindowWidth = 600 WindowHdight = 1000
STYLEBITS #TB1.STAT, SS.CENTER OR SS.CENTERIMAGE OR SS.SUNKEN, 0, WS.EX.TRANSPARENT, 0
Menu #WIN, "¸îïäïò", "¸îïäïò", [STOPIT]
statictext #TB1.st1, "ÅéóáãùãÞ ÓôÞëçò ÄéáëïãÞò", 20, 5, 245, 25 statictext #TB1.st2, "Áãþíáò 1ïò", 15, 55, 130, 20 statictext #TB1.st2, "Áãþíáò 2ïò", 15, 80, 130, 20 statictext #TB1.st4, "Áãþíáò 3ïò", 15, 105, 130, 20 statictext #TB1.st5, "Áãþíáò 4ïò", 15, 130, 130, 20 statictext #TB1.st6, "Áãþíáò 5ïò", 15, 155, 130, 20 statictext #TB1.st7, "Áãþíáò 6ïò", 15, 180, 130, 20 statictext #TB1.st8, "Áãþíáò 7ïò", 15, 205, 130, 20 statictext #TB1.st9, "Áãþíáò 8ïò", 15, 230, 130, 20 statictext #TB1.st10, "Áãþíáò 9ïò", 15, 255, 130, 20 statictext #TB1.st11, "Áãþíáò 10ïò", 11, 279, 130, 20 statictext #TB1.st12, "Áãþíáò 11ïò", 15, 305, 130, 20 statictext #TB1.st13, "Áãþíáò 12ïò", 15, 330, 130, 20 statictext #TB1.st14, "Áãþíáò 13ïò", 15, 355, 130, 20 statictext #TB1.st15, "Áãþíáò 14ïò", 15, 380, 130, 20 button #WIN.bt1, "¸îïäïò", STOPIT, UR, 160, 550, 100, 25 ComboboxColor$ = "White"
combobox #TB1.combo1,Combo1$(), combo1Click, 160, 55, 30, 300 combobox #TB1.combo2,Combo2$(), combo2Click, 160, 80, 30, 300 combobox #TB1.combo3,Combo3$(), combo3Click, 160, 105, 30, 300 combobox #TB1.combo4,Combo4$(), combo4Click, 160, 130, 30, 300 combobox #TB1.combo5,Combo5$(), combo5Click, 160, 155, 30, 300 combobox #TB1.combo6,Combo6$(), combo6Click, 160, 180, 30, 300 combobox #TB1.combo7,Combo7$(), combo7Click, 160, 205, 30, 300 combobox #TB1.combo8,Combo8$(), combo8Click, 160, 230, 30, 300 combobox #TB1.combo9,Combo9$(), combo9Click, 160, 255, 30, 300 combobox #TB1.combo10,Combo10$(), combo10Click, 160, 280, 30, 300 combobox #TB1.combo11,Combo11$(), combo11Click, 160, 305, 30, 300 combobox #TB1.combo12,Combo12$(), combo12Click, 160, 330, 30, 300 combobox #TB1.combo13,Combo13$(), combo13Click, 160, 355, 30, 300 combobox #TB1.combo14,Combo14$(), combo14Click, 160, 380, 30, 300
statictext #TB2.st1, "ÅéóáãùãÞ ÓõóôÞìáôïò", 35, 0, 245, 25 statictext #TB2.st2, "Áãþíáò 1ïò", 15, 55, 80, 20 statictext #TB2.st2, "Áãþíáò 2ïò", 15, 80, 80, 20 statictext #TB2.st4, "Áãþíáò 3ïò", 15, 105, 80, 20 statictext #TB2.st5, "Áãþíáò 4ïò", 15, 130, 80, 20 statictext #TB2.st6, "Áãþíáò 5ïò", 15, 155, 80, 20 statictext #TB2.st7, "Áãþíáò 6ïò", 15, 180, 80, 20 statictext #TB2.st8, "Áãþíáò 7ïò", 15, 205, 80, 20 statictext #TB2.st9, "Áãþíáò 8ïò", 15, 230, 80, 20 statictext #TB2.st10, "Áãþíáò 9ïò", 15, 255, 80, 20 statictext #TB2.st11, "Áãþíáò 10ïò", 15, 279, 80, 20 statictext #TB2.st12, "Áãþíáò 11ïò", 15, 305, 80, 20 statictext #TB2.st13, "Áãþíáò 12ïò", 15, 330, 80, 20 statictext #TB2.st14, "Áãþíáò 13ïò", 15, 355, 80, 20 statictext #TB2.st15, "Áãþíáò 14ïò", 15, 380, 80, 20
combobox #TB2.combo1,Combo1$(), combo15Click, 120, 55, 30, 300 combobox #TB2.combo2,Combo2$(), combo16Click, 120, 80, 30, 300 combobox #TB2.combo3,Combo3$(), combo17Click, 120, 105, 30, 300 combobox #TB2.combo4,Combo4$(), combo18Click, 120, 130, 30, 300 combobox #TB2.combo5,Combo5$(), combo19Click, 120, 155, 30, 300 combobox #TB2.combo6,Combo6$(), combo20Click, 120, 180, 30, 300 combobox #TB2.combo7,Combo7$(), combo21Click, 120, 205, 30, 300 combobox #TB2.combo8,Combo8$(), combo22Click, 120, 230, 30, 300 combobox #TB2.combo9,Combo9$(), combo23Click, 120, 255, 30, 300 combobox #TB2.combo10,Combo10$(), combo24Click, 120, 280, 30, 300 combobox #TB2.combo11,Combo11$(), combo25Click, 120, 305, 30, 300 combobox #TB2.combo12,Combo12$(), combo26Click, 120, 330, 30, 300 combobox #TB2.combo13,Combo13$(), combo27Click, 120, 355, 30, 300 combobox #TB2.combo14,Combo14$(), combo28Click, 120, 380, 30, 300
combobox #TB2.combo15,Combo1$(), combo29Click, 155, 55, 30, 300 combobox #TB2.combo16,Combo2$(), combo30Click, 155, 80, 30, 300 combobox #TB2.combo17,Combo3$(), combo31Click, 155, 105, 30, 300 combobox #TB2.combo18,Combo4$(), combo32Click, 155, 130, 30, 300 combobox #TB2.combo19,Combo5$(), combo33Click, 155, 155, 30, 300 combobox #TB2.combo20,Combo6$(), combo34Click, 155, 180, 30, 300 combobox #TB2.combo21,Combo7$(), combo35Click, 155, 205, 30, 300 combobox #TB2.combo22,Combo8$(), combo36Click, 155, 230, 30, 300 combobox #TB2.combo23,Combo9$(), combo37Click, 155, 255, 30, 300 combobox #TB2.combo24,Combo10$(), combo38Click, 155, 280, 30, 300 combobox #TB2.combo25,Combo11$(), combo39Click, 155, 305, 30, 300 combobox #TB2.combo26,Combo12$(), combo40Click, 155, 330, 30, 300 combobox #TB2.combo27,Combo13$(), combo41Click, 155, 355, 30, 300 combobox #TB2.combo28,Combo14$(), combo42Click, 155, 380, 30, 300
combobox #TB2.combo29,Combo1$(), combo43Click, 190, 55, 30, 300 combobox #TB2.combo30,Combo2$(), combo44Click, 190, 80, 30, 300 combobox #TB2.combo31,Combo3$(), combo45Click, 190, 105, 30, 300 combobox #TB2.combo32,Combo4$(), combo46Click, 190, 130, 30, 300 combobox #TB2.combo33,Combo5$(), combo47Click, 190, 155, 30, 300 combobox #TB2.combo34,Combo6$(), combo48Click, 190, 180, 30, 300 combobox #TB2.combo35,Combo7$(), combo49Click, 190, 205, 30, 300 combobox #TB2.combo36,Combo8$(), combo50Click, 190, 230, 30, 300 combobox #TB2.combo37,Combo9$(), combo51Click, 190, 255, 30, 300 combobox #TB2.combo38,Combo10$(), combo52Click, 190, 280, 30, 300 combobox #TB2.combo39,Combo11$(), combo53Click, 190, 305, 30, 300 combobox #TB2.combo40,Combo12$(), combo54Click, 190, 330, 30, 300 combobox #TB2.combo41,Combo13$(), combo55Click, 190, 355, 30, 300 combobox #TB2.combo42,Combo14$(), combo56Click, 190, 380, 30, 300
statictext #TB3.st1, "'1' Áðü", 30, 45, 60, 25 statictext #TB3.st2, "'1' ¸ùò", 215, 45, 60, 25 statictext #TB3.st3, "'X' Áðü", 30, 95, 60, 25 statictext #TB3.st4, "'×' ¸ùò", 215, 95, 60, 25 statictext #TB3.st5, "'2' Áðü", 30, 145, 60, 25 statictext #TB3.st6, "'2' ¸ùò", 215, 145, 60, 25 stylebits #TB3.bt1, _BS_MULTILINE, 0, 0, 0
button #TB3.bt1, "ÄéáëïãÞ Óôçëþí", dialogh, UR, 60, 385, 140, 25
textbox #TB3.teb1, 100, 45, 60, 25 textbox #TB3.teb2, 280, 45, 60, 25 textbox #TB3.teb3, 100, 95, 60, 25 textbox #TB3.teb4, 280, 95, 60, 25 textbox #TB3.teb5, 100, 145, 60, 25 textbox #TB3.teb6, 280, 145, 60, 25
groupbox #TB3.grp1, "", 15, 25, 340, 50 groupbox #TB3.grp2, "", 15, 75, 340, 50 groupbox #TB3.grp3, "", 15, 125, 340, 50
OPEN "TABCTL" FOR DLL AS #TAB OPEN "ÐÑÏ-ÐÏ 1×2" FOR WINDOW AS #WIN
hStatus = MakeStatusBar(HWND(#WIN), "StatusBar") Call SetText hStatus,0,"StatusBar"
Call SetText hStatus,4,time$()
Call SetText hStatus,5,date$()
timer 1000, [changeTime]
OPEN "ÅéóáãùãÞ ÓôáèåñÞò ÓôÞëçò" FOR WINDOW_popup AS #TB1 #TB1 "trapclose STOPIT" #TB1.combo1 "selectindex 1" #TB1.combo2 "selectindex 1" #TB1.combo3 "selectindex 1" #TB1.combo4 "selectindex 1" #TB1.combo5 "selectindex 1" #TB1.combo6 "selectindex 1" #TB1.combo7 "selectindex 1" #TB1.combo8 "selectindex 1" #TB1.combo9 "selectindex 1" #TB1.combo10 "selectindex 1" #TB1.combo11 "selectindex 1" #TB1.combo12 "selectindex 1" #TB1.combo13 "selectindex 1" #TB1.combo14 "selectindex 1" #TB1 "font consolas 10"
OPEN "ÅéóáãùãÞ ÓõóôÞìáôïò" FOR WINDOW_popup AS #TB2
#TB2 "trapclose STOPIT" #TB2.combo1 "selectindex 1" #TB2.combo2 "selectindex 1" #TB2.combo3 "selectindex 1" #TB2.combo4 "selectindex 1" #TB2.combo5 "selectindex 1" #TB2.combo6 "selectindex 1" #TB2.combo7 "selectindex 1" #TB2.combo8 "selectindex 1" #TB2.combo9 "selectindex 1" #TB2.combo10 "selectindex 1" #TB2.combo11 "selectindex 1" #TB2.combo12 "selectindex 1" #TB2.combo13 "selectindex 1" #TB2.combo14 "selectindex 1"
#TB2.combo15 "selectindex 1" #TB2.combo16 "selectindex 1" #TB2.combo17 "selectindex 1" #TB2.combo18 "selectindex 1" #TB2.combo19 "selectindex 1" #TB2.combo20 "selectindex 1" #TB2.combo21 "selectindex 1" #TB2.combo22 "selectindex 1" #TB2.combo23 "selectindex 1" #TB2.combo24 "selectindex 1" #TB2.combo25 "selectindex 1" #TB2.combo26 "selectindex 1" #TB2.combo27 "selectindex 1" #TB2.combo28 "selectindex 1"
#TB2.combo29 "selectindex 1" #TB2.combo30 "selectindex 1" #TB2.combo31 "selectindex 1" #TB2.combo32 "selectindex 1" #TB2.combo33 "selectindex 1" #TB2.combo34 "selectindex 1" #TB2.combo35 "selectindex 1" #TB2.combo36 "selectindex 1" #TB2.combo37 "selectindex 1" #TB2.combo38 "selectindex 1" #TB2.combo39 "selectindex 1" #TB2.combo40 "selectindex 1" #TB2.combo41 "selectindex 1" #TB2.combo42 "selectindex 1"
#TB2 "font consolas 10"
OPEN "ÄéáëïãÞ Óôçëþí" FOR WINDOW_popup AS #TB3
#TB3 "trapclose STOPIT" #TB3 "font consolas 10" Call MakeTooltips HWND(#TB3)
OPEN "TAB4" FOR WINDOW_popup AS #TB4 OPEN "TAB5" FOR WINDOW_popup AS #TB5
PRINT #WIN, "TRAPCLOSE STOPIT" PRINT #WIN, "RESIZEHANDLER [ResizeStatus]"
WinHndl = HWND(#WIN) Tab1Hndl = HWND(#TB1) Tab2Hndl = HWND(#TB2) Tab3Hndl = HWND(#TB3) Tab4Hndl = HWND(#TB4) Tab5Hndl = HWND(#TB5)
Ttl1$ = "ÅéóáãùãÞ ÓôÞëçò ÄéáëïãÞò" Ttl2$ = "ÅéóáãùãÞ ÓõóôÞìáôïò" Ttl3$ = "ÄéáëïãÞ Óôçëþí" Ttl4$ = "TAB4" Ttl5$ = "TAB5" CALLDLL #TAB, "FN_InitTab", WinHndl AS ULONG, tTab AS STRUCT, TabHndl AS ULONG print TabHndl
CALLDLL #TAB, "FN_AddTab", TabHndl AS ULONG, Tab1Hndl AS ULONG, _ 0 AS ULONG, Ttl1$ AS STRUCT, Idx AS LONG CALLDLL #TAB, "FN_AddTab", TabHndl AS ULONG, Tab2Hndl AS ULONG, _ 0 AS ULONG, Ttl2$ AS STRUCT, Idx AS LONG CALLDLL #TAB, "FN_AddTab", TabHndl AS ULONG, Tab3Hndl AS ULONG, _ 0 AS ULONG, Ttl3$ AS STRUCT, Idx AS LONG CALLDLL #TAB, "FN_AddTab", TabHndl AS ULONG, Tab4Hndl AS ULONG, _ 0 AS ULONG, Ttl4$ AS STRUCT, Idx AS LONG CALLDLL #TAB, "FN_AddTab", TabHndl AS ULONG, Tab5Hndl AS ULONG, _ 0 AS ULONG, Ttl5$ AS STRUCT, Idx AS LONG
PRINT Idx WAIT
'---------------------------------------------------------------------------------- '---------------------------------------------------------------------------------- [size] calldll #user32, "SendMessageA",_ hStatus as ulong,_WM_SIZE as long,_ 0 as long, WindowWidth as long,_ re as long wait
[checkForTab] 'see if selected tab is the same 'as previously selected tab and 'change controls if tab has changed timer 0 'turn off timer
'get the current tab ID calldll #user32, "SendMessageA",_ hwndTab as ulong,_ 'tab control handle TCM.GETCURSEL as long,_ 'message to get current selection 0 as long, 0 as long,_ 'always 0's tabID as long 'returns selected tab ID
if tabID <> oldTab then 'change page displayed oldTab = tabID 'for next check of selected tab gosub [clear] call MoveWindow winTab(tabID), 20,40,600,1000 end if
print #TB3, "refresh" timer 3000, [checkForTab] 'reactivate timer wait
[clear] 'hide all windows for i = 0 to 3 call MoveWindow winTab(i), 3000,3000,600,1000 next return
[changeTime] Call SetText hStatus,4,time$() Call SetText hStatus,5,date$() insert = GetKeyState(_VK_INSERT) if insert = 0 then call SetText hStatus, 1, "INS OFF" else call SetText hStatus, 1, "INS ON" end if
cupsLock=GetToggle(_VK_CAPITAL) if cupsLock=0 then call SetText hStatus, 2, "CUPS OFF" else call SetText hStatus, 2, "CUPS ON" end if
numLock=GetToggle(_VK_NUMLOCK) if numLock=0 then call SetText hStatus, 3, "NUM OFF" else call SetText hStatus, 3, "NUM ON" end if WAIT
FUNCTION GetToggle(Key) Toggle = 0 CallDLL #user32, "GetKeyState",Key As long, Toggle As long GetToggle = Toggle END FUNCTION
Function GetKeyState(key) Mask = HEXDEC("&H8001") '<--- value for masking the pressed bit Press = 0 CALLDLL #user32, "GetKeyState", key AS LONG, Press AS SHORT, GetKeyState as long IF (Press AND Mask) THEN GetKeyState = 0 EXIT FUNCTION END IF end function
Sub combo1Click handle$ #handle$ "selection? Selected$" a$(0) = Selected$ 'Selected$ contains text of item selected End Sub
Sub combo2Click handle$ #handle$ "selection? Selected$" a$(1) = Selected$ ' notice "Ç ÅðéëïãÞ óïõ åßíáé "; a$(1) 'Selected$ contains text of item selected End Sub
Sub combo3Click handle$ #handle$ "selection? Selected$" a$(2) = Selected$ 'Selected$ contains text of item selected End Sub
Sub combo4Click handle$ #handle$ "selection? Selected$" a$(3) = Selected$ 'Selected$ contains text of item selected End Sub
Sub combo5Click handle$ #handle$ "selection? Selected$" a$(4) = Selected$ 'Selected$ contains text of item selected End Sub
Sub combo6Click handle$ #handle$ "selection? Selected$" a$(5) = Selected$ 'Selected$ contains text of item selected End Sub
Sub combo7Click handle$ #handle$ "selection? Selected$" a$(6) = Selected$ 'Selected$ contains text of item selected End Sub
Sub combo8Click handle$ #handle$ "selection? Selected$" a$(7) = Selected$ 'Selected$ contains text of item selected End Sub
Sub combo9Click handle$ #handle$ "selection? Selected$" a$(8) = Selected$ 'Selected$ contains text of item selected End Sub
Sub combo10Click handle$ #handle$ "selection? Selected$" a$(9) = Selected$ 'Selected$ contains text of item selected End Sub
Sub combo11Click handle$ #handle$ "selection? Selected$" a$(10) = Selected$ 'Selected$ contains text of item selected End Sub
Sub combo12Click handle$ #handle$ "selection? Selected$" a$(11) = Selected$ 'Selected$ contains text of item selected End Sub
Sub combo13Click handle$ #handle$ "selection? Selected$" a$(12) = Selected$ 'Selected$ contains text of item selected End Sub
Sub combo14Click handle$ #handle$ "selection? Selected$" a$(13) = Selected$ 'Selected$ contains text of item selected End Sub
Sub combo15Click handle$ #handle$ "selection? Selected$" b$(0, 0) = Selected$ if b$(0, 0) = b$(0, 1) or b$(0, 0) = b$(0, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(0, 0) b$(0, 0) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo16Click handle$ #handle$ "selection? Selected$" b$(1, 0) = Selected$ if b$(1, 0) = b$(1, 1) or b$(1, 0) = b$(1, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(1, 0) b$(1, 0) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo17Click handle$ #handle$ "selection? Selected$" b$(2, 0) = Selected$ if b$(2, 0) = b$(2, 1) or b$(2, 0) = b$(2, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(2, 0) b$(2, 0) = " " notice "ÅðÝëåîå ÎáíÜ:" end if 'Selected$ contains text of item selected End Sub
Sub combo18Click handle$ #handle$ "selection? Selected$" b$(3, 0) = Selected$ if b$(3, 0) = b$(3, 1) or b$(3, 0) = b$(3, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(3, 0) b$(3, 0) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo19Click handle$ #handle$ "selection? Selected$" b$(4, 0) = Selected$ if b$(4, 0) = b$(4, 1) or b$(4, 0) = b$(4, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(4, 0) b$(4, 0) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo20Click handle$ #handle$ "selection? Selected$" b$(5, 0) = Selected$ if b$(5, 0) = b$(5, 1) or b$(5, 0) = b$(5, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(5, 0) b$(5, 0) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo21Click handle$ #handle$ "selection? Selected$" b$(6, 0) = Selected$ if b$(6, 0) = b$(6, 1) or b$(6, 0) = b$(6, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(6, 0) b$(6, 0) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo22Click handle$ #handle$ "selection? Selected$" b$(7, 0) = Selected$ if b$(7, 0) = b$(7, 1) or b$(7, 0) = b$(7, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(7, 0) b$(7, 0) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo23Click handle$ #handle$ "selection? Selected$" b$(8, 0) = Selected$ if b$(8, 0) = b$(8, 1) or b$(8, 0) = b$(8, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(8, 0) b$(8, 0) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo24Click handle$ #handle$ "selection? Selected$" b$(9, 0) = Selected$ if b$(9, 0) = b$(9, 1) or b$(9, 0) = b$(9, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(9, 0) b$(9, 0) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo25Click handle$ #handle$ "selection? Selected$" b$(10, 0) = Selected$ if b$(10, 0) = b$(10, 1) or b$(10, 0) = b$(10, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(10, 0) b$(10, 0) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo26Click handle$ #handle$ "selection? Selected$" b$(11, 0) = Selected$ if b$(11, 0) = b$(11, 1) or b$(11, 0) = b$(11, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(11, 0) b$(11, 0) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo27Click handle$ #handle$ "selection? Selected$" b$(12, 0) = Selected$ if b$(12, 0) = b$(12, 1) or b$(12, 0) = b$(12, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(12, 0) b$(12, 0) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo28Click handle$ #handle$ "selection? Selected$" b$(13, 0) = Selected$ if b$(13, 0) = b$(13, 1) or b$(13, 0) = b$(13, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(13, 0) b$(13, 0) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo29Click handle$ #handle$ "selection? Selected$" b$(0, 1) = Selected$ if b$(0, 1) = b$(0, 0) or b$(0, 1) = b$(0, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(0, 1) b$(0, 1) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo30Click handle$ #handle$ "selection? Selected$" b$(1, 1) = Selected$ if b$(1, 1) = b$(1, 0) or b$(1, 1) = b$(1, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(1, 0) b$(1, 1) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo31Click handle$ #handle$ "selection? Selected$" b$(2, 1) = Selected$ if b$(2, 1) = b$(2, 0) or b$(2, 1) = b$(2, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(2, 0) b$(2, 1) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo32Click handle$ #handle$ "selection? Selected$" b$(3, 1) = Selected$ if b$(3, 1) = b$(3, 0) or b$(3, 1) = b$(3, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(3, 0) b$(3, 1) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo33Click handle$ #handle$ "selection? Selected$" b$(4, 1) = Selected$ if b$(4, 1) = b$(4, 0) or b$(4, 1) = b$(4, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(4, 0) b$(4, 1) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo34Click handle$ #handle$ "selection? Selected$" b$(5, 1) = Selected$ if b$(5, 1) = b$(5, 0) or b$(5, 1) = b$(5, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(5, 0) b$(5, 1) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo35Click handle$ #handle$ "selection? Selected$" b$(6, 1) = Selected$ if b$(6, 1) = b$(6, 0) or b$(6, 1) = b$(6, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(6, 0) b$(6, 1) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo36Click handle$ #handle$ "selection? Selected$" b$(7, 1) = Selected$ if b$(7, 1) = b$(7, 0) or b$(7, 1) = b$(7, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(7, 0) b$(7, 1) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo37Click handle$ #handle$ "selection? Selected$" b$(8, 1) = Selected$ if b$(8, 1) = b$(8, 0) or b$(8, 1) = b$(8, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(8, 0) b$(8, 1) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo38Click handle$ #handle$ "selection? Selected$" b$(9, 1) = Selected$ if b$(9, 1) = b$(9, 0) or b$(9, 1) = b$(9, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(9, 0) b$(9, 1) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo39Click handle$ #handle$ "selection? Selected$" b$(10, 1) = Selected$ if b$(10, 1) = b$(10, 0) or b$(10, 1) = b$(10, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(10, 0) b$(10, 1) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo40Click handle$ #handle$ "selection? Selected$" b$(11, 1) = Selected$ if b$(11, 1) = b$(11, 0) or b$(11, 1) = b$(11, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(11, 0) b$(11, 1) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo41Click handle$ #handle$ "selection? Selected$" b$(12, 1) = Selected$ if b$(12, 1) = b$(12, 0) or b$(12, 1) = b$(12, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(12, 0) b$(12, 1) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo42Click handle$ #handle$ "selection? Selected$" b$(13, 1) = Selected$ if b$(13, 1) = b$(13, 0) or b$(13, 1) = b$(13, 2) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(13, 0) b$(13, 1) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo43Click handle$ #handle$ "selection? Selected$" b$(0, 2) = Selected$ if b$(0, 2) = b$(0, 0) or b$(0, 2) = b$(0, 1) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(0, 2) b$(0, 2) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo44Click handle$ #handle$ "selection? Selected$" b$(1, 2) = Selected$ if b$(1, 2) = b$(1, 0) or b$(1, 2) = b$(1, 1) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(1, 2) b$(1, 2) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo45Click handle$ #handle$ "selection? Selected$" b$(2, 2) = Selected$ if b$(2, 2) = b$(2, 0) or b$(2, 2) = b$(2, 1) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(2, 2) b$(2, 2) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo46Click handle$ #handle$ "selection? Selected$" b$(3, 2) = Selected$ if b$(3, 2) = b$(3, 0) or b$(3, 2) = b$(3, 1) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(3, 2) b$(3, 2) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo47Click handle$ #handle$ "selection? Selected$" b$(4, 2) = Selected$ if b$(4, 2) = b$(4, 0) or b$(4, 2) = b$(4, 1) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(4, 2) b$(4, 2) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo48Click handle$ #handle$ "selection? Selected$" b$(5, 2) = Selected$ if b$(5, 2) = b$(5, 0) or b$(5, 2) = b$(5, 1) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(5, 2) b$(5, 2) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo49Click handle$ #handle$ "selection? Selected$" b$(6, 2) = Selected$ if b$(6, 2) = b$(6, 0) or b$(6, 2) = b$(6, 1) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(6, 2) b$(6, 2) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo50Click handle$ #handle$ "selection? Selected$" b$(7, 2) = Selected$ if b$(7, 2) = b$(7, 0) or b$(7, 2) = b$(7, 1) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(7, 2) b$(7, 2) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo51Click handle$ #handle$ "selection? Selected$" b$(8, 2) = Selected$ if b$(8, 2) = b$(8, 0) or b$(8, 2) = b$(8, 1) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(8, 2) b$(8, 2) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo52Click handle$ #handle$ "selection? Selected$" b$(9, 2) = Selected$ if b$(9, 2) = b$(9, 0) or b$(9, 2) = b$(9, 1) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(9, 2) b$(9, 2) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo53Click handle$ #handle$ "selection? Selected$" b$(10, 2) = Selected$ if b$(10, 2) = b$(10, 0) or b$(10, 2) = b$(10, 1) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(10, 2) b$(10, 2) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo54Click handle$ #handle$ "selection? Selected$" b$(11, 2) = Selected$ if b$(11, 2) = b$(11, 0) or b$(11, 2) = b$(11, 1) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(11, 2) b$(11, 2) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo55Click handle$ #handle$ "selection? Selected$" b$(12, 2) = Selected$ if b$(12, 2) = b$(12, 0) or b$(12, 2) = b$(12, 1) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(12, 2) b$(12, 2) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub combo56Click handle$ #handle$ "selection? Selected$" b$(13, 2) = Selected$ if b$(13, 2) = b$(13, 0) or b$(13, 2) = b$(13, 1) then notice "Ç ÅðéëïãÞ óïõ åßíáé "; b$(13, 2) b$(13, 2) = " " notice "ÅðÝëåîå ÎáíÜ:" end if End Sub
Sub dialogh handle$ timer 0 #TB3.teb1, "!contents? txt1$" a(1) = val(txt1$) if a(1) < 0 or a(1) > 14 then notice "ÔéìÝò Åéóüäïõ Áðü 0 ¸ùò 14" end if #TB3.teb2, "!contents? txt2$" a(2) = val(txt2$) if a(2) < 0 or a(2) > 14 then notice "ÔéìÝò Åéóüäïõ Áðü 0 ¸ùò 14" end if if a(2) < a(1) then notice txt2$ + " Ìéêñüôåñï áðü " + txt1$ + " ÅéóÜãåôå ÎáíÜ" end if #TB3.teb3, "!contents? txt3$" a(3) = val(txt3$) if a(3) < 0 or a(3) > 14 then notice "ÔéìÝò Åéóüäïõ Áðü 0 ¸ùò 14" end if #TB3.teb4, "!contents? txt4$" a(4) = val(txt4$) if a(4) < 0 or a(4) > 14 then notice "ÔéìÝò Åéóüäïõ Áðü 0 ¸ùò 14" end if if a(4) < a(3) then notice txt4$ + " Ìéêñüôåñï áðü " + txt3$ + " ÅéóÜãåôå ÎáíÜ" end if #TB3.teb5, "!contents? txt5$" a(5) = val(txt5$) if a(5) < 0 or a(5) > 14 then notice "ÔéìÝò Åéóüäïõ Áðü 0 ¸ùò 14" end if #TB3.teb6, "!contents? txt6$" a(6) = val(txt6$) if a(6) < 0 or a(6) > 14 then notice "ÔéìÝò Åéóüäïõ Áðü 0 ¸ùò 14" end if if a(6) < a(5) then notice txt6$ + " Ìéêñüôåñï áðü " + txt5$ + " ÅéóÜãåôå ÎáíÜ" end if timer 3000, [checkForTab] End Sub
SUB MakeTooltips hWin TTS.ALWAYSTIP = 1 : TTS.NOPREFIX = 2 : TTF.IDISHWND = 1 TTF.CENTERTIP = 2 : TTF.SUBCLASS = 16: TTM.ADDTOOL = 1028 style = _WS_POPUP or TTS.NOPREFIX or TTS.ALWAYSTIP calldll #comctl32,"InitCommonControls", re as void calldll #user32, "GetWindowLongA", hWin as long, _GWL_HINSTANCE as long, hInstance as long calldll #user32, "CreateWindowExA", _WS_EX_TOPMOST as long,"tooltips_class32" as ptr, " " as ptr,_ style as long, _CW_USEDEFAULT as long, _CW_USEDEFAULT as long, _CW_USEDEFAULT as long, _CW_USEDEFAULT as long,_ hWin as long, 0 as long, hInstance as long, "" as ptr, hwndTT as long flags=_SWP_NOMOVE or _SWP_NOSIZE or _SWP_NOACTIVATE calldll #user32, "SetWindowPos", hwndTT as long,_HWND_TOPMOST as long, 0 as long, 0 as long,_ 0 as long, 0 as long, flags as long, r as long
'create a struct for the tooltips: struct toolinfo, cbSize as long, uFlags as long, hWindow as long, uId as long, x as long, y as long,_ w as long, h as long, hInst as long, lpstrText$ as ptr toolinfo.cbSize.struct = len(toolinfo.struct) toolinfo.uFlags.struct = TTF.IDISHWND Or TTF.SUBCLASS toolinfo.hWindow.struct = hWin
'Button TB3.bt1 Tooltip: toolinfo.uId.struct = hwnd(#TB3.bt1) toolinfo.lpstrText$.struct = "ÅðéëïãÞ óôçëùí áðü óýóôçìá." '*** CHANGE TOOLTIP TEXT HERE! calldll #user32, "SendMessageA", hwndTT as long, TTM.ADDTOOL as long, 0 as long, toolinfo as struct, re as long
'Textbox TB3.tb1 Tooltip: toolinfo.uId.struct = hwnd(#TB3.teb1) toolinfo.lpstrText$.struct = "Ðüóïõò ¢óóïõò (Ìßíéìïõì)" '*** CHANGE TOOLTIP TEXT HERE! calldll #user32, "SendMessageA", hwndTT as long, TTM.ADDTOOL as long, 0 as long, toolinfo as struct, re as long
'Textbox TB3.tb2 Tooltip: toolinfo.uId.struct = hwnd(#TB3.teb2) toolinfo.lpstrText$.struct = "Ðüóïõò ¢óóïõò (ÌÜîéìïõì)" '*** CHANGE TOOLTIP TEXT HERE! calldll #user32, "SendMessageA", hwndTT as long, TTM.ADDTOOL as long, 0 as long, toolinfo as struct, re as long
'Textbox TB3.tb3 Tooltip: toolinfo.uId.struct = hwnd(#TB3.teb3) toolinfo.lpstrText$.struct = "Ðüóá '×' (Ìßíéìïõì)" '*** CHANGE TOOLTIP TEXT HERE! calldll #user32, "SendMessageA", hwndTT as long, TTM.ADDTOOL as long, 0 as long, toolinfo as struct, re as long
'Textbox TB3.tb4 Tooltip: toolinfo.uId.struct = hwnd(#TB3.teb4) toolinfo.lpstrText$.struct = "Ðüóá '×' (ÌÜîéìïõì)" '*** CHANGE TOOLTIP TEXT HERE! calldll #user32, "SendMessageA", hwndTT as long, TTM.ADDTOOL as long, 0 as long, toolinfo as struct, re as long
'Textbox TB3.tb5 Tooltip: toolinfo.uId.struct = hwnd(#TB3.teb5) toolinfo.lpstrText$.struct = "Ðüóá '2' (Ìßíéìïõì)" '*** CHANGE TOOLTIP TEXT HERE! calldll #user32, "SendMessageA", hwndTT as long, TTM.ADDTOOL as long, 0 as long, toolinfo as struct, re as long
'Textbox TB3.tb6 Tooltip: toolinfo.uId.struct = hwnd(#TB3.teb6) toolinfo.lpstrText$.struct = "Ðüóá '2' (ÌÜîéìïõì)" '*** CHANGE TOOLTIP TEXT HERE! calldll #user32, "SendMessageA", hwndTT as long, TTM.ADDTOOL as long, 0 as long, toolinfo as struct, re as long
END SUB
Sub SetText hWnd,segID,txt$ SB.SETTEXT = 1025 calldll #user32, "SendMessageA",_ hWnd as ulong,SB.SETTEXT as long,_ segID as long,txt$ as ptr,r as long End Sub
'Function GetKeyState(key)
' CallDLL #user32, "GetKeyState", key As long, GetKeyState As long
'End Function
FUNCTION MakeStatusBar(hWin, caption$) style = _WS_VISIBLE or _WS_CHILD CALLDLL #comctl32,"InitCommonControls", re as void CALLDLL #comctl32,"CreateStatusWindow", style as long, caption$ as ptr, hWin as long, 22 as long, hBar as long SB.SETPARTS = 1028 STRUCT prt,edge1 as long,edge2 as long,edge3 as long,edge4 as long,edge5 as long,edge6 as long 'change measurements below as needed: sizePanel = Int(WindowWidth / 30) 'divide WindowWidth by number of panels prt.edge1.struct = sizePanel * 12 prt.edge2.struct = sizePanel * 15 prt.edge3.struct = sizePanel * 18 prt.edge4.struct = sizePanel * 22 prt.edge5.struct = sizePanel * 25 prt.edge6.struct = -1 numParts = 6 CALLDLL #user32, "SendMessageA", hBar as long, SB.SETPARTS as long, numParts As Long, prt As struct, r As Long MakeStatusBar = hBar END FUNCTION
'----------------------------------------------------------------------------------
SUB STOPIT Hndl$ CLOSE #WIN CLOSE #TAB CLOSE #TB1 CLOSE #TB2 CLOSE #TB3 CLOSE #TB4 CLOSE #TB5 END END SUB
[STOPIT] CLOSE #WIN CLOSE #TAB CLOSE #TB1 CLOSE #TB2 CLOSE #TB3 CLOSE #TB4 CLOSE #TB5 END '---------------------------------------------------------------------------------- '----------------------------------------------------------------------------------
Sub MoveWindow hWnd,x,y,w,h CallDLL #user32, "MoveWindow",hWnd As uLong,_ x As Long, y As Long,w As Long, h As Long,_ 1 As Boolean, r As Boolean End Sub
[ResizeStatus]
RetVal = 0 WinHndl = HWND(#WIN) CALLDLL #TAB, "UpdateTab", TabHndl AS ULONG, RetVal AS VOID SB.SETPARTS = 1028
STRUCT prt, edge1 as long, edge2 as long, edge3 as long, edge4 as long, edge5 as long, edge6 as long sizePanel = Int(WindowWidth / 30) 'divide WindowWidth by number of panels
prt.edge1.struct = sizePanel * 12
prt.edge2.struct = sizePanel * 15
prt.edge3.struct = sizePanel * 18
prt.edge4.struct = sizePanel * 22
prt.edge5.struct = sizePanel * 25
prt.edge6.struct = -1
numParts = 6
CALLDLL #user32, "SendMessageA", hStatus as long, SB.SETPARTS as long, numParts As Long, prt As struct, r As Long CALLDLL #user32, "SendMessageA", hStatus as long, _WM_SIZE as long, 0 as long, WindowWidth as long, re as long WAIT
And this Regards
Gaslouk.
|
|