Post by gaslouk on Dec 20, 2023 11:44:05 GMT
Hello. I have a small shop here in Greece with bike repairs and sales.
So I need a schedule for my nursery.
I have built one but only the GUI and I need help to complete it.
I am quoting it here and if you can bear with me.
So I need a schedule for my nursery.
I have built one but only the GUI and I need help to complete it.
I am quoting it here and if you can bear with me.
dim a(100)
DIM ComboBox1$(10)
ComboBox1$(0) = " "
ComboBox1$(1) = "PCS"
ComboBox1$(2) = "FAT"
ComboBox1$(3) = "SET"
ComboBox1$(4) = "PAIR"
ComboBox1$(5) = "DOZEN"
ComboBox1$(6) = "RIGHT"
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
global combinedData$
True = 1 : False = 0
[WindowSetup]
NOMAINWIN
WindowWidth = 600 : WindowHeight = 320
UpperLeftX = INT((DisplayWidth-WindowWidth)/2)
UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[ControlSetup]
Menu #main, "File", "Open Year", [AnoigmaEtoysWindowSetup], "Exit", [quit]
Menu #main, "Company", "Suppliers", [KartaPromitheftiWindowSetup], "Products", [KartaProiontosWindowSetup], "Customers", [KartaPelatiWindowSetup], _
| , "Partners", [PartnerWindowSetup], "Sellers", [VendersWindowSetup], | , "Planning purchases", [ProgAgorWindowSetup], "Production planning", [PrPaWindowSetup], _
"documents", [Button7.click], "Securities", [Button9.click]
Menu #main, "Tables", "Product warehouse", [7click], "Storage of raw materials", [8click], | , "Retail printing", [9click], _
"Purchase--production history", [10click], "History of raw materials", [11click], | , "Client card A", [12click], _
"Client card B", [13click], "Retail customer card", [14click], | , "Customer list", [15click], _
"Product Catalog", [16click], "List of suppliers", [17click], | , "Product movement", [18click], _
"Statistics", [19click], "Remainders", [20click], "Guarantees", [21click], "Φ.Π.Α.", [22click]
Menu #main, "Charts", "Shopping chart", [23click], "Production chart", [24click], "Sales chart", [25click]
Menu #main, "Settings", "Company details", [26click], "Print configuration", [27click], "Definition of printers", [28click], _
"Document standards", [29click], "Common document elements", [30click], "Front page image", [31click], _
"passwords", [32click], | , "Warehouse fix", [33click], "Word buttons", [34click], "Backup copy", [Button11.click]
Menu #main, "Help", "Help Manual", [36click], "About Accounting", [37click]
groupbox #main.GroupBox3, " ", 5, 108, 572, 40
groupbox #main.GroupBox4, " ", 5, 155, 572, 40
groupbox #main.GroupBox5, " ", 130, 210, 318, 40
groupbox #main.GroupBox1, " ", 5, 10, 572, 40
groupbox #main.GroupBox2, " ", 80, 60, 386, 40
button #main.Button1, "Exit", [quit], UL, 320, 220, 120, 25
button #main.Button2, "Suppliers", [KartaPromitheftiWindowSetup], UL, 10, 20, 180, 25
button #main.Button3, "Products", [KartaProiontosWindowSetup], UL, 200, 20, 180, 25
button #main.Button4, "Customers", [KartaPelatiWindowSetup], UL, 390, 20, 180, 25
button #main.Button5, "Planning purchases", [ProgAgorWindowSetup], UL, 85, 70, 180, 25
button #main.Button6, "Production planning", [PrPaWindowSetup], UL, 280, 70, 180, 25
button #main.Button7, "documents", [Button7.click], UL, 10, 118, 180, 25
button #main.Button8, "Tables - Charts", [Button8.click], UL, 200, 118, 180, 25
button #main.Button9, "Securities", [Button9.click], UL, 390, 118, 180, 25
button #main.Button10, "Settings", [Button10.click], UL, 10, 165, 180, 25
button #main.Button11, "Backup copy", [Button11.click], UL, 200, 165, 180, 25
button #main.Button12, "Επιλογή Έτους", [EpiloghEtoysWindowSetup], UL, 390, 165, 180, 25
button #main.Button13, "Help", [Button13.click], UL, 135, 220, 120, 25
Open "Accounting" for Window_nf as #main
#main "font Consolas 10"
#main "trapclose [quit]"
[loop]
Wait
[KartaPromitheftiWindowSetup]
NOMAINWIN
WindowWidth = 559 : WindowHeight = 739
UpperLeftX = INT((DisplayWidth-WindowWidth)/2)
UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[ControlSetupKartaPromithefti]
button #main1.Button1, "Save", [Save.click], UL, 10, 15, 120, 21
button #main1.Button2, "Delete", [Del.click], UL, 140, 15, 120, 21
button #main1.Button3, "Clear", [Clear.click], UL, 270, 15, 120, 21
button #main1.Button4, "Return", [quitKP], UL, 400, 15, 120, 21
button #main1.Button5, "Search", [Search.click], UL, 273, 63, 120, 21
statictext #main1.StaticText1, " Name:", 15, 600, 150, 21
statictext #main1.StaticText2, " Last Name:", 15, 625, 150, 21
statictext #main1.StaticText3, " Abbreviation:", 15, 650, 150, 21
textbox #main1.TextBox1, 20, 65, 230, 21
textbox #main1.TextBox2, 200, 600, 310, 21
textbox #main1.TextBox3, 200, 625, 310, 21
textbox #main1.TextBox4, 200, 650, 310, 21
Open "Suppliers" for dialog_modal as #main1
#main1.TextBox1 ""
#main1.TextBox2 ""
#main1.TextBox3 ""
#main1.TextBox4 ""
#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, "Save", [Button1.click], UL, 15, 15, 100, 21
button #main2.Button2, "Delete", [Button2.click], UL, 130, 15, 100, 21
button #main2.Button3, "Clear", [Button3.click], UL, 245, 15, 100, 21
button #main2.Button4, "Raw materials", [prylWindowSetup], UL, 360, 15, 100, 21
button #main2.Button5, "Return", [KartaProiontosquit], UL, 475, 15, 100, 21
button #main2.Button6, "Search", [Button6.click], UL, 245, 55, 100, 21
statictext #main2.StaticText1, " Name:", 483, 56, 100, 21
statictext #main2.StaticText2, " Code:", 483, 98, 100, 21
statictext #main2.StaticText4, " Code Supplier:", 483, 133, 100, 31
statictext #main2.StaticText5, "Measurement unit:", 483, 182, 100, 25
statictext #main2.StaticText6, " Supplier:", 483, 217, 109, 21
statictext #main2.StaticText8, " Origin:", 483, 252, 100, 21
statictext #main2.StaticText9, " Allowable warehouse limit:", 483, 287, 145, 21
statictext #main2.StaticText10, " Supplier price:", 483, 322, 100, 21
statictext #main2.StaticText11, " Cost price:", 483, 357, 100, 21
statictext #main2.StaticText12, " Price wholesale:", 483, 392, 100, 21
statictext #main2.StaticText13, " Retail price:", 483, 427, 100, 21
statictext #main2.StaticText14, " Package weight:", 483, 462, 120, 21
statictext #main2.StaticText15, " Packaging volume:", 483, 497, 120, 21
statictext #main2.StaticText16, " Description:", 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, "Produced product", [CheckBox1.click], [CheckBox1.reset], 532, 602, 131, 17
checkbox #main2.CheckBox2, "By order", [CheckBox2.click], [CheckBox2.reset], 693, 596, 138, 28
Open "PRODUCT CARD" 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, "Save", [Button1.click], UL, 15, 15, 100, 21
button #main3.Button2, "Delete", [Button2.click], UL, 130, 15, 100, 21
button #main3.Button3, "Clear", [Button3.click], UL, 245, 14, 100, 21
button #main3.Button4, "Price", [Button4.click], UL, 357, 14, 100, 21
button #main3.Button5, "Return", [KartaPelatiquit], UL, 475, 15, 100, 21
button #main3.Button6, "Search", [Button6.click], UL, 245, 55, 100, 21
statictext #main3.StaticText1, " Customer name:", 483, 76, 148, 21
statictext #main3.StaticText2, " Profession:", 483, 108, 100, 21
statictext #main3.StaticText4, " Address:", 483, 143, 100, 21
statictext #main3.StaticText5, " City:", 483, 182, 100, 21
statictext #main3.StaticText6, " Post Code:", 483, 217, 143, 21
statictext #main3.StaticText8, " d.o.y. :", 483, 252, 100, 21
statictext #main3.StaticText9, " a. f. m. :", 483, 287, 145, 21
statictext #main3.StaticText10, " e-mail :", 483, 322, 100, 21
statictext #main3.StaticText11, " Telefon 1:", 483, 357, 124, 21
statictext #main3.StaticText12, " Telefon 2:", 483, 392, 100, 21
statictext #main3.StaticText13, " Δiscount:", 483, 427, 100, 21
statictext #main3.StaticText14, " :", 483, 462, 120, 21
statictext #main3.StaticText15, " :", 483, 497, 120, 21
statictext #main3.StaticText16, " Observations:", 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 "CUSTOMER CARD" 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, "When a piece of the Product is produced:", 20, 15, 295, 25
statictext #main4.stx2, "Intermediate:", 20, 50, 80, 20
statictext #main4.stx3, "Then from the product:", 20, 80, 265, 20
statictext #main4.stx4, "Quantity consumed: .........", 20, 140, 265, 20
statictext #main4.stx5, "Total:", 480, 460, 75, 20
stylebits #main4.btn1, _BS_MULTILINE, 0, 0, 0
button #main4.btn1, "Table entry:", [EntranceInArray], UL, 415, 135, 175, 25
stylebits #main4.btn2, _BS_MULTILINE, 0, 0, 0
button #main4.btn2, "Remove from table:", [MinusFromArray], UL, 35, 460, 195, 25
stylebits #main4.btn3, _BS_MULTILINE, 0, 0, 0
button #main4.btn3, "Return", [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 "raw materials" 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, "Save", [Button1.click], UL, 10, 10, 120, 25
button #main5.btn2, "Delete", [Button2.click], UL, 140, 10, 120, 25
button #main5.btn3, "Clear", [Button3.click], UL, 270, 10, 120, 25
button #main5.btn4, "Seller Payment:", [Button4.click], UL, 10, 45, 117, 27
button #main5.btn5, "Seller Card:", [Button5.click], UL, 140, 45, 120, 25
button #main5.btn6, "Return", [venderQuit], UL, 270, 45, 120, 25
button #main5.btn7, "Search", [Button7.click], UL, 270, 85, 120, 25
statictext #main5.stx1, " Name:", 10, 300, 129, 15
statictext #main5.stx2, " Rate %:", 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 "SELERS" 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, "Partner", "Add new Partner", [newPartner], "Delete Partner", [delPartner], "Print Card", [printKard], | , "Return", [Partnerquit]
Menu #main6, "Documents", "New Document", [newDeed], "Delete Document", [delDeed]
statictext #main6.StaticText1, "Partner Cart", 262, 90, 141, 15
button #main6.Button1, "Add new Partner", [newPartner], UL, 10, 10, 185, 25
button #main6.Button2, "Delete Partner", [delPartner], UL, 210, 10, 155, 25
button #main6.Button3, "Print Card", [printKard], UL, 375, 10, 120, 25
button #main6.Button6, "Return", [Partnerquit], UL, 510, 10, 120, 25
button #main6.Button8, "New Document", [newDeed], UL, 10, 45, 185, 25
button #main6.Button9, "Delete Document", [delDeed], UL, 210, 45, 155, 25
combobox #main6.ComboBox1, ComboBox8$(), [ComboBox1.click], 10, 90, 230, 21
Open "Partners" for window_nf as #main6
#main6 "font Consolas 10"
#main6 "trapclose [Partnerquit]"
#main6.ComboBox1 "selectindex 1"
#main "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, "Cancel", [AnoigmaEtoysquit], UL, 10, 120, 90, 25
button #main7.Button2, "Ok", [openYear], UL, 120, 120, 90, 25
statictext #main7.StaticText1, "Give the Year Π.Χ. 2010", 30, 20, 168, 20
textbox #main7.TextBox1, 60, 60, 100, 21
Open "Open Year" for dialog_modal as #main7
print #main7.TextBox1, ""
#main7 "font Consolas 10"
#main7 "trapclose [AnoigmaEtoysquit]"
[AnoigmaEtoysloop]
Wait
[EpiloghEtoysWindowSetup]
button #epet.Button1, "Cancel", [EpilogEtoysquit], UL, 10, 120, 90, 25
button #epet.Button2, "Ok", [epilYear], UL, 120, 120, 90, 25
statictext #epet.StaticText1, "Give the Year Π.Χ. 2010", 30, 20, 168, 20
textbox #epet.TextBox1, 60, 60, 100, 21
Open "Select Year" 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, "List", "Open List A'", [openListaA], "Open List B'", [openListaB], | , "Save List A'", [saveListaA], "Save List B'", [saveListaB],_
| , "Clear List", [clearLista], "Print List", [printLista], | , "Back", [backStart]
Menu #main8, "Sort", "Sort By Name", [ratingByName], "Sort By Supplier", [ratingByProm], "Sort By Stock", [ratingByStock]
Menu #main8, "Entry", "Registration Date", [RegisDate], "Register All", [entryAll], "Register Selected", [entrySelec]
statictext #main8.prag1, "Warehouse:", 340, 5, 135, 25
statictext #main8.prag2, "Quantity:", 670, 50, 65, 20
statictext #main8.prag6, "Order List:", 360, 245, 135, 20
statictext #main8.prag7, "Totals by Supplier:", 135, 475, 200, 20
statictext #main8.prag8, "Cost:", 830, 490, 85, 20
stylebits #main8.prag4, _BS_MULTILINE, 0, 0, 0
button #main8.prag4, "Product listing entry", [entrProd], UL, 650, 90, 220, 25
stylebits #main8.prag5, _BS_MULTILINE, 0, 0, 0
button #main8.prag5, "Remove product from list", [outProg], UL, 650, 125, 220, 25
stylebits #main8.prag9, _BS_MULTILINE, 0, 0, 0
button #main8.prag9, "back", [backStart], UL, 795, 595, 125, 25
TextboxColor$ = "White"
textbox #main8.prag3, 760, 50, 70, 22
Open "Market Planning" for window as #main8
#main8 "trapclose [backStart]"
#main8 "font consolas 10"
#main "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, "List", "Open List A'", [openListA], "Open List B'", [openListB], | , "Save List A'", [saveListA], "Save List B'", [saveListB],_
| , "Clear List", [clearList], "Print List", [printList], | , "Back", [PrPaquit]
Menu #prpa, "Sort", "Sort By Name", [ratingByName1], "Sort By Supplier", [ratingByProm1], "Sort By Stock", [ratingByStock1]
Menu #prpa, "Entry", "Registration Date", [dateEntry], "Register All", [entryAll1], "Καταχώρηση Επιλεγμένων", [entrySelect]
statictext #prpa.prpa1, "Warehouse:", 245, 5, 105, 20
statictext #prpa.prpa2, "Quantity:", 710, 40, 110, 20
statictext #prpa.prpa6, "Order List:", 230, 215, 285, 20
stylebits #prpa.prpa4, _BS_MULTILINE, 0, 0, 0
button #prpa.prpa4, "List entry:", [EisagList], UL, 710, 100, 100, 35
stylebits #prpa.prpa5, _BS_MULTILINE, 0, 0, 0
button #prpa.prpa5, "Extract from list:", [ejagList], UL, 710, 150, 100, 35
TextboxColor$ = "White"
stylebits #prpa.prpa7, _BS_MULTILINE, 0, 0, 0
button #prpa.prpa7, "Back:", [PrPaquit], UL, 715, 535, 165, 30
TextboxColor$ = "White"
textbox #prpa.prpa3, 710, 65, 100, 22
Open "Production planning" for window as #prpa
#prpa "trapclose [PrPaquit]"
#prpa "font consolas 10"
#main "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 "The year has been selected." else notice "The directory has been created."
close #epet
notice DefaultDir$
wait
[openYear]
#main7.TextBox1 "!contents? year$"
DefaultDir$ = "C:\Users\loyka\Documents\YEARS" + "\" + year$
result = mkdir(DefaultDir$)
if result <> 0 then notice "The year exists." else notice "The directory has been created."
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.iSubItem.struct = 1 'second column
LVITEM.iSubItem.struct = 2 'third 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
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 #user32, "SetWindowLongA", hwndListView1 as uLong, _GWL_WNDPROC as long, hInstance as uLong
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, 150 as Long, 360 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 = 120 '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
'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 = "Επώνυμο" 'insert header caption here
calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTCOLUMN as Long,_
columnIndex as long, LVCOLUMN as Struct, re as Long
'Add Third column header. Additional headers are added in this manner.
columnIndex = 2 'be sure to increment index for each additional column
LVCOLUMN.pszText$.struct = "Συντομογραφία" 'insert header caption here
calldll #user32, "SendMessageA" , hwndListView1 as uLong, LVM.INSERTCOLUMN as Long,_
columnIndex as long, LVCOLUMN as Struct, re as Long
' Loop to read data from the file and populate the ListView
[OpenFile]
'filedialog "Open ","kartaProm.txt", file$
'if file$ = "" then [OpenFile]
open "kartaProm.txt" for input as #1
rowCount = 0 ' Initialize rowCount
while NOT(eof(#1))
' First row, first column
line input #1, combinedData$
' Search for the first separator character";"
commaPos1 = instr(combinedData$, ";")
' Check if the break character was found
if commaPos1 > 0 then
' If found, assign the data
nameProm$ = left$(combinedData$, commaPos1 - 1)
else
' If not found, report an error
notice "Error: first separator character not found."
end if
' Search for the second separator character "_"
commaPos2 = instr(combinedData$, "_")
' Check if the break character was found "_"
if commaPos2 > 0 then
' If found, assign the rest of the data
secNamPr$ = mid$(combinedData$, commaPos1 + 1, commaPos2 - commaPos1 - 1)
codeProm$ = mid$(combinedData$, commaPos2 + 1)
else
' If not found, report an error
notice "Error: Second separator character not found."
end if
' Entering data into the ListView
LVITEM.mask.struct = LVIF.TEXT
' We increment rowCount by 1 for the next row
rowCount = rowCount + 1
' Insert the name into the ListView, in the first column (iSubItem = 0)
LVITEM.iSubItem.struct = 0
LVITEM.pszText$.struct = nameProm$
calldll #user32, "SendMessageA", hwndListView1 as uLong, LVM.INSERTITEM as Long,_
rowCount as long, LVITEM as struct, re as Long
' Enter the last name in the ListView, in the second column (iSubItem = 1)
LVITEM.iSubItem.struct = 1
LVITEM.pszText$.struct = secNamPr$
calldll #user32, "SendMessageA", hwndListView1 as uLong, LVM.SETITEM as Long,_
rowCount as long, LVITEM as struct, re as Long
' Enter the abbreviation in the ListView, in the third column (iSubItem = 2)
LVITEM.iSubItem.struct = 2
LVITEM.pszText$.struct = codeProm$
calldll #user32, "SendMessageA", hwndListView1 as uLong, LVM.SETITEM as Long,_
rowCount as long, LVITEM as struct, re as Long
wend
close #1
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, _
"Are you sure you want to close the Accounting app?" 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 #main : END
end if
if Result = 7 then
goto [loop]
end if
[PrPaquit]
flags = _MB_ICONQUESTION OR _MB_YESNO
calldll #user32, "MessageBoxA", _
0 as long, _
"Are you sure you want to return to the previous tab?" 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
#main "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, _
"Are you sure you want to return to the previous tab?" 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, _
"Are you sure you want to return to the previous tab?" 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, _
"Are you sure you want to return to the previous tab?" 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, _
"Are you sure you want to return to the previous tab?" 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, _
"Are you sure you want to return to the previous tab?" 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, _
"Are you sure you want to return to the previous tab?" 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
#main "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, _
"Are you sure you want to return to the previous tab?" 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, _
"Are you sure you want to return to the previous tab?" 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, _
"Are you sure you want to return to the previous tab?" 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
#main "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]
open "kartaProm.txt" for APPEND as #kartProm
if err <> 0 then
notice "Error opening file."
else
' Αποθήκευση των δεδομένων στο αρχείο
' Συνδυασμός nameProm$, secNamPr$, codeProm$ με κάποιοθς χαρακτήρες χωρισμού, π.χ. του ";" και του "_"
print #main1.TextBox2, "!contents? nameProm$"
print #main1.TextBox3, "!contents? secNamPr$"
print #main1.TextBox4, "!contents? codeProm$"
combinedData$ = nameProm$ + ";" + secNamPr$ + "_" + codeProm$
print #kartProm, combinedData$
notice "Vendor card data saved."
rowCount = 0 ' Initialize rowCount
while eof(#kartProm)
' First row, first column
line input #kartProm, combinedData$
' Search for the first separator character ";"
commaPos1 = instr(combinedData$, ";")
' Check if the break character was found
if commaPos1 > 0 then
' If found, assign the data
nameProm$ = left$(combinedData$, commaPos1 - 1)
else
' If not found, report an error
notice "Error: first separator character not found."
end if
' Search for the second separator character "_"
commaPos2 = instr(combinedData$, "_")
' Check if the break character was found "_"
if commaPos2 > 0 then
' If found, assign the rest of the data
secNamPr$ = mid$(combinedData$, commaPos1 + 1, commaPos2 - commaPos1 - 1)
codeProm$ = mid$(combinedData$, commaPos2 + 1)
else
' If not found, report an error
notice "Σφάλμα: Δεν βρέθηκε ο δεύτερος χαρακτήρας χωρισμού."
end if
' Entering data into the ListView
LVITEM.mask.struct = LVIF.TEXT
' Αυξάνουμε το rowCount κατά 1 για την επόμενη γραμμή
rowCount = rowCount + 1
' Insert the name into the ListView, in the first column (iSubItem = 0)
LVITEM.iSubItem.struct = 0
LVITEM.pszText$.struct = nameProm$
calldll #user32, "SendMessageA", hwndListView1 as uLong, LVM.INSERTITEM as Long,_
rowCount as long, LVITEM as struct, re as Long
' Insert the name into the ListView, in the second column (iSubItem = 1)
LVITEM.iSubItem.struct = 1
LVITEM.pszText$.struct = secNamPr$
calldll #user32, "SendMessageA", hwndListView1 as uLong, LVM.SETITEM as Long,_
rowCount as long, LVITEM as struct, re as Long
' Insert the name into the ListView, in the Third column (iSubItem = 2)
LVITEM.iSubItem.struct = 2
LVITEM.pszText$.struct = codeProm$
calldll #user32, "SendMessageA", hwndListView1 as uLong, LVM.SETITEM as Long,_
rowCount as long, LVITEM as struct, re as Long
wend
close #kartProm
end if
wait
[Del.click]
'Place your code here
Wait
[Clear.click]
'Place your code here
Wait
[Search.click]
#main1.TextBox1 "!contents? existingName$"
if existingName$ = "" then
notice "Please enter a name before searching."
else
open "kartaProm.txt" for input as #kartProm
found = 0
while not(eof(#kartProm))
input #kartProm, combinedData$
commaPos = instr(combinedData$, ";")
nameProm$ = left$(combinedData$, commaPos - 1)
secNamPr$ = mid$(combinedData$, commaPos + 1)
codeProm$ = right$(combinedData$, commaPos + 2)
if existingName$ = nameProm$ then
' Match found
found = 1
exit while
end if
wend
close #kartProm
if found = 0 then
' No match found
notice "No entry found for the provided name."
else
' Display information in TextBox2 and TextBox3
#main1.TextBox2 "!contents? "; nameProm$
#main1.TextBox3 "!contents? "; secNamPr$
#main1.TextBox4 "!contents? "; codeProm$
notice "Entry found for the provided name."
end if
end if
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]
#main.ComboBox4 "selection? selected$"
Wait
[ComboBox5.click]
#main.ComboBox5 "selection? selected$"
Wait
[ComboBox6.click]
#main.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
Thank you very much.
Gaslouk