暂时先参考这个东东..http://www.codeproject.com/csharp/zoomnet.asp
解决方案 »
- dwgdirectX中axOdaViewer1.NewDevice如何设置参数
- 如何把一个数组的值赋给另外一个数组
- 字符串的截取方法。
- 求一正则,匹配非www的任意英文+数字
- 求救谁给给个C#压缩文件的源代码啊???(愚翁请进!!!)
- treeview控件。请大家重头到尾给列举列举。
- 汉字如何转拼音(请教)
- 如何将几张同样size的图片按顺序组合成gif动画
- 请问"孟子E章"能否将你的outlookbar源代码发给我?
- tooltip如何不行了?
- tabPage控件左上角的标题部分我不想让他显示(运行时),怎么办???在线等待!!!50分相送.
- 菜鸟提问题--送分!!!!!!!!!!!!!!!!!!!!!!!!!!
[DllImport("User32.dll")]
public extern static System.IntPtr GetDC(System.IntPtr hWnd);
[DllImport("user32.dll")]
static public extern int ReleaseDC(IntPtr hWnd, IntPtr hDC);
[DllImport("gdi32.dll")]
static public extern bool StretchBlt(IntPtr hDCDest, int XOriginDest, int YOriginDest, int WidthDest, int HeightDest,
IntPtr hDCSrc, int XOriginScr, int YOriginSrc, int WidthScr, int HeightScr, uint Rop);
private void button1_Click(object sender, System.EventArgs e)
{
IntPtr hdc1 = GetDC(this.pictureBox1.Handle); //PictureBox1的HDC
IntPtr hdc2 = GetDC(this.pictureBox2.Handle); //PictureBox2的HDC //将PBox1拷到PBox2中
StretchBlt(hdc2,0,0,100,100,hdc1,10,10,100,100,(uint)0x00CC0020); //释放
ReleaseDC((IntPtr)null,hdc1);
ReleaseDC((IntPtr)null,hdc2);}
Graphics g = pic.CreateGraphics(); //C#自已的方法
Graphics gt =picTo.CreateGraphics (); IntPtr hdc1=g.GetHdc();
IntPtr hdc2=gt.GetHdc(); //C#自已的方法
//将PBox1拷到PBox2中 ***** 这个API有没有C#自已的方法呢???? StretchBlt(hdc2,0,0,100,100,hdc1,10,10,100,100,(uint)0x00CC0020);