desktop上的字符.

Gue 2001-02-05 10:38:00
请问各位高手怎么在桌面上输出字符?如果要用API可否告知是那个函数,谢谢了.
...全文
184 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
vbdabster 2001-02-06
  • 打赏
  • 举报
回复
getdesktopwindow是得到那个窗口的,当前的?
prefix 2001-02-06
  • 打赏
  • 举报
回复
不用去Find那么多window啦,用GetDesktopWindow()。
TechnoFantasy 2001-02-06
  • 打赏
  • 举报
回复
就是textOut的第2、3个参数,分别代表x、y坐标
Gue 2001-02-06
  • 打赏
  • 举报
回复
不知道可不可以定位输出,如果可以应该怎么做呢?再次谢谢了。
TechnoFantasy 2001-02-06
  • 打赏
  • 举报
回复
不对,GetDesktopWindow函数获得的的确是桌面局柄,但是问题是占据桌面
显示图标的是一个ListView类的控件。所以你需要获得这个控件的窗口局柄
www.applevb.com
Gue 2001-02-06
  • 打赏
  • 举报
回复
如果用getdesktopwindow得到桌面的句柄,我把写成下面的这样对吗?
dim ldc as long
dim astr as string

ldc=getdesktopwindow()
astr="this is a samples"
call textout(ldc,10,20,astr,len(astr)

TechnoFantasy 2001-02-05
  • 打赏
  • 举报
回复
Dim ldc As Long
Dim astr As String
Dim hWindow As Long

hWindow = FindWindow("Progman", "Program Manager")
hWindow = FindWindowEx(hWindow, 0, "SHELLDLL_DefView", "")
hWindow = FindWindowEx(hWindow, 0, "SysListView32", "")
ldc = GetDC(hWindow)
astr = "this is a samples"
Debug.Print hWindow, ldc
Call TextOut(ldc, 10, 20, astr, Len(astr))

相应的API函数定义VB的API Loader中有
www.applevb.com

7,763

社区成员

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

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