Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Howto call "Hardware" ?


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-07-2007, 09:42 PM
Newbie
 
Join Date: Oct 2007
Location: Flen, Sweden
Posts: 2
Default Howto call "Hardware" ?

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 ===========
Reply With Quote
  #2 (permalink)  
Old 11-07-2007, 09:54 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 672
Default

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
Reply With Quote
  #3 (permalink)  
Old 11-07-2007, 10:01 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 672
Default

Forget to mention the backlight...

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
Reply With Quote
  #4 (permalink)  
Old 11-08-2007, 10:14 PM
Newbie
 
Join Date: Oct 2007
Location: Flen, Sweden
Posts: 2
Default

Quote:
Originally Posted by specci48 View Post
Forget to mention the backlight...

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
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
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
"AddEvent" and "buttonUp/buttonDown" Byak@ Questions & Help Needed 12 09-10-2008 04:04 PM
Is there any thing like Visual Basic "Tabbed dialog control" in Basic4ppc? mozaharul Questions & Help Needed 6 03-23-2008 12:07 PM
Image Button kommt nicht wieder "hoch" troll German Forum 3 02-22-2008 10:03 AM
calling the device's "Programs" or "settings" screens HarleyM Questions & Help Needed 0 12-05-2007 03:59 AM
Avoid the "optional resource assembly cannot be found" Erel Code Samples & Tips 1 07-12-2007 11:24 AM


All times are GMT. The time now is 07:33 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0