* [[VB]]
いまさらですが... 6.0
#contents
** TIPS
***ファイルダウンロード
Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
"URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal _
szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Sub doDownload()
Dim lngRet As Long
Dim DownURL As String
Dim SaveFile As String
DownURL = "http://localhost/test.txt"
SaveFile = "C:\test.txt"
lngRet = URLDownloadToFile(0, DownURL, SaveFile, 0, 0)
If lngRet = 0 Then
MsgBox "OK"
Else
MsgBox "NG"
End If
End Sub
** WebControl
-あるフォームに属しているエレメントの名前~
For inti = 0 To inti < wb.Document.Forms(frmCount).elements.Length
Debug.Print wb.Document.Forms(frmCount).elements(inti).Name
Next inti
-リンクの場合~
intElementLen = wb.Document.links.Length
For inti = 0 To intElementLen - 1
Debug.Print (wb.Document.links.Item(inti).innerHtml)
Next inti
-値セット~
wb.Document.Forms(frmCount).elements("hoge").Value = '値'
-ラジオ~
wb.Document.Forms(frmCount).elements("radio")(0).Checked = True
- IEのスクリプトエラーを表示させたくない。
WebBrowser1.Silent=True
あとInternet Explorerのツール>インターネットオプション>詳細設定タブ
スクリプトエラーの通知をしない
スクリプトデバッガを使用しない
ぐらいか?
参考:[[■ フレームになっているホームページのソースを取得するには?>http://homepage1.nifty.com/MADIA/vb/vb_bbs2/200510/200510_05100042.html]]
** リンク
[[HTML の radio にチェックをいれるには>http://hpcgi1.nifty.com/MADIA/VBBBS/wwwlng.cgi?print+200603/06030091.txt]]
** 参考書籍
** コメント
-#comment