VB学习问题请教,多谢
最近二周开始学习VB语言,主要是想使用Secure.CRT做测试使用,碰到下面的语句,不知道是什么意思希望大牛们可以帮忙解答下,非常感觉,问题已用红色字体标出
Function BrowseForFile(strDefault)
Dim strOSName
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2") '1,这句话是什么意思?
Set colSettings = _
objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem")'1,这句话是什么意思?
For Each objOS In colSettings'1,这句话是什么意思?
strOsName = Split(objOS.Name, "|")(0)
Exit For
Next
If Instr(strOsName, "XP") > 0 Then
Set objDialog = CreateObject(")'1,这句话是什么意思?
objDialog.FileName = strDefault
objDialog.Filter = "CSV Files|*.csv|Text Files|*.txt|All Files|*.*"
objDialog.FilterIndex = 1
objDialog.InitialDir = g_shell.SpecialFolders("MyDocuments")
nResult = objDialog.ShowOpen
If nResult <> 0 Then
BrowseForFile = objDialog.FileName
End If
Else
BrowseForFile = crt.Dialog.Prompt(_ '1,这句话是什么意思?
"Save selected text to file:", _
"SecureCRT - Save Selected Text To File", _
strDefault)
End If
End Function