vbÓÃapiµ÷ÓöԻ°¿ò
½¨Ò»¸öÄ£¿é
Public Declare Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
Public Type OPENFILENAME
lStructSize As Long
hwndOwner As Long
hInstance As Long
lpstrFilter As String
lpstrCustomFilter As String
nMaxCustFilter As Long
nFilterIndex As Long
lpstrFile As String
nMaxFile As Long
lpstrFileTitle As String
nMaxFileTitle As Long
lpstrInitialDir As String
lpstrTitle As String
flags As Long
nFileOffset As Integer
nFileExtension As Integer
lpstrDefExt As String
lCustData As Long
lpfnHook As Long
lpTemplateName As String
End Type
´°ÌåÉÏ·ÅÒ»¸ö±à¼¿òºÍ°´Å¥
Private Sub Command1_Click()
Dim ofn As OPENFILENAME
Dim strRtn As String
ofn.lStructSize = Len(ofn)
ofn.hwndOwner = Me.hwnd
ofn.hInstance = App.hInstance
ofn.lpstrFilter = "ËùÓÐÎļþ"
ofn.lpstrFile = Space(254)
ofn.nMaxFile = 255
ofn.lpstrFileTitle = Space(254)
ofn.nMaxFileTitle = 255
ofn.lpstrInitialDir = App.Path
ofn.lpstrTitle = "´ò¿ªÎļþ"
ofn.flags = 6148
rtn = GetOpenFileName(ofn)
If rtn >= 1 Then
Text1.Text = ofn.lpstrFile
Else
Text1.Text = "Cancel Was Pressed"
End If
End Sub
Ïà¹ØÎĵµ£º
'´úÂë:
Option Explicit
'======================ÓÃÓÚ²éÕÒ½ø³ÌºÍÖÕÖ¹½ø³ÌµÄAPIº¯Êý³£Êý¶¨Òå================ =====
Private Declare Function CreateToolhelpSnapshot Lib "kernel32" Alias "CreateToolhelp32Snapshot" (ByVal lFlags As Long, ByVal lProcessID As Long) As Long
Private Declare Function ProcessF ......
MYSQL Ó¦ÓÃÊ®·Ö¹ã·¶£¬ºÜ¶àÍøÕ¾¼¸ºõ¶¼ÔÚÓÃËû£¬ÒòΪËûµÄСÇɺÍÁé»îÐԵȷ½ÃæÈÃÎÒ¾ö¶¨Òª¶ÔËû½øÐÐÑо¿£¬µ½ÏÖÔÚÒѾ³É¹¦µÄ²»Óþ¹ýODBC£¬ADOµÈ·½Ê½¾Í¿ÉÒÔ¶ÁÈ¡ºÍ¸üÐÂÊý¾Ý¡£
ºÃÁ˲»¶àÂÞ࣬ÒÔÏÂÎÒÀ´½éÉÜ×ܸö³ÌÐòµÄϸ½Ú:
£¨Ò»£©APIÉùÃ÷
1. '·ÖÅä»ò³õʼ»¯ÊʺÏmysql_real_connect()µÄÒ»¸öMYSQL¶ÔÏñ¡ ......
È«ÆÁ
Private Sub Form_Load()
Me.Width = Screen.Width
Me.Height = Screen.Height
Me.WindowState = 2
End Sub
Öö¥
1.ÔÚVBµÄͨÓôúÂëÀïдÈëAPIÉùÃ÷
Private Declare Function SetWindowPos& Lib "user32" (ByVal hwnd As Long, _
&n ......