vb 高手请进,新手提问 储存问题

来源:百度知道 编辑:UC知道 时间:2024/06/20 07:18:18
自己想做一个 如同快捷方式一样,但也有所不同的东西,向网吧的游戏管理页面一样!

Private Declare Function ExtractIcon Lib "shell32.dll" Alias "ExtractIconA" (ByVal hInst As Long, ByVal lpszExeFileName As String, ByVal nIconIndex As Long) As Long
Private Declare Function DrawIcon Lib "user32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal hIcon As Long) As Long
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
Const SW_SHOWNORMAL = 1 '打开文件

Private Sub Command1_Click()
Dim x1 As Long
Dim x2 As Long

Picture1.Cls
Picture1.AutoSize = True
Picture1.AutoRedraw = True

CommonDialog1.ShowOpen
lCount = ExtractIcon(App.hInstance, CommonDialog1.FileName, -1)
If lCount > 0 Then
astr = Com

在 Form_Load 中添加一句:
Text1.Text = GetSetting("我的工程", "设置", "Path", "")

Form_Unload 这样写:
Private Sub Form_Unload(Cancel As Integer)
SaveSetting "我的工程", "设置", "Path", Text1.Text
End Sub

抄袭:是美好的~
在 Form_Load 中添加一句:
Text1.Text = GetSetting("我的工程", "设置", "Path", "")

Form_Unload 这样写:
Private Sub Form_Unload(Cancel As Integer)
SaveSetting "我的工程", "设置", "Path", Text1.Text
End Sub