Webbrowser Control Tip and Examples - Page 3-VBForums
Page 3 of 4 FirstFirst 1234 LastLast
Results 81 to 120 of 121

Thread: Webbrowser Control Tip and Examples

  1. #81
    Member ts96's Avatar
    Join Date
    Mar 2010
    Posts
    37

    Re: Webbrowser Control Tip and Examples

    How can I make my webbrowser remember any password and username i enter?

  2. #82
    PowerPoster
    Join Date
    Jan 2008
    Posts
    8,884

    Re: Webbrowser Control Tip and Examples

    What do you mean by webbrowser? Are you talking about an application webbrowser like IE or FireFox or are you talking about the webbrowser control that you use in a VB program? If it's the control you do not make it remember passwords/usernames. This you must do yourself with some sort of external file or database.


    Anything I post is an example for demonstration purposes only and is not intended to be the solution to your request nor do I claim that it is. If you find that it is useful then it is entirely up to you to make whatever necessary changes you feel are adequate for your purposes.

  3. #83
    Member ts96's Avatar
    Join Date
    Mar 2010
    Posts
    37

    Re: Webbrowser Control Tip and Examples

    I mean the webbrowser control. I can save my passwords in a file, but how can I make the WebBrowser control detect when I login to a page??

  4. #84
    PowerPoster
    Join Date
    Jan 2008
    Posts
    8,884

    Re: Webbrowser Control Tip and Examples

    You can't in the strict sense of making the browser detect the login. You need to control the page that you are logging into in you VB program. By using the DocumentComplete event of the WebBrowser control you can determine if the current document (or page) is the login page. You have to be familiar with this page (i.e. you need to know it's URL and the names of the fields on the page that are used to enter the username and passwords). Once you know you have this page loaded and the names of the two fields you simply copy the username and password from your file into these two fields and then you must also know the name of the submit button so you can programmaticly "click" on the submit button.

    Let's say, for example, I want to automate a login to a website. In an external file I would keep the usernames and passwords. Now let's also say I know exactly the URL of the page that has the username and password fields on it and also the login button. So, for this example, the URL of the page is "http://www.jmswebsite.com/loginpage" and the names of the fields on this page are "userID" and "pass" for the username and password and "login" for the submit button.

    Here is a very simple code example of the above.
    Code:
    Private Sub WebBrowser_DocumentComplete(ByVal pDisp As Object, URL As Variant)
      '
      '
     If URL = "http://www.jmswebsite.com/loginpage" Then 
       WebBrowser.Document.All("userID").Value = username from your external file
       WebBrowser.Document.All("pass").Value = password from your external file
    
       WebBrowser.Document.All("login").Click
     End If
       '
       '
    End Sub
    This example may not exactly solve your problem but it shows the very basics of one way you might approach your problem.


    Anything I post is an example for demonstration purposes only and is not intended to be the solution to your request nor do I claim that it is. If you find that it is useful then it is entirely up to you to make whatever necessary changes you feel are adequate for your purposes.

  5. #85
    Member ts96's Avatar
    Join Date
    Mar 2010
    Posts
    37

    Re: Webbrowser Control Tip and Examples

    You helped me a lot. Thank you. If I manage to solve my problem I will post the code here!!!

  6. #86
    Member ts96's Avatar
    Join Date
    Mar 2010
    Posts
    37

    Re: Webbrowser Control Tip and Examples

    Now I have another question. I can't explain it in words but I will show you an exampple:
    I have http://www.vbforums.com/showthread.php?t=384076&page=3 and I want to have this: http://www.vbforums.com/ . How can I do this?? (I want it for the favicon)

  7. #87
    New Member
    Join Date
    Jul 2010
    Posts
    1

    Re: Webbrowser Control Tip and Examples

    You can use small tip:
    vb Code:
    1. Private Sub Form_Load()
    2.     WebBrowser1.Navigate "http://www.vbforums.com/showthread.php?t=384076&page=3"
    3. End Sub
    4. Private Sub WebBrowser1_DownloadComplete()
    5.     Dim i As Integer
    6.     Dim SearchString
    7.     Text1.Text = WebBrowser1.LocationURL
    8.     SearchString = Text1.Text  ' String to search in.
    9.     SearchChar = ".com" ' Search for "Xp".
    10.     i = InStrRev(SearchString, SearchChar, , 1) 'InstrRev(stringcheck, stringmatch[, start[, compare]])
    11.     Text2.Text = Left(Text1.Text, (i + 3))
    12. End Sub

  8. #88
    Addicted Member
    Join Date
    Jan 2010
    Location
    Obuasi
    Posts
    136

    Resolved Re: Webbrowser Control Tip and Examples

    i tried the 'Custom Right Click Menu' side of the tutorial
    but is not working and i don't know why.
    am using windows Vista, has it got something to do with it.
    There's only one thing that makes a dream impossible to achieve: THE FEAR OF FAILURE

  9. #89
    New Member
    Join Date
    Jul 2010
    Posts
    1

    Re: Webbrowser Control Tip and Examples

    my Question is
    how can i copy image in web browser control programatically
    for example web page which i have loaded into web browser control have got 5 images and if i can right click on each image and save it is alowing me to do it manually but i want to do this autometacally
    and i just want to save one image from the page may be this is first image or mid image or last image

  10. #90
    Lively Member
    Join Date
    Feb 2007
    Posts
    71

    Re: Webbrowser Control Tip and Examples

    how to control the download window
    say we browse to http://go.microsoft.com/?linkid=9729747

    then it will come up with a save file prompt
    we save it

    so I want to be able to see if the download is finish or not..

    thank you

  11. #91
    New Member
    Join Date
    Dec 2010
    Posts
    12

    Re: Webbrowser Control Tip and Examples

    This is a great post! I have a specific question a little on the advanced side of this topic. I am trying to save "specific" data from the website to tables in access. Here is a small portion of the web site I am dealing with.

    Code:
    <div class="details">
    	<span id="Quals" onclick="javascript: toggleTable(this.id)" class="OutlineIcon">
    	<img id="imgQuals" src="images/minusIcon.gif" border="0" WIDTH="14" HEIGHT="14"></span>
    	<span class="detailsHd">ATMS Quals</span>
    	
    	<table id="tblQuals" border="1" cellpadding="2" cellspacing="0" class="details">
    	
    		<tr><th>Qual Number</th>
    			<th>Title</th>
    			<th>Expires</th></tr>
    		
    		
    		<tr><td align="left" valign="top" class="Normal">
    				ADM_MAT&nbsp;</td>
    			<td align="left" valign="top" class="Normal">
    				<a href="atms_supv_qualtree.cfm;jsessionid=0e30e09a3ccb91f2c5ca5e806e7d2b2d6176?PID=22644&amp;qualcat=ADM&amp;qualid=_MAT&amp;title=MANDATORY ANNUAL TRAINING" class="Normal">MANDATORY ANNUAL TRAINING&nbsp;</a></td>
    			<td align="center" valign="top" class="Normal">
    				10/31/2011&nbsp;</td></tr>
    		
    		
    		<tr><td align="left" valign="top" class="Normal">
    				BASSHIP_WORKER&nbsp;</td>
    			<td align="left" valign="top" class="Normal">
    				<a href="atms_supv_qualtree.cfm;jsessionid=0e30e09a3ccb91f2c5ca5e806e7d2b2d6176?PID=22860&amp;qualcat=BAS&amp;qualid=SHIP_WORKER&amp;title=BASIC SHIPBOARD WORKER" class="Normal">BASIC SHIPBOARD WORKER&nbsp;</a></td>
    			<td align="center" valign="top" class="Normal">
    				10/31/2011&nbsp;</td></tr>
    		
    		
    		<tr><td align="left" valign="top" class="Normal">
    				BASSHOP_WORKER&nbsp;</td>
    			<td align="left" valign="top" class="Normal">
    				<a href="atms_supv_qualtree.cfm;jsessionid=0e30e09a3ccb91f2c5ca5e806e7d2b2d6176?PID=22861&amp;qualcat=BAS&amp;qualid=SHOP_WORKER&amp;title=BASIC SHOP WORKER" class="Normal">BASIC SHOP WORKER&nbsp;</a></td>
    			<td align="center" valign="top" class="Normal">
    				10/31/2011&nbsp;</td></tr>
    I am currently pulling the data using the website control and using this code here to put it into a string but have no idea which way to go now...

    Code:
    Dim teststring As String
    
    teststring = WebBrowser1.Document.body.innerhtml
    Thanks all

  12. #92
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,572

    Re: Webbrowser Control Tip and Examples

    @thechazm: For gathering data from table (of HTML), dilenette had posted a sample code that uses ADO to retrieve the information. If you search the forum, you'll find that code.

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India

    Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...

  13. #93
    New Member
    Join Date
    Dec 2010
    Posts
    12

    Re: Webbrowser Control Tip and Examples

    Thank you for pointing me in the right direction. The name you referenced though does not seem to be listed in the user directory so I'm just scanning the net now.

    Have a good one,

    TheChazm

  14. #94
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,451

    Re: Webbrowser Control Tip and Examples

    That's because his handle is spelled dilettante
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  15. #95
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,572

    Re: Webbrowser Control Tip and Examples

    Quote Originally Posted by thechazm View Post
    Thank you for pointing me in the right direction. The name you referenced though does not seem to be listed in the user directory so I'm just scanning the net now.

    Have a good one,

    TheChazm
    Quote Originally Posted by CDRIVE View Post
    That's because his handle is spelled dilettante
    Oops... Sorry guys.. Spelling mistakes..

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India

    Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...

  16. #96
    New Member
    Join Date
    Dec 2010
    Posts
    12

    Re: Webbrowser Control Tip and Examples

    Thanks again. I was able to figure out what I needed by reading http://www.devarticles.com/c/a/HTML/...s-a-Recordset/

    I will go read what dilettante posted to maybe get more in depth information but the code was as simple as this:
    Code:
    AtmsQualsNumber = WebBrowser1.Document.getelementbyid("tblQuals").rows(AtmsQualsc).cells(AtmsQualscc).innertext
    Thanks again so very much for the responces and help,

    TheChazm

  17. #97
    New Member
    Join Date
    Jan 2011
    Posts
    13

    Re: Webbrowser Control Tip and Examples

    and how can i get text from webbrowser to my form in vb6

  18. #98
    New Member
    Join Date
    Dec 2010
    Posts
    12

    Re: Webbrowser Control Tip and Examples

    After a very long time of spending working with the webbrowser control I have learned quite a bit as far as how to make it work. Now I think I have hit another stump. I am trying to read a table with no id on a page. The page only has one table on it but I cannot seem to get the code to pickup on it. Any suggestions?

    Here is what I have so far:
    Code:
    AtmsQualsLength = WebBrowser1.Document.getElementsByTagName("table").rows.length
    And I have also tried:
    Code:
    AtmsCoursesLength = WebBrowser1.Document.getelementbyid("table").rows.length - 1
    The reason why I am putting table as the table name is because of this post
    http://www.eggheadcafe.com/software/...lass-name.aspx

    Thanks to all

  19. #99
    New Member
    Join Date
    Dec 2010
    Posts
    12

    Re: Webbrowser Control Tip and Examples

    Well I was not able to ever find a good solution for reading a table with no ID instead I used the instr function and with some calculations read the data from its source code. Its a pain and if the format changes then I would have to update the code but here is what I have.

    Code:
    '// Locate and assign Pay Shop
        lngSupCode = InStr(WebBrowser1.Document.documentelement.innerhtml, "Pay Shop")
        lngSupCode = lngSupCode + 210
        strBuildData = Mid(WebBrowser1.Document.documentelement.innerhtml, lngSupCode)
        lngSupCode = InStr(strBuildData, "&nbsp;")
        strBuildData = Left(strBuildData, lngSupCode)
        strBuildData = Mid(strBuildData, 18)
        lngSupCode = InStr(strBuildData, "&") - 1
        strBuildData = Left(strBuildData, lngSupCode)
        strPayShop = strBuildData
        
        '// Locate and assign Assn'd Shop
        lngSupCode = InStr(WebBrowser1.Document.documentelement.innerhtml, "Assn'd Shop")
        lngSupCode = lngSupCode + 210
        strBuildData = Mid(WebBrowser1.Document.documentelement.innerhtml, lngSupCode)
        lngSupCode = InStr(strBuildData, "&nbsp;")
        strBuildData = Left(strBuildData, lngSupCode)
        strBuildData = Mid(strBuildData, 14)
        lngSupCode = InStr(strBuildData, "&") - 1
        strBuildData = Left(strBuildData, lngSupCode)
        strAssignedShop = strBuildData
        
        '// Locate and assign Supv.
        lngSupCode = InStr(WebBrowser1.Document.documentelement.innerhtml, "Supv.")
        lngSupCode = lngSupCode + 200
        strBuildData = Mid(WebBrowser1.Document.documentelement.innerhtml, lngSupCode)
        lngSupCode = InStr(strBuildData, "&nbsp;")
        strBuildData = Left(strBuildData, lngSupCode)
        strBuildData = Mid(strBuildData, 16)
        lngSupCode = InStr(strBuildData, "&") - 1
        strBuildData = Left(strBuildData, lngSupCode)
        strSupCode = strBuildData
        
        '// Locate and assign Shift
        lngSupCode = InStr(WebBrowser1.Document.documentelement.innerhtml, "Shift")
        lngSupCode = lngSupCode + 200
        strBuildData = Mid(WebBrowser1.Document.documentelement.innerhtml, lngSupCode)
        lngSupCode = InStr(strBuildData, "&nbsp;")
        strBuildData = Left(strBuildData, lngSupCode)
        strBuildData = Mid(strBuildData, 14)
        lngSupCode = InStr(strBuildData, "&") - 1
        strBuildData = Left(strBuildData, lngSupCode)
        strShift = strBuildData
    I just wanted to share what I have done so hopefully its usefull to someone.

    Thanks,

    TheChazm

  20. #100
    New Member
    Join Date
    Aug 2004
    Posts
    8

    Smile Re: Webbrowser Control Tip and Examples

    how to set Page size for this control
    and
    how to set Page orientation L/p
    i have use this control as Report Viewer in my application

    some report on Landscape and some Portrait
    some page A4 and Some Legal

    Please Help Me

  21. #101
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,451

    Re: Webbrowser Control Tip and Examples

    Quote Originally Posted by ketanchauhan View Post
    how to set Page size for this control
    and
    how to set Page orientation L/p
    i have use this control as Report Viewer in my application

    some report on Landscape and some Portrait
    some page A4 and Some Legal

    Please Help Me
    The WB control conforms to the same properties as all other visible VB controls, IE, Top, Left, Height and Width. You can write code to change it at will.
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  22. #102
    New Member
    Join Date
    Aug 2004
    Posts
    8

    Re: Webbrowser Control Tip and Examples

    Quote Originally Posted by CDRIVE View Post
    The WB control conforms to the same properties as all other visible VB controls, IE, Top, Left, Height and Width. You can write code to change it at will.
    i want change Pagesize not top,left
    i want change page oriantation landscape, portrait Please Tell me how we can change this ???

  23. #103
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,451

    Re: Webbrowser Control Tip and Examples

    Quote Originally Posted by ketanchauhan View Post
    i want change Pagesize not top,left
    i want change page oriantation landscape, portrait Please Tell me how we can change this ???
    That would be the Height and Width properties.
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  24. #104
    New Member
    Join Date
    Aug 2004
    Posts
    8

    Re: Webbrowser Control Tip and Examples

    Quote Originally Posted by CDRIVE View Post
    That would be the Height and Width properties.
    I Try But Problem Not Solved

  25. #105
    PowerPoster
    Join Date
    Jan 2008
    Posts
    8,884

    Re: Webbrowser Control Tip and Examples

    WebBrowser control does not have a landscape/portrait setting. You change the width and height of the control to the size you want.

    .Width = 8.5 and .Height = 11 will give you portrait whereas .Width = 11 and .Height = 8.5 will give you landscape. Just like CDRIVE told you in post #103. What else do you want?


    Anything I post is an example for demonstration purposes only and is not intended to be the solution to your request nor do I claim that it is. If you find that it is useful then it is entirely up to you to make whatever necessary changes you feel are adequate for your purposes.

  26. #106
    New Member
    Join Date
    Aug 2004
    Posts
    8

    Re: Webbrowser Control Tip and Examples

    Quote Originally Posted by jmsrickland View Post
    WebBrowser control does not have a landscape/portrait setting. You change the width and height of the control to the size you want.

    .Width = 8.5 and .Height = 11 will give you portrait whereas .Width = 11 and .Height = 8.5 will give you landscape. Just like CDRIVE told you in post #103. What else do you want?
    i want to print landscape/portrait and page size a4,legal is it possible i check about this on msdn its display you can change from ScriptX

  27. #107
    Junior Member
    Join Date
    May 2009
    Posts
    26

    Re: Webbrowser Control Tip and Examples

    I am trying to learn the DOM rather than doing what I have done in the past, parsing out an entire HTML page. I don't seem to "get" the DOM for some reason.

    I am attempting to use the example here but I can't seem to find the "alt=xxxx" values within the AnchorElement.

    I am using this block of code above from this thread:
    Code:
     Option Explicit
        Private Sub Form_Load()
            WebBrowser1.Navigate "www.vbforums.com"
        End Sub
        Private Sub WebBrowser1_DownloadComplete()
            'you must add the "Microsoft HTML Object Library"!!!!!!!!!
            Dim HTMLdoc As HTMLDocument
                Dim HTMLlinks As HTMLAnchorElement
                    Dim STRtxt As String
            ' List the links.
            On Error Resume Next
                Set HTMLdoc = WebBrowser1.Document
                    For Each HTMLlinks In HTMLdoc.links
                        STRtxt = STRtxt & HTMLlinks.href & vbCrLf
                    Next HTMLlinks
                Text1.Text = STRtxt
        End Sub
    The code above finds all the "href" info from all the links like this in the document, but how do I programatically find what the "alt" value is that is associated with these links? There is no supported attribute for "alt" that I can find, i.e. HTMLlinks.alt <<< INVALID

    Here is the HTML snipit that HTMLlinks.href finds. I need to know the alt=xxx value associated with it:

    Code:
    <a href="main.php?g2_itemId=28"><img src="main.php?g2_view=core.DownloadItem&amp;g2_itemId=68&amp;g2_serialNumber=2" width="200" height="86" id="IFid1" class="ImageFrame_none giThumbnail" alt="Pyramids"/></a>

    Thanks!

  28. #108
    Junior Member
    Join Date
    May 2009
    Posts
    26

    Re: Webbrowser Control Tip and Examples

    I have a very large photo gallery on a system where the DB got corrupted. Good news is I can view my old gallery but I just can't add anything to it. I have recreated a second image of it on another URL with all the photos but no descriptions of any of them. I need to copy over the descriptions. I am currently trying to use Webbrowser control to copy all the text from the corrupt gallery to the new gallery.

    I have a Webbrowser1 and Webbrowser2 session set up with the 2 screens I want to copy from and to. I would like to learn to do this in the browser control rather than copy/paste if possible, but I will ultimately take advise on anything that works.

    There are around 36 input fields to copy on each page but they exist as 2 types with different names. Here are the 2 types:

    Copy from/to Field type 1:
    Code:
    <input type="text" id="summary_130" size="60"
    name="g2_form[items][130][summary]" value="The road to Alaska was a long and hard one.l"/>
    <h4> Keywords </h4>
    Copy from/to Field type 2:
    Code:
    <textarea id="description_129" rows="4" cols="60"
    name="g2_form[items][129][description]">Land travel to Alaska is a long and challenging task for anyone to undertake.</textarea>
    Of course my code will use the item numbers in the brackets [129], [130] etc to identify what goes where but how do I get started with a browser control to copy and paste from these two types of fields, an Input "value" and a textarea data-string?

    Thanks!

  29. #109
    New Member
    Join Date
    Jun 2011
    Posts
    6

    Re: Webbrowser Control Tip and Examples

    Did you ever find an answer to this question?? I have a similar issue.
    I would like to get information from an html table that looks like this.

    <tr class="vcard">
    <td style="border-bottom: 1px solid gray"> &nbsp;</td>
    <td style="border-bottom: 1px solid gray"><span class="tel">(###) ###-####</span> &nbsp;</td>
    <td style="border-bottom: 1px solid gray"><br><strong><span class="fn org">ANY Insurance Agency</span></strong><br>
    <span class="adr">
    <span class="street-address">Any Address</span><br>
    <span class="locality">ThisState</span><br>
    <span class="region">MO</abbr>
    </span>
    </td>
    <td style="border-bottom: 1px solid gray"> &nbsp;</td>
    </tr>


    This is more html code but im only trying to access "fn", "tel", "fn org",
    "street-address","locality", and"region".

    Here are so facts i know. They list the agents info under a vcard element. Under that element there are name, tel, and orgainize listed. Then the address information is listed under the element "adr". So i need to loop throught the information getting each set of agent information

  30. #110
    Junior Member
    Join Date
    May 2009
    Posts
    26

    Re: Webbrowser Control Tip and Examples

    It's a catch 22; if you understood this stuff well enough to code in it, then you wouldn't be coding in it ;-)

    I still don't grasp the DOM myself but being a lame hacker who codes mostly by example, this helped me a lot. It sort of enumerates most of the major parts of the DOM. I have altered my own version of it in fact with about 3 more screens and a verbose log file that even borders on being unreadable since it doubles down on so many example calls to the DOM. I use it as a shell to go to the website I plan to manipulate and find what I am looking for and go from there.

    I am not saying this will work for you, but for the most part I just run this, peruse through the output until I find what I am looking on one of the display output panels and then "cheat" by locating the VB code that produces the shortest path to accessing the info you are searching for.

    If you are into bass-ackwards coding like me, maybe this will help get you started:
    http://vb-helper.com/howto_get_webbrowser_text.html

  31. #111
    Junior Member
    Join Date
    May 2009
    Posts
    26

    Re: Webbrowser Control Tip and Examples

    Also don't make the same "first mistake" I made by thinking that if you log into a session manually with IE that your VB browser control session code testing will automatically be logged in too just because you have open an active conventional IE user session with the same website. They are separate and you will have to code any log-in sequence into your routine as well.

  32. #112
    Junior Member
    Join Date
    Jan 2012
    Posts
    24

    Re: Webbrowser Control Tip and Examples

    i love u all

  33. #113
    Addicted Member
    Join Date
    Dec 2009
    Posts
    244

    Re: Webbrowser Control Tip and Examples

    hi, is it possible do determine whether a text (SPAN element) text is visible or not?

    i tried:
    body.parentElement.innerText
    body.parentElement.outerText

    even i manually select all (Ctrl+A) then paste into a text box and still that text (text is "invalid captcha warning" exits. but not visible in the control/browser..

    but i need to get is it visible or not to track if user put correct cpathca or wrong..

    i hope i a clear and waiting for someones help...

    best regards
    kamrul Hassan

  34. #114
    New Member
    Join Date
    Feb 2012
    Location
    Rome, Italy
    Posts
    1

    Re: printing a series of page one after another, but ...

    this thread has been very useful, many thanks !
    But I still have some problems.
    My application is very simple: to prepare a series of map printout from Google Maps, for a list of points I have in a DB.
    So I loop through the point, send the correct address to google maps and get the image on the webbrowser object in my form. Then issue the print command using pdf creator as printer.
    The problem is that I would like to launch the procedure and get all the printout, but at now I must have put a msgbox after each point; without it the printout are empty, because the print command does not wait for the page to complete.
    May someone give ne a hint ?
    thx
    David

  35. #115
    Fanatic Member coolcurrent4u's Avatar
    Join Date
    Apr 2008
    Location
    *****
    Posts
    970

    Re: Webbrowser Control Tip and Examples

    Can anyone help on how to simulate typing, which is a combination of onkeydown, onkeypress and onkeyup events?

    regards
    Programming is all about good logic. Spend more time here


    (vHost for Apache) (Generate pronounceable password) (Generate random number c#) (Filter array with another array)

  36. #116
    New Member
    Join Date
    Jun 2012
    Posts
    1

    Re: printing a series of page one after another, but ...

    Quote Originally Posted by DavidRemotti View Post
    this thread has been very useful, many thanks !
    But I still have some problems.
    My application is very simple: to prepare a series of map printout from Google Maps, for a list of points I have in a DB.
    So I loop through the point, send the correct address to google maps and get the image on the webbrowser object in my form. Then issue the print command using pdf creator as printer.
    The problem is that I would like to launch the procedure and get all the printout, but at now I must have put a msgbox after each point; without it the printout are empty, because the print command does not wait for the page to complete.
    May someone give ne a hint ?
    thx
    David
    You can delay the image print by having the script wait for the page to load.

    Code:
    Do Until webbrowser1.ReadyState = READYSTATE_COMPLETE
    DoEvents
    Loop
    This should do the trick for you.

  37. #117
    New Member
    Join Date
    Jun 2012
    Posts
    1

    How to complete and send a little form

    Hello,
    I'm trying to write a simple routine that write a text in the page http://tinywebdb.appspot.com/storeavalue and press the button "Store a value".

    Looking the html source of the page, the name of the first field il "Tag", the name of the second field is "Value" and the name of the button is "fmt"

    My test code is

    WebBrowser.Document.All("Tag").focus
    WebBrowser.Document.All("Tag").Value = "xxxxxx"

    WebBrowser.Document.All("Value").focus
    WebBrowser.Document.All("Value").Value = "yyyyyy"

    WebBrowser.Document.All("fmt").Click

    but nothing happen on the last row (don't click)
    Any idea?
    Thank you, Gianluca

  38. #118
    New Member
    Join Date
    Oct 2012
    Posts
    1

    Re: How to complete and send a little form

    How can i get the url of the site that is going to get navigated?Is there a property of webrowser for it?
    Thanx in advance..

  39. #119
    Lively Member
    Join Date
    Jan 2010
    Posts
    94

    Re: Webbrowser Control Tip and Examples

    Is "Disabling functions appropriately" code on the first page supposed to disable CTRL+P? If so, it does not.
    Is there a third way of disabling CTRL+P besides hooking keyboard or using WBCustomizer.dll?

  40. #120
    New Member
    Join Date
    Nov 2012
    Posts
    14

    Re: Webbrowser Control Tip and Examples

    Checkbox in a page, how to control it

    in the website, the checkbox i wanna check, the code is like this
    <input type="checkbox" onchange="groupCheck(this.checked)">

    and from your guide, WebBrowser1.Document.GetElementById("PersistentCookie").Checked = True 'checked
    that i cant find, help me out with this, i'm using visual studio 2008

Page 3 of 4 FirstFirst 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.