Results 1 to 12 of 12

Thread: webbrowser control

  1. #1
    Guest

    Question

    hi,
    i use the web browser control in my app.
    and i need to constantly load html files into it because it shows resaults of calculations.
    but every time i open the html it takes some time to load and makes an annoying 'clinck" sound. is there a way to quick load a html file (its only a few byts) and to override the loading/opening sound.?

    is this related some how to the OPEN statement. i mean i open a file for editing in a loop - open close - open close etc. maybe i need to leave it open or something and then it will write faster and the html will show faster (the file that the html control is showing is a file that its content changes a few times, then closes and display the total).

    here is what i mean.

    the program generates random numbers.
    you select a number, you select how many times to repete the action. lets say i chose to 20, 5 times.

    i got:
    12
    5
    17
    1
    20

    each time the 'random' action is made the html file is written again, to update it content. if the number is 1 (lowest) then the number appears red, and if its 20 (highest) then it appears green.

    every time the action takes place the program removes the </body></html> from the last line to add the next numberd rolled. and then the </body></html> appears again.

    after all 5 times are complete you get a line; "total: 45"
    in black (every other line is black too).

    now, again, to remind you why you read all this.
    each time the action take place te webbrowser control load the html again and 'clincks'. and then at the end it loads the html one last time to show everything and 'clinks'.

    how can i fasten the proccess and gt rid of the 'clinking, clicking tiking sound'

    thanks..
    Boaz zemeR

  2. #2
    Guest
    Is it always the same file? If it is...why don't you use Webbrowser1.Refresh?

  3. #3
    Guest

    Exclamation refresh

    nope, that isnt working, i get an error message: method refresh of object 'iwebbrowser2' failed.

    and the webrowser control is called browser so whats the connection...

    please help?

  4. #4
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    nope, that isnt working, i get an error message: method refresh of object 'iwebbrowser2' failed.

    and the webrowser control is called browser so whats the connection...
    Hehe, then you would use
    Code:
    Browser.Refresh
    "Browser" is whatever you neamed your control.

    Hope that helped,
    D!m
    Dim

  5. #5
    Guest
    Yup, Dim's right...if your getting the error because you have a control named Browser and your using a code holding the name Webbrowser1 and refresh Webbrowser1 and not Browser..you will get an error because the Webbrowser1 control is not being detected. You might also want to try Browser.Refresh2 0 ...I don't exactly get what's the difference between Refresh and Refresh2 either .

    [Edited by Matthew Gates on 07-14-2000 at 01:20 AM]

  6. #6
    Guest

    Red face no no no

    how dumb do you think i am.
    i know that it should be called browser.refresh
    it is called browser.refresh
    and i still get the same error with iwebbrowser2 or whatever i wrote last time

    this is the reason that i asked here because it really is beyond my understanding, why it would say iwebbrowser2 when i use browser

    thanks..

  7. #7
    Guest
    Exactly how fast are you refreshing?

  8. #8
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    Sorry for the "hehe" i wasn't sure if you were serious.
    Anyways...it sounds like you have several web controls on your form...i think...If not then yeah like Matt asked...how many times are you refreshing...no but that would have anything to do with saying that refresh of control that you don't have failed.
    I think you might have several web controls on your form and check your code for "iwebbrowser.refresh" cause it HAS to be somewhere in there.

    Gl,
    D!m
    Dim

  9. #9
    Guest

    i checked it..

    nope, i checked it, just one 'browser' (webbrowser control).
    and im not sure how fast am i refreshing, pretty fast i guess a few times per second maybe..

    but that doesnt matter
    so i cant use refresh...
    but if i could at least get read of the sound, even if it will still be a bit slower then if i had used refresh.

    the sound is a part of ie5, whenever you load a html page it does a click sound, and i can shut it down on my computer, but not on others..
    i need to make it stop for a while, just when my program is working..

  10. #10
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    HOw about moving it to a temp directory when your program is lanched and then placing it back when the program is unloaded.
    Hope that helps,
    D!m
    Dim

  11. #11
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    This is probably not going to be any help whatsoever...

    If you are using webbrower control for fairly simple stuff ie: not printing or using layers,

    and you suspect IE5 is the problem,
    you could use the IE 3 webbrowser control. This would make your app usable by peolple who have only got IE3 intalled.

    How do I do that I hear you ask?

    Well, that's the stumling block!

    About a year ago I downloaded a reg file from MSDN which, when merged to your registy, made IE3 webbrowser control avaiable even if you had IE4 installed on your PC

    BUT my PC was rebuilt last February and I have lost the .reg file.

    I've just done a quick search for it on the MSDN site but no luck so far...





    Mark
    -------------------

  12. #12
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    Mark
    -------------------

Posting Permissions

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



Click Here to Expand Forum to Full Width