VB 用BASIC语言写智能手机程序
来源:优易学  2011-4-1 15:00:11   【优易学:中国教育考试门户网】   资料下载   IT书店

 

  ''''''''''''第4节课
  Else If label5.Text =label17.Text Then
  image4.Top =94
  image4.Color =cgreen
  Else If label5.Text =label18.Text Then
  image4.Top =94
  image4.Color =cred
  Else If label5.Text =label19.Text Then
  image4.Top =94
  image4.Color =cblue
  '''''''''''''第5节课
  Else If label5.Text =label20.Text Then
  image4.Top =118
  image4.Color =cgreen
  Else If label5.Text =label21.Text Then
  image4.Top =118
  image4.Color =cred
  Else If label5.Text =label22.Text Then
  image4.Top =118
  image4.Color =cblue
  ''''''''''第6节课
  Else If label5.Text =label23.Text Then
  image4.Top =140
  image4.Color =cgreen
  Else If label5.Text =label24.Text Then
  image4.Top =140
  image4.Color =cred
  Else If label5.Text =label25.Text Then
  image4.Top =140
  image4.Color =cblue
  ''''''''''第七节课
  Else If label5.Text =label26.Text Then
  image4.Top =162
  image4.Color =cgreen
  Else If label5.Text =label27.Text Then
  image4.Top =162
  image4.Color =cred
  Else If label5.Text =label28.Text Then
  image4.Top =162
  image4.Color =cblue
  '''''''''第八节课
  Else If label5.Text =label29.Text Then
  image4.Top =183
  image4.Color =cgreen
  Else If label5.Text =label30.Text Then
  image4.Top =183
  image4.Color =cred
  Else If label5.Text =label31.Text Then
  image4.Top =183
  image4.Color =cblue
  Else
  image4.top =2000 ' 不符合条件,让指针不可见
  End If
  End Sub
  三、一个小小的关键所在
  用basic4ppc 写的程序,默认情况下,程序的退出按键是 一个圆圈 里面是 OK 如图

  点击OK 后,程序就直接退出了,即不能最小化,在后台一直运行, 这样,下次启动时,由于我们的程序是实时判断某个时间点,即 第一节 08:00 08:05 08:45 程序只仅当处于这三个值时,才有显示动作,如果是 08:06 就会造成不能正确显示,所以,我想到了,如何让程序关闭后,一直在后台最小化运行,解决的方法是: 在程序最先初化时,加入下面代码
  Sub App_Start
  Form2.show
  flb.New1("Form2",B4PObject(1))
  flb.MinimizeBox = True
  End Sub
  这样程序右上角原来的关闭按钮 OK 变成现在的 X 了,如图所示:

  点 X 后 程序还在后台运行,用任务管理器激活后,发现提示块显示正常
  当然,也可考虑到老师朋友们可能会有临时课务,比哪某位老师下午最后一节课不在,要你去代上,你可以做一个临时课务,直接在此输入要代的课即可。
  呵,用起来也还真不错。
  结束语
  这是我在ppc手机上写的第一个小工具,因为自己喜欢写程序,有些都是生活中碰到的问题,然后在睡前或睡醒前加点思索,于是就有了她。但愿这小小拙作,能给您抛砖引玉,使您有些动力去写自己喜欢的作品。有兴趣的朋友可以加以完善,比如上课时自动设为静音或振动,下课后再自动恢复等.

上一页  [1] [2] [3] 

责任编辑:小草

文章搜索:
 相关文章
热点资讯
资讯快报
热门课程培训