How do I create an InputPanel Controll during Runtime? - Windows Mobile Software Development

Hello Friends,
My problem is I developed an App which runs on Windows Mobile as well as on the Desktop with the same exe and now change of Code.
With an if clause i check if the App is running on Desktop. In this case I change the Controlls Locations a bit and the AppRootPath.
In Addition I now want to resize and relocate the Textboxes if SoftInputPanel is enabled.
This can be easy achived by adding an InputPanel Control from Toolbox and using its OnEnableChange Event.
BUT if I include an InputPanel Control in my Project, its not deployable on the Desktop anymore.
So I triet to create the InputPanel Control only if the if clause checkt that the envirement is not a pc.
But I didnt managed that.
Anybody a clue how to?
Thx, Bignose

The first thing that springs to mind is to use 2 assemblies that you can call from the application - 1 for desktop apps and 1 for mobile apps. That way, the main application would have no dependancies on .NetCF controls.
For example...
Code:
MyAssembly.ObjectWithGenericInterface.UpdateForm(this)
You would have an assembly with a class that implements a generic interface, and that interface has an "UpdateForm" method. You create 2 different assemblies that are mostly identical - one for desktop and 1 for mobile. You then simply deploy a different "MyAssembly", depending on the target platform, but it will rely on neither when you build the application.
Edit:
You wouldn't actually need a generic interface to implement from, as long as the class inside the 2 assemblies actually had the same public methods available.

Thanks for your idea.
Am I understanding this right I would have to create to complete new GUIs?
At the Moment the Differences are small:
Code:
If Environment.OSVersion.Platform <> PlatformID.WinCE then
Me.Width = 256
Me.Height = 484
XMLPath = Strings.Right(XMLPath, (Strings.Len(XMLPath) - 6))
PbContact.Visible = False
TbNumber.Width = 202
Me.MaximizeBox = False
Me.MinimizeBox = True
End If
If I could create the InputPanel Control with an EventHandler in this Block the Application should run on both Desktop and PDA, right?
Is there no way?

AgentBignose said:
Thanks for your idea.
Am I understanding this right I would have to create to complete new GUIs?
Click to expand...
Click to collapse
No - only 1 GUI, the way you are currently doing it.
The application solution would not include any .NetCF assemblies, as they would only need to be referenced in the assembly that gets used by the windows mobile app.
So you'd have a deployment solution for the desktop version, and then a deployment solution for the windows mobile version. The windows mobile deployment would include the assembly that has references to the .NetCF (SIP, and any other controls you may need to use). That would be the only difference between the MSI and the CAB that you'd end up with.
I hope that makes sense. It's actually quite a simple idea, but a bit difficult to explain.

I think I understood you.
I leave the code as is.
But at the point where I want to create the SIP Control I dont do this directly, but I create a new .dll assembly which I creates the InputPanel and use this assembly.
Nevertheless I dont know how to create the InputPanel in the Assembly.
I hope I dont bother you to much, in that case please excuse me.

AgentBignose said:
I think I understood you.
I leave the code as is.
But at the point where I want to create the SIP Control I dont do this directly, but I create a new .dll assembly which I creates the InputPanel and use this assembly.
Nevertheless I dont know how to create the InputPanel in the Assembly.
I hope I dont bother you to much, in that case please excuse me.
Click to expand...
Click to collapse
No bother mate.
You need to add a reference to...
Code:
Microsoft.WindowsCE.Forms
and you create the input panel with...
Code:
Microsoft.WindowsCE.Forms.InputPanel sip = new Microsoft.WindowsCE.Forms.InputPanel();
Hope that helps mate

johncmolyneux said:
No bother mate.
Click to expand...
Click to collapse
Thats nice. Thanks.
You need to add a reference to...
Code:
Microsoft.WindowsCE.Forms
and you create the input panel with...
Code:
Microsoft.WindowsCE.Forms.InputPanel sip = new Microsoft.WindowsCE.Forms.InputPanel();
Click to expand...
Click to collapse
I did that.
But how Can I now use the OnEnableChange Event?
I only know the way over deklaring it as Friends With, but I dont manage this in runtime.

AgentBignose said:
Thats nice. Thanks.
I did that.
But how Can I now use the OnEnableChange Event?
I only know the way over deklaring it as Friends With, but I dont manage this in runtime.
Click to expand...
Click to collapse
I just noticed that you're using VB, so I can't really help with coding the event handler for you, but this page might help...
http://www.thescarms.com/dotnet/eventhandler.aspx

Related

Any news about accelerometer API?

Hi,
where could i find the API/SDK for the accelerometer, because i would develope an an application (.net cf) which should use the g-sensor.
no ideas?
Take a look at this application, maybe you can contact the author. I don't know if any API/SDK is used, but it is the first program I have seen wich uses the accelerometer:
http://forum.xda-developers.com/showthread.php?t=403939
Thanks, but he don't want to tell us, how they did it.
The authors of GSen won't tell anybody how he did it.
It's a commercial software house... someday they will surely try to sell that utility or develope some commercial applications and games using Diamond's accellerometer.
I presume they reverse engineered Teeter or Opera to find out how it works.
At moment, we keep the infos for several reasons.
GSen is " freeware ", no need to change the status.
CharlyV said:
At moment, we keep the infos for several reasons.
GSen is " freeware ", no need to change the status.
Click to expand...
Click to collapse
Great software ya got there.
Just a feedback.. it's a real pain to edit the config file.
The save function on the device doesnt work. It's like the same function as "restore to default". I had a number of apps there and all gone when I clicked saved. Undo doesnt seem to work either.
Looks like I gotta do the hard way.. check for the window names and edit the config file on PC manually.
Checkout OnDeviceTilt...
After a lot of searching and disassembling manila.exe, etc. i figure out, that we have to use "HTCSensorSDK.dll" in Windows-Directory.
There are functions like "HTCSensorOpen", "HTCSensorClose", etc.
The problem is, that I don't know the parameters of these functions, and HTC won't answer on emails.
sushilange said:
After a lot of searching and disassembling manila.exe, etc. i figure out, that we have to use "HTCSensorSDK.dll" in Windows-Directory.
There are functions like "HTCSensorOpen", "HTCSensorClose", etc.
The problem is, that I don't know the parameters of these functions, and HTC won't answer on emails.
Click to expand...
Click to collapse
the HTCSensorSDK is the Light Sensor not the Accelerometer API, you should disasm the "Teeter" game on the Diamond to see what API's its using
HTCSensorSDK is the API for the accelerometer. I attached a debugger to the teeter app and verified it was one of the loaded modules. There were no other relevent DLLs loaded.
Walsheiu is definitely wrong:
http://scottandmichelle.net/scott/comments.html?entry=784
Scottandmichelle.com figured out the function paramters to the G-Sensor API and released the full source code. It is using HTCSensorSDK.dll.
Koush said:
Walsheiu is definitely wrong:
http://scottandmichelle.net/scott/comments.html?entry=784
Scottandmichelle.com figured out the function paramters to the G-Sensor API and released the full source code. It is using HTCSensorSDK.dll.
Click to expand...
Click to collapse
no worries, i stand corrected, i assumed that was only for the Sensor, so now we know.
I have written a managed wrapper that allows you to access the HTC Sensor SDK easily. More information here:
http://blog.enterprisemobile.com/2008/07/using-htc-diamonds-sensor-sdk-from-managed-code/
Koush said:
I have written a managed wrapper that allows you to access the HTC Sensor SDK easily. More information here:
http://blog.enterprisemobile.com/2008/07/using-htc-diamonds-sensor-sdk-from-managed-code/
Click to expand...
Click to collapse
very nice work mate....
Just out of curiosity, which kind of applications - games - tweaks or what so ever can we expect with this accelerometer?
Diamond WII bowling ?

CHome Visual Editor

has anyone in this thread ever used this program?
ive downloaded and tried messing around with it, but im not completely sure what i need to do to make a theme with it.
is there anyone that can help me and explain how to use this program?
smjfosho said:
has anyone in this thread ever used this program?
ive downloaded and tried messing around with it, but im not completely sure what i need to do to make a theme with it.
is there anyone that can help me and explain how to use this program?
Click to expand...
Click to collapse
I've never messed with it but you have sparked my interest... I'm downloading it and gonna start messing around with it
jdshifflett said:
I've never messed with it but you have sparked my interest... I'm downloading it and gonna start messing around with it
Click to expand...
Click to collapse
alright, thank you very much.
i have a feeling that if we learn how to use this, many amazing skins can be made for our excaliburs.
I have downloaded it...initially tried to use it to make a preliminary of my Horizon Skin (which i hope to release soon). I found that it isn't (for me atleast) worth the effort.
Maybe I am just a super-noob with it, but I found it confusing and hard to actually design panels. It didn't work by the basis of centering the main panel or putting the active panel at the top...it was more like the screen was all active panels and I would have to scroll to each one. I found it annoying, but that is my take.
If someone can figure out how to efficiently use this program, then i saw more power to them, and maybe i will try this program again.
A few notes:
-Always exit correctly, sometimes it gives an error the next time starting
-Be sure to put your Bronzeres.dll in the WINDOWS folder there (it'll add some images)
-You can replace the default background
-I think putting the cmhomeres.dll and cmhomeres.dll.0409.mui (or whatever the second is) adds some text too.
-Make a backup of your registry and put it in the windows folder, then load it (It'll enable the use of the DLL's)
Good luck! I hope to see some good progress
Cyclonezephyrxz7 said:
I have downloaded it...initially tried to use it to make a preliminary of my Horizon Skin (which i hope to release soon). I found that it isn't (for me atleast) worth the effort.
Maybe I am just a super-noob with it, but I found it confusing and hard to actually design panels. It didn't work by the basis of centering the main panel or putting the active panel at the top...it was more like the screen was all active panels and I would have to scroll to each one. I found it annoying, but that is my take.
If someone can figure out how to efficiently use this program, then i saw more power to them, and maybe i will try this program again.
A few notes:
-Always exit correctly, sometimes it gives an error the next time starting
-Be sure to put your Bronzeres.dll in the WINDOWS folder there (it'll add some images)
-You can replace the default background
-I think putting the cmhomeres.dll and cmhomeres.dll.0409.mui (or whatever the second is) adds some text too.
-Make a backup of your registry and put it in the windows folder, then load it (It'll enable the use of the DLL's)
Good luck! I hope to see some good progress
Click to expand...
Click to collapse
i had the same issue with all the active panels, but what i did was i deactivated all the panels and just started with changing around the clock panel, so that helped.
i guess im more noob than you lol, but where is the cmhomeres.dll things? and how do you use them with the program because all i did was import a .cpr file.
smjfosho said:
i had the same issue with all the active panels, but what i did was i deactivated all the panels and just started with changing around the clock panel, so that helped.
i guess im more noob than you lol, but where is the cmhomeres.dll things? and how do you use them with the program because all i did was import a .cpr file.
Click to expand...
Click to collapse
Hey... when I get home I will send you the files. . . they are located in the windows folder on your phone. The file contains system text, I don't know just how much if does... but it is worth putting in.... I hope to release the Horizon theme and others soon!!!
Cyclonezephyrxz7 said:
Hey... when I get home I will send you the files. . . they are located in the windows folder on your phone. The file contains system text, I don't know just how much if does... but it is worth putting in.... I hope to release the Horizon theme and others soon!!!
Click to expand...
Click to collapse
alright thanks very much,
i know how to import the .cpr but how do you import the rest?
smjfosho said:
alright thanks very much,
i know how to import the .cpr but how do you import the rest?
Click to expand...
Click to collapse
I believe on the tools menu it has all the options "import registry" and "set background"....besides that, it reads the DLL files AUTOMATICALLY...
attached is CMhomeres
Cyclonezephyrxz7 said:
I believe on the tools menu it has all the options "import registry" and "set background"....besides that, it reads the DLL files AUTOMATICALLY...
attached is CMhomeres
Click to expand...
Click to collapse
awesome thank you very much, ill get to messing with it tomorrow.
again thank you, if i make a cool theme youll be the first to test it if you want
I need ths program "CHome" please give me a link ....
http://forum.xda-developers.com/showthread.php?t=525499
there you go
Cyclonezephyrxz7 said:
I believe on the tools menu it has all the options "import registry" and "set background"....besides that, it reads the DLL files AUTOMATICALLY...
attached is CMhomeres
Click to expand...
Click to collapse
i downloaded the CMhomeres you attached, but when i go to import the registry
it asks for files called .rgu or .reg, what are those?
I want CHome for 6.1 kavana rom, please give me a link
CHome is only with 6.5 roms
smjfosho said:
CHome is only with 6.5 roms
Click to expand...
Click to collapse
nooo I had it
I want to edit sliding panel
windows mobile 6.1 doesnt have CHome
smjfosho said:
windows mobile 6.1 doesnt have CHome
Click to expand...
Click to collapse
It actually does we just didn't name it that, but WM6.5 has suddenly become CHome and will be the reason how much users will know it as that.
Original Config - CHome Configurator for WM6.1: Version 1.1.0.5 FINAL (UPDATED - 2008/07/11)
CHome Refresh another tool we used to make the homescreen refresh.
But anyway the only way to get it is to flash 6.1 or 6.5 not available as .cab.......
smjfosho said:
i downloaded the CMhomeres you attached, but when i go to import the registry
it asks for files called .rgu or .reg, what are those?
Click to expand...
Click to collapse
On your phone go to the start menu then to Accessories, and then click RESCO REGISTRY (that is where it is on my phone). Get to the point where you see only HKEY_LOCAL_MACHINE HKEY_CLASSES_ROOT and HKEY_CURRENT_USER or something like that...it is the highest you can go. Select all of those and select "export registry" (DONT FORGET TO SELECT ALL OF THEM). I kno the program doesn't use all of it, but it is safer that way (in my opinion)
once you make a theme what do you do after that?
how do you get it to your phone?
smjfosho said:
once you make a theme what do you do after that?
how do you get it to your phone?
Click to expand...
Click to collapse
Hmm...haha, I never got that far (didn't have the patience)
I would suppose there is a way on the FILE menu to save the CPR. Do so, then copy the CPR file to the Windows Folder on your folder.
Two notes:
1-The CPR file MUST be named (in this case for simplicity) titanium_320x240.cpr
2-BACKUP YOUR OLD ONE THAT IS ALREADY THERE!!!YOU DONT WANT TO LOSE THAT ONE!
Best of luck!

[REQUEST] How can i do it with C#?

Hi, i would like to now if there is an object in Visual studio 2008 with C# for have a list like htc messages, or how can make it.
Thanks!
I use WM Standard, so I am not so sure about Pro, but I know there is a List control. Instead of trying to add one of those and add a whole bunch of images, why don't you read up on it and make a new list, like messageList which will extend the List control. That way you can make each list object have its own box with gfx and a counter of how many msgs are in that area.
Sorry, that is the best I can think of off hand...try Google'ing it and maybe you will get results!!! (I think that Resco has some pre-made controls you can download and use...[other have it too])...
Cyclonezephyrxz7 said:
I use WM Standard, so I am not so sure about Pro, but I know there is a List control. Instead of trying to add one of those and add a whole bunch of images, why don't you read up on it and make a new list, like messageList which will extend the List control. That way you can make each list object have its own box with gfx and a counter of how many msgs are in that area.
Sorry, that is the best I can think of off hand...try Google'ing it and maybe you will get results!!! (I think that Resco has some pre-made controls you can download and use...[other have it too])...
Click to expand...
Click to collapse
Thanks for the answer, but resco controls is not free?
There are some free ones in this forum (SliderList Control, Sense SDK, Manila Interface SDK), hope they are what you're looking for .
Livven said:
There are some free ones in this forum (SliderList Control, Sense SDK, Manila Interface SDK), hope they are what you're looking for .
Click to expand...
Click to collapse
Hi! Thank you very much, Sense SDK could be interesting!
My problem could be the message count.. but i'll try it!

Program acts like a user? Can it be done?

Hi. I know Java and C# enough to write small programs and I'm very currius about that can I do something like this:
When I start a program it visually touches windows icon, then opens word mobile and types some word on it?
I mean, is it possible to make a program which acts like a user as it can be easily done in assembly language?
If the answer is yes, can please tell me where can I learn those comments and learn more about this?
Thanks
Any suggestions??Please??
AFAIK, it will be hard with JAVA...
But...
MortScript, a superb freeware, can do what you described, and more !
Check it at :
http://www.pocketpcfreeware.com/en/index.php?soft=1448
or directly at DEV's website : http://www.sto-helit.de/index.php?module=page&entry=ms_overview
YoLoLo said:
AFAIK, it will be hard with JAVA...
But...
MortScript, a superb freeware, can do what you described, and more !
Check it at :
http://www.pocketpcfreeware.com/en/index.php?soft=1448
or directly at DEV's website : http://www.sto-helit.de/index.php?module=page&entry=ms_overview
Click to expand...
Click to collapse
Thank you soooooo much This is what I'm looking for. Really, thank you
You're welcome !
Another way of doing it in code (C++) is to use SendMessage() or PostMessage() to send WM_KEYDOWN and WM_LBUTTONDOWN messages to the window in question.
In VB or C# use a Message class object to do it.
Auto Hotkey for WM should work too!
Never tried it out myself, haven't had a need for it yet.
But I use it for my PC all the time!

[Q] Remove smilie face on keyboard

Did anybody found a way to get rid of the smilie face on the sip? I hate it when typing an email for example since the spacebar gets really small when also having a multiple language keyboard. The smilie face is something nice for chat maybe but useless for emails. So is there a way to change the email SIP, probably in the registry to a SIP with the same functionality but without this smilie face?
Try this registry hack:
Code:
[HKEY_LOCAL_MACHINE\Software\Microsoft\FingerKB\InputScopeMap\{805d58c2-096a-4451-b2cb-40996fcb236d}\BaseButtons\lang_0409]
"IS_TEXT"="{013C8739-21A3-4c92-9773-75C0D1235299}"
[HKEY_LOCAL_MACHINE\Software\Microsoft\FingerKB\InputScopeMap\{805d58c2-096a-4451-b2cb-40996fcb236d}\BaseButtons\MultiLang\lang_0409]
"IS_TEXT"="{AD5985C6-6945-4475-885C-BDED65AA5CC1}"
denominator77 said:
Try this registry hack:
Code:
[HKEY_LOCAL_MACHINE\Software\Microsoft\FingerKB\InputScopeMap\{805d58c2-096a-4451-b2cb-40996fcb236d}\BaseButtons\lang_0409]
"IS_TEXT"="{013C8739-21A3-4c92-9773-75C0D1235299}"
[HKEY_LOCAL_MACHINE\Software\Microsoft\FingerKB\InputScopeMap\{805d58c2-096a-4451-b2cb-40996fcb236d}\BaseButtons\MultiLang\lang_0409]
"IS_TEXT"="{AD5985C6-6945-4475-885C-BDED65AA5CC1}"
Click to expand...
Click to collapse
this should be working, indeed. But unfortunately the registry editor just crashes up on modifying. Is there a way to make this into (reversible) .xap for samsung devices? I know these things exsist which modify the registry, but I have not found an open source one yet which I can modify to do this registry edit.
Thanks for the help!
Marvin_S said:
this should be working, indeed. But unfortunately the registry editor just crashes up on modifying. Is there a way to make this into (reversible) .xap for samsung devices? I know these things exsist which modify the registry, but I have not found an open source one yet which I can modify to do this registry edit.
Thanks for the help!
Click to expand...
Click to collapse
I'll make a special version of my Native Keyboard application for you in the evening. It will contain this patch in reversible form.
denominator77 said:
I'll make a special version of my Native Keyboard application for you in the evening. It will contain this patch in reversible form.
Click to expand...
Click to collapse
great thanks!
All language support btw? since i guess this will only be the english keyboard? Same code applies to the italian, etc. keyboards. I believe the values dont change only the folders.
Thanks a lot
Marvin_S said:
All language support btw? since i guess this will only be the english keyboard? Same code applies to the italian, etc. keyboards. I believe the values dont change only the folders.
Click to expand...
Click to collapse
This one is for english keyboard only. Do you need that for other languages too?
Hi Denominator77
Concerning these changes on the layout of the keyboards, I have a question. When I tried to write an e-mail address or a user name of the outlook / exchange configuration the space key is not available (instead of writing a space just move the position of the cursor). I do not know if just for this kinds of fields WM7 use another layout of the keyboard as the ',' is also not available. This is a problem because I need to write a space in my exchange user name as it has the format 'name surname'.
Do you think that it is possible to change the layout of this keyboard or do you build one which force the use of the spaces?
Thanks in advance for your help.
kata said:
Hi Denominator77
Concerning these changes on the layout of the keyboards, I have a question. When I tried to write an e-mail address or a user name of the outlook / exchange configuration the space key is not available (instead of writing a space just move the position of the cursor). I do not know if just for this kinds of fields WM7 use another layout of the keyboard as the ',' is also not available. This is a problem because I need to write a space in my exchange user name as it has the format 'name surname'.
Do you think that it is possible to change the layout of this keyboard or do you build one which force the use of the spaces?
Thanks in advance for your help.
Click to expand...
Click to collapse
Hi Kata. It does not seem to be a layout related issue. The space button is available in that mode. But the input field does not accept spaces.
As I know, user name cannot contain spaces. Maybe you are trying to enter your display name (Name Surname), not the system login. Try to enter your email address without @server part.
Hi denominator77,
Thanks for your answer, the user name has a space and I used with a lot of phones and PDA (windows mobile 5 ,6, 6.5; Android or Symbian) without problems, also the resto of my colleagues at my organization (for everybody user name has two words name and surname)
I think I am not the only one who are suffering, for instance : http://social.answers.microsoft.com...7/thread/3cd68f96-3037-4f57-ac6a-83bc030aeec6
Regards
P.S. Of course, I already tried to enter a lot of options as just the surname, name.surname, the complete e-mail address as username.
denominator77 said:
This one is for english keyboard only. Do you need that for other languages too?
Click to expand...
Click to collapse
cool thanks, took me a while to respond had exams.. do you have the source, than I can modifie it myself with the languages I use.
I think I have to flash a new rom anyway for my omnia since the push things are bugging me like crazy. I hope this will help and than I have to redo all the things again.
denominator77 said:
This one is for english keyboard only. Do you need that for other languages too?
Click to expand...
Click to collapse
Is it possible to make a native keyboard but with Dutch auto correction?
Marvin_S said:
do you have the source, than I can modifie it myself with the languages I use.
Click to expand...
Click to collapse
You can extract the xap and modify xml files.
Also look in the following topic: http://forum.xda-developers.com/showthread.php?t=917886
Maybe I already have implemented a keyboard for your language.
tbk21 said:
Is it possible to make a native keyboard but with Dutch auto correction?
Click to expand...
Click to collapse
No, it's not possible at the moment.

Categories

Resources