求助各位大侠,这个图片的API命令是什么?
求助,
我想用vb调用这个图片的API 命令,有谁知道命令么,谢谢 --------------------编程问答-------------------- 晕,你怎么放的是自己机器上的链接
file:///C:/Documents%20and%20Settings/188964/Desktop/桌面.jpg --------------------编程问答-------------------- 大神留个邮箱我给你发过去 --------------------编程问答-------------------- --------------------编程问答-------------------- 有控件的
添加部件 Microsoft common Dialog control 6.0 (sp6) --------------------编程问答-------------------- CommonDialog1.DialogTitle = "打开要修改的描述文件"
CommonDialog1.Filter = "(*.cfg)|*.cfg|(*.txt)|*.txt"
CommonDialog1.ShowOpen’显示打开文件地址
Label1.Caption = CommonDialog1.FileName
If CommonDialog1.FileName = "" Then
Exit Sub
End If --------------------编程问答-------------------- Option Explicit '强制宣告定义变量
Dim DeskPath$ '定义变量
Private Sub Form_Load()
'将窗体居中显示 (屏幕宽度减去窗体的宽度)除以2 , (屏幕高度减去窗体的高度)除以2
Me.Move (Screen.Width - Me.Width) \ 2, (Screen.Height - Me.Height) \ 2
End Sub
Private Sub Command1_Click()
DeskPath = GetDeskPath
Me.Picture = LoadPicture(DeskPath & "\桌面.jpg")
End Sub
Public Function GetDeskPath() As String
Dim WshShell
Set WshShell = CreateObject("Wscript.shell")
GetDeskPath = WshShell.SpecialFolders("Desktop")
End Function
--------------------编程问答-------------------- 通用对话框控件:Microsoft common Dialog control 6.0 (sp6)
--------------------编程问答-------------------- 你那是文件夹选择对话框。
Microsoft Visual Studio .NET 中有相应的标准控件。
不知道是否有这个相应的API。
要选择文件夹,有个替代方案。
你参考一下这个代码:
Private Sub Command1_Click()--------------------编程问答-------------------- 同意8楼的,有趣,不知楼主从发整了个英文版的对话框出来,看样子可能软件作者自己设计的.我的意思是我没见过左下角有那种TOOLS按钮的WINDOWS内置的对话框风格:)
Dim SelFolder$
Dim spShell As Object
Dim spFolder As Object
Dim spFolderItem As Object
On Error GoTo Err_Proc
Set spShell = CreateObject("Shell.Application")
Set spFolder = spShell.BrowseForFolder(0, "选择目录!", 1, "")
Set spFolderItem = spFolder.Self
SelFolder = spFolderItem.Path
Debug.Print SelFolder
Exit Sub
Err_Proc:
If Err > 0 Then Exit Sub
End Sub
补充:VB , API