VB编程注释求源码及注释谢谢

vb写一个简单红绿灯程序代码,希望能注释和思路写清楚一点,我菜鸟!谢谢_百度知道
vb写一个简单红绿灯程序代码,希望能注释和思路写清楚一点,我菜鸟!谢谢
然后这样重复,先红色。再过20秒红色只有一个计时器(Timer)和三个Shape控件,过5秒绿色。再一个按钮停止,还有一个按钮启动,过20秒黄色
提问者采纳
If Sj = 20 And (ZT = 1 Or ZT = 3) Then
Shape1.Enabled = True
Shape3.FillColor = &HFF&
Qzt = 3Else
Command1.Enabled = FalseEnd SubPrivate Sub Timer1_Timer()
Sj = Sj + 1
If ZT = 1 Or ZT = 3 Then Command1.Caption = &quot.FillColor = &H40&
&#39.FillColor = &H8080&
Shape3;绿灯
Shape2.Shape = 3Command1;暗红
If ZT = 2 Then Command1;开始&quot, Qzt As Integer.FillColor = &H40&
ZT = 0End IfEnd SubPrivate Sub Form_Load()
Shape1.FillColor = &H4000&
Shape2.Caption = (20 - Sj) & &
Timer1; Then
Command1.FillColor = &H8080& &#39,SJ是时间记录Dim ZT As Integer.FillStyle = 0 &#39.FillColor = &HFFFF&
End Select
Sj = 0 End If If Sj = 5 And ZT = 2 Then
Shape1.Interval = 1000
&#39.Caption = &quot.Shape = 3
Shape2;开始&开始&quot&#39.FillColor = &HFFFF&
Shape2.Caption = &quot.FillColor = &H8080&
Shape3.FillColor = &H8080&
Shape3, Sj As IntegerPrivate Sub Command1_Click()If Command1;ZT是当前状态记录.FillColor = &H40&
Select Case ZT
Shape2;停止&红灯
Shape1.Shape = 3
Shape3;20停止&黄灯
Shape3.FillColor = &H4000&
Shape2;暗绿
Shape2;停止&quot.Caption = &一秒一次加入倒计时
Timer1,Qzt是前状态记录;
Timer1.FillColor = &H40&
If Qzt = 3 Then
Shape1.Caption = (5 - Sj) & &
Timer1.FillStyle = 0 &#39.FillStyle = 0 &#39.FillColor = &HFF00&
Shape3.Enabled = False
Shape1;暗黄
Shape3.FillColor = &H4000&
Shape2.FillColor = &H4000& &#39
提问者评价
其他类似问题
为您推荐:
您可能关注的推广
程序代码的相关知识
其他2条回答
Interval = 20000Shape1;停止&quot.Enabled = TrueTimer1.Interval = 20000Shape1.FillColor = 65535Exit SubEnd IfIf Shape1.FillColor = &HFF00&Command1;Timer1.BorderColor = 65280Shape1.Interval = 5000Shape1.Interval = 1End SubPrivate Sub Timer1_Timer()If Shape1.FillColor = 255Exit SubEnd IfIf Shape1.BorderColor = 65280 ThenTimer1.BorderColor = &HFF00&Shape1.BorderColor = 65535Shape1Private Sub Command1_Click()Timer1.BorderColor = 255 ThenTimer1.Enabled = FalseEnd SubPrivate Sub Form_Load()Shape1.Caption = &quot.BorderColor = 255Shape1.BorderColor = 65535 ThenTimer1
窗体上随意放一个计时器(Timer)和三个Shape控件,还有一个按钮:
Private Sub Command1_Click()
Timer1.Enabled = True
Timer1_Timer
Private Sub Form_Load()
Shape1.Shape = 3
Shape1.FillColor = vbGrayText
Shape1.FillStyle = 0
Shape2.Shape = 3
Shape2.FillColor = vbGrayText
Shape2.FillStyle = 0
Shape3.Shape = 3
Shape3.FillColor = vbGrayText
Shape3.FillStyle = 0
Shape1.Move Me.Width / 2 - 500, Me.Height / 6 - 500,
Shape2.Move Me.Width / 2 - 500, Me.Height / 3 - 500,
Shape3.Move Me.Width / 2 - 500, Me.Height / 2 - 500,
Timer1.Enabled = False
Timer1.Interval = 1000
Private Sub Timer1_Timer()
Static n As Integer
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁您的举报已经提交成功,我们将尽快处理,谢谢!
适用简易程序的法庭审判,同普通程序之法庭审判相比,基本区别就在于其庭审程序的简化。
简易程序法庭审判具有以下特点:
(1)审判员一人独任审判。
大家还关注
(window.slotbydup=window.slotbydup || []).push({
id: '2081942',
container: s,
size: '1000,60',
display: 'inlay-fix'VBGood网站全文搜索
搜索VBGood全站网页(全文搜索)
论坛最新话题
作者:, 回复:2, 阅读:30, 日期: 作者:, 回复:1, 阅读:50, 日期: 作者:, 回复:8, 阅读:48, 日期: 作者:, 回复:2, 阅读:86, 日期: 作者:, 回复:1, 阅读:115, 日期: 作者:, 回复:12, 阅读:217, 日期: 作者:, 回复:2, 阅读:93, 日期: 作者:, 回复:1, 阅读:219, 日期: 作者:, 回复:4, 阅读:231, 日期: 作者:, 回复:2, 阅读:250, 日期: 作者:, 回复:2, 阅读:194, 日期: 作者:, 回复:2, 阅读:181, 日期: 作者:, 回复:2, 阅读:249, 日期: 作者:, 回复:1, 阅读:443, 日期: 作者:, 回复:4, 阅读:337, 日期: 作者:, 回复:1, 阅读:203, 日期: 作者:, 回复:5, 阅读:304, 日期: 作者:, 回复:1, 阅读:207, 日期: 作者:, 回复:1, 阅读:244, 日期: 作者:, 回复:2, 阅读:517, 日期:
VBGood RSS 订阅
每周超过200个关于VB编程的精彩新话题,现在就订阅吧!
论坛历史精华
为VBGood提供空间用VB编写,需求源代码,我的QQ是,谢谢_百度知道
用VB编写,需求源代码,我的QQ是,谢谢
com/zhidao/wh%3D600%2C800/sign=/zhidao/wh%3D450%2C600/sign=1ffcf446c5f6dbdfa9ec8acfac7fd.baidu.hiphotos.jpg" esrc="/zhidao/pic/item/bdbe5cff://b.jpg" target="_blank" title="点击查看大图" class="ikqb_img_alink"><a href="http<a href="http://g.hiphotos
提问者采纳
做出来问题不大,不过这规则说明是否简单了一些?
提问者评价
其他类似问题
为您推荐:
源代码的相关知识
其他1条回答
你都不想多打字说明问题,截个图你们去猜吧!
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁求解释vb程序代码_百度知道
求解释vb程序代码
Enabled = False
&#39;计算空档的行列
r1 = space &#92;判断是否相邻
n = Arrange(Index)
Arrange(Index) = Arrange(space)
Arrange(space) = n
imgPT(space) = PC,使鼠标点击失效
End IfEnd Sub是一个拼图小游戏的部分代码;步,求每句解释, vbInformation
&#39.GraphicCell(Arrange(space))
imgPT(Index) = LoadPicture()
space = Index
steps = steps + 1
txtS, c1 As Integer
Dim r2 As IntegerOption ExplicitPublic Rows As Integer, Cols As Integer &#39;判断是否拼完!共用了&步数Public showref As Boolean
&#39;空档的位置Private started As Boolean
&#39, c2 As Integer
Dim n As Integer
Dim i As Integer
If Not started Then Exit Sub
c1 = space Mod Cols
&#39;图象控件与数组的对应关系Private space As Integer
&#39。&图块的行列数Const GAP As Integer = 2
&#39;行列图块的间距Private Arrange() As Integer
&#39; Cols
c2 = Index Mod Cols
&#39;计算点击的行列
r2 = Index &#92;是否已开始Private steps As Integer
&#39;恭喜.Text = steps
If isOK() Then
MsgBox &拼图完成时;是否显示参考图
Private Sub imgPT_Click(Index As Integer)
Dim r1 As I & steps & & Cols
If Abs(c1 - c2) = 1 And Abs(r1 - r2) = 0 Or Abs(c1 - c2) = 0 And Abs(r1 - r2) = 1 Then
&#39,完成拼图,如果已完成
For i = 1 To Rows * Cols - 1
提问者采纳
计算空档的行列
r1 = space &#92;判断是否相邻这几句就是用来判断 空白和图像的位置 c1;计算点击的行列
r2 = Index &#92c1 = space Mod Cols
&#39; Cols
If Abs(c1 - c2) = 1 And Abs(r1 - r2) = 0 Or Abs(c1 - c2) = 0 And Abs(r1 - r2) = 1 Then
&#39,r1 就是行列的位置 c2; Cols
c2 = Index Mod Cols
那这之后一直到if之前这一段大致是什么意思
n = Arrange(Index)
Arrange(Index) = Arrange(space)
Arrange(space) = n &#39;交换 空白和点击的变量内容
imgPT(space) = PC.GraphicCell(Arrange(space))
imgPT(Index) = LoadPicture() &#39;交换图片
space = Index
steps = steps + 1 &#39;步数加1
txtStep.Text = steps &#39;文本框显示步数这段么?
嗯嗯我私信你了
提问者评价
来自团队:
其他类似问题
为您推荐:
vb程序的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁

我要回帖

更多关于 jquery源码中文注释 的文章

 

随机推荐