Howto call "Hardware" ?

Discussion in 'Questions (Windows Mobile)' started by Bertil Lindstrom, Nov 7, 2007.

  1. Bertil Lindstrom

    Bertil Lindstrom New Member

    :sign0163:Hi !
    I am new to this forum and also to b4ppc.
    Now I try to make a simple app that shall open the SIP, it doesnt work.
    So trying to call other functions in the external libs.
    This is the latest, it doesnt work either -:(

    I have added the DLL.s both for the desktop and the device, created objects
    and all that. What I can get to work is only those functions (in the LIB) that returns a value (DLL-version etc).

    Am I out in the dark side or what??

    Can someone point me in the direction of how to call those functions like Open SIP, Backlight on/off etc.

    Best regards
    Bertil

    '========== CODE begins ===========
    Sub Globals
    'Declare the global variables here.
    End Sub
    Sub App_Start
    Form1.Show
    Hardware.New1
    End Sub
    Sub Button1_Click
    Hardware.BackLightOn False
    End Sub
    Sub Button2_Click
    Hardware.BackLightOn True
    End Sub
    '========== CODE ends ===========
     
  2. specci48

    specci48 Well-Known Member Licensed User

    This simple programs adds a textbox to form1 and opens the SIP:
    Code:
    Sub Globals
       
    'Declare the global variables here.
    End Sub

    Sub App_Start
       Form1.Show
       AddTextBox(
    "Form1","TextBox1",40,20,100,25,"")
       
    Sip(True)
    End Sub
    Remember: The SIP ist only visible if you run this program on the device!

    specci48
     
  3. specci48

    specci48 Well-Known Member Licensed User

    Forget to mention the backlight... :signOops:

    The correct syntax ist
    Code:
    Hardware1.BackLightOn
    which turns the backlight on. No True or False is required because if you want to cancel the BackLightOn command you should use
    Code:
    Hardware1.BackLightNormal
    But, as mentioned in the help file, not all functions of the hardware.dll will work on all devices. So it may be impossible to get these both functions work on your device.

    specci48
     
  4. Bertil Lindstrom

    Bertil Lindstrom New Member

    Hi specci48

    Thanks for the info - as always it is obvious when it in front of you!!
    Now, I am really going on!
    Thanks again
    /Bertil
     
Loading...