Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 2 of 2

Thread: Help

  1. #1
    Join Date
    Apr 2009
    Posts
    48

    Huh? Help

    is their a alternative to timers because i want a progress bar and some paragraph objects to refresh every 10seconds but with timers it causes the application to crash after a while

    this is what needs to happen every 10 seconds...

    usedspaceMB = Drive.GetUsedSpace(_SourceDrive);
    usedspaceB = usedspaceMB*1024*1024
    usedspaceGB = String.GetFormattedSize(usedspaceB, FMTSIZE_AUTOMATIC, true);

    freespaceMB = Drive.GetFreeSpace(_SourceDrive);
    freespaceB = freespaceMB*1024*1024
    freespaceGB = String.GetFormattedSize(freespaceB, FMTSIZE_AUTOMATIC, true);

    percentage = usedspaceB/freespaceB*100
    Progress.SetCurrentPos("hdpercent", percentage);

    driveinfo = Drive.GetInformation(_SourceDrive);
    Paragraph.SetText("drive_info", ""..driveinfo.DisplayName.." "..driveinfo.FileSystem.."\r\nUsed: "..usedspaceGB.." | Free: "..freespaceGB.."");

    --Processor Info
    cpuname = Registry.GetValue(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\ 0", "ProcessorNameString", true);
    identifier = Registry.GetValue(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\ 0", "Identifier", true);
    cpuusage = CMU.GetCPUsageTotal();
    Progress.SetCurrentPos("cpupercent", cpuusage);
    Paragraph.SetText("cpuname", ""..cpuname.."\r\n"..identifier.."");

    --Memory Info
    meminfo = System.GetMemoryInfo();

    freevirtualB = meminfo.AvailableVirtual*1024*1024
    freevirtualmem = String.GetFormattedSize(freevirtualB, FMTSIZE_AUTOMATIC, true);
    totalvirtualB = meminfo.TotalVirtual*1024*1024
    totalvirtualmem = String.GetFormattedSize(totalvirtualB, FMTSIZE_AUTOMATIC, true);
    freeramB = meminfo.AvailableRAM*1024*1024
    freeram = String.GetFormattedSize(freeramB, FMTSIZE_AUTOMATIC, true);
    totalramB = meminfo.TotalRAM*1024*1024
    totalram = String.GetFormattedSize(totalvirtualB, FMTSIZE_AUTOMATIC, true);

    Progress.SetCurrentPos("mempercent", meminfo.MemoryLoad);
    Paragraph.SetText("meminfo", "RAM: "..freeram.." of "..totalram.."\r\nVirtual Memory: "..freevirtualmem.." of "..totalvirtualmem.."");

  2. #2
    Join Date
    Apr 2009
    Posts
    48

    HELP - Realtime Updating

    hey,

    i am designing a pc tuneup utilitie and need some infomation in paragraph objects and some progress bars to update without the use of timers and without causing the application to crash etc..

    if so could you provide a example on how to go about doing it

    im a newbie to this

    thanks

Posting Permissions

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