|
How can i send email from pocket pc 2003 with vb.net cf2
Teemu H
|
|
|
|
|
It seems that this question is readily answered on the web. A simple google search turned this up: http://blog.opennetcf.org/ayakhnin/CategoryView,category,Send%20Email.aspx[^]
Maybe next time you should do a search before posting--not that I mind helping, but it seems like you're not really trying very hard to find an answer on your own.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
I really have make a search of this but that seems like you dont have read my message really good.
I was asking this for VB.NET not C#
Thanks anyway
Teemu H
|
|
|
|
|
|
Hello Everyone,
What is the difference between Windows CE 5 and CE.Net? Or where can I find documentation on this? I've searched a lot but seem to not find any definitive comparison.
I don't think it is two names for the same thing but I am fairly new to the Windows CE and Windows Mobile platforms so any direction you could give me would be great.
Thanks.
|
|
|
|
|
CE .NET was the name used for Windows CE versions 4.0, 4.1 and 4.2. When CE 5.0 rolled around, Microsoft removed the ".NET" part of the name, just as they had removed it from "Windows .NET Server 2003". These days, ".NET" only refers to the .NET Framework or .NET Compact Framework.
For version 6.0 they've inserted another qualifier, so it's now known as "Windows Embedded CE 6.0".
For information on new features in CE 5.0, see here[^].
|
|
|
|
|
I also had the same doubt, giving you a score 5.
|
|
|
|
|
Hi,
I am developing windows mobile 5.0 application using VS2005 C#.NET...In treeview how to change the back colour in programmatically...In properties do not have the option...If anybody knows please help me..
Thanks&Regards
Sarala
|
|
|
|
|
|
I am developing application in VS2005 C#, Windows Mobile 5.
Please help, I have some doubts..
1. How to code for softkeys in Windows Mobile?
2. How to add background image?
3.If I closed the application, its still running at the background,I stop running programs also its still running,I need to remove the battery to shutdown the application.How to avoid this?
4.How to install exe file with icon/logo to Windows Mobile programs collection?
I am a newbie for WM development,So, please bear with my questions.
Thanks in advance
|
|
|
|
|
Please clarify what you mean on some of these.
1. What specifically do you want to do with the softkeys? Turn them off? Receive the events?
2. What do you want to add a background image to? Your form? According to the documentation, it doesn't look like the 'Control.BackgroundImage' (http://msdn2.microsoft.com/en-us/library/system.windows.forms.treeview.backcolor.aspx[^]) property is supported in the Compact Framework. There is probably another way to do it, but I doubt it's trivial.
3. PDAs keep the application running unless you explicitly tell it to terminate in your code, or you kill the running process from the Settings | System | Memory control panel.
4. In Visual Studio, Create a CAB setup program. Once the project has been created, there is a place in there to specify a shortcut to the Programs menu. This shortcut can have an icon associated with it. You edit this in the filesystem editor for the CAB setup program. Build the CAB project and then run it on the PDA. When your CAB gets installed on the PDA it will place the icon into the special Programs folder as you expect.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
1.Wanted to receive the events,same like buttons.As my form is very small and needs to handle many events, I wants to use softkeys to reduce some buttons.
2.Wanted to make the form more colorful.Its Ok I managed to change the backcolor property.
3.Yes,I wanted to terminate the code by explicitly mentioning Applicatio.Exit but its just hanging,is there any other way to kill the process safely(programmatically)?
4.Yes,I have tried CAB program, but after successfully running in PDA,I just can't see my app in PDA?
Sorry for bugging you with so many doubts,thanks a lot.
|
|
|
|
|
1. I haven't tried this, but here is some code I found on the web: http://forums.devbuzz.com/tm.asp?m=38708&p=1&tmode=1[^]
2. Cool.
3. If your app is hanging after Application.Exit() gets called, then there is probably something else in your code keeping it from exiting. Are you using any threads or timers that aren't being terminated before trying to close the application? I have found that when I explicitly call Application.Exit(), it does in fact unload the app as I expect (or at least I've just assumed that and never checked to make sure ).
4. You will need to specify a shortcut in the "Start Menu" special folder. Take a look at this screenshot:
http://www.matthew-long.com/images/installer_properties.png[^]
You will also need to specify an icon for you application in the Application Properties like this:
http://www.matthew-long.com/images/app_properties.png[^]
Finally, you may want to soft reset your PDA. Icons get cached, so they need to be refreshed through a rest in order to show up correctly.
Let me know if you have further questions.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
Let me try again on number 1. You said Soft Keys and I'm thinking the whole time you meant hardware keys. Anyhow, here is a little tidbit I found this morning on soft keys in Windows Mobile 5.0:
Adding smart keys to an application is as simple as designing a menu. When designing your application, simply create a menu with only two choices. When the application executes, Windows Mobile 5.0 will map each menu choice to a soft key. Windows Mobile 5.0 automatically provides this behavior to any application containing a menu with one or two choices. Menus containing more then two choices are rendered as a traditional menu.
I haven't tested this, but I got it from here: http://msdn2.microsoft.com/en-gb/library/ms839548.aspx[^]
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
Thanks a lot for your replies.
3.Yes, I am using System.Threading.Timers which triggers CallBack function events every few secs(Certain time interval) which is communicating with the server.We are using Timer.Dispose when App is closing but it not seems to be working, the requests are still going to server,thatmeans timer is running at the background.
I have used IDisposable interface to dispose the object possesing Timer, but its throwing StackOver flow Exception on disposing which cannot be handled even by Catch block.
After trying all the ways, I finally decided to Kill the Process Programmitically,what do you say?
In .NetFramework there is also a method called Environment.Exit but I cannot find it in .NetCompactFramework.
Please advise me..
The link you have given in 1 (regarding softkeys),page cannot found is coming,please resend.
Thanks again
|
|
|
|
|
I know this is stating the obvious but are you stopping the timer first before trying to call dispose? (just want to make sure).
Honestly, I think you really need to track down the real issue rather than trying to kill the process. Something is not right in the app and I promise it will not benefit you to just ignore the problem and try to kill the process. That being said, if you really want to kill it, take a look at Process.Kill() here: http://msdn2.microsoft.com/en-us/library/system.diagnostics.process.kill(VS.80).aspx[^]
Here's a note from that page:
The Kill method executes asynchronously. After calling the Kill method, call the WaitForExit method to wait for the process to exit, or check the HasExited property to determine if the process has exited.
I am not familiar with Envrionment.Exit(). You'll probably have to use something else, though, since it is not available in the compact framework.
And as far as the link in #1 goes, don't worry about it. If you see my previous post (where I respond to myself), you'll see that I was sending you to look at a link about hardware keys, not softkeys.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
Hi perlmunger
Thanks a lot for your advises,they are very useful for us , I will avoid using Kill method and try to trace out the wrong thing in my App.
I will get back to you if any doubts.
Thanks
Aruna
|
|
|
|
|
1. There is codeproject article on capturing hardware key events.
2. You can add a background image to a form by overriding the paint event and using GDI to draw a bitmap on the form. I do this.
3. me.close, then application.exit
If you still have the problem use the debugger to see if the application is hanging during the form's dispose event and determine which object is causing the problem.
|
|
|
|
|
I develop own SIP (Soft Input Panel) which should have an opportunity to recognize the symbols drawn on all screen. Like Transcriber, but only for separate symbols. Has collided with 2 problems:
1) Interception of mouse events (can't set global hook)
2) If to draw on screen: GetDC(0)... after drawing it is impossible to refresh screen.
First method (I also tried to use NULL instead of GetDesktopWindow() in all methods)
#define SetWindowRedraw(hwnd, fRedraw) \
((void)SNDMSG(hwnd, WM_SETREDRAW, (WPARAM)(BOOL)(fRedraw),0L))
SetWindowRedraw(GetDesktopWindow(), TRUE);
RedrawWindow(GetDesktopWindow(), NULL, NULL, RDW_INVALIDATE |RDW_UPDATENOW |RDW_ALLCHILDREN);
Second method:
InvalidateRect(GetDesktopWindow(),NULL,FALSE);
UpdateWindow(GetDesktopWindow());
Third method:
RedrawWindow(GetDesktopWindow(),NULL,NULL,RDW_INVALIDATE|RDW_ALLCHILDREN|RDW_UPDATENOW );
Whether there are other ways of realization of drawing and recognition on all screen? Thought above creation of a topmost window with copying a contained desktop, but it would be desirable, all the same to make similarly Transcriber
|
|
|
|
|
.cpp
In XXX_Init
...
ActivateKBHook(GetModuleHandle(NULL), LowLevelKeyboardProc);
...
Rest of code:
//globals
HINSTANCE g_hHookApiDLL = NULL; //handle to coredll.dll, where all the hook related APIs are present
HHOOK g_hInstalledLLKBDhook = NULL; //g_hInstalledLLKBDhook represents handle to the installed KB hook
//WINCEKBHOOK_API BOOL ActivateKBHook(HINSTANCE hInstance, HOOKPROC LLKeyboardHookCallbackFunction)
BOOL ActivateKBHook(HINSTANCE hInstance, HOOKPROC LLKeyboardHookCallbackFunction)
{
//we need to manually load these standard Win32 API calls
//MSDN states that these aren't supported in WinCE
SetWindowsHookEx = NULL;
CallNextHookEx = NULL;
UnhookWindowsHookEx = NULL;
//now load the coredll.dll
g_hHookApiDLL = LoadLibrary(_T("coredll.dll"));
if(g_hHookApiDLL == NULL)
{
//something is awfully wrong
//the dll has to be present
MessageBox(NULL, L"Can't Load coredll", L"Error", MB_OK);
return false;
}
else
{
//load the SetWindowsHookEx API call
//the SetWindowsHookEx function installs an application-defined hook procedure into a hook chain.
//You would install a hook procedure to monitor the system for certain types of events.
//here we use use the hook to monitor kyeboard events
SetWindowsHookEx = (_SetWindowsHookExW)GetProcAddress(g_hHookApiDLL, _T("SetWindowsHookExW"));
if(SetWindowsHookEx == NULL)
{
//this means that MS has really stopped supporting this API in WinCE
return false;
}
else
{
//install the KB hook
//the handle needs to be saved for default processing of the events and to uninstall the hook, once we re done with it
g_hInstalledLLKBDhook = SetWindowsHookEx(WH_KEYBOARD_LL, LLKeyboardHookCallbackFunction, hInstance, 0);
if(g_hInstalledLLKBDhook == NULL)
{
MessageBox(NULL, L"Can't Set Hook", L"Error", MB_OK);
return false;
}
}
//load CallNextHookEx() API call
//the CallNextHookEx function passes the hook information to the next hook procedure in the current hook chain.
//we use this call for default processing of events.
CallNextHookEx = (_CallNextHookEx)GetProcAddress(g_hHookApiDLL, _T("CallNextHookEx"));
if(CallNextHookEx == NULL)
{
MessageBox(NULL, L"Can't Call Hook", L"Error", MB_OK);
return false;
}
//load UnhookWindowsHookEx() API
//the UnhookWindowsHookEx function removes a hook procedure installed in a hook chain by the SetWindowsHookEx function.
//we use this call to unistall the hook.
UnhookWindowsHookEx = (_UnhookWindowsHookEx)GetProcAddress(g_hHookApiDLL, _T("UnhookWindowsHookEx"));
if(UnhookWindowsHookEx == NULL)
{
MessageBox(NULL, L"Can't Unhook Hook", L"Error", MB_OK);
return false;
}
}
//all the APIs are loaded and the application is hooked
return true;
}
//WINCEKBHOOK_API BOOL DeactivateKBHook()
BOOL DeactivateKBHook()
{
//unload the hook
if(g_hInstalledLLKBDhook != NULL)
{
UnhookWindowsHookEx(g_hInstalledLLKBDhook);
g_hInstalledLLKBDhook = NULL;
MessageBox(NULL, L"Unhooked Hook", L"Error", MB_OK);
}
//unload the coredll.dll
if(g_hHookApiDLL != NULL)
{
FreeLibrary(g_hHookApiDLL);
g_hHookApiDLL = NULL;
MessageBox(NULL, L"Unloaded DLL", L"Error", MB_OK);
}
//we have terminated gracefully
return true;
}
/****************************************************************
WH_KEYBOARD_LL hook procedure
****************************************************************/
LRESULT CALLBACK LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
{
MessageBox(NULL, L"Callback", L"key", MB_OK);
CHAR szBuf[128];
HDC hdc;
static int c = 0;
size_t * pcch = 0;
HRESULT hResult;
if (nCode < 0) // do not process message
return CallNextHookEx(g_hInstalledLLKBDhook, nCode,wParam, lParam);
hdc = GetDC(NULL);
hResult = StringCchPrintf(CA2W(szBuf), 128/sizeof(TCHAR), L"KEYBOARD - nCode: %d, vk: %d, %d times ", nCode, wParam, c++);
if (FAILED(hResult))
{
// TODO: write error handler
}
hResult = StringCchLength(CA2W(szBuf), 128/sizeof(TCHAR), pcch);
if (FAILED(hResult))
{
// TODO: write error handler
}
MessageBox(NULL, CA2W(szBuf), L"key", MB_OK);
ReleaseDC(NULL, hdc);
return CallNextHookEx(g_hInstalledLLKBDhook, nCode, wParam, lParam);
}
In the header .h
#ifndef _WINCE_KB_HOOK_H
#define _WINCE_KB_HOOK_H
//used for passing to SetWindowsHookEx funtion to set a Low level (LL) keyboard hook
#define WH_KEYBOARD_LL 20
// Define the function types used by hooks
typedef LRESULT (CALLBACK* HOOKPROC)(int code, WPARAM wParam, LPARAM lParam);
typedef HHOOK (WINAPI *_SetWindowsHookExW)(int, HOOKPROC, HINSTANCE, DWORD);
typedef LRESULT (WINAPI *_CallNextHookEx)(HHOOK, int, WPARAM, LPARAM);
typedef LRESULT (WINAPI *_UnhookWindowsHookEx)(HHOOK);
// For the low level keyboard hook, your keyboards procedures is passed a pointer to KBDLLHOOKSTRUCT instance
typedef struct {
DWORD vkCode;
DWORD scanCode;
DWORD flags;
DWORD time;
ULONG_PTR dwExtraInfo;
} KBDLLHOOKSTRUCT, *PKBDLLHOOKSTRUCT;
// Win32 Hook APIs
static _SetWindowsHookExW SetWindowsHookEx;
static _UnhookWindowsHookEx UnhookWindowsHookEx;
static _CallNextHookEx CallNextHookEx;
//WINCEKBHOOK_API BOOL ActivateKBHook(HINSTANCE hInstance, HOOKPROC LLKeyboardHookCallbackFunction);
BOOL ActivateKBHook(HINSTANCE hInstance, HOOKPROC LLKeyboardHookCallbackFunction);
//WINCEKBHOOK_API BOOL DeactivateKBHook();
BOOL DeactivateKBHook();
#endif
|
|
|
|
|
We are using SHNOTIFICATIONDATA to show icon on the upper toolbar on Windows
Mobile 5. But we can't find out how to send a message to our window when we
click on the icon, without showing any pop-up window.
Our code:
SHNOTIFICATIONDATA* pNotification = NULL;
HICON hIconn = NULL;
hIconn = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
pNotification = (SHNOTIFICATIONDATA*)malloc(sizeof(SHNOTIFICATIOND ATA));
pNotification->dwID = ICON_ID;
pNotification->clsid = guidPPCAlertsApp; npPriority = SHNP_INFORM;
pNotification->csDuration = 10; hwndSink = m_hWnd; pszHTML =
pNotification->_T("...");
pNotification->hicon = hIconn;
pNotification->cbStruct = sizeof(SHNOTIFICATIONDATA); pszTitle =
pNotification->TEXT("Application name"); grfFlags = SHNF_STRAIGHTTOTRAY;
SHNotificationAdd( pNotification );
!??
|
|
|
|
|
Can sm one tell me which on is better from the programmer's point of view, using SIP or H.323 or the combination of these, considerig feasibility aspect in wireless communication?
sumit
|
|
|
|
|
Hi, I need to work with an old database which I think is CEDB (.vol file), I'm developing in VS.Net 2005 (VB) and just need to do some basic bits. I have no idea what I'm doing!!! Any help whatsoever would be very much appreciated.
|
|
|
|
|
Hi guys
have been asked to do some maintenance on a mobile app in VS 2005
when i build and runthe app the emulator fires up and reports the following error
"This application (Mytestapp.exe ) requires newer version of the Microsoft .net compact framework than the version installed on this device"
is there a fix for this?
i tried getting the .NET Compact Framework 2.0 Redistributable however it wont install onthe PC when it has VS 2005 on it (!)
how do i work around this issue as i dont have a physical device to use?
cheers
Bryce
|
|
|
|
|
Dear Bryce - read the interweb
f you have VS 2005 installed and are developing the app then just connect to the device in VS and deploy it. Make sure your project properties has the
"Deploy the latest version of the .NET Compact Framework (including service packs)" checked. It is found under "Devices".
cheers
Bryce
|
|
|
|
|