VB and webBrwoser questions
1 post
• Page 1 of 1
VB and webBrwoser questions
Gah... its been a while since i used my old trusty VB6 studio, but i got this unique idea for a weekend projct.
i need help with the Visual Basic webBrowser component. here is the source of my miniature project, i threw this together in about 10 minuets.
basically, its 2 buttons and a label.
the idea is that you click the login button, which loads up a web page and from there all the complex stuff is done on the web server (this whole VB project s just a different interface for a website... so you dont *have* to have a browser open)
hers what i need/my questions:
1) i need to get the "offline button" working correctly with the label, so that initially, the user loads the web page and the button says click here to go off line, the label says "you are online" and Vice-versa when the "go offline"button is clicked...
2) is that the correct way to POST data to the URL as the initial page is loaded?
3) can i disable the scroll bars? the pages this tool will be viewing are specifically designed to view certain sized content, and the scroll bars wont ever be needed. or if they are, they will be javascript/ajax... not browser Dependant.
4) i know the WebBrwoser control will be using IE core... but is there a way i can change specific things... like the user agent?
5) it would be nice to put a status label somewhere... can somebody tell me how id get the status of the WebBrowser control so i can pipe it into a label or txt box or something?
Thanks SOOO much, in advance!
Edit... source code is below.
- Code: Select all
VERSION 5.00
Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "shdocvw.dll"
Begin VB.Form Form1
Caption = "EditOnline Standalone Editor"
ClientHeight = 4410
ClientLeft = 9420
ClientTop = 6495
ClientWidth = 5655
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4410
ScaleWidth = 5655
Begin VB.CommandButton logbtn
Caption = "Login!"
Height = 375
Left = 120
TabIndex = 2
Top = 3960
Width = 1695
End
Begin VB.CommandButton btnOn
Caption = "Switch to Offline mode"
Height = 375
Left = 2040
TabIndex = 1
Top = 3960
Width = 1815
End
Begin SHDocVwCtl.WebBrowser WebBrowser1
Height = 3765
Left = 120
TabIndex = 0
Top = 120
Width = 5415
ExtentX = 9551
ExtentY = 6641
ViewMode = 0
Offline = 0
Silent = 0
RegisterAsBrowser= 0
RegisterAsDropTarget= 1
AutoArrange = 0 'False
NoClientEdge = 0 'False
AlignLeft = 0 'False
NoWebView = 0 'False
HideFileNames = 0 'False
SingleClick = 0 'False
SingleSelection = 0 'False
NoFolders = 0 'False
Transparent = 0 'False
ViewID = "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
Location = "http:///"
End
Begin VB.Label Label1
Height = 375
Left = 3960
TabIndex = 3
Top = 3960
Width = 1575
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Sub btnOn_Click()
'Set bonline = False
' i need that'fasle' to switch to the opposite of w/e it was before...
'Set Label1.Caption = "You are now offline"
'Set logbtn.Caption = "Switch to online mode"
MsgBox "I dont work yet", vbOKOnly, "To do"
End Sub
Public Sub Form_Load()
Dim bonline As Boolean
'Set bonline = True
'Set Label1.Caption = "You are currently online"
'Set logbtn.Caption = "Switch to offline mode"
End Sub
Private Sub logbtn_Click()
WebBrowser1.Navigate "127.0.0.1", , , ver = 0.1
End Sub
1 post
• Page 1 of 1
Return to HTML, CSS, and Scripts
Who is online
Users browsing this forum: No registered users and 2 guests