Results 1 to 14 of 14

Thread: App stops after showing YouTube video link

  1. #1

    Thread Starter
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    App stops after showing YouTube video link

    Hi guys.

    I've searched the forum but I've seen nothing similar or a solution.

    I added this new problem to the existing app to save uploading it again. Post #12 but I'm told its better to make a new thread as that one was RESOLVED.

    Now I've been working on this app for the past 4 years and I posted updates on the relevant forums. I test every code in the ListView to make sure each web link and video works. I've tested the latest version and I notice that if it shows a YouTube video which shows no problem if I click on another error code nothing shows in the webbrowser control. I've put in Refresh on every click of the ListView and Refresh & Refresh2 on the webbrowser but nothing shows.

    The only thing that gets updated is Adobe update their Flash Player but I'm not using that control as its a waste of time in VB6. The webbrowser control uses ieframe.dll which is a defaut install by Windows.

    Any suggestions will be appreciated.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  2. #2

    Thread Starter
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: App stops after showing YouTube video link

    Well this new thread has been up for the past 5 days and its had 92 views but no comments. My app has had 3 more downloads.

    Would anyone like to guess what the problem is?
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  3. #3

    Thread Starter
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: App stops after showing YouTube video link

    Well this thread has had 174 views and 55 downloads of my app and still no comments or suggestions.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: App stops after showing YouTube video link

    i know i downloaded your app, when you first posted, though i have so far been unable to find where is saved it
    does the problem exist in the original download, or do i need to download again?

    i have never use youtube from vb, but as no one else has posted any solutions, i though i would have a look
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  5. #5

    Thread Starter
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: App stops after showing YouTube video link

    Yes this error shows in the app I posted. As I said if you search for youtube in Possible Causes 2 items show. If you click on VW and AUDI Engine code P0171 P0174 P1136 and P1138 YouTube runs the video no problem but if you click on the other item nothing shows. If you click on Show All on the toolbar it reloads the database but nothing shows when you click on an item, you have to close the app and start it again.

    As I've said I've made this app for many years and YouTube video's have always shown. The app only uses COMCTL32.OCX and ieframe.dll for the webbrowser.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  6. #6
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: App stops after showing YouTube video link

    I tried it here on this system, The app does not stop responding.
    I do get errors when it tries to play the video. The error pops up on IE and says that it can't move focus to the control because it is invisible, not enabled or is of a type that can not receive focus.
    The test system is XP sp3. Not sure which IE version is on here either 7 or 8. I don;t use IE and have not allowed the newest version to be installed.

    If I clear the error and click on the link again or another link the program works but I get IE errors on the links.

  7. #7
    Addicted Member
    Join Date
    Jun 2002
    Location
    Finland
    Posts
    169

    Re: App stops after showing YouTube video link

    Quote Originally Posted by Keithuk View Post
    If you click on VW and AUDI Engine code P0171 P0174 P1136 and P1138 YouTube runs the video no problem but if you click on the other item nothing shows.
    Code:
    'commented out
    'brwWebBrowser.Document.Clear
    'brwWebBrowser.Document.Write HTMLString
    'brwWebBrowser.Document.Close
    
    On Error Resume Next: Kill "c:\1.html": On Error GoTo 0
    Open "c:\1.html" For Binary As #1: Put #1, , HTMLString: Close #1
    brwWebBrowser.Navigate2 "c:\1.html"

  8. #8

    Thread Starter
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: App stops after showing YouTube video link

    Thanks for the comment pekko.

    Quote Originally Posted by pekko View Post
    Code:
    'commented out
    'brwWebBrowser.Document.Clear
    'brwWebBrowser.Document.Write HTMLString
    'brwWebBrowser.Document.Close
    
    On Error Resume Next: Kill "c:\1.html": On Error GoTo 0
    Open "c:\1.html" For Binary As #1: Put #1, , HTMLString: Close #1
    brwWebBrowser.Navigate2 "c:\1.html"
    It doesn't use html files to operate, its html links in the database. All the normal html links work its just the YouTube ones after you have watched the video you can't click or search for something else, thats the problem, you have to close the app then restart it.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  9. #9
    Addicted Member
    Join Date
    Jun 2002
    Location
    Finland
    Posts
    169

    Re: App stops after showing YouTube video link

    Code:
    brwWebBrowser.Document.Clear
    brwWebBrowser.Document.Write HTMLString
    brwWebBrowser.Document.Close
    'Add this line
    brwWebBrowser.Document.body.innerHTML = HTMLString
    
    
    'You should also comment these out
    'Private Sub lvwCodes_KeyDown(KeyCode As Integer, Shift As Integer)
    'lvwCodes_Click
    'End Sub
    
    'Private Sub lvwCodes_KeyPress(KeyAscii As Integer)
    'lvwCodes_Click
    'End Sub
    
    'And use only this
    Private Sub lvwCodes_KeyUp(KeyCode As Integer, Shift As Integer)
    lvwCodes_Click
    End Sub

  10. #10

    Thread Starter
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: App stops after showing YouTube video link

    Quote Originally Posted by pekko View Post
    Code:
    brwWebBrowser.Document.Clear
    brwWebBrowser.Document.Write HTMLString
    brwWebBrowser.Document.Close
    'Add this line
    brwWebBrowser.Document.body.innerHTML = HTMLString
    
    
    'You should also comment these out
    'Private Sub lvwCodes_KeyDown(KeyCode As Integer, Shift As Integer)
    'lvwCodes_Click
    'End Sub
    
    'Private Sub lvwCodes_KeyPress(KeyAscii As Integer)
    'lvwCodes_Click
    'End Sub
    
    'And use only this
    Private Sub lvwCodes_KeyUp(KeyCode As Integer, Shift As Integer)
    lvwCodes_Click
    End Sub
    I used the keypress subs so the user could scroll down the list with cursor keys to see each error code. That would leave it one line behind. I was told on the original problem Object doesn't support this property or method 438 post #13

    move code from keydown to keyup

    I coded it in KeyDown, KeyPress but that didn't do anything it was the KeyUp that it needed.
    I left it in KeyDown, KeyPress & KeyUp and that cured that problem.

    Quote Originally Posted by DataMiser View Post
    I tried it here on this system, The app does not stop responding.
    I do get errors when it tries to play the video. The error pops up on IE and says that it can't move focus to the control because it is invisible, not enabled or is of a type that can not receive focus.
    The test system is XP sp3. Not sure which IE version is on here either 7 or 8. I don;t use IE and have not allowed the newest version to be installed.

    If I clear the error and click on the link again or another link the program works but I get IE errors on the links.
    I build all my VB6 apps on my Windows 7 32bit laptop, IE11. I have a WinXP SP3 desktop IE8 with VB6 installed and all YouTube video's play and you can click on another error code and it shows.

    Why should these video's on Win7 only show this fault? Thats why I thought it was an Adobe Flash Player problem but I install every update as it comes out the last one being Flash Player 17.0.0.149 Beta (IE). Everytime I run YouTube on my IE11 an message at the top says I need the latest Abobe Flash Player but the video's play without a problem.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  11. #11
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: App stops after showing YouTube video link

    Maybe it is related to IE 11.
    I have not installed it even on my windows 7 box. I would test it there but I do not have vb6 installed there.

  12. #12
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: App stops after showing YouTube video link

    Well, I went ahead and installed VB6 on my new machine running Windows 7 and the default IE8. Am not seeing the problem there either. Video plays fine and app continues to work.

  13. #13

    Thread Starter
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: App stops after showing YouTube video link

    DataMiser How old is your Windows 7 machine as when I installed Windows 7 with SP1 last year IE11 is installed by default.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  14. #14
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: App stops after showing YouTube video link

    Nope not installed by default, is installed via updates. I built this system a few months ago and installed Windows 7 SP1 on it. I always change the automatic update settings to notify only. Update wants to download and install IE 11 but I have not allowed it to do so as I ran into issues before with 9 and have heard of some possible conflicts with VB6 and IE 11. I use Firefox so saw no point in installing IE 11

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