home *** CD-ROM | disk | FTP | other *** search
/ PC User 2001 August / APC_Aug2001_CD2.iso / features / devtools / files / lb202win.exe / LB202W.EXE / DIALOG3.BAS < prev    next >
Encoding:
BASIC Source File  |  2000-10-26  |  1.9 KB  |  87 lines

  1.  
  2.  
  3.     category$(0) = "Paul"
  4.     category$(1) = "Carl"
  5.  
  6.     WindowWidth = 344
  7.     WindowHeight = 290
  8.  
  9.     ComboboxColor$ = "darkblue"
  10.  
  11.     groupbox #main.group, "Example", 26, 16, 288, 200
  12.     combobox #main.category, category$(, [selectCategory], 46, 41, 96, 95
  13.     listbox #main.from, from$(, [selectFrom], 46, 71, 100, 100
  14.     listbox #main.into, into$(, [selectInto], 174, 71, 100, 100
  15.     button #main, ">> Move >>", [moveFromSelection], UL, 54, 181
  16.     button #main, "OK", [acceptSelections], UL, 270, 224
  17.     open "Hi Paul" for dialog as #main
  18.     gh = hwnd(#main.group)
  19.  
  20.  
  21. [inputLoop]
  22.  
  23.     input r$
  24.     goto [inputLoop]
  25.  
  26.  
  27. [selectCategory]   'Perform action for the combobox named 'category'
  28.  
  29.     print #main.category, "selection?"
  30.     input #main.category, name$
  31.  
  32.     'notice "you selected "; name$
  33.     if name$ = "Paul" then [paulSelected]
  34.     if name$ = "Carl" then [carlSelected]
  35.  
  36.     goto [inputLoop]
  37.  
  38. [paulSelected]
  39.  
  40.     from$(0) = "54 Mercury"
  41.     from$(1) = "Herbalife"
  42.     from$(2) = "GOD"
  43.  
  44.     print #main.from, "reload"
  45.     goto [updateGroupboxLabel]
  46.  
  47. [carlSelected]
  48.  
  49.     from$(0) = "62 VW"
  50.     from$(1) = "Shoptalk Systems"
  51.     from$(2) = "GOD"
  52.  
  53.     print #main.from, "reload"
  54.  
  55. [updateGroupboxLabel]
  56.  
  57.     open "user" for dll as #user
  58.  
  59.     calldll #user, "SetWindowText", _
  60.         gh as word, _
  61.         name$ as struct, _
  62.         result as short
  63.     close #user
  64.  
  65.     goto [inputLoop]
  66.  
  67. [selectFrom]   'Perform action for the listbox named 'from'
  68.  
  69.     'Insert your own code here
  70.  
  71.  
  72. [selectInto]   'Perform action for the listbox named 'into'
  73.  
  74.     'Insert your own code here
  75.  
  76.  
  77. [moveFromSelection]   'Perform action for the button named 'moveButton'
  78.  
  79.     'Insert your own code here
  80.  
  81.  
  82. [acceptSelections]   'Perform action for the button named 'okButton'
  83.  
  84.     'Insert your own code here
  85.  
  86.     goto [inputLoop]
  87.