[2nd release]SenseSlider .NET CF Control 0.2 - Windows Mobile Software Development

Because the SenseSDK which is available at xda lacks a control for the HTC Slider I tried to create my own.
I finally fixed some bugs and changed a bit of the behavior and here is the first release version of my SenseSlider control.
The 2nd release is ready and stable. See Changelog for further info.
Features:
mimics HTC Slider
fully functional .net Control
does not depend on images for the bar background/slider thumb (drawn at runtime) and therefore allows different color-schemes
events for SelectedIndexChanged, StartedSliding, StoppedSliding, OnSliding (Gives thes index of the hovered icon)
supports vibration (aka haptic feedback)
includes a semi-transparent panel for overlay when sliding
does not depend on other control collections (SenseSDK only used for demo application; can be used with any other collection) (does not apply for new version, uses SmartDeviceFrameWork)
changes in the 2nd release:
uses the IImaging-Implementation of the SmartDevice-Framework and is now stable and more flexible (load the IImages with SDF in any way and add them to the slider)
supports an imagefile as slider thumb (see attached screenshot)
great speed improvement (fixed a bug which slowed drawing down)
made the source code of the demo application a lot more readable and understandable (or at least I hope so )
I uploaded a demo application to show some of the control's features. The source code for the demo is also available.
To use the Slider in your own applications just add the SenseSlider.dll and instantiate LunaticShade.SenseSlider (see the source of the demo application for details). (The new Version needs also the OpenNETCF Assemblies enclosed in the package or an installed version of the SmartDeviceFramework on the target device)
At this time the control cannot be drawn at designtime (due to heavy P/Invokes) but you can set the properties and events with the property editor.
Please report any bugs you may encounter.
If you got questions just ask

looks quite interesting. I will give it a try as soon as I can integrate in my apps (testing makes no sense - I also have HD2 )
keep on developing!
Obelix

Looks cool ! I'll try it as soon as a release is available !

Looks nice, not exactly like Sense (no vibration, no left-right/right-left gesture, if I tap&hold some icon and then swipe to left or right, the slider doesn't follow my finger), but good. Can't wait to be able to use it in my apps

first release,
see first post

That's VERY nice mate. I'm also particularly pleased that you used the Sense SDK interface in your demo, as I was considering using this slider in one of my apps that uses the Sense SDK heavily. I'm not considering it any more though - I'm all over it
I'm not currently at a dev machine and therefore can't really check out the control, so I do have one question that I may be able to answer if I looked in the IDE. Can you stop it changing page by sliding left and right on the page itself? I'd rather people had to use the slider to change page.
But yeah, very nice - thanks a lot!

I'm glad to hear that you like it.
johncmolyneux said:
Can you stop it changing page by sliding left and right on the page itself? I'd rather people had to use the slider to change page.
Click to expand...
Click to collapse
Actually it is the WinMo 6.5 TabControl which exposes this behavior. If you slide over a TabPage it changes the tab respectively, the senseslider then only reflects this action. So this is not the default behavior of the Slider (actually you could just set back the SelectedTab if it was not changed by the SenseSlider).

Ah fair enough. I didn't realise you'd used a tab control, but I guess that makes sense.
Thanks for the reply mate

nice control man.
i got 4-5 times a crash on the program. when i changed the button slider color, and stopped the vibration, then when i moved the slider fast from left to right, etc, an error occured.
overall nice work. i don't know if it is your icons, or the real time drawing, but the icons at the slider have a very bad quality. hope you can make the graphics much more similar to the HTC Slider looks
well done for a 0.1 version.

anyone knows what is wrong with this line?
Dim imageNames = assembly.GetManifestResourceNames().Where(Function(r) r.Contains("_b"))
i can't get the slider to work having a vb code. this slider needs so many things. i guess the reason that my slider is not working right now is because of the above code line, which returns me nothing, even though i have a picture which contains _b in the name

TeDeV said:
anyone knows what is wrong with this line?
Dim imageNames = assembly.GetManifestResourceNames().Where(Function(r) r.Contains("_b"))
i can't get the slider to work having a vb code. this slider needs so many things. i guess the reason that my slider is not working right now is because of the above code line, which returns me nothing, even though i have a picture which contains _b in the name
Click to expand...
Click to collapse
your resources have to be embedded. in the file browser of visual studio open the Resources folder (not the resx file!) select the images and in the property window change Build action to embed in resx.

i tried that, but when i add the image in the resources file, and choose the embed build action, i get errors
DividedByZeroException
stackTrace....
"σε LunaticShade.SenseSlider.Draw(Graphics g, Int32 x, Int32 y) σε LunaticShade.SenseSlider.Draw(Graphics g) σε LunaticShade.SenseSlider.OnPaint(PaintEventArgs e) σε System.Windows.Forms.Control.WnProc(WM wm, Int32 wParam, Int32 lParam) σε System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam) σε Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain) σε System.Windows.Forms.Application.Run(Form fm) σε PrimeKeys.Form1.Main() "
i also have a question.
how do you "connect" the senseSlider with the tabControl?
for example.... if i had two tabcontrols, how does the SenseSlider, knows which tabcontrol to bind?
i can't find that code in your sample.

TeDeV said:
i tried that, but when i add the image in the resources file, and choose the embed build action, i get errors
DividedByZeroException
stackTrace....
"σε LunaticShade.SenseSlider.Draw(Graphics g, Int32 x, Int32 y) σε LunaticShade.SenseSlider.Draw(Graphics g) σε LunaticShade.SenseSlider.OnPaint(PaintEventArgs e) σε System.Windows.Forms.Control.WnProc(WM wm, Int32 wParam, Int32 lParam) σε System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam) σε Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain) σε System.Windows.Forms.Application.Run(Form fm) σε PrimeKeys.Form1.Main() "
Click to expand...
Click to collapse
hm, that's strange. are you using pngs? did you set the IconSize Property of the senseslider? maybe a call of senseslider.updatevalues() in your constructor helps.
i also have a question.
how do you "connect" the senseSlider with the tabControl?
for example.... if i had two tabcontrols, how does the SenseSlider, knows which tabcontrol to bind?
i can't find that code in your sample.
Click to expand...
Click to collapse
actually the senseslider does not know that it controls a tabcontrol. It raises the event SelectedIndexChanged when the user selects an icon. In this event I activate the corresponding TabPage to be active.

yes but the corresponding tabpage of which tabcontrol?
if i have 2 tabcontrols, with 5-6 tabpages inside each tabcontrol, how does the slider knows, to which tabcontrol to bind? i don't get it.
i am creating the senseSlider dynamically. and this is my code...
senseSlider.Location = New System.Drawing.Point(0, 554) '504
'senseSlider.Dock = DockStyle.Bottom
senseSlider.Size = New System.Drawing.Size(480, 84)
senseSlider.BackColor = System.Drawing.Color.FromArgb(CInt(CByte((239))), CInt(CByte((235))), CInt(CByte((239))))
senseSlider.BorderBaseColor = System.Drawing.Color.FromArgb(CInt(CByte((235))), CInt(CByte((235))), CInt(CByte((235))))
senseSlider.DarkBaseColor = System.Drawing.Color.Silver
senseSlider.DarkSliderColor = System.Drawing.Color.FromArgb(CInt(CByte((35))), CInt(CByte((35))), CInt(CByte((35))))
senseSlider.HapticFeedback = True
senseSlider.IconSize = New System.Drawing.Size(72, 72) '56,56
senseSlider.IconSpacing = 25
senseSlider.LightSliderColor = System.Drawing.Color.Silver
senseSlider.UpdateValues()
'=====================
anything wrong there?
ok i have figured it out. it is the IconSize! if i use other png images with different dimensions than yours, then i get that error, no matter what. i don't get it. what is 56,56? because none of your icons are 56x56

yes but the corresponding tabpage of which tabcontrol?
if i have 2 tabcontrols, with 5-6 tabpages inside each tabcontrol, how does the slider knows, to which tabcontrol to bind? i don't get it.
Click to expand...
Click to collapse
The senseslider does not bind to a TabControl it only informs you that the SelectedIndex was changed. In the event handler for SelectedIndexChanged you decide what to do then. That is which TabControl to refresh. If you do nothing, nothing will happen. (In the sample I subscribed to the SelectedIndexChanged event and change the SelectedIndex of the TabControl to the SelectedIndex of the Slider by code).
ok i have figured it out. it is the IconSize! if i use other png images with different dimensions than yours, then i get that error, no matter what. i don't get it. what is 56,56? because none of your icons are 56x56
Click to expand...
Click to collapse
The IconSize only says how big the Icons are drawn. If they are smaller or bigger they will be stretched. I don't know why this does not work but
i will try to figure this out.

Very nice. I've been wanting to write something similar for an app that I want to write. You've just saved me a boatload of work! Thanx!
One issue that I saw though; when the app starts up, the ons screen keyboard icon is displayed over the slider. Opening and closing the keyboard hides the icon. Is there a way to have the application hide the keyboard icon on startup?

the slider must be able to DOCK = bottom.
if i have an app which rotates, then i can't use the height thing, in order to anchor.
and depending on the pda resolution the height will be different. and you have to consider that people want menu bar at the bottom, and not just the slider. so it is difficult to have this without dock = bottom.
thanks

TeDeV said:
the slider must be able to DOCK = bottom.
if i have an app which rotates, then i can't use the height thing, in order to anchor.
and depending on the pda resolution the height will be different. and you have to consider that people want menu bar at the bottom, and not just the slider. so it is difficult to have this without dock = bottom.
thanks
Click to expand...
Click to collapse
But that's a very simple thing to manually code, so not an issue. It would be good to not have to code it though, so docking would be nice.
Edit:
Actually, forget coding. Just anchor it in a panel that's docked to the bottom of your form.

cool. thx for you job.

Wow
Fantastic work - really looking forward to seeing this develop. It's so frustrating that HTC don't just release this stuff so that the developers here can make the phone shine compared to android and iphone - the standard winmo controls are so 1980s !
Cheers
Ian

Related

How To: Customize the Sliding Panels Homescreen

This was from the windows mobile team blog. More to follow but wanted to post it for those who don't read that.
Original link: http://blogs.msdn.com/windowsmobile/archive/2008/06/03/customizing-the-sliding-panel-homescreen.aspx
Customizing the Sliding Panel Homescreen
from Windows Mobile Team Blog by Jorge Peraza
Hi, my name is Jorge Peraza; I am a Developer on the Windows Mobile team that was responsible for the new “Sliding Panel” home screen in Windows Mobile 6.1.
When we were working on the visual style and functionality of the home screen we tried to make something that looked both professional and appealing while still showcasing all the information the user is going to need to know what’s important and requires attention. While I think the default design looks really cool, we added some customization features to enable users to make it their own.
Customizing the layout
The home screen layout can be modified using the same home.xml file from previous versions of WM, the schema of the file was extended to allow the customization of many of its elements, this includes the art assets that are used for most of the plug-ins.
When you open the SlidingPanel.home.xml file (inside \ApplicationData\Home) you will find the plug-in element that corresponds to the sliding panel home screen (its CLSID is {E9267CAB-02EE-4f37-8216-6BF6A8FF5A71}). All the child elements inside it are designed to tweak and customize the way the home screen will look.
The top level element is the plugins tag, this has one attribute called “Order” and it’s used to list the plug-ins that will be shown and the order they are going to be laid out on the screen.
The built in plug-in names are:
1)CClock – The big clock
2)CAppointments - The calendar plugin
3)CHome – The notifications plugin
4)CMyPhotos – The photos plugin
5)CMessage – The message center (this is off by default on all sliding panel built in layouts.
6)CMusic – The music plugin
7)Settings – The settings plug-in
8)Custom Plugin – Users can specify custom plug-ins with static content that can be displayed on the home screen.
For example, the XML snippet bellow moves the photos plug-in to the first position and enables the message center (which is turned off by default on both "Sliding Panel" and "Sliding Panel Media")
<plugin clsid="{E9267CAB-02EE-4f37-8216-6BF6A8FF5A71}" name="Bronze" height="266">
<Plugins Order="CMyPhotos;CClock;CMessage" />
</plugin>
There are many other ways of customizing the home screen using the plug-in settings like overriding the default images or even adding your own custom plug-ins that display static content, I'll post and updated entry latter on on how to do this in detail but for now, you can use the provided home.xml files to start experimenting with this.
The notifications plug-in and message center
In the sliding panel home screen, the notifications plug-in by default serves as a dual-purpose notifications/gateway to all you phone/message accounts where every page represents one account (so, if you have multiple notifications in one category they will be shown as one summary page).
There is however an alternative behavior where individual notifications are added as independent pages (Similar to what the T-Mobile shadow home screen does) and the plug-in only shows accounts that have new notifications in them. One cool feature of this alternate behavior is that each individual notification can be dismissed without having to leave the home screen.
You can enable this alternative behavior by setting the following registry key to a value other than 2 (The actual value indicates how many pages of each notification type will be added to the home screen before collapsing them into a summary page. We have tested 2 and 5 but feel free to experiment with other values)
[HKLM\Software\Microsoft\Chome\Chome]
PageCollapseThreshold: DWORD
Note that this prevents you from being able to access the email/phone account data if there are no notifications for it. If you still want to be able to do that you can always re-enable the message center as described in the previous section as a separate plug-in.
There is one more behavioral change you can make that allows you to “dock” the condensed view of the first plug-in to the top of the screen when it is not active, we added this for people like me that want to have the clock always visible. To enable just set the following registry key to “1”
[HKLM\Software\Microsoft\Chome]
DockOperatorBar: DWORD
Advanced layout modification
There are even more advanced things you can do to further tweak the look of the home screen but it is unsupported by Microsoft at this moment so you’ll have to experiment on your own J (Hint, look at the following files \windows\CHome_240x320.cpr and \windows\CHome_320x240.cpr).
----------------------------------------------------------------------------------------------------
Thanks to djNutz for posting this information & OrganicM for his efforts.
I wanted to create a post with info about what the different keys do in the CHome section of the registry. So, I'll start with a brand new one, that I bet nobody knows about....
[HKLM\Software\Microsoft\Chome\Chome]
PageCollapseThreshold: 2 or 5 (DWORD Value)
This will collapse your Notifications panel to only show active notifications. You can enable this alternative behavior by setting the following registry key to a value other than 2 (The actual value indicates how many pages of each notification type will be added to the home screen before collapsing them into a summary page. 2 and 5 were tested and work pretty well.
More to come of course....
should this change be made to the security section too, or does that matter? actually, do changes to the security section ever matter, cause they seem to apply even when you only edit the software section.
p.s.
i'm pretty sure people are gonna ask, so maybe i'll save some trouble instead of looking like an ass by answering preemptively. This DWORD value must be created with your registry editor, it's not already there, at least on ricky v24.
2 = default or normal (i assume cause it looks the same as before) and 5 = condensed.
But for the rest of us who don't have the time to be on every WM blog and forum at once here's my favorite:
To “dock” the condensed view of the first plug-in to the top of the screen when it is not active, set the following registry key to “1”
[HKLM\Software\Microsoft\Chome]
DockOperatorBar: DWORD
This is so you can have the clock always visible, no matter which panel you're on. You could also set it so that CHome Weather's compact view is always on top. Whatever plugin is first on the list.
More info from MS coming down the pipe:
We can get the day of the week on the clock plugin at the top of CHome by doing this:
Replace this portion...
<!-- Date --> <Text ID="Date" Left="180" Top="83" Width="110" Height="19" FontFamily="Segoe Condensed" FontSize="9" FontStyle="Bold" Wrap="False" HorizontalAlignment="Left" Trimming="EllipsisCharacter"></Text>
With this!
<!-- Date -->
<Text ID="Date" Left="180" Top="83" Width="110" Height="19" FontFamily="Segoe Condensed" FontSize="9" FontStyle="Bold" Wrap="False" HorizontalAlignment="Left" Trimming="EllipsisCharacter"></Text>
<Text ID="Day of Week" Left="65" Top="83" Width="110" Height="19" FontFamily="Segoe Condensed" FontSize="9" FontStyle="Bold" Wrap="False" HorizontalAlignment="Right" Trimming="EllipsisCharacter"></Text>
I will incorporate this in Chome Weather fore sure!
Here you go, the first is my Home
2nd is Scroll Down once
3rd is Scroll Down twice
4th is Scroll Down Thrice
heh
Edit: Tried Month in cpr, no luck.
will keep trying
I'm glad people are finally getting this information out. It makes customization that much easier. I'm adding the tips to the wiki as well, as they come out.
How to Reload the Homescreen
I have two questions:
1. After editing my CHome cpr file, how do I reload the homescreen without having to reboot the device?
2. How can I show any text on the clock panel? Regular text is defined by Text ID = "xxxxx", where xxxxx is something like Time, Network Name, etc. However, suppose I want to have the text "Knowledge Rules", how do I set it up in XML?
I have very little programming and Excalibur experience. So, I apologize if these questions are too naive or have been answered before.
Thanks a lot in advance.
you can use this if you dont use OrganicM Chome Weather
I don't think Microsoft has put out much documentation on the sliding panels plugin yet. Most of the CHome configurations use
Code:
TextID="text 1"
as the delimiter for static text. But that's not to say that the clock plugin will recognize that as a valid section. Could work. Could make your phone useless.
beartard said:
I don't think Microsoft has put out much documentation on the sliding panels plugin yet. Most of the CHome configurations use
Code:
TextID="text 1"
as the delimiter for static text. But that's not to say that the clock plugin will recognize that as a valid section. Could work. Could make your phone useless.
Click to expand...
Click to collapse
I do not understand. How do I make the phone know that:
text 1 = Knowledge Rules?
Typical syntax seems to be Text ID = "xxxx", where xxxx is a variable name, which is recognized by the device. If Text 1 is a valid variable for the device, how do I assign it a value? Am I rambling here?
No, you're not rambling. As far as the information coming from Microsoft and disseminated here on this site goes, it's a best guess right now.
someone at msdn blog asked the same question.
Someone at msdn blog asked the same question. Let's wait to see if we get an answer from there...
From http://blogs.msdn.com/windowsmobile...ustomizing-the-sliding-panel-homescreen.aspx:
"Jorgeba, thanks for taking the time to educate your user. I have some questions.
How do you change the text in the condense clock? The .cpr file has Text ID="Text 1". How is "Text 1" define? I would love to add the date to the condense layout.
The ActionURL and Softkey2 URL in the Appointments plug-in always open calendar in the today view. Is there a way to make one of the button opens calendar in the month view? Setting the default view for calendar does not help."
Easy as pie......
If you know what you are doing.
If you have any xml experience,then you'll know how to adjust x and y values to position things in different places. Yes, you can do that. Just change x=whatever and y=whatever to where you would like them to be. Just know this means that it will start on the left and move x pixels over and y pixels down. If you put in negative values, it will shift them in the opposite direction.
Eg. x=-whatever will move it to the left vs a + value which will move it to the right. Same for y=
Also, you can adjust the valignment and halignment to center, left, or right.
Have fun with these. They apply to everything in your cpr (That's the layout for your homescreen.It's in your \Windows directory on your phone).I mean everything, from where your network displays, right down to your pictures.
That's it. Have fun!
jaymit said:
Hi,
Sorry Im kind of a newbie :s, is it possible to edit home screen panels? I wanted to change the layout and look of the clock plugin.
Thanks!
Click to expand...
Click to collapse
Does anybody know how to change font color for certain panels or certain lines of text in the panel? Is it only possible for the whole homescreen?
As far as I know even as far as old xml coding works, you can only change a font color for a selected word or unselected word. Meaning, if you have the old 6.0 your plugins that are selected could have a different color, but unselected could be another color. This applied to the entire homescreen. I have not seen different colors for different plugins, since each panel style is basically its own plugin (each has its own unique GUID), then I doubt you can change font color for each plugin. You can more than likely only change the active selected panel and inactive panel fonts. I am not sure what their titles are in the cpr, but I know that in the old 6.0, the homecolor was one of the fonts colors and the other was called something else.
Eventhough this is 6.1, it doesn't look like much has changed as far as the fonts color goes. You could, however, always try adding a "fontcolor=" command in the cpr and a hex code and try it, to see if it works.
Hope this helps.
Edit your registry or get CHome Config
Both do the same thing. You want to change the plugin order for CHome. It's located in HKLM\Security\CHome\Default Settings and in HKLM\SOFTWARE\Microsoft\CHome. Edit the order you want your plugins to go. Reboot your phone and the new edits should be reflected in your homescreen layout. If you are having trouble cause this is new. Just search this thread for CHome Configurator. It's stickied at the top of this forum. Download it and it will let you select the order in a much easier way. Make sure you reboot, though, or else your changes won't show. Hope this fixes your problem. Later.
tae-xda said:
How to change the default location for where the CMyPhotos plugin
Click to expand...
Click to collapse
rollingondubs1 said:
I have that already, All my games are under a folder which i cant make it as a action url
Click to expand...
Click to collapse
try this
"ACTIONURL" = "\Windows\Start Menu\Games\xxxxx xxxx.lnk
or this
"ACTIONURL" = "\windows\fexplore.exe; \windows\start menu\games"
Yes you can
One last time, I think I've figured out how to help you.
1. Open Chome Config.
2. Scroll to MyApplication and select it with your center button.
3. Scroll to any page you want to edit. Then scroll down to where it says ActionURL. Press menu.
4. Once in the menu select the "1 Change URL" item.
5. Once you have selected that it will take you to a file explorer. Go to \Windows\Start Menu\Games. This is where your games should be. If not, then wherever you store, your games, navigate yourself to that folder and select the file you want.
I think this should cover it. Hope this solved your problem. HOLLA!!!!
rollingondubs1 said:
I have that already, All my games are under a folder which i cant make it as a action url
Click to expand...
Click to collapse
How to change the location of CMyPhoto to \Storage Card\My Documents\My Picturs

Windows Mobile 6.1 - Skinning of All UI Components - possible?

Hey All!
Have used search many many times, and tried searching Google, but can't find any result!!!
I have tried many Shell UI programs like ThrottleLauncher, Wisbar Advance, PointUI and SPB MobileShell. Of all these, SPB seems the most polished.
Whilst these apps manage to hide the ancientness that is WindowsMobile 6.1, it doesn't allow you to skin the scrollbars, buttons or dropdown menus. Can anyone think of a way to do this? Maybe something that does the same job as PalmRevolt does on Palm OS?
Surely it'd be a case of finding a program that can replace some icons / settings in the Windows Directory...
I'm keeping SPB Mobileshell too.. Its just that I'm resigning to the fact that I'll be stuck with WinMo6.1 on my Palm Treo Pro for quite some time!
Thanks all!
I'm still going to use SPB, but thought this woud
dr3wster said:
Hey All!
Have used search many many times, and tried searching Google, but can't find any result!!!
I have tried many Shell UI programs like ThrottleLauncher, Wisbar Advance, PointUI and SPB MobileShell. Of all these, SPB seems the most polished.
Whilst these apps manage to hide the ancientness that is WindowsMobile 6.1, it doesn't allow you to skin the scrollbars, buttons or dropdown menus. Can anyone think of a way to do this? Maybe something that does the same job as PalmRevolt does on Palm OS?
Surely it'd be a case of finding a program that can replace some icons / settings in the Windows Directory...
I'm keeping SPB Mobileshell too.. Its just that I'm resigning to the fact that I'll be stuck with WinMo6.1 on my Palm Treo Pro for quite some time!
Thanks all!
I'm still going to use SPB, but thought this woud
Click to expand...
Click to collapse
Using a resource editor, it is possible to skin almost everything. It's just a bunch of dlls, exes and registry entries. I use PE Explorer and it's great and very powerful, but it does cost quite a bit of money..
dwizzy130
No unfortunately its not possible. At most you can alter themes, as I am sure you already know. The only other thing you can do is change the size of the scroll bars in the registry, and if you set their width to 0, they disappear... A setting like 2, makes them thin enough that they indicate where you are, but can't really be used.
Apart from that, you already have the right idea with SPB, Point UI, etc. You may want to know that PointUI hides more of the oem interface with the pay version and will be adding a dialer among other things in the next update. You did not mention Manilla... I don't use it b/c I just don't have the time to deal with new ROM bugs, but nonetheless it does the best the best job at hiding winmo, and has the most skinned elements...
EDIT: Just read the above post... I guess it is possible.
OK, decided to add some addtional stuff
Altering WM menu system and Dialogs
Try this program
FingerSuite
or
Try the extracted HTC Menu app
or
Edit the Menu Font size registry key for a less pretty effect, but it means one less program to install.
HKEY_LOCAL_MACHINE\system\gwe\menu\popfnt
and change the value for the "Ht" entry to "1000" decimal (from 1200).
play around with 800, 900, and 1000 and see which suits your personal preference
Modifying Scroll Bars
Change the thickness of scrollbars
To change the thickness of the scrollbars at the right/bottom of documents larger than the screen, adjust...
For the horizontal (bottom) scrollbar:
HKLM\System\GWE\cyHScr = 9 (DWORD decimal)
For the vertical (right) scrollbar:
HKLM\System\GWE\cxVScr = 9 (DWORD decimal)
The default thickness is 13. You can set the value to anything you may like
Change the length of scrollbar arrow buttons
To go with changing the thickness of the scrollbars, you may wish to change the length of the scrollbar arrow buttons...
For the horizontal (bottom) scrollbar arrows:
HKLM\System\GWE\cyVScr = 0 (DWORD decimal)
For the vertical (right) scrollbar:
HKLM\System\GWE\cxHScr = 0 (DWORD decimal)
The default length is 13. You can set the value to pretty much anything you like
Found another useful app for handling scroll bar color, background colors ect.
UITweaker
http://forum.xda-developers.com/showthread.php?t=411197
Further down in that thread someone gives this link which seems usefulhttp://mobile-sg.com/software/?platform=ppc
Hmm, real pity nothing can be done to skin those ugly looking scrollbars, eventhough SPB or any other software will beautify the look as well as experience of using the device, the scrollbars will still leave a signature stating "I am the ugly looking WM 6.1"
I just recently flashed SNN Diamond on my Wizard and I'm loving it so far but I do have one caveat. When I put a customized background on my today/home, the drop-down start menu adopts the same image as its background. I don't want my drop-down start menu to have a background image, I'd prefer it to be a plain color. How do I change it? You would think that this is a simple thing to do but I have been at it for a day, still no luck. Any ideas guys?

[SOLVED] Launch HTC Volume Control on Fuze with 6.5.5

[EDITThis has not worked with the latest Raph Energy ROMs since around June or July or 2010[/EDIT]
I should have editted this a while back.
The cab HTC_VolumeCtl.cab should not be used, unless you don't want to use the DPad or the arrow keys.
I now just use LaunchHTCVolumeControl_1.0.CAB with Tarkim's key remapper and it works great.
--------------------------
Old stuff is below this.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
LaunchHTCVolumeControl_1.0.CAB
Install the 2 cabs attached to this post.
Run the shortcut on the Start Menu.
It is something like Shortcut to LaunchHTCVolumeControl.lnk
Now the Volume buttons will launch the HTC Volume Control
If you copy that shortcut to Windows\Start Up
It will work most of the time.
1 time out of 15 soft resets, it launched the exe before the task bar was ready.
Thanks admaximum for posting the cab with the updated HTCVolumeControl.
I tranfered the cab from the post here: http://forum.xda-developers.com/showpost.php?p=6129949&postcount=55
[EDIT]
I've learned alot on this since I started this thread.
I have made an app that launches the Volume Control by sending the Left Mouse Down / Left Mouse Up to show the taskbar.
And then it sends a message to the appropriate item.
I have learned through the process that some items may appear that are not easy to detect through the registry.
Notification Items show up here:
HKLM\System\State\Shell\Notifications
If it also exists here:
HKCU\ControlPanel\Notifications
Then it is being displayed.
But there are exceptions, such as blue tooth.
It is displayed, but is not there.
So, I added code to search a a registry section that I also added to detect this.
HKCU\Software\JVH3\LaunchHTCVolumeControl\Ignore
And I put the bluetooth code in as another key.
So now it is extendable, if other notification items are found.
Just add the key. The same way the key for bluetooth is done.
I agree that this is not the best way to launch the control, but currently, it is the only known reliable way with a Fuze using build 23541.
[/EDIT]
[ORIGINAL]
Help - HTCVolumeControl.dll - methods and parameters
See post 27 for a cab that installs an exe and shortcut to launch the volume control.
Just use a key remapper to attach to volume buttons.
I am trying to figure out how to launch the HTC Volume Control on my Fuze from C#.
I ran depends.exe on HTCVolumeControl.dll to find the methods:
VOL_Deinit
VOL_Init
VOL_Open
VOL_Close
VOL_IOControl
VOL_Read
VOL_Write
VOL_Seek
But, I have no idea what arguments they take, or what they output.
And I am not sure how to find this out.
I wrote a really small app in C# to create a windows mobile app to execute the methods.
I only tried with: VOL_Init, VOL_Open, VOL_IOControl
using System.Runtime.InteropServices;
[DllImport("HTCVolumeControl.dll")]
private static extern int VOL_Init();
[DllImport("HTCVolumeControl.dll")]
private static extern int VOL_Open();
[DllImport("HTCVolumeControl.dll")]
private static extern int VOL_IOControl();
When executing VOL_Init, it seems to do something. It makes it so the icon on the status bar will launch the Windows Mobile Volume Control instead of the HTC one and it displays a speaker icon, instead of the windows logo.
I also tried it with these import definitions:
[DllImport("HTCVolumeControl.dll")]
private static extern int VOL_Init(uint msg);
[DllImport("HTCVolumeControl.dll")]
private static extern int VOL_Open(uint msg);
[DllImport("HTCVolumeControl.dll")]
private static extern int VOL_IOControl(uint msg);
Either way I can't get the HTC Volume Control to launch by executing any of these methods.
Please help.
If we can get this to work, then any keymapper can launch the HTC Volume Control by launching an exe made like this.
Does anyone know what arguments these methods take?
And
Does anyone know what needs to be executed to start the control?
[/ORIGINAL]
Bounty For steps to launch
In case a bounty is started, this posted is reserved to document bounties offered, and paid, if a solution is posted.
Obviously there is no way to enforce a bounty, but a bounty offered and not delivered would result cause others to not trust that user in the future.
HTCVolumeControl.dll is a service DLL. So when calling the opening function you'll only get a handle to the service. The functions you posted here is the interface that every service DLL consists of.
When developing my Taskbar launcher I'm blocking the WM_LBUTTONDOWN/UP events from taskbar to launch my own stuff instead. And one guy complaint that HTC Volume control wasn't working anymore. After a little investigation I figured out that HTC Volume control is sending those messages with X=367 and Y=26 to make it launch the volume control window.
So to open HTC Volume control you simply have to call FindWindow to retrieve a handle to the status bar and then send both WM_LBUTTONDOWN and WM_LBUTTONUP with those coordinates in the LPARAM (Y in the hiword, X in the loword, or look at Remote spy to catch the "combined" value). I don't know how to use this in C# (probably the usual PInvoke: FindWindow and SendMessage?) but if you can't figure it out I'm sure someone else can help on.
To verify just open Remote Spy, select HHTaskbar and then hit the Volume up/down buttons on your phone and you should see the LBUTTON events.
RAMMANN said:
HTCVolumeControl.dll is a service DLL. So when calling the opening function you'll only get a handle to the service. The functions you posted here is the interface that every service DLL consists of.
When developing my Taskbar launcher I'm blocking the WM_LBUTTONDOWN/UP events from taskbar to launch my own stuff instead. And one guy complaint that HTC Volume control wasn't working anymore. After a little investigation I figured out that HTC Volume control is sending those messages with X=367 and Y=26 to make it launch the volume control window.
So to open HTC Volume control you simply have to call FindWindow to retrieve a handle to the status bar and then send both WM_LBUTTONDOWN and WM_LBUTTONUP with those coordinates in the LPARAM (Y in the hiword, X in the loword, or look at Remote spy to catch the "combined" value). I don't know how to use this in C# (probably the usual PInvoke: FindWindow and SendMessage?) but if you can't figure it out I'm sure someone else can help on.
To verify just open Remote Spy, select HHTaskbar and then hit the Volume up/down buttons on your phone and you should see the LBUTTON events.
Click to expand...
Click to collapse
Thank you very much for this. When I get home from work,. I'll have some things try and learn.
I have not used Remote Spy before and have only grabbed handles to Windows in desktop programming. That was about 10 years ago.
This makes greate sense, since it can be launched from the status bar.
Thanks again.
RAMMANN said:
HTCVolumeControl.dll is a service DLL. So when calling the opening function you'll only get a handle to the service. The functions you posted here is the interface that every service DLL consists of.
When developing my Taskbar launcher I'm blocking the WM_LBUTTONDOWN/UP events from taskbar to launch my own stuff instead. And one guy complaint that HTC Volume control wasn't working anymore. After a little investigation I figured out that HTC Volume control is sending those messages with X=367 and Y=26 to make it launch the volume control window.
So to open HTC Volume control you simply have to call FindWindow to retrieve a handle to the status bar and then send both WM_LBUTTONDOWN and WM_LBUTTONUP with those coordinates in the LPARAM (Y in the hiword, X in the loword, or look at Remote spy to catch the "combined" value). I don't know how to use this in C# (probably the usual PInvoke: FindWindow and SendMessage?) but if you can't figure it out I'm sure someone else can help on.
To verify just open Remote Spy, select HHTaskbar and then hit the Volume up/down buttons on your phone and you should see the LBUTTON events.
Click to expand...
Click to collapse
OK, I have coded this and am able to get the window handle and send it messages, but since the speaker that is normally visable on the same row as the clock does not launch the volume control, it doesn't quite work.
Non programatically, I must click the clock and then click the windows logo that appears. I have attached pictures.
When I send the message, the other row appears so then I can click the Windows logo. But I have not figured out what that window is. If it is HTTaskBar, then it is not responding.
Remote Spy is great. Just wish there were a way to stop and start the reading of messages and a way to capture it to a data file.
well, as I have experienced it the WM_LBUTTON* command is not used to programmatically click on the task bar and hit the icon. I think HTC Volume Control is hooked into the task bar and if receiving a special coordinate (the one I told you) it means: show it. It was reproducible on the HTC Touch Diamond, and it was also working on another device, I think Touch HD, which got a different screen resolution. So it doesn't check if you hit the coordinates of the volume icon, it only checks for the fixed coordinates. That's why it only works with this special coordinate.
The new WM 6.5 slidebar that pops up when hitting the taskbar is a different window, it's not HHTaskbar. Forget this one.
You should check again: open Remote Spy and listen to the messages of HHTaskbar. Then hit the volume up/down controls - I mean the hardware buttons of your device - and NOT hitting the taskbar. Now you should see the WM_LBUTTON* events (among many others, but those are unimportant). You need to send exactly the same and it should work.
Code to launch HTC Volume Control
I now can programatically launch the HTC Volume Control.
Code:
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Linq;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Collections.Generic;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.ComponentModel;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Data;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Drawing;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Text;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Windows.Forms;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Runtime.InteropServices;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]namespace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] LaunchVolumeControl[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]partial[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]class[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Form1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] : [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Form[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]{[/SIZE]
[SIZE=2][[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]DllImport[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"coredll.dll"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])][/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]internal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]static[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]extern[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]IntPtr[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] FindWindow([/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]String[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] lpClassName, [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]String[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] lpWindowName);[/SIZE]
[SIZE=2][[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]DllImport[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"coredll.dll"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])][/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]private[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]static[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]extern[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] SendMessage([/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]IntPtr[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] hWnd, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] msg, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] wParam, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] lParam);[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Form1()[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2]InitializeComponent();[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]private[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] button4_Click([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]object[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] sender, [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]EventArgs[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] e)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]IntPtr[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] hWnd = FindWindow([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"HHTaskBar"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]null[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] LParam = ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])MakeLParam(240, 40);[/SIZE]
[SIZE=2]LParam = 0x1A01BE;[/SIZE]
[SIZE=2]SendMessage(hWnd, ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]WMessages[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].WM_LBUTTONDOWN, 0, LParam);[/SIZE]
[SIZE=2]SendMessage(hWnd, ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]WMessages[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].WM_LBUTTONUP, 0, LParam);[/SIZE]
[SIZE=2]SendMessage(hWnd, ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])0x800c, 3, 0);[/SIZE]
[SIZE=2]SendMessage(hWnd, ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])0x498, 2, 0);[/SIZE]
[SIZE=2]SendMessage(hWnd, ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])0x407, 0x7c08d760, 0x0A);[/SIZE]
[SIZE=2]SendMessage(hWnd, ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])0x007, 0, 0);[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]enum[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]WMessages[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] : [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2]{ [/SIZE]
[SIZE=2]WM_LBUTTONDOWN = 0x201, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Left mousebutton down [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_LBUTTONUP = 0x202, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Left mousebutton up [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_LBUTTONDBLCLK = 0x203, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Left mousebutton doubleclick [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_RBUTTONDOWN = 0x204, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Right mousebutton down [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_RBUTTONUP = 0x205, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Right mousebutton up [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_RBUTTONDBLCLK = 0x206, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Right mousebutton doubleclick [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_KEYDOWN = 0x100, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Key down [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_KEYUP = 0x101, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Key up [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]} [/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] MakeLParam([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] LoWord, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] HiWord) [/SIZE]
[SIZE=2]{ [/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ((HiWord << 16) | (LoWord & 0xffff)); [/SIZE]
[SIZE=2]} [/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]}[/SIZE]
I found the remaining 4 by using remote spy. Great advice. I did that and actually figured it out before reading your last post though.
Remote Spy ultimately got me on the right track along with getting the window and sending it messages.
Such a great tool.
Thank you for your help.
It's almost 3am where I live, so I am going to get some sleep now.
Oh if you can't get it done at all! Another way you might want to try is using kbd_event() and simulate the hardware buttons (volume up/down) but I haven't tried it and I don't know which keycodes you need. Probably it's even the better solution but I just randomly figured out the WM_LBUTTON* method when working on Taskbar launcher and thought it's easy enough. 3 lines of codes, that is. Yes..... yes.... I know the kbd_event might even be a 1 liner. So I'm sorry for any irritation but I hope one of those methods finally works for you!
JVH3 said:
I now can programatically launch the HTC Volume Control.
Code:
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Linq;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Collections.Generic;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.ComponentModel;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Data;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Drawing;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Text;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Windows.Forms;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Runtime.InteropServices;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]namespace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] LaunchVolumeControl[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]partial[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]class[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Form1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] : [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Form[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]{[/SIZE]
[SIZE=2][[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]DllImport[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"coredll.dll"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])][/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]internal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]static[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]extern[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]IntPtr[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] FindWindow([/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]String[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] lpClassName, [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]String[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] lpWindowName);[/SIZE]
[SIZE=2][[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]DllImport[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"coredll.dll"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])][/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]private[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]static[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]extern[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] SendMessage([/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]IntPtr[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] hWnd, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] msg, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] wParam, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] lParam);[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Form1()[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2]InitializeComponent();[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]private[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] button4_Click([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]object[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] sender, [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]EventArgs[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] e)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]IntPtr[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] hWnd = FindWindow([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"HHTaskBar"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]null[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] LParam = ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])MakeLParam(240, 40);[/SIZE]
[SIZE=2]LParam = 0x1A01BE;[/SIZE]
[SIZE=2]SendMessage(hWnd, ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]WMessages[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].WM_LBUTTONDOWN, 0, LParam);[/SIZE]
[SIZE=2]SendMessage(hWnd, ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]WMessages[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].WM_LBUTTONUP, 0, LParam);[/SIZE]
[SIZE=2]SendMessage(hWnd, ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])0x800c, 3, 0);[/SIZE]
[SIZE=2]SendMessage(hWnd, ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])0x498, 2, 0);[/SIZE]
[SIZE=2]SendMessage(hWnd, ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])0x407, 0x7c08d760, 0x0A);[/SIZE]
[SIZE=2]SendMessage(hWnd, ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])0x007, 0, 0);[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]enum[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]WMessages[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] : [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2]{ [/SIZE]
[SIZE=2]WM_LBUTTONDOWN = 0x201, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Left mousebutton down [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_LBUTTONUP = 0x202, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Left mousebutton up [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_LBUTTONDBLCLK = 0x203, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Left mousebutton doubleclick [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_RBUTTONDOWN = 0x204, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Right mousebutton down [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_RBUTTONUP = 0x205, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Right mousebutton up [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_RBUTTONDBLCLK = 0x206, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Right mousebutton doubleclick [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_KEYDOWN = 0x100, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Key down [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_KEYUP = 0x101, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Key up [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]} [/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] MakeLParam([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] LoWord, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] HiWord) [/SIZE]
[SIZE=2]{ [/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ((HiWord << 16) | (LoWord & 0xffff)); [/SIZE]
[SIZE=2]} [/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]}[/SIZE]
I found the remaining 4 by using remote spy. Great advice. I did that and actually figured it out before reading your last post though.
Remote Spy ultimately got me on the right track along with getting the window and sending it messages.
Such a great tool.
Thank you for your help.
It's almost 3am where I live, so I am going to get some sleep now.
Click to expand...
Click to collapse
oh! Now this looks quite lengthy. And it's only working on your current screen resolution.
RAMMANN said:
Oh if you can't get it done at all! Another way you might want to try is using kbd_event() and simulate the hardware buttons (volume up/down) but I haven't tried it and I don't know which keycodes you need. Probably it's even the better solution but I just randomly figured out the WM_LBUTTON* method when working on Taskbar launcher and thought it's easy enough. 3 lines of codes, that is. Yes..... yes.... I know the kbd_event might even be a 1 liner. So I'm sorry for any irritation but I hope one of those methods finally works for you!
Click to expand...
Click to collapse
I have it working and just posted the code to do it.
Problem is that the hardware buttons launch the ugly windows mobile volume control.
I was writing this, so that I could launch the HTC Volume Control from the volume button key presses.
I still have to add more to handle the volume button presses but that will have to wait until tomorrow to start.
Thanks again for your help.
Using Remote Spy was the key.
RAMMANN said:
oh! Now this looks quite lengthy. And it's only working on your current screen resolution.
Click to expand...
Click to collapse
The purpose is so that I can have the volume buttons launch the HTC Volume Control.
Currently it launches the ugly Windows Mobile Volume Control for all Raphael / Touch Pro / Fuze Roms that use the later 6.5.x builds such as 23529.
It does work when it's in landscape 2, so I am thinking the first 2 messages might not even be needed.
It's already working properly with Rhodium, Topez, and Leo without needing to do anything like this.
App that launches HTC Volume Control
This is really just a proof of concept app.
I wrote this for the Fuze and that is currently the only device that I know it works on.
But, the good news is that we can now launch the HTC Volume Control from code.
There are now multiple ways we can make the volume buttons launch the HTC Volume Control with this.
small exe that launches it so any existing keymapper program can launch the volume control.
exe that handles the vol up and vol down key strokes and launches it.
JVH3 said:
The purpose is so that I can have the volume buttons launch the HTC Volume Control.
Currently it launches the ugly Windows Mobile Volume Control for all Raphael / Touch Pro / Fuze Roms that use the later 6.5.x builds such as 23529.
It does work when it's in landscape 2, so I am thinking the first 2 messages might not even be needed.
It's already working properly with Rhodium, Topez, and Leo without needing to do anything like this.
Click to expand...
Click to collapse
Ah! Ok! I see! I also had the old ugly volume controls appear on my Topaz when cooking some 6.5.x on it, but I had installed S2U and it replaces the Volume control so this was fine with me.
About your approach to launch the Volume Control, I'm still wondering why it didn't work on your device with the coordinates I told you. As a result it would only be 3 simple lines of code and that's it:
FindWindow(HHTaskbar)
SendMessage(WM_LBUTTONDOWN)
SendMessage(WM_LBUTTONUP)
Like suggested in another thread ("restart Manila") you maybe should also use PostMessage instead of SendMessage to make it more stable.
RAMMANN said:
Ah! Ok! I see! I also had the old ugly volume controls appear on my Topaz when cooking some 6.5.x on it, but I had installed S2U and it replaces the Volume control so this was fine with me.
About your approach to launch the Volume Control, I'm still wondering why it didn't work on your device with the coordinates I told you. As a result it would only be 3 simple lines of code and that's it:
FindWindow(HHTaskbar)
SendMessage(WM_LBUTTONDOWN)
SendMessage(WM_LBUTTONUP)
Like suggested in another thread ("restart Manila") you maybe should also use PostMessage instead of SendMessage to make it more stable.
Click to expand...
Click to collapse
I might change that.
I did try the way you had posted with the coordinates provided.
I am using the ArkSoft taskmanage.
I'm really tired right now, but I think I remember it activating the ArkSoft task manager.
I need to go get some sleep now.
JVH3 said:
I might change that.
I did try the way you had posted with the coordinates provided.
I am using the ArkSoft taskmanage.
I'm really tired right now, but I think I remember it activating the ArkSoft task manager.
Click to expand...
Click to collapse
I see. So the guy seems to got the same problem I got. On devices on which the HTC Volume control is working (older builds?) it should have the effect, that when the user hits the Volume up/down it would launch ArkSoft instead of HTC Volume Control
JVH3 said:
I need to go get some sleep now.
Click to expand...
Click to collapse
Goodnight!
Tomorrow you can try to move ArkSoft activation area and try again. If happens what I wrote before then you can use the method I first told, ArkSoft has to fix his taskman, and finally you got a stable way to launch HTC Volume Control. if you then code the app in native C then you even got a responsive way to launch it Otherwise I could also build a small EXE and upload if you're interested.
Very interesting thread. Definitely will make a donation for who fixes this for those devices not running htcvolume in combination with wm6.5.x.
Im on a blackstone and this is the only big flaw in the new builds
I still need to do a little work.
I just noticed that it does not launch it if there are notifications, such as new email.
Instead it launches somethign else.
But, after dismissing the notification, then it works.
i noticed the slider that appears after closing the clock has an extra icon on it.
So, I probably need to send message left mouse down.
and then move mouse left maybe 100px, since it will stop.
this assumes notifications are always to the left of the volume (windows logo) icon.
I think this will work, but I am at work.
I think you are going crazy this way. I still suggest: try the original commands I told you. If Arcsoft is launching instead, move the activation area somewhere else. I'm pretty sure you get HTC Volume Control launch properly (and simple).
RAMMANN said:
I think you are going crazy this way. I still suggest: try the original commands I told you. If Arcsoft is launching instead, move the activation area somewhere else. I'm pretty sure you get HTC Volume Control launch properly (and simple).
Click to expand...
Click to collapse
I will try when I get home. I am at work for a little while longer.
My activation area for ArkSwitch is the upper left and it's not that big.
When you did this, were you using a later build of Windows, such as 23529, 23518, etc.
It has been a problem with all 6.5.1, 6.5.3, and 6.5.5 ROMs where the volume buttons won't launch the HTC Volume control.
The TaskBar with these builds changed. It's not as tall.
Only recently were they able to get these to work, by using packages from a Leo. But they did not get it to work for anything other than Rhodium, Topaz, and Leo.
I will still try.
If I manually launch the Volume Control, I must click on the clock, and then click on the windows logo in the notification region that drops down, as described in the post with the pictures.
So, I would expect that I would need 2 sets of messages for each click.
Unless the specifc 1 pixel will trigger it. But since this task bar is not the same taskbar as with Windows Mobile 6.1 or 6.5, the behavior may be different.
It will be at least an hour before I get to this.
Change to original suggestion did not work
staticvoid Main(string[] args)
{
IntPtr hWnd = FindWindow("HHTaskBar", null);
uint LParam = (uint)MakeLParam(367, 26);
SendMessage(hWnd, (uint)WMessages.WM_LBUTTONDOWN, 0, LParam);
SendMessage(hWnd, (uint)WMessages.WM_LBUTTONUP, 0, LParam);
}
It just makes it show the larger Notification region like I showed in the post with the picture.
I killed ArkSwitch, QuickMenu, and ChangeScreen before testing.
I am going to try several variants of the y coordinate, since the taskbar is shorter in 6.5.5 that 6.1 and 6.5.
I tried with all y coordinate betweed 0 to 36 with x fixed at 367.
This method does not appear to work for Windows Mobile 6.5.5
I will return to my original way and add the additional messages for a moues move to the left.

Using WM6.5.x Control styles in own (.NET) programs?

Hello,
since WM6.5.3 the standard Controls like Buttons, Comboboxes, TabControls, Checkboxes etc. have a new Style with gradient Backgrounds and sometimes rounded edges.
If you develop programs with the .NET CF you will get the boring old style. Is there any way to enable the new style for .NET applications?
The only thing I found was this "hack" for the TabControl:
mobileworld.appamundi.com/blogs/peterfoot/archive/2009/09/17/windows-mobile-6-5-tab-control.aspx
(sorry, seems that I'm not allowed to post outside links)
I searched a lot for this but even the documentation from Microsoft gives no hint how to do this.
There is also a new control in many system control panels which replaces the TabControl (the navigation thing at top of the form for example in sounds and notification settings). Is there any chance to use this control in my own programs?
It is really annoying that Microsoft has developed a new themeable style for their controls and nobody can use it
Thanks a lot
Markus
You can but it requires overriding the controls paint events and imo is not worth the hassle. If you want fancy looking controls then you would be better off with 3rd party controls. There's several options out there and some are free. Read about some at http://forum.xda-developers.com/showthread.php?t=616838
If you want to work with the native controls and spruce them up a bit check out http://code.msdn.microsoft.com/uiframework for some guidance.
Ren13B said:
You can but it requires overriding the controls paint events and imo is not orth the hassle.
Click to expand...
Click to collapse
thanks for your answer but I don't want to create custom controls or use some 3rd party controls. I want to use the standard controls but with the WM6.5.x style.
Microsoft is really stupid. They were on a good way with 6.5.x. The user interface of the standard apps is mostly consistent and finger friendly. But they forget 3rd party developers now completely. I want to be able to create apps with the system look and feel but it seems that it is not possible. So my own applications have always an inconsistent look when I use standard controls. I always get the old style but when I open a messagebox then I get buttons in the new style.
Microsoft, this is really crap!
You'll have to wait for Windows Phone 7 if you want perfect consistency. Microsoft isn't going to update the controls for 6.5.
Hey there!
Today I did some research into controls, and I found out how to enable 6.5.3 style for buttons and checkboxes. You have to:
edit2: for dialogs - open .rc file in a text editor, and find your dialog, then after a line beggining with STYLE add a line with following contents:
Code:
EXSTYLE 0x1800000
Compile it and run. You should get 6.5.3 look and feel on existing controls without changing them!
Or if you want to create controls in runtime (works good for buttons, checkboxes/radio buttons look ugly):
1) call SHInitExtraControls()
2) when creating a button/checkbox use class TTBUTTON and make sure its style is combined with 0x8000
3) Use 'em like normal buttons.
Now it's time for listboxes & others...
edit2: To mimic 6.5.3 listbox behavior you have to set item height to 64 (or 32 for (W)QVGA), for example in this way:
Code:
SendDlgItemMessage(hwndDlg, IDC_COMBO1, CB_SETITEMHEIGHT, -1, 64);
SendDlgItemMessage(hwndDlg, IDC_COMBO1, CB_SETITEMHEIGHT, 0, 64);
To expand list views, use a empty image list with a proper image height (64 or 32), for example:
Code:
HIMAGELIST il;
il = ImageList_Create(1, 64, ILC_COLOR, 0, 1);
SendDlgItemMessage(hwnd, IDC_LIST1, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM) il);
edit: Oops, forgot you want it in .NET. Quick investigation lead me to a sad fact: .NET controls have the wrong window class. But if .NET dialogs are stored in resources there is hope. So I would be grateful if someone post here a compiled .NET application which would show a dialog with a button linked to some simple action. I might try to modify it for 6.5.3 style.

HOWTO: SIP at the bottom in WM6.5?

Hi,
I've already asked on several forums but unfortunately no answers so far
My env: CF 2.0, WM 6+
I'm trying to create fullscreen application and I need to display Sip
panel completely at the bottom of the screen - without taskbar.
I have used few ways to do it:
1. FindWindow for "SipWndClass" and then SetWindowPos or MoveWindow
2. SipGetInfo/SipSetInfo setting rcSipRect and clearing SIPF_DOCKED bit.
These methods work fine with e.g. WM 6.1 but not with WM 6.5 – part of taskbar is still visible and sip panel is located over it.
You can see it here: http://img822.imageshack.us/img822/9240/sshot000.png
Any ideas how to make it working with all systems?
Rgds
I am hiding and displaying SIP in eVC++ native code with these functions:
SipShowIM(SIPF_ON);
SipShowIM(SIPF_OFF);
Well,it is shifted up as the menubar height is,but without icon in the middle.
I think,that if I get SIPwindow position and change it,it could be also moved. Didn't tried.
WM6.5.3
TomasNM said:
Well,it is shifted up as the menubar height is,but without icon in the middle.
Click to expand...
Click to collapse
The icon is not displayed because of me I used FindWindow for "MS_SIPBUTTON" and ShowWindow to hide it.
TomasNM said:
I think,that if I get SIPwindow position and change it,it could be also moved. Didn't tried.
WM6.5.3
Click to expand...
Click to collapse
I thought that was what I did by using FindWindow("SipWndClass", null) and then SetWindowPos or MoveWindow. As I mentioned in the 1st post it works ok in WM6.1 but not in WM6.5.
Rgds
OK,
I think I found it - after some tests it looks that it's also necessary to move window "SipBackDropWndClass".
Seems to be working in WM6 and WM6.5.
Rgds
That's good news.
However if I would like to achieve it,I would find the SIP window,then move it and enable.disable with SipShowIM(SIPF_ON);SipShowIM(SIPF_OFF);
Will this work?
TomasNM said:
That's good news.
I would find the SIP window,then move it
Click to expand...
Click to collapse
At the moment that's my code:
Code:
IntPtr sipWind = FindWindow("SipBackDropWndClass", null);
MoveWindow(sipWind, Left, Top, Width, Height, false);
sipWind = FindWindow("SipWndClass", null);
MoveWindow(sipWind, Left, Top, Width, Height, false);
Is that what you ment?

Categories

Resources