能力值:
( LV4,RANK:50 )
|
-
-
2 楼
给你个例子:
public UserControl1()
{
InitializeComponent();
this.bitmap1 = new Bitmap(@"C:\aaa.bmp");
this.dc1 = this.CreateGraphics();
this.dc2 = this.CreateGraphics();
}
Bitmap bitmap1 = null;
Graphics dc1;
Graphics dc2;
protected override void OnPaint(PaintEventArgs e)
{
this.Draw();
base.OnPaint(e);
}
private void Draw()
{
if (bitmap1 != null)
{
int i = GDI32.SelectObject((int)this.dc1.GetHdc(), (int)this.bitmap1.GetHbitmap());
this.dc1.ReleaseHdc();
GDI32.BitBlt((int)dc2.GetHdc(), 0, 0, this.bitmap1.Width, this.bitmap1.Height, (int)this.dc1.GetHdc(), 0, 0, 13369376);
this.dc1.ReleaseHdc(); this.dc2.ReleaseHdc();
}
}
So .. i = 0... this meens that the bitmap isn't in dc1...
|
能力值:
( LV3,RANK:20 )
|
-
-
3 楼
VB6.0的代码有吗?
|
|
|