http://www.mndsoft.com/blog/article.asp?id=886 [解决办法] 一、自绘XP风格的按钮,参见我博客里《用VB实现带图片的XP风格的按钮控件》一文。 二、用以下代码替换原文中使用StdPicture对象的Render方法绘制的代码: Public Sub DrawPng(ByVal hdcDraw As Long, ByVal FileName As String, Optional ByVal nLeft As Long, Optional ByVal nTop As Long) Dim hImage As Long Dim Graphics As Long Dim Token As Long Dim GdipInput As GdiplusStartupInput Dim nWidth As Long Dim nHeight As Long
Dim IStream As stdole.IUnknown Dim fn As Integer Dim bytBuffer() As Byte
fn = FreeFile() Open FileName For Binary Access Read As #fn bytBuffer = InputB(LOF(fn), fn) Close #fn
If (CreateStreamOnHGlobal(VarPtr(bytBuffer(0)), 1, IStream) = S_OK) Then GdipInput.GdiplusVersion = 1 GdiplusStartup Token, GdipInput