如何使用vb.net2005更改Windows XP主题

时间:2010-04-10 05:20:00

标签: vb.net visual-studio-2005

我尝试过以下代码,但没有效果:

Imports system.Runtime.InteropServices

<DllImport("UxTheme.DLL", BestFitMapping:=False, CallingConvention:=CallingConvention.Winapi, CharSet:=CharSet.Unicode, EntryPoint:="#65")> _
     Shared Function SetSystemVisualStyle(ByVal pszFilename As String, ByVal pszColor As String, ByVal pszSize As String, ByVal dwReserved As Integer) As Integer
     End Function

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        'This code will set Window Themes
        SetSystemVisualStyle("C:\WINDOWS\Resources\Themes\HmmXP_2_0_1\HmmXP\HmmXP.msstyles", "NormalColor", "NormalSize", 0)
    End Sub

任何人都可以帮助吗?

1 个答案:

答案 0 :(得分:1)

选中此link,可能会对您有所帮助......