Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
CnVCL 组件包
» 关于TCnTrayIcon和TCnRS232
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: 关于TCnTrayIcon和TCnRS232
kendling
(小冬)
高级版主
MyvNet
UID 703
Digest Posts
5
Credits 978
Posts 580
点点分 978
Reading Access 101
Registered 2005-2-18
Location 广东
Status Offline
#1
Post at 2005-2-18 01:20
Profile
|
Site
|
Blog
|
P.M.
|
|
关于TCnTrayIcon和TCnRS232
TCnTrayIcon和TCnRS232应该增加一个Boolean的属性,以指示当前组件状态
如:
TCnTrayIcon增加Showing 为True时程序是显示状态,为False时程序为隐藏状态
TCnRS232增加Connection 为True时端口在打开状态,为False时端口在关闭状态
zjy
管理员
UID 2
Digest Posts
6
Credits 2385
Posts 1543
点点分 2385
Reading Access 102
Registered 2002-12-16
Location China
Status Offline
#2
Post at 2005-2-18 12:06
Profile
|
Site
|
Blog
|
P.M.
多谢建议!
这两个属性确实应该具备。CnRS232 已经增加了一个运行期只读属性 Connected,CnTrayIcon 已经通知作者进行更新。
更新过的组件您可以在下一版本发布时找到,或者从 CVS 中取得。
Zhou JingYu
CnPack Administrator
http://www.cnpack.org/
kendling
(小冬)
高级版主
MyvNet
UID 703
Digest Posts
5
Credits 978
Posts 580
点点分 978
Reading Access 101
Registered 2005-2-18
Location 广东
Status Offline
#3
Post at 2005-2-18 19:20
Profile
|
Site
|
Blog
|
P.M.
|
|
我自己已经更新了。
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#4
Post at 2005-2-19 20:11
Profile
|
Blog
|
P.M.
您说的Showing属性是指什么功能?
如果是图标是否显示,Active属性应该可以做到吧。
如果是CnTrayIcon所属的窗体是否显示,似乎不是CnTrayIcon所管的范围?
kendling
(小冬)
高级版主
MyvNet
UID 703
Digest Posts
5
Credits 978
Posts 580
点点分 978
Reading Access 101
Registered 2005-2-18
Location 广东
Status Offline
#5
Post at 2005-2-19 23:28
Profile
|
Site
|
Blog
|
P.M.
|
|
但如果你要做一个“显示/隐藏主窗口”的功能,不知道程序或主窗口是否在隐藏状态,功能该怎么做?
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#6
Post at 2005-2-20 14:15
Profile
|
Blog
|
P.M.
那个Form的Visible行不?
kendling
(小冬)
高级版主
MyvNet
UID 703
Digest Posts
5
Credits 978
Posts 580
点点分 978
Reading Access 101
Registered 2005-2-18
Location 广东
Status Offline
#7
Post at 2005-2-20 17:59
Profile
|
Site
|
Blog
|
P.M.
|
|
试过了,不行,隐藏后就不可以打开了。
代码如下,你可以试试:
if not Form1.Visible then
CnTrayIcon1.ShowApplication
else
CnTrayIcon1.HideApplication;
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#8
Post at 2005-2-22 22:25
Profile
|
Blog
|
P.M.
您说的没错,俩状态是不一致
俩状态不一致,不过应该将状态统一起来,无需加其他属性了。
上面代码无效的情况,实际上可以算是CnTrayIcon的一个bug吧。
我们已经修正这个问题了。
kendling
(小冬)
高级版主
MyvNet
UID 703
Digest Posts
5
Credits 978
Posts 580
点点分 978
Reading Access 101
Registered 2005-2-18
Location 广东
Status Offline
#9
Post at 2005-2-22 23:30
Profile
|
Site
|
Blog
|
P.M.
|
|
谢谢。
Poll
Trade
Reward
Activity
CnPack Forum
CnPack English Forum
> CnWizards IDE Wizards
> CVSTracNT
> Announcements & Others
All times are GMT++8, the time now is 2024-11-24 12:50
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.019041 second(s), 7 queries , Gzip enabled
TOP
Clear Cookies
-
Contact Us
-
CnPack Website
-
Archiver
-
WAP
Member's CP Home
Edit Profile
Credits Transaction
Public User Groups
Buddy List
Main
Page Views
User Agents
Posts History
Top Forums
Top Threads
Post Ranking
Credit Ranking
Online Time
Team
Moderation Stats