Results 1 to 23 of 23

Thread: Screensaver on WinXP

  1. #1

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

    Screensaver on WinXP

    Hi guys.

    I downloaded a screensaver 10 years ago from http://www.levasseur.net/VB/PixSS.html the link no longer works but I Googled it and now I've found a link that work for the original app.

    http://vbmadeeasy.net/vbme/Graphics/...xSS.zip951.htm

    Now over the years I've changed the app to suit my needs. I added a picture preview when you add pictures to use with the help from guys on here.

    This screensaver has working on Win98/ME/WinXP/Vista without a problem. It used to run ok on WinXP but recently it hasn't running you can click on Preview and it works but it doesn't work on its own.

    You need to add some pictures of your drive before it will show anything.

    Can anyone see anything wrong with the code to stop it working on WinXP.
    Attached Files Attached Files
    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: Screensaver on WinXP

    Ok 5 users have downloaded and no comments so does it work for you guys in WinXP?
    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: Screensaver on WinXP

    This thread was made 3 months ago and I see I've had 7 downloads with no comments on why it doesn't work on WinXP. I know old threads aren't read that much unless someone posts a link.

    Does anyone have any solutions to this annoying problem please?
    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
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: Screensaver on WinXP

    I took a look at your project, adding some logging and ran a few tests.

    It does not seem to work properly in Preview mode either. In both cases it displays the first image for a few seconds and then unloads itself.
    From the logging I added I can see that several mouse move events are being triggered and is causing the screen saver to unload itself.

    Not sure what is triggering these but maybe that will give you something to go on.
    Adding some logging at various points in the code would help you pinpoint the issue.

  5. #5

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

    Re: Screensaver on WinXP

    Thanks for your input.

    As I said the Preview part was added a while ago with the help of guys on here. That part works perfectly without unloading it shows a preview of every picture selected. The idea of a screensaver is if there is any mouse movement/click or keys press it will stop.

    As I've said it works perfectly on Vista and my old WinME but it doesn't work on its own in WinXP.
    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: Screensaver on WinXP

    Well like I said I tested it and the preview did not work properly. It showed one image for about two seconds and then received about 5 mouse move events and exited. It does exactly the same thing when started due to inactivity.

    Perhaps you have a different build on the machines where it works, I don't know, I also don't know what you mean when you say it doesn't work but I do know that when I build the code you linked it is receiving mouse move events and that it is closing itself in both normal and preview mode. I was runnign under XP but I would expect it to do the same thing on any OS where it is supported.

  7. #7

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

    Re: Screensaver on WinXP

    Well the Config is just for adding pictures along with their location I don't know why the preview pic should show for 2 seconds then closes. To do a test you need to rem out the forms in Sub Main.

    Code:
    'Select Case szParameter
        'Case "/C"
            frmConfig.Show
        'Case "/P"
            'Load frmPreview
        'Case "/A"
            'Call ChangePassword
        'Case Else
            'If AlreadyRunning() = False Then
               ' Load frmMain
                'frmMain.Show
            'End If
    'End Select
    so that frmConfig runs.

    My WinXP is SP3, my Vista is SP2 and my WinME is standard. In WinXP when you Config and setup the files you want to show you can click on Preview and it runs but if you enable it it never runs I've even dropped the time down to 1 minute.
    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.

  8. #8
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Screensaver on WinXP

    Are you sure nothing on your XP system changed since the program last worked correctly?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  9. #9

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

    Re: Screensaver on WinXP

    Well all I can say is I fitted a new 2TB hard drive 4 months ago and all I installed are the Windows updates which is normal for any Windows system. I have had a problem with IE8 and Outlook Express problems so I will do another format and rebuild in the next month or so then try the screensaver straight of.

    Thanks for your input, now I've had 12 downloads.
    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.

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

    Re: Screensaver on WinXP

    I'm not talking about a preview of the pic. I am talking about the preview of the screen saver. This is what I thought you meant as well when you said preview. Like I said it does not work in either mode Preview nor normal. In both cases it does exactly the same thing.

    Something in your code is causing a mouse move event to fire after the first picture is shown and this is causing the program to unload itself.

    I do not think this has anything to do with the OS nor any change you may have made to your system.

    Are you using the same build of the screen saver on the different systems?

    According to the logging I placed into the file it is seeing 6 mousemove events fire very rapidly as soon as the DoScreenSave sub has completed the first time and then it unloads itself in the mouse move event.

  11. #11

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

    Re: Screensaver on WinXP

    We have a bit of confusion on names here, I mean when you preview it when you setup the screensaver in Windows it works as it should. In frmConfig there are no mouse movement events so I don't know why it closes when you move the mouse over anything.

    There are Form_MouseMove in the frmMain so it detects any mouse movement thats the only MouseMove event in that app so I don't know where you see 6 of them?

    Now I haven't bothered with this app for months but I've just noticed a serious VB programming error which you haven't picked up on. I have error traps in most control events, subs, functions but it only says Resume Next which won't record or trap anything. I have a few that say Debug.Print Err.Description but that will only show something in IDE.

    I've built PixSS.scr on WinXP and Vista and swapped them but it still doesn't work on WinXP.
    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.

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

    Re: Screensaver on WinXP

    We have a bit of confusion on names here, I mean when you preview it when you setup the screensaver in Windows it works as it should. In frmConfig there are no mouse movement events so I don't know why it closes when you move the mouse over anything.
    Apparently there is some confusion. When talking about previewing a screen saver this is what I mean.

    Open properties / screen saver select the screen saver and click the preview button. any screen saver should activate and display until you move the mouse or hit a key just like it would if it appeared normally the only real difference is that you do not have to wait.

    When I build your project set it as the active screen saver and hit the preview button it behaves exactly the same way as it does if you just wait for it to engage normally in both cases the code goes through the DoScreenSave to the bottom of the routine and then I see the mouse move event fire about 6 times and the form unloads itself via code in the mouse move event.

    Like I said add some logging which is what I did and that shows what code gets executed and where it exists. There is no indication that any error has occurred just that it is receiving mouse move events and it thinks it should unload itself and does.

    I did not notice the OERN but then I did not look at the whole project mostly just the routines that were being executed when the problem occurs.

    here is a sample of what I saw in the log I created no matter if started using preview or allow to load normally result is the same
    Code:
    1/21/2013 8:19:10 AM: do screen save
    1/21/2013 8:19:10 AM: mousemove True
    1/21/2013 8:19:10 AM: Hit timer
    1/21/2013 8:19:10 AM: enable controls = False
    1/21/2013 8:19:10 AM: File= ....\My Pictures\1big.jpg
    1/21/2013 8:19:10 AM: delay function
    1/21/2013 8:19:11 AM: enable controls = True
    1/21/2013 8:19:11 AM: end timer
    1/21/2013 8:19:11 AM: end do screen save
    1/21/2013 8:19:11 AM: mousemove False
    1/21/2013 8:19:11 AM: mousemove False
    1/21/2013 8:19:11 AM: mousemove False
    1/21/2013 8:19:11 AM: mousemove False
    1/21/2013 8:19:11 AM: mousemove False
    1/21/2013 8:19:12 AM: mousemove False
    1/21/2013 8:19:12 AM: unloading because of mouse movement
    1/21/2013 8:19:12 AM: query unload
    1/21/2013 8:19:12 AM: mousemove False
    1/21/2013 8:19:12 AM: bottom of query unload
    1/21/2013 8:19:14 AM: preview unload
    The true or false after the mouse move is the value of the m_ismoving variaible.

    And just to be clear there was no actual movement of the mouse. This happens everytime in both preview and normal modes.
    I have tested only under XP sp3

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

    Re: Screensaver on WinXP

    I tried it under Windows 7 just now and it unloads after the first image has been displayed. Under windows 7 I get and error saying it has stopped working but when looking at the log I see the same as above indicating that the program unloaded itself after detecting a mouse move event.

  14. #14

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

    Re: Screensaver on WinXP

    Ok I've put some proper error traps in on every control event, sub function. I compiled it and set it running with a 1 minute interval. In Windows screensaver preview probably thats where we are getting the confusion it will show 4-5 pics then stop running. The error log shows 26 lines saying.

    "Client Site not available 398 tmrCheckPreview_Timer"

    This is the err.description, err.number and the control name. Now this is the frmPreview Form which obviousy shows while you preview but I can't see anything wrong with this timer code. This Timer.Interval is 300

    Code:
    Private Sub tmrCheckPreview_Timer()
    
    Dim iTmp As Integer
    Static iTimesHere As Integer
    Static iCurrentIndex As Integer
    On Error GoTo ErrHandler
    
    m_Finished = False
    If IsWindow(m_PreviewhWnd) And (m_Finished = False) Then
        iTmp = (iTimesHere \ 10) + 1
        If iCurrentIndex <> iTmp Then
            imgTmp.Picture = lblIcon(iTmp).DragIcon
            picLogo.PaintPicture imgTmp.Picture, 0, 0, picLogo.Width, picLogo.Height
        End If
        iCurrentIndex = iTmp
        iTimesHere = (iTimesHere + 1)
        If iTimesHere >= 30 Then iTimesHere = 0
    Else
        tmrCheckPreview.Enabled = False
        m_Finished = True
        Unload Me
    End If
    
    Exit Sub
    ErrHandler:
    Open ErrorLog For Append As #1
    Write #1, Err.Description & " " & Err.Number & " tmrCheckPreview_Timer"
    Close #1
    Resume Next
    End Sub
    When it runs it show 4 pics then stops with the following error log.

    " 0 AlwaysOnTop"
    "Resume without error 20 AlwaysOnTop"

    I don't know as it needs the Form AlwaysOnTop, I will remove it.

    I removed the AlwaysOnTop and compiled again. It still shows the "Client Site not available 398 tmrCheckPreview_Timer" error in Windows preview and when it runs it only show 4 pics then stops but it shows nothing in the errorlog file.
    Last edited by Keithuk; Jan 21st, 2013 at 01:50 PM. Reason: Update
    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.

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

    Re: Screensaver on WinXP

    The error you mention is occurring on this line
    Code:
    picLogo.PaintPicture imgTmp.Picture, 0, 0, picLogo.Width, picLogo.Height
    However that does not seem to have anything to do with the actual screen saver not working as it only runs this code while setting on the screen saver selection screen and running the little preview in the window there. If I select the screen saver and just sit there on the form I can see this error in the log several times and I have no idea why it is looking for a client site but when I actually preview or let the screen saver engage this is not happening.

    What I get is the first image loads and displays for about 2 seconds and then the program terminates and this happens every time in both preview mode and normal mode and every time the login indicates that it received a quick series of mouse move events which trigger the exist as if you jiggled the mouse.

    Where did you add code that gave you the result you mention above about always on top.

  16. #16
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Screensaver on WinXP

    I tested the screensaver app on a XP virtual machine and it worked for me.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  17. #17

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

    Re: Screensaver on WinXP

    Quote Originally Posted by DataMiser View Post
    The error you mention is occurring on this line
    Code:
    picLogo.PaintPicture imgTmp.Picture, 0, 0, picLogo.Width, picLogo.Height
    How do you know the error occurs in that line? That line is from the tmrCheckPreview in the frmPreview I just showed the code from the Timer because thats the error that was saved in the Errorlog.txt "Client Site not available 398 tmrCheckPreview_Timer". This error only shows in the Errorlog.txt when you use the Windows Preview it prints it a few times.

    I've just found this error number on here run time error 398 'client site not available' talks about a UserControl which I'm not using the same as the link on here. MSDN also talks about a UserControl which I'm not using. This app uses not special ocx's or references. I wonder if this container is the picture its trying to show?

    Quote Originally Posted by DataMiser View Post
    What I get is the first image loads and displays for about 2 seconds and then the program terminates and this happens every time in both preview mode and normal mode and every time the login indicates that it received a quick series of mouse move events which trigger the exist as if you jiggled the mouse.

    Where did you add code that gave you the result you mention above about always on top.
    You can set how long each picture shows for in the frmConfig.

    The Property Let AlwaysOnTop and Property Get AlwaysOnTop is at the top of the frmMain Form, as I've said I've removed this now the normal runtime error

    " 0 AlwaysOnTop"
    "Resume without error 20 AlwaysOnTop"

    doesn't show now. When it runs now in normal mode it shows 4 pictures that stops but it writes nothing to the ErrorLog.txt file.

    Thanks for your input.
    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.

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

    Re: Screensaver on WinXP

    How do you know the error occurs in that line?
    Because I added code to show which line the error occurs on of course.

    Code:
    Private Sub tmrCheckPreview_Timer()
    
    Dim lRetVal As Long
    Dim lhPrevhWnd As Long
    Dim iTmp As Integer
    Static iTimesHere As Integer
    Static iCurrentIndex As Integer
    On Error GoTo ErrHandler
    LogIt "tmrCheckPreview Enter"
    m_Finished = False
    100 If IsWindow(m_PreviewhWnd) And (m_Finished = False) Then
    110   iTmp = (iTimesHere \ 10) + 1
    120    If iCurrentIndex <> iTmp Then
    121        imgTmp.Picture = lblIcon(iTmp).DragIcon
    122        picLogo.PaintPicture imgTmp.Picture, 0, 0, picLogo.Width, picLogo.Height
    123    End If
    124    iCurrentIndex = iTmp
    125    iTimesHere = (iTimesHere + 1)
    127    If iTimesHere >= 30 Then iTimesHere = 0
    Else
    130 LogIt "preview unload"
    132    tmrCheckPreview.Enabled = False
    133    m_Finished = True
    134    Unload Me
    End If
    LogIt "tmrCheckPreview End"
    Exit Sub
    ErrHandler:
    LogIt "tmrCheckPreview Error:" & Err.Description & " Line " & Erl
    Resume Next
    End Sub
    1/21/2013 1:54:47 PM: tmrCheckPreview Error:Client Site not available Line 122

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

    Re: Screensaver on WinXP

    As for the always on top code I see no difference with or without that in the build.

    I only added 4 pictures and left the display time at the default 10 seconds and in every test the result has been that the first image shows for about 2 seconds then the program unloads due to detected mouse movement.

    The error about the client is being triggered by the line I pointed out but is not what is triggering the unload as even when this error does not occur the result is the same.

    Under windows 7 same thing 1st image displays for about 2 seconds [maybe a little less] and then the program closes. only difference is Windows 7 display a message saying that the program has quit working but the log shows even under windows 7 that it detected a mouse movement and called the unload code to exit.

    Not sure what you may be doing different to get it to cycle to the second image as it has never shown more than the one here in any test and never showed the 1 for the time it should be showing it.

  20. #20

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

    Re: Screensaver on WinXP

    I've just had a new Windows 8 64bit laptop and my screensaver works perfectly staight of on that.

    I haven't had chance to rebuild my WinXP machine yet but I have installed WinXP on a friends computer and the screensaver didn't work only the setup preview for 4 pictures, just the same as mine.
    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.

  21. #21

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

    Angry Re: Screensaver on WinXP

    Quote Originally Posted by Keithuk View Post
    I've just had a Windows 8 64bit laptop and my screensaver works perfectly straight of on that.

    I haven't had chance to rebuild my WinXP machine yet but I have installed WinXP on a friends computer and the screensaver didn't work only the setup preview for 4 pictures, just the same as mine.
    This is an old thread 03/11/12 which I've posted my app in in the #1

    As I've said it works perfectly on Vista and my old WinME but it doesn't work on its own in WinXP.

    The codes has been checked many times it works on WinXP I can preview all pictures all day long. If I leave it the screen saver doesn't work

    On Windows 7 32bit it worked perfectly I haven't tried it on my new Windows 10 x84 fooking crap laptop

    No solutions in this forum so forget 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.

  22. #22
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    6,190

    Re: Screensaver on WinXP

    Quote Originally Posted by Keithuk View Post
    No solutions in this forum so forget it
    It might be that x84 hardware is not supported by VB6 so don't hold your breath.

    cheers,
    </wqw>

  23. #23
    Lively Member vbLewis's Avatar
    Join Date
    Feb 2009
    Location
    USA
    Posts
    127

    Re: Screensaver on WinXP

    just FYI there is a bug on some builds of Windows 10 where the Config i.e "/C" command line doesnt work. It is because the registry entry for that commandline is missing. I dot know if they fixed it or not in updates, i havent checked.
    Here is my bug report to the Feedback hub:

    when you right click on a screensaver app it gives you an option to 'configure'. This command is supposed to pass the command line /C to the screensaver app so it knows to show a configuration dialog. However the /C is missing from the registry key.

    the following key is the correct way it should be:
    [HKEY_CLASSES_ROOT\scrfile\shell\config\command]
    @=""%1" /C"

    the current registry key does not contain the /C and sends a blank command line to the screensaver app.
    thanks for your attention

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