x,y ------------ Long,逻辑坐标中要检查的点像素
解决方案 »
- 200分大赏求多串口设备同时通讯的解决方案,不够再加
- commondialog取消问题。。。
- 在windows XP简体版上开发的工程,要怎样才能在windows繁体上正常的运行?
- VB窗体退出错误
- 如何得到同一进程中最上层的窗口句柄?
- 在VB中如何实现把当前库或表转换为另外一种数据库文件
- vb 与 水晶报表的问题
- richtext的小问题
- 去哪儿可以查api函数的使用,msdn有没有中文的呀,shell函数使用的所有参数,哪儿去查
- 关于VB的打包向导的怪问题!!
- 急!!!求教COM+开发时在DLL中数据库连接的设置 500分相送
- 谁有asprotect 1.2的注册版,想买正版,可是要美金。
For lTempX = 0 To Picture1.Width - 1
For lTempY = 0 To Picture1.Height - 1
lTempRGB = GetPixel(Picture1.hdc, lTempX, lTempY)
SetPixel Picture2.hdc, lTempX, lTempY, lTempRGB
Next
Next办不到,因为picture1.width的单位为提,如何办?
Dim fColor As Long
For y = 0 To Picture1.Height Step 5
For x = 0 To Picture1.Width Step 5
fColor = Picture1.Point(x, y)
Picture2.PSet (Picture2.Width - x - 60, y), fColor
Next x
Next y
Me.MousePointer = 0
可按你的代码直接使方法2:将代码改动一下For lTempX = 0 To Picture1.Width/Screen.TwipsPerPixelX - 1
For lTempY = 0 To Picture1.Height/Screen.TwipsPerPixelY - 1
lTempRGB = GetPixel(Picture1.hdc, lTempX, lTempY)
SetPixel Picture2.hdc, lTempX, lTempY, lTempRGB
Next
Next
泰山,你的我基本看明白了,可是我想用像素操作,没办法吗?
Picture2.Width - x - 60 什么意思?
x,y的坐标原点不在左上角?
设置picture2的ScaleMode为 3 - VbPixels
autoredraw 设置为 falseFor lTempX = 0 To Picture1.scaleWidth - 1
For lTempY = 0 To Picture1.scaleHeight - 1
lTempRGB = GetPixel(Picture1.hdc, lTempX, lTempY)
SetPixel Picture2.hdc, lTempX, lTempY, lTempRGB
Next
Next
Pic1.PaintPicture Pic2.Picture,0,0