home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / favorite / favorit1.frm (.txt) < prev    next >
Visual Basic Form  |  1991-07-10  |  16KB  |  389 lines

  1. Form1
  2. Favorite Program Launcher
  3. Courier
  4. Form1
  5. Picture1
  6. PetName
  7. PetnameLabel
  8. Pet Name
  9. List1
  10. BrowseButton
  11. Pick A File
  12. Filenamelabel
  13. CommandlineName
  14. CommandlineLabel
  15. Command Line
  16. Check1
  17. Check1
  18. Checklabel
  19. Minimize on Launch
  20. OKButton
  21. CancelButton
  22. Cancel
  23. Y    DosButton
  24. Shell to DOS
  25. AddMenu
  26. ChangeMenu
  27. &Change
  28. DeleteMenu
  29. &Delete
  30. UndeleteMenu
  31.     &Undelete
  32. HelpMenu
  33. &Help
  34. HelpKey
  35. V    AboutMenu
  36. &About
  37. combo1_changeq
  38. RunCtl_Click
  39. AddCtl_Click
  40. Combo16
  41. visible
  42. AddMenu_Click"
  43. makevisible
  44. Petname
  45. CommandlineLabel_Click
  46. PetnameLabel
  47. TRUE#
  48. ProgramnameLabel
  49. PathnameLabel
  50. Make_Boxes_VisibleI
  51. CommandlineLabel!
  52. PetnameText
  53. ProgramnameText
  54. CommandlineText.
  55. PathnameText
  56. PathName_Change
  57. Commandlinename
  58. Petnamename
  59. Programnamename
  60. Pathnamename
  61. Pathname|
  62. Programname
  63. commandline)
  64. PennameName_Change
  65. PetName_Change
  66. Form_ClickQ
  67. ChangeMenu_Click
  68. DeleteMenu_Click
  69. RunMenu_Click
  70.     TRUEFALSE
  71. FALSE
  72. make_programs_visible
  73. form_
  74. scalewidth
  75. form1
  76. autodraw
  77. Form_Resize
  78. autoredraw
  79. width?
  80. DATAIN
  81. INKEY
  82.     ADDSWITCH
  83. newname
  84. textk
  85. yStop
  86. PetName_LostFocus
  87. value
  88. form_gotfocus
  89. FIRSTSWITCH
  90. makefile
  91.     closefile{
  92. closefile2q
  93.     makefile2
  94.     NoIniFile1
  95. ReadINIFile
  96. EndofIniFile
  97. INIDATAM
  98. PETNAMEARRAY=
  99. PROGRAMNAMEARRAY
  100. NoIniFile2
  101. COMMANDLINEARRAY:
  102. OKButton
  103. CancelButton
  104. OKButton_Click
  105. CancelButton_Click 
  106. NEWWIDTH
  107. ProgramName_Change
  108.     PIFbutton
  109. PifLabel
  110.     BATButton
  111. BATLabel
  112. List1.
  113. Change
  114. WORKD
  115. add_to_list
  116. DELETESWITCHK
  117. MAINTSWITCHI
  118. List1_Click
  119. Gotfocusy
  120. List1_DblClick/
  121. index
  122.     listindex
  123. PetnameLabel_Click
  124. Form1_GotFocus
  125. @    form_load
  126. Form_MouseUp
  127. Button
  128. Shifto
  129. main\
  130. form_lostfocus
  131. sub_main
  132. petname_SetFocus.
  133. petname_gotfocus
  134. petname_textL
  135. PIFButton_Click
  136.     listcount
  137.     listvalueF    
  138. endofinifile2
  139. elist1
  140. DATAWORK
  141. AboutMenu_Click
  142. readmenuS    
  143. CommandlineName_Change
  144. @    Writefile8
  145. writeclose
  146. writeclose2
  147.     killerror
  148. killerror2
  149. TRIMEDSTRING
  150.     SENTVALUEu
  151. TRIMEDVALUE
  152. CommandlineName_LostFocusX
  153. TRIMSENTg
  154. TRIMMEDSENT
  155. TRIMEDSENT
  156. TRIMEDNAME
  157. WORKITEM
  158. RUNJOB
  159.     shellitem
  160. caption
  161. DELETEDITEMS
  162. deleteditem
  163. deleteditemsi
  164. noitem
  165. noitem2
  166. UndeleteMenu_Click
  167. response%    
  168. windowstateu
  169. sponseL
  170. Checklabel_Clickc    
  171. Check1_Click
  172. check1
  173. savecaption
  174. helpkey_click
  175. HelpMenu_Click
  176. FORM2)
  177. helpbutton
  178. Form3
  179. aboutbutton5    
  180. COMMAND1
  181. Upperp    
  182. BATLabel_Click
  183. Picture1_Click
  184. ProgramName_LostFocus
  185. midlist1
  186. filenotfound
  187. filenotfound2
  188. mandlinenamev
  189.     minimized
  190. BatButton_Click
  191. PIFLabel_Clickb
  192. shellmsg
  193. Trimx
  194. TRIMMED
  195. GLOBALS
  196. BrowseButton_Click
  197. form4
  198. browsebutton
  199. RUNFILENAME
  200. Filenamelabel
  201. filenametable
  202. Filenamelabel_Click
  203. Clear_the_fields
  204. DosButton_Click
  205. shellerror
  206. shellerror2
  207. HAVESHELLED>
  208. GLOBALS TO FORM
  209. tells if "A"dd or "C"hange
  210. used in subrte to swap visibility(
  211. used at load time for initialization
  212. work areao
  213. array saves prior deletesi
  214.   for UNDELETE menu item
  215. AddCtl_Click
  216. make right side of form visibled
  217. Make_Boxes_Visible
  218. user passes value in TRUEFALSE variable to tell whether to
  219. make form's right side visible or to shrink. TRUE = make
  220. right side visible.  FALSE  = shrink screen to left.
  221. check to see that user has
  222. not minimized form
  223. wide withd
  224. narrow width
  225. make labels, boxes and
  226. visible or invisible
  227. AddMenu_Click
  228.  invoked when "Add" is clicked
  229. sub to make right side of form
  230. visiblek
  231. move cursor to PETNAME field
  232. ChangeMenu_Click
  233.  invoked when user selects CHANGE from menui
  234. nothing in list1 array to change
  235. tell them what to do
  236. Click an item in the list first.
  237. Message"
  238. No items in list."
  239. Message"
  240. make form wide  
  241. tell the world we are doing a
  242. change transaction
  243. move data from item in List1 array to text boxes
  244. move cursor to PETNAME field
  245. DeleteMenu_Click
  246. user selected DELETE from menu.  Delete the item from thee
  247. List1 array and rewrite the FAVORITE.INI file.
  248. make form narrow
  249. clear text boxes
  250. check for no items in list
  251. There are no items in list."
  252. Message"
  253. Click an item in the list.
  254. Message"
  255. leave this sub if nothing in List1 array
  256. button matrix for Msgbox
  257. Delete "
  258. Warning"
  259. user chose CANCEL button
  260. item in List1 array to deleter
  261. this loop adds to array of deleted
  262. items this session for possible undeletesl
  263. add to deleted items array
  264. remove from list1 arraye
  265. nothing in list 
  266. delete any existing FAVORITE.INI filed
  267. favorite.ini
  268. go to routine to write the file outd
  269. ReadINIFile
  270. read the FAVORITE.INI file and build list1
  271. favorite.ini
  272. test to see if null file or not
  273. is null file
  274. favorite.ini
  275. delete the fileo
  276. leave, no input
  277. force error when end of file
  278. Read all possible data
  279. Read one line of filea
  280. put file record in list1
  281. got here at end of filec
  282. CancelButton_Click
  283.  user CANCELS a change or ADD transactionn
  284. clear any entered data
  285. sub to shrink form
  286. OKButton_Click
  287.  user chooses "OK" after ADD or CHANGE transaction
  288. routine to add item to List1 array
  289. and FAVORITE.INI file     
  290. add_to_list
  291. adds and changes to list of programs and FAVORITE.INI file
  292. are processed here
  293. came here by "C"hangeF
  294. find item in list1 array
  295. user didn't enter PETNAMEr
  296. Enter information in Pet Name or Cancel your change.
  297. Message"
  298. put cursor back at PETNAME
  299. user didn't enter PROGRAMNAMEA
  300. Enter program name information or Cancel the change.
  301. Message"
  302. put cursor back at PROGRAMNAME
  303. align the entered data so it
  304. can be placed in list1 and .INI file
  305. align COMMANDLINEo
  306. if change, remove old item from List1 
  307. not needed any further, clear 
  308. add to list1
  309. go to subrte to write FAVORITE.INI filem
  310. hide the right side boxes & buttons
  311. clear the box textsa
  312. form_load
  313. VB will begin here.  Use FIRSTSWITCH as the program2
  314. initialization trigger.e
  315. turn switch on so routine 
  316. won't be used againi
  317. if INI file never createds
  318. (VB still needs GOTO's)a
  319. favorite.ini
  320.  File exists
  321. go read INI file
  322. INI file doesn't exist
  323. Writefile
  324. sub to write the FAVORITE.INI file after successfull
  325. change or add transaction.
  326. favorite.ini
  327. force error at end of list1 arrayt
  328. find out how many items in list1 array
  329. loop thru arrayr
  330. move to output form-global
  331. write the record
  332. error trap
  333. List1_DblClick
  334.  DBL-clicking an item in the list causes it to run through
  335.  WINDOW'S PROGRAM MANAGERt
  336. must be at least 1 item in listr
  337. pointer to item in list1
  338. see if "Minimize on Run" box is checked, if so minimize to icon 
  339. prepare SHELL instruction parameters -- program | parameters
  340. save the caption & put temp one in
  341. in case parameters not ok&
  342. shell to program manager
  343. not found dialog button
  344. The program name or suffix you entered
  345.  will not call your 
  346. program from Window's Program Manager.
  347.  Please  "
  348. click CHANGE to review."
  349. UndeleteMenu_Click
  350.  user can undelete as many items as have been deleted this
  351. session by clicking on UNDELETE.  This subroutine removes them
  352. from the saved array and replaces them back into the List1 array
  353. check to see if anything saved
  354. There are no items to undelete."
  355. Message"
  356. pull the last deleted item from the arrayc
  357. and place back into list, deleting it from the saved array a
  358. add it back to List1 array
  359. goto sub to write the FAVORITE.INI file1
  360. helpkey_click
  361.  user chose HELP from menu
  362. load the help form into memory
  363. make it visiblet
  364. put cursor on "OK" button"
  365. HelpMenu_Click
  366. user chose HELP keyy
  367. AboutMenu_Click
  368.  display the "About" menu (Form3) when menu item clicked
  369. load the form"
  370. make it visibleF
  371. change focus to forms "OK" buttoni
  372. PetName_LostFocus
  373.  aligns text when user leaves text box
  374. CommandlineName_LostFocus
  375.  edit the field when user leaves field
  376. List1_Click
  377.  user single-clicked to hilight list1 item he wanted
  378. clear text boxes
  379. make form narrow
  380. BrowseButton_Click
  381. Clear_the_fields
  382. clear text box datai
  383. clear the current file nameo
  384. clear the chosen name 
  385. clear the command line
  386. DosButton_Click
  387. command.com"
  388. Couldn't execute COMMAND.COM. The probable problems are that COMMAND.COM is not in your path or your Window's TEMP disk is full.
  389.