|
Thanks .
If i want to learn symbian and iphone then how should i start
|
|
|
|
|
Hi,
At first you need good programming skill well I can say if you have more or less good idea on visual studio 2005 or visual studio 2008 (compact Framework ) the best for Windos mobile programming .
For symbian I can say best NETBEANS . If you are familiar with Java I am sure you heard about that .
you can see article on CODE PROJECT there are so far good tutorial help and Also can see on MSDN microsoft . Wish Help . If you want help dont be hesitate
|
|
|
|
|
Hello!
I try to access a HID USB device with my PocketPC LOOX with integrated USB Host.
I already figured out - that I can get an handle to the device with -> FindFirstDevice, FindNextDevice
I am quite sure I got the _right_ device, because I looked at the enumeration before an after I plugged it in.
The device name in the DEVMGR_DEVICE_INFORMATION is HID1.
I assume this also means the HID driver was loaded.
To make sure opening is made with the correct options - I do a
HANDLE hFile = CreateFileW(di.szDeviceName,
GENERIC_WRITE | GENERIC_READ,
FILE_SHARE_READ|FILE_SHARE_WRITE,
(LPSECURITY_ATTRIBUTES)NULL,
OPEN_EXISTING,
0,
NULL);
No error occurs, and I see a value for hFile.
Now I try to write and read from the handle with
...
Result = WriteFile(handle, &WriteBuffer, 10, &BytesWritten, NULL);
...
or
ReadFile(handle, &ReadBuffer, 10, &NumberOfBytesRead, NULL);
of cource with the right Buffer / Bufferlenght handling.
WriteFile and ReadFile does not work an come with error 50 (ERROR_NOT_SUPPORTED).
Does not seem right
So I tried to deal with DeviceIoControl .. and got no luck.
On Windows XP everythink work fine (HidD_GetPreparsedData, HidP_GetCaps, SetupDiGetClassDevsW, SetupDiEnumDeviceInterfaces, SetupDiGetDeviceInterfaceDetailW, CreateFile, ReadFile, WriteFile) but this functions does not seem to be available in Windows Mobile 5.0 (hid.dll, hidsdi.h, setupapi.h ...)
If you wonder which device I want to control ... here you go .. JoyWarrior 24F8 from www.codemercs.com
Can anyone point me to the right function to access / read / write an HID USB Device in Windows Mobile 5.0.
It does not matter if VB, VC++,C or C#
|
|
|
|
|
I’m trying to use the green TALK button on my Pocket PC as a floor control button. That means I need to know when the user presses it and when they release it.
I’ve found several ways to be informed when the user presses the VK_TTALK button, and I’ve been able to take control of the association with the default phone application (details below if you care to see them). The problem I’m having is determining when the user releases the button.
What happens is, no matter how long I hold the button down, I get a WM_KEYUP for VK_TTALK within a few hundred milliseconds of the key press event. This happens even though I hold the button down for many seconds after pressing it. (I see that this gentleman appears to have faced the same or a very similar issue.)
Can anyone tell me if there’s a way to do this? I’m beginning to think maybe it’s just a problem with the 6700 hardware or firmware. Or maybe it’s a more widespread issue? Any other ideas?
By the way, it happens that I’m working on an HTC6700, but I really need a portable solution that will work on any Pocket PC. A 6700-specific solution – though it might be cool and fun – really won’t help me. My environment, BTW, is C++ in MS Visual Studio 2005.
Approaches I’ve tried:
- SHCMBM_OVERRIDEKEY – I’ve used SendMessage(… SHCMBM_OVERRIDEKEY, VK_TTALK, …), as described here, to request that TALK button events be passed to me as WM_HOTKEY events.
- What worked: The built-in phone app launch was bypassed, so that’s good. And I did get WM_HOTKEY events for the button presses.
- What didn’t work: I got WM_KEYUP events telling me the user had released the TALK button, but they came way too soon, while I was still holding the button down.
- UnregisterFunc1(), UnregisterHotKey(), RegisterHotKey() – There’s a lot of discussion (here and here, e.g.) about this option. I’ve tried it and had problems similar to the ones I describe above.
- What worked: I avoided the phone app launch, and I did get WM_HOTKEY events for presses (and releases, too, if I recall correctly).
- What didn’t work: But the release events came too soon, as they did elsewhere. Also, after I exited my application, the connection between the TALK button and the built-in phone application was still broken. There’s probably a way I could restore that, but since the release events were no good, I doubt I’ll pursue this option.
- SHSetAppKeyWndAssoc() – I had high hopes for this one (described here), and it did let me grab keys other than VK_TTALK, but I wasn’t able to get VK_TTALK with it at all, and even with the keys I could get, I didn’t see any notice of key release events.
- SetWindowsHookEx() – I found some documentation of how to add a hook for low-level keyboard events (see here, e.g.) and tried it. I got the events, but they behaved just the same as SHCMBM_OVERRIDEKEY above. That is, I was told the button was pressed, and then told a too-short time later that it was released (when I was still holding it down).
- GetAsyncKeyState() – I even considered polling methods. I thought maybe I could start with one of the above methods, which at least notified me on the button press, and then poll to watch for the user to subsequently release the button. GetAsyncKeyState() is supposed to tell you whether a given button is down or up. And it did correctly report the button as being pressed when the event came telling me that it was pressed. But when a subsequent event came telling me (incorrectly) that it had been released, GetAsyncKeyState() ALSO told me the button was not pressed. So that’s no help.
I’m running out of ideas. How about you?
Thanks for any guidance you can provide!
Steve
|
|
|
|
|
SteveKier wrote: What happens is, no matter how long I hold the button down, I get a WM_KEYUP for VK_TTALK within a few hundred milliseconds of the key press event. This happens even though I hold the button down for many seconds after pressing it.
i have a hunch that the device is using a short and long key press functionality IE tap a key for one function and hold for another.
it appears that once the timer for the held key is reached the WM_KEYUP msg is sent by default.
u may have to override the standard key handling functions at a lower level than u are currently interfacing to. unfortunatly i dont have the experince to point to a document that is helpful.
|
|
|
|
|
...a good thought. Thanks.
Sadly, when I check out this idea I find that no message at all comes to my hook when I actually release the button. You're right, of course, that sometimes you'll see differences between press-release and press-hold: say, one key code for a press-release and a different key code for press-hold. But in this case it's the very same key code in both cases, both event (KEYDOWN and KEYUP) are driven by the press of the key, and there's no event at all on the release of the key. Bummer.
And you may be right that I'll need to intervene at an even lower level then the "low-level keyboard events" hook I've got. I've not found a (portable) way to do that just yet, though.
And as it happens we've decided to move away from depending on the SEND key and let the user choose a key that works - whatever key that may be on their given device. So if this behavior does turn out to be peculiar to the 6700 - as the evidence currently suggests - then the user can just choose a different key on that device.
Thanks again for your idea.
Steve
|
|
|
|
|
sounds like a very sensible work around, otherwise you would have to find the function that posts WM_KEY msgs rewrite it, tie ur on keyhandler when ur app starts then tie the normal handler when ur app exits.... messy and would prob interrupt other functionality with the device =(
|
|
|
|
|
Hello,
I was wondering if anyone knows an alternative to receive sms to a personal computer other than through a GSM Modem. I really find this method quite slow than using kannel project.
Any reply would be greatly appreciated. Thanks in advance
Aim small, miss small
|
|
|
|
|
Ummm the cell network your connected to will dictate if u use GSM or not...
could look for a WCDMA cell network but i doubt u will be able to tell the difference.
|
|
|
|
|
Hello!
I am facing some problems on the development of my mobile simlpe application connecting to an SQLCE database.
After searching a bunch of sites, tutorials and Q&A's my code seems to be correct and I can't figure out what's going wrong.
This is my code:
SqlCeConnection conn = new SqlCeConnection("Data Source=ChokweDB.sdf");
SqlCeCommand insertForm1 = new SqlCeCommand("INSERT INTO Form1Table (p1,p2,p3,p4,entrevistador,data) values ('" + p1.Text + "','" + p2.Text + "','" + p3Value + "','" + p4Value + "','" + txtEntrevistador.Text + "','" + txtData.Text + "')", conn);
conn.Open();
insertForm1.ExecuteNonQuery();
conn.Close();
My database is placed in the home directory of the application (filename ChokweDB.sdf). When I run the code, MVS2008 will simply not find the database:
The database file cannot be found. Check the path to the database. [ Data Source = ChokweDB.sdf ]
Why oh why? What am I missing?
|
|
|
|
|
Hi Vafo,
in your code you have to specify exact database path.
<br />
string DBPath = @"Program Files\ChokweDB.sdf";<br />
SqlCeConnection conn = new SqlCeConnection("Data Source=" + DBPath );
hope this will help you...
Pavan Pareta
modified on Friday, April 24, 2009 2:47 PM
|
|
|
|
|
Can't build, unrecogized escape sequence error after each dash...seen this before..
string dbconn = "@C:\Documents and Settings\Vasco\Ambiente de trabalho\Serviços de Informática\ChokweMobile\ChokweDB.sdf";
SqlCeConnection conn = new SqlCeConnection("Data Source=" + dbconn);
And after some correcting...
<pre> string dbconn = @"C:\Documents and Settings\Vasco\Ambiente de trabalho\Serviços de Informática\ChokweMobile\ChokweDB.sdf";
SqlCeConnection conn = new SqlCeConnection("Data Source=" + dbconn);
Returns Path not valid.
And...
string dbconn = @".\ChokweDB.sdf";
The database file cannot be found. Check the path to the database. [ Data Source = .\ChokweDB.sdf ]
The database IS o the same folder as the application - and it really IS there and the name is spelled correctly..
modified on Thursday, April 23, 2009 7:10 AM
|
|
|
|
|
Hi,
Add data source in your project.
then select your database (.sdf) file in your solution. then click properties then
set the value of Copy to Output Directory = Copy Always.
Try this.
Thanks
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
http://www.youtube.com/watch?v=-oJaaPCrk3Q
|
|
|
|
|
you should to add the data base trough add elements there you can see your data base and can execute program to compile if you want to compile trough mobile device add the data base in mobile device
Thanks
|
|
|
|
|
Try this
string path = "Data Source =";
path += System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
path += "\\Database.sdf";
then
myConnection = new SqlCeConnection(@path);
cheers
|
|
|
|
|
I have a very basic question but have lost some time wondering and digging the webs for an answer already - should be extra easy to answer tho:
I am developing a windows form for Windows Mobile 6 in C#, using Visual Studio 2008. I have two sets of radiobuttons in a form, and I want to separate them. I have learned I should use the WS_GROUP option, but the dumb question is...
"Where/how do I set this WS_GROUP option?"
Appreciate some reply - thank you for your attention
|
|
|
|
|
Can you confirm the development language that you are using? WS_GROUP is a windows style constant that is used in programs written in C/C++. For C# you would accomplish grouping radio buttons by either placing them in the same container (groupbox or panel).
|
|
|
|
|
Placing them inside a panel was the answer. Thanks.
|
|
|
|
|
I make code for read in web based mySql.
my php code able to read mySql and push to string.
$yoResult = iconv("EUC-KR", "UTF-8", $outxml);
echo $yoResult;
$yoResult is...
<?xml version="1.0" encoding="utf-8" ?>
<yodata>
<yovalue1>bla bla </yovalue1>
</yodata>
my window mobile code read that data string.
But i don't know How to handle that data!
How do I approach that data?
|
|
|
|
|
You might want to check out the XmlTextReader class or the ReadXml method of the DataSet object (Depending on what you are doing).
|
|
|
|
|
I give you here complete example for xml in windows mobile : It would show you in listbox all title and link of xml >
using System.Net;
using System.IO;
using System.Xml;
XmlTextReader reader = new XmlTextReader(filename );
while (reader.Read()) // if stream readed
{
XmlNodeType nodetype = reader.NodeType; // checking nodes every type
if (nodetype == XmlNodeType.Element)
{
if (reader.Name == "title")
{
listBox1.Items.Add("........................");
listBox1.Items.Add(reader.ReadString());
}
if (reader.Name == "link")
{
listBox1.Items.Add(reader.ReadString());
}
}
}
reder.Close();
xml :
<root>
<title> Newgame
http:...........<title> Newpc
http:...........
|
|
|
|
|
Hi,
I'm using C# and .net Compact Framework 2.0.
I want to draw a polygon at various angles, in other words I want to rotate it. However, I don't know the maths to do this,
transformation matix aren't part of the Cf so I've to figure it out for myself, any pointers?
Thanks
Gem
|
|
|
|
|
Why not just make your own transformation matrix class?
|
|
|
|
|
yup, thats what I'm trying to figure out
|
|
|
|
|
Hi
I think there is an article on this site which deals with this...
Also check SourceForge which i also think has some code to cover this (svg for cf).
Good luck
|
|
|
|
|