Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Focus Change?

  1. #1
    Constant Bitrate monger's Avatar
    Join Date
    Nov 1999
    Location
    Good ole Maine. Gotta love trees and deer.
    Posts
    210

    Focus Change?

    After about a year of ignoring the car puter, this software has inspired me to give it another shot. I have it installed on Celeron 500 w/ 128 megs of ram, Win 98, yadda yadda yadda... typical system being run around here.


    Heres my problem; I have autoplay 1.3 set as shell and it all works fine except for when I try to play a track. The Winamp vis steals focus away from autoplay and it requires a click up on the track name to regain control of the system. This is a problem as I dont want to have to use a mouse.

    So, is there any way to 'lock' autoplay in the focus?

    Thanks for reviewing this problem.

    P.S. I did install all the VB runtime files and all the other stuff that you mentioned on your website.
    Monger
    ICQ-7207702
    UPDATE: I moved farther north. Now its even too cold for the deer; only moose now

  2. #2
    Variable Bitrate
    Join Date
    Jun 2002
    Location
    Norway
    Posts
    310
    Allways ontop?
    "If A equals success, then the formula is: A=X+Y+Z. X is work. Y is play. Z is keep your mouth shut."
    Albert Einstein

  3. #3
    Variable Bitrate Stine161's Avatar
    Join Date
    Apr 2002
    Location
    Alberta Canada
    Posts
    233
    how are you controlling auto-play? IRman Keyboard or Girder?

    I think this might be your problem.

  4. #4
    jol
    jol is offline
    FLAC jol's Avatar
    Join Date
    Jan 2002
    Location
    Mellansel, Sweden
    Posts
    1,299
    do you use your or autoplay's winamp? if you select that it only should be visible in the tray or not at all, then I guess it can't steal the focus..

  5. #5
    Constant Bitrate monger's Avatar
    Join Date
    Nov 1999
    Location
    Good ole Maine. Gotta love trees and deer.
    Posts
    210
    t0ffluss - Allways ontop?

    -I tried turning always on top on and off and if it is off, I lose the graphic EQ; When it is on, winamp steals focus from autoplay

    Stine161 - how are you controlling auto-play? IRman Keyboard or Girder?

    I think this might be your problem.

    -I am using a keypad for control.

    jol - do you use your or autoplay's winamp? if you select that it only should be visible in the tray or not at all, then I guess it can't steal the focus..

    -I am using the winamp that is bundled with autoplay ver. 1.3.. I tried both settings of only in the system tray and nowhere and I still get the same problem.
    Monger
    ICQ-7207702
    UPDATE: I moved farther north. Now its even too cold for the deer; only moose now

  6. #6
    jol
    jol is offline
    FLAC jol's Avatar
    Join Date
    Jan 2002
    Location
    Mellansel, Sweden
    Posts
    1,299
    I dont use it, just wanted to help out I got rid of the problem when I used the winamp that came along, in the taskbar.. not as shell tho

  7. #7
    Constant Bitrate monger's Avatar
    Join Date
    Nov 1999
    Location
    Good ole Maine. Gotta love trees and deer.
    Posts
    210
    I just tried re-installing autoplay on the car-puter. and also tried using it NOT as shell. Still to no avail. This is starting to annoy me.
    Monger
    ICQ-7207702
    UPDATE: I moved farther north. Now its even too cold for the deer; only moose now

  8. #8
    Variable Bitrate Stine161's Avatar
    Join Date
    Apr 2002
    Location
    Alberta Canada
    Posts
    233
    maybe its not winamp that is taking the focus...try closeing all un needed programs and run auto-play by its self.

  9. #9
    Maximum Bitrate CarComp's Avatar
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    515
    Winamp vis WILL steal the focus from any application. Its just inherent to windows. I figured out that the only way to keep an application on top is to include an API that keeps it on top in the application's code itself.

    Magnetik will have to resolve this one like I said.

    Here's how to do it...

    In a module add the following

    Private Declare Function GetWindowThreadProcessId Lib "user32" _
    (ByVal hWnd As Long, lpdwProcessId As Long) As Long

    Private Declare Function AttachThreadInput Lib "user32" _
    (ByVal idAttach As Long, ByVal idAttachTo As Long, _
    ByVal fAttach As Long) As Long

    Private Declare Function GetForegroundWindow Lib "user32" () As Long

    Private Declare Function SetForegroundWindow Lib "user32" _
    (ByVal hWnd As Long) As Long


    Public Function ForceForegroundWindow(ByVal hWnd As Long) As Boolean
    Dim ThreadID1 As Long
    Dim ThreadID2 As Long
    Dim nRet As Long
    '
    ' Nothing to do if already in foreground.
    '
    If hWnd = GetForegroundWindow() Then
    ForceForegroundWindow = True
    Else
    '
    ' First need to get the thread responsible for this window,
    ' and the thread for the foreground window.
    '
    ThreadID1 = GetWindowThreadProcessId(GetForegroundWindow, ByVal 0&)
    ThreadID2 = GetWindowThreadProcessId(hWnd, ByVal 0&)
    '
    ' By sharing input state, threads share their concept of
    ' the active window.
    '
    If ThreadID1 <> ThreadID2 Then
    Call AttachThreadInput(ThreadID1, ThreadID2, True)
    nRet = SetForegroundWindow(hWnd)
    Call AttachThreadInput(ThreadID1, ThreadID2, False)
    Else
    nRet = SetForegroundWindow(hWnd)
    End If
    '
    ' Restore and repaint
    '
    If IsIconic(hWnd) Then
    Call ShowWindow(hWnd, SW_RESTORE)
    'Call ShowWindow(hWnd, SW_RESTORE)
    Else
    Call ShowWindow(hWnd, SW_SHOW)
    End If
    '
    ' SetForegroundWindow return accurately reflects success.
    '
    ForceForegroundWindow = CBool(nRet)
    End If
    End Function


    In the form, add to a timer:

    ForceForegroundWindow (Me.hWnd)



    (I think thats right)
    Get MediaEngine !!!
    Media Engine Download

  10. #10
    FLAC
    Join Date
    Apr 2001
    Location
    Here, There, Everywhere
    Posts
    1,436
    firstly, thanks for the 6+ replies trying to help out Monger before I got to see the post


    Monger, I have had this problem brought to me a few times prior, but have yet to be able to replicate the problem...

    using the supplied winamp is a must, since it leaves winamp in the systray.... but this doesnt seem to help you... hrm...

    im gonna take the code that CarComp has very nicely supplied and make it part of a '1.35 Auto-Play' build - hopefully tonite after I take my G/F to see the new Harry Potter movie

    so hang tight Monger, I should have your problem solved in 1-2 days at the most..... ill PM you too when I have a new version released...... hopefully I can kill off this problem once and for all!!!


    and thnx CarComp.... might havta start haunting in #mp3car on EFnet a bit more to share in your ideas/smarts
    Project - GAME OVER :(

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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