Hi all!
I'making a program scheduler wich runs programs when loaded.
I use two textfields AppName & AppPath to save the Application name and full path to a ListBox
and the registry. I also saves the varible AppNo & AppPathNo which shows how many apps saved.
I need to fill the listbox with programs added so far when i reload the program, and the run them. How in the world do i
do that!!!!!
This is what I written so far....
Thanx in advange!Code:Private Sub CmdAdd_Click() Dim AppNo Dim AppPathNo AppNo = GetSetting("ProgSch", "AppNo", "No") AppPathNo = GetSetting("ProgSch", "PathNo", "No") If AppNo >= 10 Or AppPathNo >= 10 Then GoTo Error Else AppNo = AppNo +1 SaveSetting "ProgSch", "AppNo", "No", AppNo AppPathNo = AppPathNo +1 SaveSetting "ProgSch", "PathNo", "No", AppPathNo SaveSetting "ProgSch", "AppToRun", AppNo, AppName SaveSetting "ProgSch", "AppPath", AppPathNo, AppPath Apps.AddItem AppName.Text & " " & "-" & " " & AppPath Exit Sub Error: Dim Msg Msg = MsgBox("Error! You can only add 10 applications!", vbCritical) End If End Sub Private Sub Form_Load() Dim StartNoCheck1 Dim StartNoCheck2 StartNoCheck1 = GetSetting("ProgSch", "AppNo", "No") StartNoCheck2 = GetSetting("ProgSch", "PathNo", "No") If StartNoCheck1 = "" Then SaveSetting "ProgSch", "AppNo", "No", "0" End If If StartNoCheck2 = "" Then SaveSetting "ProgSch", "PathNo", "No", "0" End If End Sub
[Edited by CyberCarsten on 06-23-2000 at 02:09 PM]




Reply With Quote