473,756 Members | 7,570 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Uxtheme.dll skinning

Hello everybody...
I am trying to apply some parts of the WinXP skins in panel controls. I am
using the Uxtheme wrapper which you can download from www.codeproject.com
and it is good.
If I want to do what I explained, I have to pass a string to a function
which makes the drawing. The string refers to the part of the skin.
I have made this very well, but I can't find what string is the correct to
draw the StartButton and the task buttons of the Taskbar.
Please help me with this since I need it too much.

Thank you very much...

Martín Heras
Nov 22 '05 #1
5 6383
The Startbutton and Taskbar do not have names associated with them for use
in themeing. If you want to draw those parts then you must extract the
bitmaps from the current themes resource file. You can use
GetCurrentTheme Name to get the ColorName of the current theme and then
append that string with "_TASKBARBACKGR OUND_BMP" or "_STARTBUTTON_B MP" for
the appropriate bitmaps. GetCurrentTheme Name also returns the name of the
resource file to extract the bitmaps from.

--
Mick Doherty
http://homepage.ntlworld.com/mdaudi1...nate/home.html
"Martín Heras" <mh****@fiberte l.com.ar> wrote in message
news:uz******** ******@TK2MSFTN GP12.phx.gbl...
Hello everybody...
I am trying to apply some parts of the WinXP skins in panel controls. I am
using the Uxtheme wrapper which you can download from www.codeproject.com
and it is good.
If I want to do what I explained, I have to pass a string to a function
which makes the drawing. The string refers to the part of the skin.
I have made this very well, but I can't find what string is the correct to
draw the StartButton and the task buttons of the Taskbar.
Please help me with this since I need it too much.

Thank you very much...

Martín Heras

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004
Nov 22 '05 #2
Mmmmm... And how can I open an unmanaged resource from a file using VB.NET?

Thank you...

"Mick Doherty"
<EX***********@ AND.REMOVE.SQUA REBRACKETS.[mdaudi100#ntlwo rld.com]> wrote in
message news:eW******** ******@TK2MSFTN GP11.phx.gbl...
The Startbutton and Taskbar do not have names associated with them for use
in themeing. If you want to draw those parts then you must extract the
bitmaps from the current themes resource file. You can use
GetCurrentTheme Name to get the ColorName of the current theme and then
append that string with "_TASKBARBACKGR OUND_BMP" or "_STARTBUTTON_B MP" for
the appropriate bitmaps. GetCurrentTheme Name also returns the name of the
resource file to extract the bitmaps from.

--
Mick Doherty
http://homepage.ntlworld.com/mdaudi1...nate/home.html
"Martín Heras" <mh****@fiberte l.com.ar> wrote in message
news:uz******** ******@TK2MSFTN GP12.phx.gbl...
Hello everybody...
I am trying to apply some parts of the WinXP skins in panel controls. I am using the Uxtheme wrapper which you can download from www.codeproject.com and it is good.
If I want to do what I explained, I have to pass a string to a function
which makes the drawing. The string refers to the part of the skin.
I have made this very well, but I can't find what string is the correct to draw the StartButton and the task buttons of the Taskbar.
Please help me with this since I need it too much.

Thank you very much...

Martín Heras

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004

Nov 22 '05 #3
I knew this was coming...
Heres one I prepared earlier:

\\\\
Imports System.Runtime. InteropServices
Imports System.Text

#Region " Dll Imports "

<DllImport("ker nel32", CallingConventi on:=CallingConv ention.Cdecl)> _
Private Shared Function LoadLibrary( _
ByVal lpFileName As String) As IntPtr
End Function
<DllImport("ker nel32", CallingConventi on:=CallingConv ention.Cdecl)> _
Private Shared Function FreeLibrary( _
ByVal hModule As IntPtr) As Boolean
End Function

<DllImport("UxT heme", CharSet:=CharSe t.Unicode, _
CallingConventi on:=CallingConv ention.Cdecl)> _
Friend Shared Function GetCurrentTheme Name _
(ByVal pszThemeFileNam e As StringBuilder, _
ByVal cchMaxNameChars As Integer, _
ByVal pszColorBuff As StringBuilder, _
ByVal cchMaxColorChar s As Integer, _
ByVal pszSizeBuff As StringBuilder, _
ByVal cchMaxSizeChars As Integer) As Integer
End Function

#End Region

Private Function ExtractBitmap(B yVal sFilename As String, _
ByVal sBitmapName As String) As Bitmap
Dim hInst As IntPtr = LoadLibrary(sFi lename)
Dim BMP As Bitmap = Bitmap.FromReso urce(hInst, sBitmapName)
FreeLibrary(hIn st)
Return BMP
End Function

Dim TaskBarBmp As Bitmap
Dim StartButtonBmp As Bitmap

Private Sub SetBitmaps()
Dim ThemeName As StringBuilder = New StringBuilder(2 56)
Dim ColorName As StringBuilder = New StringBuilder(2 56)
Dim ThemeSize As StringBuilder = New StringBuilder(2 56)
GetCurrentTheme Name(ThemeName, 256, ColorName, 256, ThemeSize, 256)
TaskbarBmp = ExtractBitmap(T hemeName.ToStri ng, _
ColorName.ToStr ing + "_TASKBARBACKGR OUND_BMP")
StartButtonBmp = ExtractBitmap(T hemeName.ToStri ng, _
ColorName.ToStr ing + "_STARTBUTTON_B MP")
End Sub
////

--
Mick Doherty
http://homepage.ntlworld.com/mdaudi1...nate/home.html
"Martín Heras" <mh****@fiberte l.com.ar> wrote in message
news:%2******** *******@TK2MSFT NGP10.phx.gbl.. .
Mmmmm... And how can I open an unmanaged resource from a file using VB.NET?
Thank you...

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004
Nov 22 '05 #4
Mmmmm... And how can I open an unmanaged resource from a file using VB.NET?

Thank you...

"Mick Doherty"
<EX***********@ AND.REMOVE.SQUA REBRACKETS.[mdaudi100#ntlwo rld.com]> wrote in
message news:eW******** ******@TK2MSFTN GP11.phx.gbl...
The Startbutton and Taskbar do not have names associated with them for use
in themeing. If you want to draw those parts then you must extract the
bitmaps from the current themes resource file. You can use
GetCurrentTheme Name to get the ColorName of the current theme and then
append that string with "_TASKBARBACKGR OUND_BMP" or "_STARTBUTTON_B MP" for
the appropriate bitmaps. GetCurrentTheme Name also returns the name of the
resource file to extract the bitmaps from.

--
Mick Doherty
http://homepage.ntlworld.com/mdaudi1...nate/home.html
"Martín Heras" <mh****@fiberte l.com.ar> wrote in message
news:uz******** ******@TK2MSFTN GP12.phx.gbl...
Hello everybody...
I am trying to apply some parts of the WinXP skins in panel controls. I am using the Uxtheme wrapper which you can download from www.codeproject.com and it is good.
If I want to do what I explained, I have to pass a string to a function
which makes the drawing. The string refers to the part of the skin.
I have made this very well, but I can't find what string is the correct to draw the StartButton and the task buttons of the Taskbar.
Please help me with this since I need it too much.

Thank you very much...

Martín Heras

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004

Nov 22 '05 #5
I knew this was coming...
Heres one I prepared earlier:

\\\\
Imports System.Runtime. InteropServices
Imports System.Text

#Region " Dll Imports "

<DllImport("ker nel32", CallingConventi on:=CallingConv ention.Cdecl)> _
Private Shared Function LoadLibrary( _
ByVal lpFileName As String) As IntPtr
End Function
<DllImport("ker nel32", CallingConventi on:=CallingConv ention.Cdecl)> _
Private Shared Function FreeLibrary( _
ByVal hModule As IntPtr) As Boolean
End Function

<DllImport("UxT heme", CharSet:=CharSe t.Unicode, _
CallingConventi on:=CallingConv ention.Cdecl)> _
Friend Shared Function GetCurrentTheme Name _
(ByVal pszThemeFileNam e As StringBuilder, _
ByVal cchMaxNameChars As Integer, _
ByVal pszColorBuff As StringBuilder, _
ByVal cchMaxColorChar s As Integer, _
ByVal pszSizeBuff As StringBuilder, _
ByVal cchMaxSizeChars As Integer) As Integer
End Function

#End Region

Private Function ExtractBitmap(B yVal sFilename As String, _
ByVal sBitmapName As String) As Bitmap
Dim hInst As IntPtr = LoadLibrary(sFi lename)
Dim BMP As Bitmap = Bitmap.FromReso urce(hInst, sBitmapName)
FreeLibrary(hIn st)
Return BMP
End Function

Dim TaskBarBmp As Bitmap
Dim StartButtonBmp As Bitmap

Private Sub SetBitmaps()
Dim ThemeName As StringBuilder = New StringBuilder(2 56)
Dim ColorName As StringBuilder = New StringBuilder(2 56)
Dim ThemeSize As StringBuilder = New StringBuilder(2 56)
GetCurrentTheme Name(ThemeName, 256, ColorName, 256, ThemeSize, 256)
TaskbarBmp = ExtractBitmap(T hemeName.ToStri ng, _
ColorName.ToStr ing + "_TASKBARBACKGR OUND_BMP")
StartButtonBmp = ExtractBitmap(T hemeName.ToStri ng, _
ColorName.ToStr ing + "_STARTBUTTON_B MP")
End Sub
////

--
Mick Doherty
http://homepage.ntlworld.com/mdaudi1...nate/home.html
"Martín Heras" <mh****@fiberte l.com.ar> wrote in message
news:%2******** *******@TK2MSFT NGP10.phx.gbl.. .
Mmmmm... And how can I open an unmanaged resource from a file using VB.NET?
Thank you...

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004
Nov 22 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
804
by: Martín Heras | last post by:
Hello everybody... I am trying to apply some parts of the WinXP skins in panel controls. I am using the Uxtheme wrapper which you can download from www.codeproject.com and it is good. If I want to do what I explained, I have to pass a string to a function which makes the drawing. The string refers to the part of the skin. I have made this very well, but I can't find what string is the correct to draw the StartButton and the task buttons...
1
4819
by: Paul Hartness | last post by:
I want to be able to skin my application producing non-standard form shapes such as WinAmp & Windows Media Player. I have reviewed toolkits such as DirectSkin, SkinCrafter, SkinBoxer, SkinMagic etc. and though they provide skinning of existing application frames, forms and controls they do not allow for changing the shape of the form nor arrangement of the controls. I realise with .NET it is easy to provide a non-rectangular form by...
3
5887
by: AtlasApollo | last post by:
Greetings! We are working on a project that has a bunch of TrackBars spec'ed as graphic controls. In other words, they are slick looking and green. In the design phase, these controls look great on the printed page, though when I try to get the TrackBar to look the way the concept was presented, it just doesn't seem to let me tweak it. Can you please tell me what I can do to easily customize the TrackBar
2
1475
by: meyer_phillip | last post by:
I am looking for an application skinning engine that supports colour themes. Winamp is an example of an app supporting colour themes. For example in Winamp I can pick the "Winamp Modern" skin and apply one of the 30 or so color themes to that skin - so it's the same skin in different colors. I have looked at various skinning engines such as skinmagic, themeengine, directskin, etc, but none of those support color themes. Can anyone...
6
6635
by: elziko | last post by:
Every time I use to run my project it was fine. I jave just added three lines of code: If Not drSeries.IsDBNull(2) Then strUnits = drSeries.GetString(2) End If and now when I run it I get the following error BEFORE I even reach my MainForm_Load event:
2
306
by: CJ Taylor | last post by:
I've been googling this for awhile, but can't seem to find anything really solid on skinning a windows forms app. I know how to skin the internal stuff but would like to see an example of stuff like the titlebar and pushbuttons, etc... Thanks, CJ
1
1109
by: Martín Heras | last post by:
Hello everybody... I am trying to apply some parts of the WinXP skins in panel controls. I am using the Uxtheme wrapper which you can download from www.codeproject.com and it is good. If I want to do what I explained, I have to pass a string to a function which makes the drawing. The string refers to the part of the skin. I have made this very well, but I can't find what string is the correct to draw the StartButton and the task buttons...
2
1942
by: JJ | last post by:
I'm using Themes with asp.net 2.0 and i have a command field(in a gridview) like this: <asp:CommandField ButtonType=Image ShowDeleteButton= true DeleteImageUrl="~/App_Themes/Theme1/Images/button-delete.gif"/> My current Theme is "Theme1" but how about if i change the theme to any other?. I have to change "deleteimageurl" too. How can i avoid this?. JJ
0
902
by: anandp7890 | last post by:
How to install a UxTheme.dll file on Windows2000 Professional edition ? kindly, repond to thanks & regards anand
1
1584
by: anirban123 | last post by:
I have an existing forms application developed in C# .NET 2.0. I would like to know the easiest way of enhancing its look and feel/apply skinning. Please help ASAP.
0
9384
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9212
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9645
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6473
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5069
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5247
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3276
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2612
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.