VBµ÷ÕûExcel¸ñʽ
Private Sub Cmd_OK_Click()
Dim ExcelAppX As Excel.Application
Dim ExcelBookX As Excel.Workbook
Dim ExcelSheetX As Excel.Worksheet
Dim a(1 To 3) As Single
Dim strFormat As Variant
a(1) = 7.3456
a(2) = 2.43
a(3) = 0
strFormat = "£¤#,##0." & String(CLng(TxTNumber.Text), "0") & ";£¤-#,##0." & String(CLng(TxTNumber.Text), "0")
Set ExcelAppX = CreateObject("Excel.Application")
Set ExcelBookX = ExcelAppX.Workbooks().Add(App.Path & "\a.xls")
ExcelAppX.Visible = True
Set ExcelSheetX = ExcelBookX.Worksheets("Sheet1")
ExcelSheetX.Cells(1, 1).Value = a(1)
ExcelSheetX.Cells(1, 2).Value = a(2)
ExcelSheetX.Cells(1, 3).Value = a(3)
ExcelSheetX.Cells(1, 1).NumberFormatLocal = strFormat
ExcelSheetX.Cells(1, 2).NumberFormatLocal = strFormat
ExcelSheetX.Cells(1, 3).NumberFormatLocal = strFormat
ExcelAppX.Application.Visible = True
ExcelSheetX.PrintPreview
ExcelAppX.DisplayAlerts = False
Set ExcelAppX = Nothing
Set ExcelBookX = Nothing
Set ExcelSheetX = Nothing
End Sub
Ïà¹ØÎĵµ£º
Dim p(10000, 1) As Double
Dim num As Integer
Dim ptx As Single
Dim pty As Single
Dim w0, w1, w2, w3 As Single
Private Sub Command1_Click()
Dim t As Single
Dim i As Integer
Dim f0, f1, f2, f3 As Single
Picture1.DrawWidth = 3
For t = 0 To 1 St ......
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_NCLBUTTONDOWN = &HA1
Private Const HTCAPTION = 2
Priva ......
Private Type SECURITY_ATTRIBUTES
nLength As Long
lpSecurityDescriptor As Long
bInheritHandle As Boolean
End Type
Dim lang As String
Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hkey As Long, ByV ......
×î½üÓÉÓÚ¹¤×÷ÏîÄ¿ÔÒò£¬ÁÙʱҪÇó×öÒ»¸ö¾ÖÓòÍøɨÃèÈí¼þ¡£¹¦ÄÜÒªÇó£¬É¨Ãè³öIPµØÖ·ÒÔ¼°¶ÔÓ¦µÄMACµØÖ·¡£¹¦ÄܱȽϼòµ¥¡£ÓÚÊǺܿì¾Í×öÁË¡£²ÉÓõĿª·¢¹¤¾ßÊÇ VB6.0
ʹÓ÷½·¨ÊÇͨ¹ý·¢ËÍ ARP°ü£¬¹ã²¥ IPµØÖ·µÄ·½Ê½À´»ñµÃ ¶ÔÓ¦µÄ MACµØÖ·£¬SendARP£¨£©¡£
ÓÐһЩϸ½ÚҪעÒ⣬¾ÍÊÇ Êä³öMACµØÖ ......
VB¸ù¾Ý´°¿Ú±êÌâ»ñÈ¡Ó¦ÓóÌÐòÍêÕû·¾¶(À´×ÔÍøÂç)
Option Explicit
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId A ......