【绝地求生全套源码】【唐人社导航源码】【打印盒子源码】vb 源码题库

2024-12-26 02:55:58 来源:怎么进口溯源码燕窝 分类:综合

1.vb高手看一下这十几行源码,源码为什么一执行就显示:“编译错误:end select没有select case”
2.vb游戏代码大全vb小游戏源代码
3.vb问题:希望可以给代码

vb 源码题库

vb高手看一下这十几行源码,题库为什么一执行就显示:“编译错误:end select没有select case”

       后面又少个 end if ,源码另外你的代码写的不规范例,不太好看,以后这样写程序,把我这块复制过去就好用了!

       Private Sub Command1_Click(Index As Integer)

       Select Case Index

       Case 0 To 9

        If FirstNum Then

        StrNum1 = Str(Index)

        FirstNum = False

        Else

        StrNum1 = StrNum1 + Str(Index)

        End If

       Case

        If pointflag = False Then

        If StrNum1 = True Then

        StrNum1 = "0."

        StrNum1 = False

        Else

        StrNum1 = StrNum1 + "."

        pointflag = True

        End If

        If pointflag = True Then Exit Sub '这可以这样写,你写的少个end if ,也可以像我这样写

        End If

        Text1.Text = StrNum1

       End Select

       End Sub

vb游戏代码大全vb小游戏源代码

       关于vb游戏代码大全,vb小游戏源代码这个很多人还不知道,题库绝地求生全套源码今天来为大家解答以上的源码问题,现在让我们一起来看看吧!题库

       1、源码Rem 窗体创建三个单选框按钮,题库OptionOption2、源码Option3 Private Sub Form_Activate() Option1.Caption = "石头" Option2.Caption = "剪刀" Option3.Caption = "布" Option1.Value = False Option2.Value = False Option3.Value = False End Sub Private Sub Option1_Click() Randomize Select Case Int(3 * Rnd) Case 0: MsgBox "对方也出石头!题库继续!源码唐人社导航源码" Case 1: MsgBox "哈哈!题库你赢了!源码对方出的题库是剪刀!奖励你一个苹果!源码" Case 2: MsgBox "你输了!打印盒子源码对方出的是布哦!不好意思,苹果给对方了哈!" End Select Option1.Value = False End Sub Private Sub Option2_Click() Randomize Select Case Int(3 * Rnd) Case 0: MsgBox "你输了!对方出的产品朔源码奶粉是石头哦!不好意思。

       2、苹果给对方了哈!" Case 1: MsgBox "对方也出剪刀!继续!源码熊编程机甲" Case 2: MsgBox "哈哈!你赢了!对方出的是布!奖励你一个苹果!" End Select Option2.Value = False End Sub Private Sub Option3_Click() Randomize Select Case Int(3 * Rnd) Case 0: MsgBox "哈哈!你赢了!对方出的是石头!奖励你一个苹果!" Case 1: MsgBox "你输了!对方出的是剪刀哦!不好意思,苹果给对方了哈!" Case 2: MsgBox "对方也出布!继续!" End Select Option3.Value = False End Sub。

vb问题:希望可以给代码

       先新建一个模块,里面添加API声明

       Option Explicit

       Declare Function MoveWindow Lib "user" (ByVal hwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long

       Declare Function SendMessage Lib "user" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

       Public Const LB_INITSTORAGE = &H1A8

       Public Const LB_ADDSTRING = &H

       Public Const WM_SETREDRAW = &HB

       Public Const WM_VSCROLL = &H

       Public Const SB_BOTTOM = 7

       Declare Function GetLogicalDrives Lib "kernel" () As Long

       Declare Function FindFirstFile Lib "kernel" Alias "FindFirstFileA" (ByVal lpFileName As String, lpFindFileData As WIN_FIND_DATA) As Long

       Public Const INVALID_HANDLE_VALUE = -1

       Declare Function FindNextFile Lib "kernel" Alias "FindNextFileA" (ByVal hFindFile As Long, lpFindFileData As WIN_FIND_DATA) As Long

       Declare Function FindClose Lib "kernel" (ByVal hFindFile As Long) As Long

       Type FILETIME

       dwLowDateTime As Long

       dwHighDateTime As Long

       End Type

       Public Const MaxLFNPath =

       Type WIN_FIND_DATA

       dwFileAttributes As Long

       ftCreationTime As FILETIME

       ftLastAccessTime As FILETIME

       ftLastWriteTime As FILETIME

       nFileSizeHigh As Long

       nFileSizeLow As Long

       dwReserved0 As Long

       dwReserved1 As Long

       cFileName As String * MaxLFNPath

       cShortFileName As String *

       End Type

       然后在窗体上制作2个菜单,放置一个ListBox和一个PictureBox

       完整代码如下:

       Option Explicit

       Dim PicHeight%, hLB&, FileSpec$, UseFileSpec%

       Dim TotalDirs%, TotalFiles%, Running%

       Dim WFD As WIN_FIND_DATA, hItem&, hFile&

       Const vbBackslash = "\"

       Const vbAllFiles = "*.*"

       Const vbKeyDot =

       Private Sub Form_Load()

       ScaleMode = vbPixels

       PicHeight% = Picture1.Height

       hLB& = List1.hwnd

       SendMessage hLB&, LB_INITSTORAGE, &, ByVal & *

       Move (Screen.Width - Width) * 0.5, (Screen.Height - Height) * 0.5

       End Sub

       Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

       If KeyCode = vbKeyEscape And Running% Then Running% = False

       End Sub

       Private Sub Form_Resize()

       MoveWindow hLB&, 0, 0, ScaleWidth, ScaleHeight - PicHeight%, True

       End Sub

       Private Sub Form_Unload(Cancel As Integer)

       Set Form1 = Nothing

       End

       End Sub

       Private Sub mnuFindFiles_Click()

       If Running% Then: Running% = False: Exit Sub

       Dim drvbitmask&, maxpwr%, pwr%

       On Error Resume Next

       FileSpec$ = InputBox("Enter a file spec:" & vbCrLf & vbCrLf & "Searching will begin at drive A and continue " & "until no more drives are found. " & "Click Stop! at any time." & vbCrLf & "The * and ? wildcards can be used.", "Find File(s)", "*.exe")

       If Len(FileSpec$) = 0 Then Exit Sub

       MousePointer =

       Running% = True

       UseFileSpec% = True

       mnuFindFiles.Caption = "&Stop!"

       mnuFolderInfo.Enabled = False

       List1.Clear

       drvbitmask& = GetLogicalDrives()

       If drvbitmask& Then

       maxpwr% = Int(Log(drvbitmask&) / Log(2))

       For pwr% = 0 To maxpwr%

       If Running% And (2 ^ pwr% And drvbitmask&) Then _

       Call SearchDirs(Chr$(vbKeyA + pwr%) & ":\")

       Next

       End If

       Running% = False

       UseFileSpec% = False

       mnuFindFiles.Caption = "&Find File(s)..."

       mnuFolderInfo.Enabled = True

       MousePointer = 0

       Picture1.Cls

       Picture1.Print "Find File(s): " & List1.ListCount & " items found matching " & """" & FileSpec$ & """"

       Beep

       End Sub

       Private Sub mnuFolderInfo_Click()

       If Running% Then: Running% = False: Exit Sub

       Dim searchpath$

       On Error Resume Next

       searchpath$ = InputBox("输入要查找的目标路径", "文件夹信息", "C:\")

       If Len(searchpath$) < 2 Then Exit Sub

       If Mid$(searchpath$, 2, 1) <> ":" Then Exit Sub

       If Right$(searchpath$, 1) <> vbBackslash Then searchpath$ = searchpath$ & vbBackslash

       If FindClose(FindFirstFile(searchpath$ & vbAllFiles, WFD)) = False Then

       End If

       MousePointer =

       Running% = True

       mnuFolderInfo.Caption = "停止(&S)"

       mnuFindFiles.Enabled = False

       List1.Clear

       TotalDirs% = 0

       TotalFiles% = 0

       Call SearchDirs(searchpath$)

       Running% = False

       mnuFolderInfo.Caption = "文件夹信息(&F)"

       mnuFindFiles.Enabled = True

       Picture1.Cls

       MousePointer = 0

       MsgBox "Total folders: " & vbTab & TotalDirs% & vbCrLf & "Total files: " & vbTab & TotalFiles%, , "Folder Info for: " & searchpath$

       End Sub

       Private Sub SearchDirs(curpath$)

       Dim dirs%, dirbuf$(), i%

       Picture1.Cls

       Picture1.Print "Searching " & curpath$

       DoEvents

       If Not Running% Then Exit Sub

       hItem& = FindFirstFile(curpath$ & vbAllFiles, WFD)

       If hItem& <> INVALID_HANDLE_VALUE Then

       Do

       If (WFD.dwFileAttributes And vbDirectory) Then

       If Asc(WFD.cFileName) <> vbKeyDot Then

       TotalDirs% = TotalDirs% + 1

       If (dirs% Mod ) = 0 Then ReDim Preserve dirbuf$(dirs% + )

       dirs% = dirs% + 1

       dirbuf$(dirs%) = Left$(WFD.cFileName, InStr(WFD.cFileName, vbNullChar) - 1)

       End If

       ElseIf Not UseFileSpec% Then

       TotalFiles% = TotalFiles% + 1

       End If

       Loop While FindNextFile(hItem&, WFD)

       Call FindClose(hItem&)

       End If

       If UseFileSpec% Then

       SendMessage hLB&, WM_SETREDRAW, 0, 0

       Call SearchFileSpec(curpath$)

       SendMessage hLB&, WM_VSCROLL, SB_BOTTOM, 0

       SendMessage hLB&, WM_SETREDRAW, 1, 0

       End If

       For i% = 1 To dirs%: SearchDirs curpath$ & dirbuf$(i%) & vbBackslash: Next i%

       End Sub

       Private Sub SearchFileSpec(curpath$)

       hFile& = FindFirstFile(curpath$ & FileSpec$, WFD)

       If hFile& <> INVALID_HANDLE_VALUE Then

       Do

       DoEvents

       If Not Running% Then Exit Sub

       SendMessage hLB&, LB_ADDSTRING, 0, ByVal curpath$ & Left$(WFD.cFileName, InStr(WFD.cFileName, vbNullChar) - 1)

       Loop While FindNextFile(hFile&, WFD)

       Call FindClose(hFile&)

       End If

       End Sub

       程序运行时就能够通过输入文件名而进行模糊查找了

       如果还不明白,就加我QQ,我把我做好的程序发给你看

       QQ号:

更多资讯请点击:综合

热门资讯

gms 源码

2024-12-26 02:401934人浏览

trx国际理财源码_国际理财软件

2024-12-26 01:501650人浏览

大富源码运营版_大富源码下载

2024-12-26 01:491792人浏览

coreutils 源码

2024-12-26 01:41926人浏览

股价15元以下源码_15元的股票

2024-12-26 01:14332人浏览

推荐资讯

opencl源码

1.OpenCL安装过程记录2....查了半天没看懂,能简单明了的告诉我是干什么的有什么功能吗_百度知 ...3.OpenCL,OpenGL和DirectX三者的区别4.O

医药小程序商城源码_医药小程序商城源码是什么

1.医药类进小程序需要什么资质医药类进小程序需要什么资质 医药类小程序的开发与运营,需要满足一系列特定的资质要求,以确保合法合规并保障用户健康权益。首先,企业必须拥有营业执照,证明其合法经营资格。