易截截图软件、单文件、免安装、纯绿色、仅160KB

[VB]简单Timer

Public Class Form1
Dim x As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
x = 1
Timer1.Interval = 1000
Timer1.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Label1.Left = Label1.Left + x * 100
If Label1.Left <= 0 Then
x = 1
End If
If Label1.Left + Label1.Width >= Me.Width Then
x = -1
End If
End Sub
End Class


相关文档:

VB.NET中操作xml文件(插入节点、修改、删除)

已知有一个XML文件(bookstore.xml)如下:
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
<book genre="fantasy" ISBN="2-3631-4">
<title>Oberon's Legacy</title>
<author>Corets, Eva</author>
<price>5.95</price>
</book>
< ......

vb.net SQL数据库操作(读取、修改、删除)

        Dim rs As ADODB.Recordset
Dim sqlstr As String
 
'查询
        sqlstr = "select * from 表名 where 字段名 = '" & 查询的内容 & "'"
        rs = VScn.Execute("" & SqlSt ......

VB mcisendstring 方法


做个mp3播放器,用realplay和WMP做出来的程序内存占用太大。
如果你仅仅是播放MP3,建议使用API函数mciSendString。
Option Explicit
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal
lpstrReturnString As String, ByVal uReturnLength As Lo ......

VB与Windows API 间的呼叫技巧

 一般会使用WINDOW API的情况,实在是因为VB本身不提供某些功能,但是,程式所
需又不得不然,例如:读取Registry内的资
料,VB只提供SaveSetting、Getsetting 等
系列的指令,但是它只能读取特定地区的值,要读、删、更动其他区域的值时,就无

使用。再如:仔细看一看Combo Box的Events,其中 ......

骇人听闻,VB遇到这现象,大家小心哇~

YXOnline已经接近尾声,为了处理一些界面的问题,测试一个C++的DLL
一个函数,用deasambling看C++的代码是没有错误的,但是到了VB,请看
b的返回值是True 不管C++和VB相互键约定True和False各对应为什么数值
这里已经是True了
但那时显示True = True 仍旧不执行第一个Msgbox
直接跳到Else
而如果省略b = True 为 If b Then ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号