Hardware library was updated

Discussion in 'Announcements' started by Erel, May 23, 2007.

  1. Erel

    Erel Administrator Staff Member Licensed User

    The Hardware library was updated and it now also includes:
    - Clipboard operations.
    - GCCollect / GCAllocatedMemory - Handle managed memory.
    - GetSpecialFolder - Gets the path to one of the special folders.
    - NetVersion - Retrieves the .Net Framework version.

    www.basic4ppc.com/Downloads.html
     
  2. Cableguy

    Cableguy Expert Licensed User

    Erel....Whats the special folders?
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    These are the special folders:
    sfFavorites - The user favorite items folder.
    sfFonts - The fonts folder.
    sfPersonal - The default folder for documents.
    sfProgramFiles - The program files.
    sfPrograms - The programs shortcuts folder.
    sfStartMenu - The main menu shortcuts.
    sfStartup - Application in this folder will be launched at startup.
    sfWindows - The windows folder.
     
  4. specci48

    specci48 Well-Known Member Licensed User

    Could you add these constants in the next version of the help file?
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    These constants are part of the hardware library.
    They will all appear in the pop up menu.
     
  6. specci48

    specci48 Well-Known Member Licensed User

    Yes, I've seen them but in my eyes something like that should be documented in the help file, too! :sign0095:
     
  7. alfcen

    alfcen Well-Known Member Licensed User

    Hardware Library

    The enhanced library is a charm, especially the garbage collection feature and the Framework query. Erel, am I assuming correctly that GC does not clear temporary internet files?
    Compliments!
    Robert
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    You assume correctly.
    It only clears unreferenced allocated memory.
     
  9. batninja

    batninja Member Licensed User

    Desktop app shows error message after installing new Hardware library

    Hi

    I eagerly instaled the new hardware library, looking forward to the clipboard function but I get a strange error message now when I launch the desktop (V5) application. i.e.

    System.Runtime.InteropService.ExternalException:The requested clipboard operation failed.
    at System.WIndows.Forms.Clipboard.SetDataObject(Object data, Boolean copy)
    at System.WIndows.Forms.Clipboard.SetDataObject(Object data)
    at Dbasic.Form1.HighLightAllText(Int32 new TabSize)

    Im running with Vista and just copied the hardware files to the Program Libraries folder. Also the Hardware Help file doesnt work under Vista.

    Any ideas?

    Thanks

    Bats
     
  10. alfcen

    alfcen Well-Known Member Licensed User

    Hi
    As far as I am aware, the hardware library runs on the device only.
    The hardware desktop library is basically a dummy merely capable of retrieving the .NET framework version.
     
  11. conf

    conf Member

    The Hardware lib only catch 5 hardware keys and cursor keys. But I use PPC Phone with number pad and I want to catch number keys. How can I do that? Please help, thank you.
     
  12. conf

    conf Member

    Another problem:

    I run the example of Hardware lib"

    Code:
    'Add a Hardware object named Hardware1
    Sub Globals


    End Sub


    Sub App_Start
          Form1.show
          Hardware1.New1
          
    msgbox("Device ID: " & Hardware1.GetDeviceID)
          Hardware1.BackLightOn 
    'Prevents the back light from suspending
          Hardware1.RunAppAtEvent(AppPath & "\MyApp.exe", Hardware1.evWakeup) 'MyApp will be launched each time the device is turned on
          Hardware1.RunAppAtTime (AppPath & "\MyApp.exe", TimeAdd(now,0,5,0)) 'MyApp will be launched in 5 minutes
          AddTimer("Timer1")
          Timer1.Interval = 
    5000 '5 seconds
          Timer1.Enabled = true
          TextBox1.Focus
          Hardware1.KeyPress(
    asc("1")) 'Writes 1
          
          Hardware1.KeyDown(
    160'Holds the left shift down
          Hardware1.KeyPress(asc("1")) 'Writes !
          Hardware1.KeyUp(160'Frees the left shift
    End Sub


    Sub Timer1_Tick
          Hardware1.KeepAlive 
    'Resets the system idle timers
    End Sub
    and now when I wake up the device, it's always run MyApp.exe. How to stop it ? I soft-reset but it's not work.
     
  13. Erel

    Erel Administrator Staff Member Licensed User

    Use the evNone event to remove it:
    Hardware1.RunAppAtEvent(AppPath & "\MyApp.exe", Hardware1.evNone)
     
  14. conf

    conf Member

    I did but it's still run when I wake up the device. Any solution? May be I need to hard-reset? Help me :(
     
  15. Erel

    Erel Administrator Staff Member Licensed User

  16. Cableguy

    Cableguy Expert Licensed User

    People,

    Hi see some interesting issues here that should be adressed in the questions and problem section!!
     
  17. conf

    conf Member

    Hi Cableguy,

    I understand but I think it can fit with Hardware lib thread. I just want to know the solution to remove problem.

    Thank you.
     
  18. conf

    conf Member

    I use Check Notifications software to remove notification and it's work. Beside, can you re-test RunAppAtEvent and show me how to remove it ?

    Thank Erel.
     
Loading...