大家可否帮我看一下这段代码,(我快要发疯了)...

stephenz2 2000-08-14 08:53:00
这是我写的一段代码:
If (txtread中的页数> 1) Then
txtread.Refresh
Call BitBlt(Picture1(0).hDC, 0, 0, txtread.Width, txtread.Height, txtreaddc, 0, 0, SRCCOPY)
txtread.SetFocus
SendKeys "{pgdn}"
For page = 1 To txtread中的页数
If (page Mod 2 = 0) Then

txtread.SetFocus
SendKeys "{pgdn}"
txtread.Refresh
Load Picture1(page)
Picture1(page).AutoRedraw = True
Picture1(page).Visible = False
Picture1(page).Left = 120
Picture1(page).Top = 120
Picture1(page).Width = 3375
Picture1(page).Height = 6375
Call BitBlt(Picture1(page).hDC, 0, 0, txtread.Width, txtread.Height, txtreaddc, 0, 0, SRCCOPY)
Picture1(page).Refresh
Else
txtread.SetFocus
SendKeys "{pgdn}"
txtread.Refresh
Load Picture1(page)
Picture1(page).AutoRedraw = True
Picture1(page).Left = 3720
Picture1(page).Top = 120
Picture1(page).Width = 3375
Picture1(page).Height = 6375
If (page = 1) Then
Picture1(page).Visible = True
Else
Picture1(page).Visible = False
End If
Call BitBlt(Picture1(page).hDC, 0, 0, txtread.Width, txtread.Height, txtreaddc, 0, 0, SRCCOPY)
Picture1(page).Refresh
End If
Next page
Else
txtread.Refresh
Call BitBlt(Picture1(0).hDC, 0, 0, txtread.Width, txtread.Height, txtreaddc, 0, 0, SRCCOPY)
End If
txtread.Visible = False

我本来想的是把一个textbox(代码中命名为txtread)分页输出到几个Picturebox(代码中命名为picture1() )中,可是试来试去,几个picturebox中所拷贝的内容都是第一页(也就是没按PageDown时)的内容,请高手帮我检查一下,
谢谢!
...全文
97 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

7,759

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧