Hi,
In a few months the software we use will be totally rewritten, atm it's too slow and not well written (by other developer). I'm very new to VB.net and the Compact Framework and have been searching for to the point guides on how to create the fastest most efficient and user-friendly smart device application to be used on the Ikôn with WM Pro.
So far the best I've found are a few books describing the compact framework which isn't exactly what I'm looking for, I need specific pointers on how to write code specifically for WM and the Ikôn.
Without resorting to native code can someone help me by giving some advice regarding this issue?
Kind Regards,
Miguel
Good morning Miguel,
I would like to recommend the following books
.NET Compact Framework Programming with Visual Basic .NET
Authors: David Durant, Paul Yao
ISBN/ISBN13: 0321174046 / 9780321174048
(Book source code can be downloaded here)
Programming .NET Compact Framework 3.5 (2nd Edition)
ISBN/ISBN13: 0321573587 / 9780321573582
Microsoft Mobile Development Handbook
Authors: Andy Wigley, Daniel Moth and Peter Foot
ISBN/ISBN13: 0735623589 / 9780735623583(The companion CD / code sample can be downloaded here)
Kind regards,Jacques
Hi Jacques,
I haven't given ".NET Compact Framework Programming with Visual Basic .NET" a try yet, thanks for the heads up!
In a few months the software we use will be totally rewritten, atm it's too slow and not well written (by other developer). I'm very new to VB.net and the Compact Framework and have been searching for to the point guides on how to create the fastest most efficient and user-friendly smart device application to be used on the Ikôn with WM Pro. Miguel, Could you share with us the areas of the application that were too slow? Such as: · trying to do database communication · Wireless WAN or 802.11 communication · General hardware access We could help you in this area. We’ve been able to analyze areas that need speed increase and were able to address it. For example, signature capture in Java (see: http://community.psionteklogix.com/downloads/developer_sdkhdk/m/sample__demo_code/3380.aspx )
Miguel,
Could you share with us the areas of the application that were too slow? Such as:
· trying to do database communication
· Wireless WAN or 802.11 communication
· General hardware access
We could help you in this area. We’ve been able to analyze areas that need speed increase and were able to address it. For example, signature capture in Java (see: http://community.psionteklogix.com/downloads/developer_sdkhdk/m/sample__demo_code/3380.aspx )
Hi Steven,
I believe the biggest problems we are experiencing atm are predominately:
- Camera (Demo dll) takes longer to be accessed after being shutdown repeatedly a certain amount of times or refuses to do so requiring a reset -> for this issue I have an open ticket
- Download speed via web service is not terribly fast (different chunksizes have been tried with different results but nothing that's really up to par)
- The initial load time of an application that carries a lot of TableAdapters is very long (20+ sec sometimes)
P.S.: Regarding databases, is there a particular one Psion recommends? Currently we use SQL CE but I'm planning on testing SQLite in the future.
Miguel - Camera (Demo dll) takes longer to be accessed after being shutdown repeatedly a certain amount of times or refuses to do so requiring a reset -> for this issue I have an open ticket
Jog my memory on this one. Which ticket is this? Did you use CameraCtrlPtx? http://community.psionteklogix.com/downloads/developer_sdkhdk/m/sample__demo_code/1169.aspx
I wouldn't recommend CameraCaptureDialog (see http://community.psionteklogix.com/knowledge/w/knowledgebase/cameracapturedialog-and-shcameracapture-memory-issues-and-how-to-avoid-them.aspx)
Miguel - Download speed via web service is not terribly fast (different chunksizes have been tried with different results but nothing that's really up to par)
Webservices with .NET is a tricky thing. Despite the claim of garbage collection, I know of several instances where users utilized the .NET WebServices classes and ran into memory leaks. I think we've talked about this before
Miguel - The initial load time of an application that carries a lot of TableAdapters is very long (20+ sec sometimes)
TableAdapters? Are we talking database interaction? Is it on external storage cards?
Miguel P.S.: Regarding databases, is there a particular one Psion recommends? Currently we use SQL CE but I'm planning on testing SQLite in the future.
There is not one that we officially recommend over any other.
Steven Cox Jog my memory on this one. Which ticket is this? Did you use CameraCtrlPtx? http://community.psionteklogix.com/downloads/developer_sdkhdk/m/sample__demo_code/1169.aspx I wouldn't recommend CameraCaptureDialog (see http://community.psionteklogix.com/knowledge/w/knowledgebase/cameracapturedialog-and-shcameracapture-memory-issues-and-how-to-avoid-them.aspx)
Ticket 155410
The second link offers a demo that doesn't exist anymore:
http://community.psionteklogix.com/developers/m/sample__demo_code/1169.aspx
Would it be possible to share that demo again, possibly in VB.net?
Steven Cox Webservices with .NET is a tricky thing. Despite the claim of garbage collection, I know of several instances where users utilized the .NET WebServices classes and ran into memory leaks. I think we've talked about this before
Where can I find this discussion?
Steven Cox TableAdapters? Are we talking database interaction? Is it on external storage cards?
Yes, we only work on the SD card.
Steven Cox There is not one that we officially recommend over any other.
And unofficially?
In regards to Ticket 155410: That issue probably has nothing to do with the API that you are using and more with something wrong with the platform (methinks). Especially if you can invoke the error via the Picture taker application from Microsoft. As per the ticket, please provide Help Desk with your system properties file, because that is a very important piece of information that they need to continue resolving issues.
In regards to the link to CameraCtrlPtx: That's weird ... Could you navigate to the Downloads section > Developers/SDK > Samples and Demos, and in that list you'll find CameraCtrlPtx (although according to your ticket, you already use it).
To use it in VB, you simply need to import the CameraCtrlPtxNet control into your VB project (ensuring to include all the other appropriate DLLs required). You'll probably have to do this manually, but it should work just fine.
In regards to the WebServices problems: I've had customers remark about the issue, fix it, but I never saw what they did to resolve it. There seems to be a few hits out there concerning it http://www.google.com/webhp?sourceid=navclient&ie=UTF-8#hl=en&q=httpwebrequest+memory+leak+compact+framework&aq=f&aqi=&aql=&oq=&gs_rfai=&pbx=1&fp=6dcd74dedc130321
Depending on your build of iKon, I know that there have been issues with external SD cards causing trouble (especially the big ones... over 2 GB). Check with Help Desk concerning this, but there may be some new builds that resolve the issue.
I can ask around with some of our developers concerning which database they prefer.
This might be a stupid question but is the following correct?
public void SetFlash(int intValueState)
{
SendMessage(pictureHwnd,
WM_CAMERA_SET_FLASH, intValueState, intValueState);
}
//0 = flash off
//1 = flash on
I'm not used to working with Messages like this...
Kind regards,
If you're wanting to do this via VB, then you don't have to go through the native SendMessage interface.
See the source file: UserControl1.cs:
One of the functions of the CameraCtrlPtxNet control is SetFlash
Now look at the CSharpTest project. I manually added the CamerCtrlPtxNet control via the designer.
Now, all you would have to do is to simply invoke picture1.SetFlash(true) when you need to.
Now, to answer your question from a native standpoint:
Do NOT set the wParam value to anything except '0' when you are attempting to do this via SendMessage.
It's the lParam value (which you have set to intValueState) that needs to be set ONLY.