Jump to content
Sign in to follow this  


Recommended Posts

Is there any way to "clear" this message, run code before the form closes, intercept the red "X" and the form Close (Alt_F4) message or change the behavior of $GUI_EVENT_CLOSE?

Sorry for broad scope of my question, I'm just trying to understand what's possible with respect to intercepting / working with the form close event so I can continue to try different options to get this to work. 

I'm messing around with LibVLC and when I close my player window with a button calling a CloseVideoPlayer() function the player closes.  When I call the same function in the  Case $GUI_EVENT_CLOSE section, Autoit hands on the first libvlc dll call. libvlc_media_player_stop($hLibVLC_dll, $VLCMPlayer) ;stop the video.

Any thoughts on other things to try?

    While 1
         Local $GuiMsg = GUIGetMsg(1)
        Switch $GuiMsg[0]

            Case $GUI_EVENT_CLOSE
                Switch $GuiMsg[1]
                    Case $VPlayerWindow
                    Case Else

            Case $bnClose


Func CloseVideoPlayer()
    If $VLCMPlayer <> "" Then
        libvlc_media_player_stop($hLibVLC_dll, $VLCMPlayer) ;stop the video
        libvlc_media_player_release($hLibVLC_dll, $VLCMPlayer)
        libvlc_release($hLibVLC_dll, $hVLC)


Thanks for anything that might help me figure this out.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...