Œ»Ý‚̃\[ƒXƒR[ƒh


  Form1




  

Option Explicit

Private Sub Command1_Click()
    
    If SSTab1.Tab = TAB_LEFT Then
        
        WebBrowser1.Navigate2 LoadHomePage("Left")
    
    End If
    
    If SSTab1.Tab = TAB_RIGHT Then
        
        WebBrowser2.Navigate2 LoadHomePage("Right")
    
    End If
    
    If SSTab1.Tab = TAB_XXX Then
        
        WebBrowser3.Navigate2 LoadHomePage("XXX")
    
    End If

End Sub

' ********************************************************
' ‰Šúˆ—
' ********************************************************
Private Sub Form_Load()

    Dim strFileName
    Dim strValue As String * 20
    Dim X, Y, w, h

    strFileName = App.Path & "\" & App.EXEName & ".ini"
    
    Call GetPrivateProfileString( _
        "Location", _
        "Left", _
        "0", _
        strValue, _
        20, _
        strFileName _
    )
    X = strValue
    
    Call GetPrivateProfileString( _
        "Location", _
        "Top", _
        "0", _
        strValue, _
        20, _
        strFileName _
    )
    Y = strValue
    
    Call GetPrivateProfileString( _
        "Location", _
        "Width", _
        "800", _
        strValue, _
        20, _
        strFileName _
    )
    w = strValue
    
    Call GetPrivateProfileString( _
        "Location", _
        "Height", _
        "600", _
        strValue, _
        20, _
        strFileName _
    )
    h = strValue
    
    Call MoveWindow(Form1.hWnd, X, Y, w, h, 1)
    
    WebBrowser1.Navigate2 LoadHomePage("Left")
    WebBrowser2.Navigate2 LoadHomePage("Right")
    WebBrowser3.Navigate2 LoadHomePage("XXX")

    Text1.Visible = True
    Text2.Visible = False
    Text3.Visible = False

End Sub

' ********************************************************
' ƒTƒCƒY•ÏX
' ********************************************************
Private Sub Form_Resize()

    If Me.WindowState = vbMinimized Then
        Exit Sub
    End If
    
    Dim rc As RECT
    
    GetClientRect Me.hWnd, rc

    With SSTab1
        .Left = 0
        .Top = Text1.Height
        .Width = rc.Right
        .Height = rc.Bottom - Text1.Height - StatusBar1.Height
    End With

    If SSTab1.Tab = TAB_LEFT Then
        With WebBrowser1
            .Left = 0
            .Top = Me.ScaleY(SSTab1.TabHeight, vbPixels, vbTwips)
            .Width = Me.ScaleX(SSTab1.Width, vbPixels, vbTwips)
            .Height = Me.ScaleY(SSTab1.Height - SSTab1.TabHeight, vbPixels, vbTwips)
        End With

        With Text1
            .Left = 0
            .Top = 0
            .Width = rc.Right - Command1.Width
        End With
        
        With Command1
            .Left = Text1.Width
        End With
        
    End If

    If SSTab1.Tab = TAB_RIGHT Then
        With WebBrowser2
            .Left = 0
            .Top = Me.ScaleY(SSTab1.TabHeight, vbPixels, vbTwips)
            .Width = Me.ScaleX(SSTab1.Width, vbPixels, vbTwips)
            .Height = Me.ScaleY(SSTab1.Height - SSTab1.TabHeight, vbPixels, vbTwips)
        End With

        With Text2
            .Left = 0
            .Top = 0
            .Width = rc.Right - Command1.Width
        End With
    
        With Command1
            .Left = Text2.Width
        End With
    
    End If

    If SSTab1.Tab = TAB_XXX Then
        With WebBrowser3
            .Left = 0
            .Top = Me.ScaleY(SSTab1.TabHeight, vbPixels, vbTwips)
            .Width = Me.ScaleX(SSTab1.Width, vbPixels, vbTwips)
            .Height = Me.ScaleY(SSTab1.Height - SSTab1.TabHeight, vbPixels, vbTwips)
        End With

        With Text3
            .Left = 0
            .Top = 0
            .Width = rc.Right - Command1.Width
        End With
    
        With Command1
            .Left = Text3.Width
        End With
    
    End If

End Sub

Private Sub Form_Unload(Cancel As Integer)
   
    Dim nRect As RECT
    Dim strFileName

    If Me.WindowState = vbNormal Then
    
        Call GetWindowRect(Form1.hWnd, nRect)
    
        strFileName = App.Path & "\" & App.EXEName & ".ini"
    
        Call WritePrivateProfileString( _
        "Location", "Left", nRect.Left, strFileName)
        
        Call WritePrivateProfileString( _
        "Location", "Top", nRect.Top, strFileName)
        
        Call WritePrivateProfileString( _
        "Location", "Width", nRect.Right - nRect.Left + 1, strFileName)
        
        Call WritePrivateProfileString( _
        "Location", "Height", nRect.Bottom - nRect.Top + 1, strFileName)

    End If

End Sub

' ********************************************************
' ƒJƒŒƒ“ƒg‚Ì•ÏX
' ********************************************************
Private Sub SSTab1_Click(PreviousTab As Integer)

    Form_Resize
    
    If SSTab1.Tab = TAB_LEFT Then
        Text1.Visible = True
        Text2.Visible = False
        Text3.Visible = False
        Me.Caption = WebBrowser1.Document.All.Tags("TITLE")(0).innerText
    End If
    
    If SSTab1.Tab = TAB_RIGHT Then
        Text1.Visible = False
        Text2.Visible = True
        Text3.Visible = False
        Me.Caption = WebBrowser2.Document.All.Tags("TITLE")(0).innerText
    End If
    
    If SSTab1.Tab = TAB_XXX Then
        Text1.Visible = False
        Text2.Visible = False
        Text3.Visible = True
        Me.Caption = WebBrowser3.Document.All.Tags("TITLE")(0).innerText
    End If
    
    SSTab1.TabCaption(SSTab1.Tab) = Me.Caption

    
End Sub

' ********************************************************
' Enter ƒL[‚̈—(1)
' ********************************************************
Private Sub Text1_KeyPress(KeyAscii As Integer)

    If KeyAscii = 13 Then
        WebBrowser1.Navigate2 Text1.Text
    End If

End Sub

' ********************************************************
' Enter ƒL[‚̈—(2)
' ********************************************************
Private Sub Text2_KeyPress(KeyAscii As Integer)

    If KeyAscii = 13 Then
        WebBrowser2.Navigate2 Text2.Text
    End If

End Sub

' ********************************************************
' Enter ƒL[‚̈—(3)
' ********************************************************
Private Sub Text3_KeyPress(KeyAscii As Integer)

    If KeyAscii = 13 Then
        WebBrowser3.Navigate2 Text3.Text
    End If

End Sub


' ********************************************************
' ƒy[ƒW•\Ž¦Š®—¹(1)
' ********************************************************
Private Sub WebBrowser1_NavigateComplete2(ByVal pDisp As Object, URL As Variant)

    SSTab1.TabCaption(0) = WebBrowser1.Document.All.Tags("TITLE")(0).innerText
    If SSTab1.Tab = TAB_LEFT Then
        Me.Caption = SSTab1.TabCaption(0)
    End If
    Text1.Text = URL

End Sub

Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)
    
    StatusBar1.Panels(1).Text = Text

End Sub

' ********************************************************
' ƒy[ƒW•\Ž¦Š®—¹(2)
' ********************************************************
Private Sub WebBrowser2_NavigateComplete2(ByVal pDisp As Object, URL As Variant)

    SSTab1.TabCaption(1) = WebBrowser2.Document.All.Tags("TITLE")(0).innerText
    If SSTab1.Tab = TAB_RIGHT Then
        Me.Caption = SSTab1.TabCaption(1)
    End If
    Text2.Text = URL

End Sub

Private Sub WebBrowser2_StatusTextChange(ByVal Text As String)
    
    StatusBar1.Panels(1).Text = Text

End Sub

' ********************************************************
' ƒy[ƒW•\Ž¦Š®—¹(3)
' ********************************************************
Private Sub WebBrowser3_NavigateComplete2(ByVal pDisp As Object, URL As Variant)

    SSTab1.TabCaption(2) = WebBrowser3.Document.All.Tags("TITLE")(0).innerText
    If SSTab1.Tab = TAB_XXX Then
        Me.Caption = SSTab1.TabCaption(2)
    End If
    Text3.Text = URL

End Sub

Private Sub WebBrowser3_StatusTextChange(ByVal Text As String)
    
    StatusBar1.Panels(1).Text = Text

End Sub

Private Sub ƒIƒvƒVƒ‡ƒ“_Click()

    Form3.Show vbModal

End Sub

Private Sub ƒ\[ƒX•\Ž¦_Click()

    Form2.Show vbModal

End Sub

Private Sub ƒvƒŒƒrƒ…[_Click()

    If SSTab1.Tab = TAB_LEFT Then
        WebBrowser1.ExecWB OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_DODEFAULT
    End If

    If SSTab1.Tab = TAB_RIGHT Then
        WebBrowser2.ExecWB OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_DODEFAULT
    End If

    If SSTab1.Tab = TAB_XXX Then
        WebBrowser3.ExecWB OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_DODEFAULT
    End If

End Sub

Private Sub –ß‚é_Click()

    On Error Resume Next
    
    If SSTab1.Tab = TAB_LEFT Then
        WebBrowser1.GoBack
    End If

    If SSTab1.Tab = TAB_RIGHT Then
        WebBrowser2.GoBack
    End If

    If SSTab1.Tab = TAB_XXX Then
        WebBrowser3.GoBack
    End If

End Sub

Private Sub i‚Þ_Click()

    On Error Resume Next
    
    If SSTab1.Tab = TAB_LEFT Then
        WebBrowser1.GoForward
    End If

    If SSTab1.Tab = TAB_RIGHT Then
        WebBrowser2.GoForward
    End If

    If SSTab1.Tab = TAB_XXX Then
        WebBrowser3.GoForward
    End If

End Sub
  







  Form2

  

Option Explicit

Private Sub Form_Load()

    If Form1.SSTab1.Tab = TAB_LEFT Then
        Text1.Text = Form1.WebBrowser1.Document.All.Tags("BODY")(0).InnerHTML
    End If

    If Form1.SSTab1.Tab = TAB_RIGHT Then
        Text1.Text = Form1.WebBrowser2.Document.All.Tags("BODY")(0).InnerHTML
    End If

    Me.Caption = Form1.Caption

End Sub

Private Sub Form_Resize()

    If Me.WindowState = vbMinimized Then
        Exit Sub
    End If
    
    Dim rc As RECT
    
    GetClientRect Me.hWnd, rc

    With Text1

        .Height = rc.Bottom
        .Width = rc.Right

    End With

End Sub
  

  Form3

  

Option Explicit

Dim strFileName As String
Dim WshShell As Object

Private Sub Command5_Click()

    Set WshShell = CreateObject("WScript.Shell")
    WshShell.Run ("RunDLL32.EXE shell32.dll,Control_RunDLL inetcpl.cpl")
    
    Set WshShell = Nothing

End Sub

Private Sub Command1_Click()
    
    strFileName = App.Path & "\" & App.EXEName & ".ini"

    Call WritePrivateProfileString( _
    "HomePage", "Left", Text1.Text, strFileName)

End Sub

Private Sub Command2_Click()

    strFileName = App.Path & "\" & App.EXEName & ".ini"

    Call WritePrivateProfileString( _
    "HomePage", "Right", Text2.Text, strFileName)

End Sub


Private Sub Form_Load()

    Form3.Text1.Text = Form1.Text1.Text
    Form3.Text2.Text = Form1.Text2.Text

End Sub
  

  •W€ƒ‚ƒWƒ…[ƒ‹

  

Option Explicit

Global Const TAB_LEFT = 0
Global Const TAB_RIGHT = 1
Global Const TAB_XXX = 2

Type RECT
        Left As Long
        Top As Long
        Right As Long
        Bottom As Long
End Type
Declare Function GetClientRect Lib "user32" _
(ByVal hWnd As Long, _
lpRect As RECT) As Long


Public Declare Function GetPrivateProfileString Lib "kernel32" _
Alias "GetPrivateProfileStringA" _
(ByVal lpAppName As String, _
ByVal lpKeyName As String, _
ByVal lpDefault As String, _
ByVal lpReturnedString As String, _
ByVal nSize As Long, _
ByVal inifilename As String) As Long

Public Declare Function WritePrivateProfileString Lib "kernel32" _
Alias "WritePrivateProfileStringA" _
(ByVal lpApplicationName As String, _
ByVal lpKeyName As String, _
ByVal lpString As String, _
ByVal lpFileName As String) As Long

Public Declare Function GetWindowRect Lib "user32" _
(ByVal hWnd As Long, _
lpRect As RECT) As Long

Public Declare Function MoveWindow Lib "user32" _
(ByVal hWnd As Long, _
ByVal X As Long, _
ByVal Y As Long, _
ByVal nWidth As Long, _
ByVal nHeight As Long, _
ByVal bRepaint As Long) As Long

Global strFileName As String

Public Function LoadHomePage(strPageName As String) As String

    Dim strValue As String * 128
    
    strFileName = App.Path & "\" & App.EXEName & ".ini"
    
    Call GetPrivateProfileString( _
        "HomePage", _
        strPageName, _
        "www.yahoo.co.jp", _
        strValue, _
        128, _
        strFileName _
    )

    LoadHomePage = strValue

End Function
  




yahoo  google  MSDN  MSDN(us)  WinFAQ  Win Howto  tohoho  ie_DHTML  vector  wdic  Ž«‘  “V‹C 


[PRObrowser]
claudebot
24/03/28 23:17:47
InfoBoard Version 1.00 : Language=Perl

1 BatchHelper COMprog CommonSpec Cprog CprogBase CprogSAMPLE CprogSTD CprogSTD2 CprogWinsock Cygwin GameScript HTML HTMLcss InstallShield InstallShieldFunc JScript JScriptSAMPLE Jsfuncs LLINK OldProg OracleGold OracleSilver PRO PRObrowser PROc PROconePOINT PROcontrol PROftpclient PROjscript PROmailer PROperl PROperlCHAT PROphp PROphpLesson PROphpLesson2 PROphpLesson3 PROphpfunction PROphpfunctionArray PROphpfunctionMisc PROphpfunctionString PROsql PROvb PROvbFunction PROvbString PROvbdbmtn PROvbonepoint PROwebapp PROwin1POINT PROwinSYSTEM PROwinYOROZU PROwindows ProjectBoard RealPHP ScriptAPP ScriptMaster VBRealtime Vsfuncs a1root access accreq adsi ajax amazon argus asp aspSample aspVarious aspdotnet aw2kinst cappvariety centura ckeyword classStyle cmaterial cmbin cmdbapp cmenum cmlang cmlistbox cmstd cmstdseed cmtxt cs daz3d db dbCommon dbaccess dnettool dos download flex2 flex3 flex4 framemtn framereq freeWorld freesoft gimp ginpro giodownload google hdml home hta htmlDom ie9svg install java javaSwing javascript jetsql jquery jsp jspTest jspVarious lightbox listasp listmsapi listmsie listmsiis listmsnt listmspatch listmsscript listmsvb listmsvc memo ms msde mysql netbeans oraPlsql oracle oracleWiper oraclehelper orafunc other panoramio pear perl personal pgdojo pgdojo_cal pgdojo_holiday pgdojo_idx pgdojo_ref pgdojo_req php phpVarious phpguide plsql postgres ps r205 realC realwebapp regex rgaki ruby rule sboard sc scprint scquest sdb sdbquest seesaa setup sh_Imagick sh_canvas sh_dotnet sh_google sh_tool sh_web shadowbox shgm shjquery shvbs shweb sjscript skadai skywalker smalltech sperl sqlq src systemdoc tcpip tegaki three toolbox twitter typeface usb useXML vb vbdb vbsfunc vbsguide vbsrc vpc wcsignup webanymind webappgen webclass webparts webtool webwsh win8 winofsql wmi work wp youtube