给自己的程序增加网页浏览功能(续)[7]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 cutemouse 的 blog

end sub

 

private sub form_load()

    set myie = createobject("internetexplorer.application")

    myie.visible = true

end sub

 

四、shdocvw.dllinetcpl中的api

 

public const max_path = 260

public const csidl_favorites = &h6

 

public declare function launchinternetcontrolpanel lib "inetcpl.cpl" (byval hwndparent as long) as long

public declare function launchconnectiondialog lib "inetcpl.cpl" (byval hwndparent as long) as long

public declare function launchsecuritydialog lib "inetcpl.cpl" (byval hwndparent as long) as long

public declare function launchsitecertdialog lib "inetcpl.cpl" (byval hwndparent as long) as long

public declare function openfontsdialog lib "inetcpl.cpl" (byval hwndparent as long) as long

 

public declare function doorganizefavdlg lib "shdocvw.dll" (byval hwndparent as long, byval lpszpath as string) as long

public declare function shgetspecialfolderpath lib "shell32.dll" alias "shgetspecialfolderpatha" (byval hwndowner as long, byval lpszpath as string, byval nfolder as long, byval fcreate as long) as long

public declare function doaddtofavdlg lib "shdocvw.dll" (byval hwndparent as long, byval lpszpath as string) as long

public declare function addurltofavorites lib "shdocvw.dll" (byval hwndparent as long, byval lpszpath as string) as long       这个函数的参数定义有问题。

 

'

 

'private sub command1_click()

'    dim rc as long

'’显示internet选项的控制面板

'    rc = launchinternetcontrolpanel(me.hwnd)

'    debug.print getlasterror

'    if rc = 0 then

'        msgbox "launchinternetcontrolpanel failed!", vbexclamation

本文关键:WEBBROWSER控件和INTERNET EXPLORER AUTOMATION
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top