Results 1 to 14 of 14

Thread: App stops after showing YouTube video link

Hybrid View

  1. #1

    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.

  2. #2
    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"

  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

    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.

  4. #4
    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

  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

    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.

  6. #6
    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.

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