Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2007
    Posts
    107

    Can you correct this code plz .....thank you

    hi there

    look to this code

    PHP Code:
    tbl_reg Registry.GetValueNames(HKEY_LOCAL_MACHINE"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
    for 
    j,k in tbl_reg do
      
    ListBox.AddItem("ListBox1"k"");
    end 
    this code is to get startup application list into Listbox1 , but the problem is

    when i click on the button the list appear again and again each time i click

    i would like to correct this code and make the list appear one time not many times

    thank you

  2. #2
    Join Date
    Aug 2003
    Posts
    2,427
    Try -

    Code:
    if not locked then
    tbl_reg = Registry.GetValueNames(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"); 
    for j,k in tbl_reg do 
      ListBox.AddItem("ListBox1", k, ""); 
    end
    locked = true 
    end

  3. #3
    Join Date
    Aug 2004
    Location
    Somewhere in Texas, USA
    Posts
    417
    Or just clear the lisbox every time you click.

    Code:
    ListBox.DeleteItem("ListBox1", LB_ALLITEMS);
    tbl_reg = Registry.GetValueNames(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"); 
    for j,k in tbl_reg do 
      ListBox.AddItem("ListBox1", k, ""); 
    end

Similar Threads

  1. Can anybody correct me the code please ?
    By jackdaniels in forum AutoPlay Media Studio 7.5
    Replies: 4
    Last Post: 02-28-2008, 01:27 AM
  2. Article: Using Authenticode Code Signing Certificates
    By Ted Sullivan in forum Setup Factory 8.0 Examples
    Replies: 4
    Last Post: 10-31-2007, 09:03 AM
  3. Making a Basic Quiz/Testing Application
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 3
    Last Post: 10-12-2007, 06:42 AM
  4. can you help me where i put this code plz
    By jack in forum AutoPlay Media Studio 6.0
    Replies: 6
    Last Post: 04-02-2007, 08:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts