惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
NISL@THU
NISL@THU
E
Exploit-DB.com RSS Feed
L
LINUX DO - 热门话题
L
Lohrmann on Cybersecurity
K
Kaspersky official blog
Project Zero
Project Zero
Cisco Talos Blog
Cisco Talos Blog
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
S
Schneier on Security
G
GRAHAM CLULEY
The Hacker News
The Hacker News
T
Threat Research - Cisco Blogs
Scott Helme
Scott Helme
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy & Cybersecurity Law Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
T
Tor Project blog
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
爱范儿
爱范儿
P
Privacy International News Feed
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
S
Securelist
G
Google Developers Blog
The Last Watchdog
The Last Watchdog
Google Online Security Blog
Google Online Security Blog
美团技术团队
F
Fortinet All Blogs
小众软件
小众软件
Recorded Future
Recorded Future
V
Visual Studio Blog
B
Blog RSS Feed
H
Help Net Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
Martin Fowler
Martin Fowler
Latest news
Latest news
Spread Privacy
Spread Privacy
H
Heimdal Security Blog

博客园 - TangHuawei

設置RichTextBox行距 - TangHuawei - 博客园 新的一年又开始了 C#.NET windows控件实现水印 C#纯数学方法递归实现货币数字转换中文 移动没有标题栏的窗口 - TangHuawei - 博客园 让程序更智能-自动选择功能的实现 - TangHuawei - 博客园 用VB实现局域网屏幕监视 如何在VB6中实现文字“打屏”及霓虹灯效果 - TangHuawei - 博客园 用VB“破解”有时间限制的程序 用VB5 Winsock控件创建TCPIP客户机 服务器程序 用VB产生随机密码 用vb开发通信软件 用VB设计基于代理服务器的网络计费系统 用VB设计能适应各种显示属性的界面 用VB设计软件封面 用VB实现彩蝶飞舞 游动的窗体 有历史记录功能的菜单 远程共享显示及声音的实现
让复选框生动起来
TangHuawei · 2007-01-12 · via 博客园 - TangHuawei

复选框内包含了检查符号,表示男

复选框内未包含检查符号,表示女

    我们来改进一下复选框。选中性别复选框,单击在属性表“事件/单击”右边的生成器按钮,选择代码生成器,就出现了代码的编辑窗口。写入如下程序:

Private Sub 性别_Click()

    注释:根据复选框的值显示男或女

    If (Me![性别] = -1) Then       注释:如果“是”就把标签改成“男”
      Me![性别标签].Caption = "男"
    End If

    If (Me![性别] = 0) Then        注释:如果“否”就把标签改成“女”
      Me![性别标签].Caption = "女"
    End If

End Sub

    以上这段程序能在单击复选框时自动改编标签显示的内容。为了在移动记录时正确显示性别,还需要在窗体的“事件/成为当前”里把这段程序再写一遍。

Private Sub Form_Current()

    注释:根据复选框的值显示男或女

    If (Me![性别] = -1) Then       注释:如果“是”就把标签改成“男”
      Me![性别标签].Caption = "男"
    End If

    If (Me![性别] = 0) Then        注释:如果“否”就把标签改成“女”
      Me![性别标签].Caption = "女"
    End If

End Sub