dotNet中怎行实现 BitBlt 功能就是位图考贝
解决方案 »
- 请问如何递归到每个数组
- <在线waiting。。。>dictionary的遍历问题
- 如何使用OleDb删除数据库数据
- 中文转拼音(个别汉字转换出错)
- winxp中文下开发.net程序在Winxp英文下运行,报错:Selected collating sequence not supported by the
- 信息显示不出来
- 求助:如何从一个窗体拖拽一个按钮到另一个窗体. 提供思路亦可,winform C#
- 急呀,请教一个关于SharePoint的问题?????
- winform下显示html页面问题和html转换为图片问题
- 正则表达式匹配问题
- 高分急求!实时显示数据的曲线源码(像WINDOWS系统任务管理系统的那种)
- 为什么我的 VS 2003。NET安装好后,可以新建ASP。NET WEB应用程序,然后过后一些时间不用,却说我的asp.net服务器版本不是1.1
private static extern bool BitBlt(
IntPtr hdcDest,
int nXDest,
int nYDest,
int nWidth,
int nHeight,
IntPtr hdcSrc,
int nXSrc,
int nYSrc,
System.Int32 dwRop
);
Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As LongPrivate Sub Command1_Click()
Dim wScreen As Long
Dim hScreen As Long
Dim w As Long
Dim h As Long
Picture1.ClswScreen = BarCode1.Width
hScreen = BarCode1.Height - 10Picture1.ScaleMode = vbPixels
w = Picture1.ScaleWidth
h = Picture1.ScaleHeight
hdcScreen = GetDC(0)r = StretchBlt(Picture1.hdc, 0, 0, w, h, hdcScreen, BarCode1.Left + Me.Left \ Screen.TwipsPerPixelX + 3, BarCode1.Top + Me.Top \ Screen.TwipsPerPixelY + 30, wScreen, hScreen, vbSrcCopy)End SubPrivate Sub Command2_Click()
SavePicture Picture1.Image, "d:\tmp\tmp.jpg" '将条形码保存为图像文件以便打印
End Sub
Private Sub Form_Load()
Picture1.Width = BarCode1.Width
Picture1.Height = BarCode1.Height
End SubPrivate Sub Text1_Change()
BarCode1.Value = Text1.Text
End Sub