Web Browser Control! How To Click An Image.
i want to click a button on an html page that is in the form of a .gif image using a vb application.
i know how to click html buttons using this code
VB Code: WebBrowser1.Document.All.Item("continueButton").Click
but not sure how to do a .gif
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Detect A Click On Web Browser Control?
hi everybody,
one new problem i couldn't solved after trying really hard.. i want to detect a click on my web browser control. when it detect that the user have click on the page, then it will let the user enter the main program. the code i think of is below.. but they dont work. actually it work but it enable the button as soon as the site load on the browser..
Code:
Private Sub Form_Load()
WebBrowser1.Navigate ("http://www.website.com/")
End Sub
Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)
enterButton.Enabled = True
End Sub
so please help me....
How To Disable The Right Click Menu Option In Web Browser Control ??
I am using the web browser control in my VB application to display a table of data and a graph, I would like to disable the menu that appears when the control is right clicked at run time, the same menu that appears in IE, is it possible to do this ?? and how
thanks
arunb
Web Browser Control..or..Right Click..View Source..File Save
HI.
I am using a web browser control to access the Internet. It pulls up web pages just fine, but I need to save the HTML source code of the displayed page from my VB project.
Option 1
Does anyone know how to do this using the web browser control?
Option 2
The same thing can be accomplished by right clicking on the web page, selecting View Source and then saving the file. How do I get VB to automate these steps?
Option 3
A way to do this that I haven't thought of yet! (using the Internet Transfer Control is not an option due to security issues.)
Of course, the first option is the better, more efficient choice. I just can't figure out how to do it!
I would appreciate it if someone could shed light (and code..if available) on either of the options above.
Thanks in advance.
Chris
Adding A Custom Right Click Item To The Web Browser Control's Pop Up Menu In VB6
Somebody else asked this same question regarding .net but I'm using VB6 and the Browser control so hopefully someone can give me an answer as well.
Does anyone know how to create a custom right click menu item to the web browser control in VB6? What I want to do is add a menu option that is enabled when a user right-clicks on a link in the browser that starts with a common URL string. For example, let's say I want this menu item to be enabled ONLY when the link goes to a URL starting with http://www.vbcity.com/forums/ so it would be enabled if one right-clicked on a link to http://www.vbcity.com/forums/post.asp?method=reply&tid=52321 but not to http://www.vbcity.com. Can anyone tell me how to do this?
Thanks,
Dan
Click A Link, Button, Or Edit Input Field In Browser Control?
I have no experience with the browser control, nor do I with the Inet control. Is there a way to insert text into an input field of a webpage, click on a specific link, or click a "submit" button?
For example, if I wanted to log someone into a site based on info they provided in a text box?
Saving Loaded Image From Browser Control
My program parses all the links from a page and then saves all those files locally. Perhaps you're familiar with this little bit of code from the MSDN which I'm using to save the linked files locally:
Code:
Dim strURL As String
Dim bData() As Byte ' Data variable
Dim intFile As Integer ' FreeFile variable
strURL = "ftp://ftp.microsoft.com/Softlib/Softlib.exe"
intFile = FreeFile() ' Set intFile to an unused file.
' The result of the OpenURL method goes into the Byte
' array, and the Byte array is then saved to disk.
bData() = Inet1.OpenURL(strURL, icByteArray)
Open "C:TempSoftlib.exe" For Binary Access Write As #intFile
Put #intFile, , bData()
Close #intFile
It's working great with all sorts of file types except for with the pages that have links to JPGs, about 70% of the time I'll get all the JPGs linked to and about 30% of the time I'll come across a page of links to JPGs where it goes through the links far too quickly and you're left with empty little files.
However, the same links to images that I can't get through the code above load perfectly fine in any web browser, including the standard web browser form (Add | Form | New | Web Browser.)
MY QUESTION THEN IS: How can I automatically save that image that just loaded in the web browser form?
Image Control Click Event
i am using VB .NET
I have an image control which contains a .ico file. (in a .aspx page)
on the click event of this control(in .aspx.vb page), i want to show another page, which is a web link.
how do i do it?
Webbrowser Control (click An Image)
That's it....i just want to click the image button that says Signin.png
i've figured out how to fill username and password but no idea how to click the image
Code:
<div id="signin">
<p class="imgAvatar"><a href="#"><img src="http://graphics.mypage.com/images/layout/avatarNone.png" alt="Avatar" /></a></p>
<form method="POST" action="/myp/login.php">
<dl>
<dt>Members</dt>
<dd class="medInput"><label>User Name:</label> <input name="username" /></dd>
<dd class="medInput"><label>Password:</label> <input type="password" name="password" /></dd>
<dd class="btnSignin"><input type="image" src="http://graphics.mypage.com/images/layout/btnSignin.png" /></dd>
<dd class="remember"><input type="checkbox" name="autologin" /><label>Remember Me?</label> <a href="/profile/profile.php?mode=getpasswd&sid=9a4726bd38b89254565f8a20951dba79" title="Forgot your password?">Forgot your password?</a></dd>
<dd class="btnSignup">New Here? <a href="/profile/character.php?&sid=9a4726bd38b89254565f8a20951dba79"><img src="http://graphics.mypage.com/images/layout/btnSignup.png" alt="Signup" /></a></dd>
</dl>
<input type="hidden" name="submit" value="Login" />
<input type="hidden" name="sid" value="9a4726bd38b89254565f8a20951dba79" />
<input type="hidden" name="redirect" value="http://www.mypage.com/" />
</form>
</div>
help is wanted
Edited by - Alec_Trevelian on 6/29/2006 11:50:51 AM
How To Cancel The Click Event In The Image Control
I inserted image control (to make it a background for some controls) on the sheet and then I placed some controls like command after I made the image "send backward" and controls "send forward" . When I run the project the controls appear on the image. But when I click on the image the controls disappear and then appear again when I move the mouse away from the image. How to fix this problem. By the way I tried to make the propert of image, Enable= false, But it didn't success .
thank you for help.
Image Control Mouse Click Event?
HIiiii
I am trying to use Image Control MouseDown and MouseUp event. It is responding for right mouse click. But not for left mouse click. Even it is not responding for Click and Double_Click event too.
What could be problem?
Hdave
Image Control Click Event Not Occuring?!
Hi All,
I am getting some strange behaviour with an image object.
I have some code that I run when the user clicks on an Image object but if you click quite fast... about ... I was just starting to write 'about as fast as a double-click' when it suddenly occurred to me what the problem is here!
I'll finish anyway because it might be instructive to someone else...
If you click too fast the program doesn't respond on some of the clicks (you sometimes need to click the same image up to 4 times).
As I was explaining this above I realised that the double-click event was probably being fired!... I just tested it and that is what's happening!
So now all I do is pass the event and it's index on to the standard click event and all is well!Code:Private Sub imgResponse_DblClick(Index As Integer)
imgResponse_Click Index
End Sub
Anyway, sorry for wasting your time but I thought it was quite amusing...
Mac
Simple Error {Click Event For Image Control}
hi guys,
I have this form and I want to check if the user has clicked on a image by means of a buttons. The following is my code.
-------------------------------------------------------
Private Flag As Boolean
Private Sub Command1_Click()
If Flag = True Then
MsgBox "True" else
MsgBox "False"
End If
End Sub
Private Sub Image2_Click(Index As Integer)
If Image2(Index) = 1 Then
Flag = True
Else
Flag = False
End If
End
------------------------------------------------
Can anyone check out my mistake please
Click .gif In File List And Preview In Image Control
Hello,
I have a file explorer with drive,dir,file boxes. The file box only displays .gif which is what i want. When a gif is clicked i want it to be displayed in an image control. this is what i have so far but i dont know how to get the gif clicked on into the image box.
Code:
Private Sub File1_Click()
Dim FilePath As Variant
FilePath = Dir1.Path & "" & File1.FileName
Label1.Caption = FilePath
End Sub
i have tried
Image1.Picture = FilePath but it said something about object required.
Any help would be great.
Chris
Image Click Event Stops Imagelist Control From Updating
Using Excel VBA
I cannot work out why the following is happening:
I have a form that is populated from the contents of a spreadsheet, with each row being read using a For Next Loop.
In addition to the form containing textboxes, buttons and labels it also has an imagelist control.
A mousemove event is linked to the image and this functions correctly (displays a form with an imagelist control and linked image). If I change the image event to anything else e.g. mousedown, click, doubleclick etc and run the same code as a result of this event I get a situation whereby the next line that is read from the spreadsheet updates the textboxes and labels but not the image (imagelist linked), the picture remains at the previous image. However If I click the image it displays the correct larger picture and when that form is closed the imagelist on the main form is updated correctly.
It appears that the image click procedure is stopping the variables being updated for the imagelist control until the sub form has been closed, yet using the same code I get no problems with mousemove event.
An example of the code is as follows:
Code:
For counter = 7 To 27
Image1.Picture = ImageList1.ListImages(counter - 6).Picture
pic_label1.Caption = Worksheets("Sheet2").Cells(counter, 4) & " - " & Worksheets("Sheet2").Cells(counter, 5)
.........
Next
'Private Sub Image1_Click() ---------------------------------------- code causes imagelist control to stop updated
'image2show = counter - 6
'imageshow.Caption = Worksheets("Sheet2").Cells(counter, 4) & " - " & Worksheets("Sheet2").Cells(counter, 5)
'imageshow.Show
'End Sub
----------- code works ok
Private Sub Image1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
image2show = counter - 6
imageshow.Caption = Worksheets("Sheet2").Cells(counter, 4) & " - " & Worksheets("Sheet2").Cells(counter, 5)
imageshow.Show
End Sub
Private Sub UserForm_Activate()
Me.Caption = Worksheets("Sheet2").Cells(image2show + 6, 4) & " - " & Worksheets("Sheet2").Cells(image2show + 6, 5)
image2.Picture = ImageList2.ListImages(image2show).Picture
End Sub
How To Detect A Click Event On Embeded Image Inside An Activex Control.
Hello All,
I need some help figuring this out. I am developing an ActiveX control that contain an array of multiple image boxes embedded inside a windowless transparent form (container). Based on property settings at design time, only one imagebox is visible, and all others are set to be invisible. I have a method (property) set in the control that decides which image is going to be visible. This is settable during a standard VB exe project development, and at run time via user selction. When I compile the OCX and use it to on a standard VB EXE project, I don't have an option available to write code for an Image click event. Only events available are control got focus, & lost focus etc. How do I go about adding the Image click event (to the Visible Image) inside my control?
Do I have to implement another method/event within my Activex control? If I did that, how would I then pass the name of the caller (name of the form where the control click was initiated) in to my activex event, and have the activex report back to the "SAME" calling form during run time?
Thanks
Need Help - "click" Submit On Web Page Using VB Web Browser Control
Hi...
I need some help, I need to make the VB Web Browser "click" a submit button on a page. I would normally submut data by appending onto the end of the "URL - http://www.thesiteinquestion.com/page?x=123&y=234", however in this case i need to actually click the button, as it submits a random code, which even the variable name is random - some kind of hash on the PHP SES ID.
I know this is possiable, in the past I have found code that will input text to fields on a page (in WebBrowser) and then submit the page. Sadly, after about 2 hours searching on VBCode.com I still cant find it!!!
Can anyone help me? Im really desperate for the code... ASAP
Many Regards,
Sam
vbhelp@samwitney.co.uk
While I DOUBLE CLICK ON ANY IMAGE, IT'LL USE MY PROGRAM TO SHOW IMAGE~
While I DOUBLE CLICK ON ANY IMAGE, IT'LL USE MY PROGRAM TO SHOW IMAGE~
I HAVE MAKE A SIMPLE PICTURE VIEWER,AND I WOULD LIKE TO KNOW HOW TO DO LIKE ACDSEE DO, WHEN I DLB CLICK ANY PICTURE(*.JPG,*.BMP AND ETC IMAGE FILE) IT WILL AUTOMATIC USE MY PRGRAM TO BROSWER, NO NEED EVRY TIME OPEN MY PROGRAM TO VIEW PICTURE.
HOW TO DO IT?
Viewing Image From Database Without Data Control And Bound Image Control (VB6).
Hi, everyone. I'm new here and this is my first call for help.
I am making a database app in VB6 where I want everything to be accessed through VB code (without using a data control and bound controls), using Jet statements (DAO 3.51) . The only thing that escapes me so far are the images (jpegs) stored in the database. Anybody know how to show an image from a database in an image control without using a data control and bound image control (using just VB code)?
The images where stored by a small utility I made as a helper to the other program. It basically stores a binary copy of the jpeg files, in batch mode, into a binary field of an access table, along with some other info.
Disable Right Click In Web Browser
Hey All,
Is there any easy way to disable right click on the web browser control so it wont show that 'Open Link, Open Link in new Window, Save Target As..., etc' menu.
Thanks for any help.
Browser Integration On Right Click
Hey peeps, you know when you right click on a file in a browser, you get options such as:
Open
Open With...
Add to Zip...
Properties
Now what I want to do is add an extra option, "Encrypt". Clicking on it will launch my encryption program with the filepath as the command. How would I go about this? Thanks!
Disable Right Click In Browser
Help, its driving me mad. How do I either disable the right click or change the pop up menu in the browser object VB6.
I cant even find mouse events for thing!
Right Click On Web Browser To Paste
I have a program that hosts a small web browser and I'd like to be able to paste my clipboard contents into the web browser control window without right clicking and selecting paste (or CTRL V). Is it possible to set up my VB6 program to simply Paste clipboard contents whenever I RightClick over the web browser control?
''click' A Checkbox In IE Browser When Name Is The Same
Hi
I am a bit stumped on this one. i have tried number of ways that work on other forms to get the checkbox on this web page to 'click' or 'check' etc
here is the macro
VB Code:
Sub test()Set ie = CreateObject("InternetExplorer.Application")With ie.Visible = True.navigate "http://slmap.bravehost.com/smpl.htm"Do Until .ReadyState = 4DoEventsLoopDo While .busy: DoEvents: Loop Set fb1 = .document.forms(0).Item("em")fb1.Value = "3"Set fb2 = .document.forms(0).Item("ey")fb2.Value = "2005"Set fb4 = .document.forms(0).Item("version")fb4.Value = ABCfb4.Checked = TrueEnd WithEnd Sub
and here is the salient portion of the html code:
HTML Code:
<input type=CHECKBOX name=version value=ABC onclick="Selectversion(this.form,true)">T2<br>
<input type=CHECKBOX name=version value=DEF onclick="Selectversion(this.form,true)">T3<br>
getelementbyId doesnt work either. and i tried .click, and several other various cominatins of .text, .value, etc etc, but cannot figure out how to get the desired checkbox to 'click'
any tips here would be appreciated
thanks
tx
Capturing A Click On A Web Browser
I've got a form that loads with a web browser. The web browser displays a flash file I have created. The flash file has a button on it that starts a tutorial
Not sure if this is going to be possible but it's worth asking.
I need to capture the button click in the flash file.
The only way I could think of doing it was to draw an object on the form that is in the same location as the button, but the object disappears behind the web browser.
Any thoughts
Thanks in advance
John
Capturing A Click In Web Browser
I've got a form that loads with a web browser. The web browser displays a flash file I have created. The flash file has a button on it that starts a tutorial
Not sure if this is going to be possible but it's worth asking.
I need to capture the button click in the flash file.
The only way I could think of doing was to draw an object on the form that is in the same location as the button, but the object disappears behind the web browser.
Any thoughts
Thanks in advance
John
Using VB To 'click' A Checkbox In IE Browser Form
Hi
I am a bit stumped on this one. i have tried number of ways that work on other forms to get the checkbox on this web page to 'click' or 'check' etc
here is the macro
Sub test()
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.navigate "http://goodvibe.infinites.net/smpl.htm"
Do Until .ReadyState = 4
DoEvents
Loop
Do While .busy: DoEvents: Loop
Set fb1 = .document.forms(0).Item("em")
fb1.Value = "3"
Set fb2 = .document.forms(0).Item("ey")
fb2.Value = "2005"
Set fb4 = .document.forms(0).Item("version")
fb4.Value = ABC
fb4.Checked = True
End With
End Sub
and here is the salient portion of the html code:
<input type=CHECKBOX name=version value=ABC onclick="Selectversion(this.form,true)">T2<br> <input type=CHECKBOX name=version value=DEF onclick="Selectversion(this.form,true)">T3<br>
getelementbyId doesnt work either. and i tried .click, and several other various cominatins of .text, .value, etc etc, but cannot figure out how to get the desired checkbox to 'click'
any tips here would be appreciated
thanks
tx
Context Menu(right Click) Over A Vb Web Browser?
im pritty sure this can be done but unsure how
i tryed
Sub WebBrowser1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbRightButton Then PopupMenu mnuWeb
End Sub then in the menu editor i had the context menu that i want to call. but all this does is just call ie context menu. any help would be great thanks
----
p.s does any one no where i can download some good web browser icons. i.e for back/forward/stop/refresh etc
How To Click A Option Button In A Browser
i want to click a option button in a browser
HTML Code:
<td class="required">Gender:</td>
<td class="spacetext">
<input type="radio" name="gender" id="genderF" value="F">
<label for="genderF">Female</label>
<input type="radio" name="gender" id="genderM" value="M">
<label for="genderM">Male</label></td>
Right Click Menu On An Embedded Web Browser
is there any way to override the right click menu in an embedded web browser? I want to change the menu so that open in new window does something different
Public Sub BrowserWindow_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BrowserWindow.MouseDown
gives an error at compile time
An unhandled exception of type 'System.NotSupportedException' occurred in system.windows.forms.dll
Additional information: The MouseDown event is not valid on this ActiveX control.
am i doing something wrong?
J
Click Event For Web Browser Objects
I notice that the web browser doesn't have a click event. Is there any way that I can detect for a mouse click within the web browser window? I can't find an equivalent event.
Thanks
Aidan
Disable Shift-click On Custom Browser
i found a code to disable the CTRL-N shortcut (new window) for IE, im putting a limit for my browser and wanted to disable the shift-click, anyone knows how?
Listview Click Opening Default Browser
hi, i currently have this
Code:
Private Sub ListView1_ItemClick(ByVal Item As MSComctlLib.ListItem)
ShellExecute Me.hWnd, "Open", Item.Key, 0, 0, 3
End Sub
which opens the result in the default webbrowser is there a way i can have it open in a webbrowser on the form instead to keep it all in the one program?
also as a side note how do i link the "enter" keyboard button to a textbox to press a search button
Click On A Link At A Specific Location In Web Browser
Hello Guies
I want to know that
if any web site is being browsed and there is some link or button in a page
Say Prev or Next
How should i write a VB Program that can automatically clicks on those links or button and the the link is activated
i can use the web browser control of VB as well
How To Click On A Submit Button Silently In A Web Browser
hi. i was having a problem with inet using the executing command but i just thought this would be easier. but i'm having one problem. i need it to click on the Submit button within the webbrowser. but I don't know how I would go about doing that. please help. thanks.
if it helps
the button for Submitting is
<input type=submit value="Confirm">
there is no input name. so i can't use
With WebBrowser1.Document
.All("Submit").Click
i also have this other problem... with inet
strURL = "https://political.moveon.org/obamabuttons/process_sticker.pl"
strFormData = "confirm=1&fbt_id=&x=0&fb_id=&state=" & state.Text & "&y=0&email=" & email.Text & "+" & index.Text & "@gmail.com&city=" & city.Text & "&id=&country=United+States&req_phone=&sticker=187&name=" & name1.Text & "&phone=" & phone.Text & "&zip=" & zip.Text & "&phone_type=mobile&address1=" & address.Text & ""
Inet1.Execute strURL, "Post", strFormData, _
"Content-Type: application/x-www-form-urlencoded" & vbCrLf
Do Until Inet1.StillExecuting = False
DoEvents
Loop
i dont see why its not working. if it worked correctly, there would be a validate email in my email but there isn't.
VB Browser Control Browser Type
Is there anyway to make a browser emulate a browser other than IE? I would like to use a VB Browser control, but I would like it to pretend as through it was netscape when contacting secure servers...
Assistance is as always appreciated
Web Browser Image Question
How would I do this?
I have an HTML page that contains a picture. I want to create a form that will have just that picture loaded up when I navigate to the page. How would I do this? Is there a way to just load a section of the HTML (the IMAGE part) into the display of the form?
Web Browser Image Save
Ok, basically ive got a web page opened inside the web browser.
I need to save all the images to a .bmp or .jpg
However, I need to achieve this without using Inet to download the image.
Is there anyway of using the WebBrowser.Document.Images.Item(index) to save the image already being displayed without having to download it again?
any help appreciated.
Get Image Path On Browser
hi im trying to get a image path on my browser heres what im using
WebBrowser1.Navigate ("www.yahoo.com")
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Text1 = WebBrowser1.Document.images.Item(1)
End Sub
the problem is text1 just diplays the text
[object]
so i tried this code to get all images on the page...
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
On Error Resume Next
Set Doc = WebBrowser1.Document
For Each a_link In Doc.images
txt = txt & a_link.href & vbCrLf
Next a_link
txtLinks.Text = txt
Screen.MousePointer = vbDefault
End Sub
the strange thing is it worked but i dont want all the items i want a specific image! any ideas?
|