| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 732 人关注过本帖
标题:直接操作DWG文件做监控软件
只看楼主 加入收藏
asuo888
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2006-4-11
收藏
 问题点数:0 回复次数:0 
直接操作DWG文件做监控软件


Dim val As Integer
Dim textid As Long
Dim ScrRect As MICRODRAWOCXLib.AsRect
Dim TextRect As MICRODRAWOCXLib.AsRect

Private Sub Command1_Click()
textid = MicroDrawOcx1.FindText(Text1.Text, 0)
If textid > 0 Then '找到文字,居中显示
Set ScrRect = MicroDrawOcx1.GetScreenRect()
Set TextRect = MicroDrawOcx1.GetRectEx(textid)
MicroDrawOcx1.PanView TextRect.Center().x, TextRect.Center().y, ScrRect.Center().x, ScrRect.Center().y

Timer1.Interval = 100
End If

End Sub

Private Sub Command2_Click()
Timer1.Interval = 0
End Sub

Private Sub Form_Load()
val = 0
End Sub

Private Sub Timer1_Timer()
If textid > 0 Then
val = val + 1
Text = Text2.Text + Str(val)
MicroDrawOcx1.SetLong textid, LONG_DISPLAY_WIDTH, 3
MicroDrawOcx1.SetObjectColor textid, RGB(0, 255, 0)
MicroDrawOcx1.SetString textid, STRING_TEXT_STRING, Text
MicroDrawOcx1.RedrawObject textid
End If

End Sub
源码可以到 www.microdraw.cn 下载

搜索更多相关主题的帖子: DWG 监控软件 文件 
2006-04-11 21:13
快速回复:直接操作DWG文件做监控软件
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015480 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved