废话少说,直接代码
---
applyBG = function( v ){
v.onDrawBackground = function( hdc,rc ){
a1 = ::POINTF( 0,0 );
a2 = ::POINTF( rc.width(),rc.height() );
b = gdip.lineBrush(
a1,
a2,
0xFF315e95,
0xFF228ba2
);
b1 = gdip.solidBrush( 0x22000000 );
gg = gdip.graphics(hdc);
gg.fillRectangle( b, 0,0, rc.width(), rc.height() );
gg.fillPolygon( b1, , ::POINTF( 0,0 ),
::POINTF( rc.width()*0.33,0 ),
::POINTF( 0,rc.height()*0.6 )
);
gg.fillPolygon( b1, , ::POINTF( 0,0 ),
::POINTF( rc.width(),0 ),
::POINTF( rc.width(),rc.height()*0.8 ),
::POINTF( 0,rc.height()*0.3 )
);
}
}
applyBG( winform );
具体新建一个新窗体,贴进去就好了。

发表评论