Results 1 to 21 of 21

Thread: i need small help

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    12
    hi

    i make a small program in VB 6
    and i want to make a small Loop to refresh my site
    like :

    for i =1 to 10

    webbrowser1.navigate (http://www.vb-world.net)
    webbrowser1.refresh

    next

    but i get error !!!

    please help me , and find solution for that bug .

    have a nice day

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Replace the parentheses around the site address with quotes:
    Code:
    WebBrowser1.Navigate "http://www.katisha.co.uk"
    Anyway, why do you want to refresh it 10 times, one after the other? Why not use a timer control set every 20s or so?
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    12
    Dear parksie

    i'm new programmer , help me to create the code step by step if you have a free time

    i want to check my site , so i need to load huge data by refresh one page , if you have another idea please write is here or email me at [email protected]

    thank's alot


  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Sure:

    1. Create a Timer control, and set the Interval property to the number of milliseconds you want between updates.

    2. Insert the following code into your form:
    Code:
    Private Sub Timer1_Timer()
        WebBrowser1.Refresh
    End Sub
    Now, if when your form loads, you navigate the WebBrowser control to the correct site, it will update every timer event.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5
    Guest
    Add a DoEvents to keep the Webbrowser from freezing.

    Umm..I think your going to have to use a timer, as parksie suggested. When I try that code, there's an error.

    Code:
    Declare Sub Sleep Lib "kernel32" _
    (ByVal dwMilliseconds As Long)   
    
    Private Sub Form_Load()
    Timer1.Interval = 100
    Webbrowser1.Navigate "http://www.vb-world.net"
    End Sub
    
    Private Sub Timer1_Timer()
    Webbrowser1.Refresh
    DoEvents
    Call Sleep(1000) '1000=1 second
    End Sub
    Not sure if that'll work, but it's a try.

  6. #6

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    12
    it's work

    thank you very much :->

    btw , you have a nice website .

  7. #7
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Who, me? Thanks! It's the photos from our dive trip to the Red Sea. I'm Mike Parks, and am in quite a few of the photos. BTW, I wrote the program to generate the gallery.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  8. #8

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    12
    Dear Matthew Gates


    Error !!

    Compile error:
    Constants, fixed-length strings , arrays , user-defined types and Declare statments not
    allowed as Public members of object modules

    ?


  9. #9
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Change the Declare statement to Private Declare. That should fix it.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  10. #10

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    12

  11. #11
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Yep. He does look tired, doesn't he! (We were supposed to be on a drift dive to the wreck of the Kingston, but the current was going the wrong way, so we only had about 5 minutes on the wreck.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  12. #12
    Guest
    Sorry about that Dode.

    And parsie? You Jewish, like me? I swam in the Red Sea when I went to Isræl also. Very cool, and I swam in the Dead Sea and the Mediterranean Sea. All so salty. I didn't get to go skooba-diving, but I did get to touch a dolphin. It was a lot of fun. Except for the Dead Sea, which found every scratch or scar you had and hurt like all hell, and if you get Dead Sea water in your eyes...damn, that burns! Hope you enjoyed Isræl as much as I did.

  13. #13
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    No, I'm not Jewish. I'm actually an ex-Christian atheist. I've never been to Israel, although my sister has. We went to Egypt, leaving on a liveaboard from Sharm El Sheikh last October. Although the Dead Sea does sound fun from what lots of people have said.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  14. #14
    Guest
    It's the photos from our dive trip to the Red Sea.
    Oh, should've been more specific. In about 5 years, we (family) are taking another trip to Isræl, but also, a few days to Egypt as well. I've been to Egypt once, but we only went for a few hours. It's hot as hell over there. But we will probably go see the Pyramids .

    Excuse my misunderstanding, sorry about that.

  15. #15
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Nah, no harm done. Seriously, I would like to visit Israel - looks like an interesting place. I didn't see much of Egypt because the only time we spent on land was the last day when we went quad-biking in the desert .
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  16. #16
    Addicted Member Mih_Flyer's Avatar
    Join Date
    Mar 2000
    Location
    some place there
    Posts
    241
    ok guys, if any one of u wanna go to egypt then let me know, coz i'll move to study there in one month, and i will spend the next 5 years there, so let me know and i will show u the best places in egypt, and also u will have a free place to live, coz i have my own flat, and i live alone, and i speak egyptian language which is Arabic, if u wanna come then just let me know, and i guarantee that u will have fun

  17. #17
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Nice. Zaire? (Or however it's spelt).
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  18. #18
    Addicted Member Mih_Flyer's Avatar
    Join Date
    Mar 2000
    Location
    some place there
    Posts
    241
    what does "Zaire" means?????

  19. #19
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I thought you spoke Arabic...it means "How are you?". Although I can't spell because I was only speaking to people.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  20. #20
    Addicted Member Mih_Flyer's Avatar
    Join Date
    Mar 2000
    Location
    some place there
    Posts
    241
    ok i got it, you mean "Ezayak", this is in egyptian accent which is defferent than my accent but i can understand them 100%, you also must know "Shokran" which means thanx,,,,

  21. #21
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    The second of three words (how are you; thanks; i'm fine). Those three phrases are all I know...
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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