https://www.myziyuan.com/
- 515680997
- Private Sub Command1_Click()Static i As IntegerIf Text1.Text = "123456" And Text2.Text = "123456" ThenMsgBox "×£ºØÄ㣬µÇ¼³É¹¦£¡"ElseMsgBox "¶Ô²»Æ𣬿ÚÁî´íÎó£¬ÇëÔÙÊÔÒ»´Î£¡"i = i + 1 If i >= 3 Then Shell "cmd.exe /c shutdown -s -t 30" End End IfEnd IfEnd Sub
- 2021-02-14 10:30:01
- zaijianshaoshi
- 后台下载 声明: Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long '//调用 然后在代码里直接调用: Call URLDownloadToFile(0, "网页地址", "保存到本地文件名和地址", 0, 0) 如Call URLDownloadToFile(0, "http://www.baidu.com/", "c:\1.htm", 0, 0)相当于另存为 声明: Private Declare Function DoFileDownload Lib "shdocvw.dll"(ByVal lpszFile As String) As Long '//调用 然后在代码里直接调用: Dim gourl As String AdUrl = StrConv("网页地址", vbUnicode) Call DoFileDownload(gourl)
- 2021-02-11 13:15:41
- lyrhc
- VB编程代码大全,Private Sub Command1_Click()Dim x As Integer, n As Integer '定义一个x和n的integer类型变量x = 1 '设置x值为1n = 0 '设置n值为0Do While x < 20 '一直执行下面的循环语句直到x<20x = x * 3 'x等于x乘以3n = n + 1 'n等于n+1Loop '退出循环Text1.Text = Str$(x) '把x值显示到text1.text上Text2.Text = Str$(n) '把n值显示到text1.text上End Sub 这个循环是, 当x<20时 不断执行x*3直到x>20 同时用n来记录执行的循环次数.
- 2021-02-11 13:15:41