FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour SysRefresh() ( DO Events) / MsgInfo() and ActiveX()
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
SysRefresh() ( DO Events) / MsgInfo() and ActiveX()
Posted: Thu Oct 13, 2022 09:17 PM
hi,

based on CLASS Tvlc from carlos vargas
https://forums.fivetechsupport.com/viewtopic.php?t=36205

i wrote CLASS FWTVlc which include Codeblock Slot for Events and Menu
https://forums.fivetechsupport.com/viewtopic.php?t=42025

Code (fw): Select all Collapse
      // ActiveX have no Property bRClicked so ADD it
      ::bRClicked = { | nRow, nCol | VLC_Menu( oWnd, nRow, nCol, ::oControl, ::nIndex ) }


i have try Method VLC_Menu() but it "hang" so i use Function VLC_Menu()

Code (fw): Select all Collapse
FUNCTION VLC_Menu( oDlg, nRow, nCol, oVLCX, nIndex )
LOCAL oPopup
LOCAL lisObj := .F.

   DEFAULT nIndex TO 1

   IF hb_isObject( oVLCX )
      lisObj := .T.

      MENU oPopup POPUP
         MENUITEM "&POPUP Menu" ACTION MsgInfo( "Hello world " + VAR2CHAR( nIndex ) )
         SEPARATOR
         MENUITEM "&load Media" ACTION MP_LoadFile( oVLCX, nIndex )
         SEPARATOR
         MENUITEM "play &Next" ACTION MP_PlayNext( oVLCX, nIndex )
      ENDMENU

      ACTIVATE POPUP oPopup WINDOW oDlg AT nRow, nCol
   ENDIF

RETURN nil


now i want to call
Code (fw): Select all Collapse
PROCEDURE MP_PlayNext( oVLCX, nIndex )
   IF hb_isObject( oVLCX )
      //  SysRefresh()
      MsgInfo( "ready to play Next" )
      oVLCX:Stop()
      oVLCX:Play_Next()
   ELSE
      MsgInfo( "Error Object", "MP_PlayNext()" )
   ENDIF
RETURN

---

when use SysRefresh() it still "hang" but when using MsgInfo() it work :-)

so my Question : what can i use instead of MsgInfo() and "why" is it working while other "hang" :-)
greeting,

Jimmy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: SysRefresh() ( DO Events) / MsgInfo() and ActiveX()
Posted: Fri Oct 14, 2022 08:42 PM

Dear Jimmy,

Please try with SysWait( 1 )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: SysRefresh() ( DO Events) / MsgInfo() and ActiveX()
Posted: Fri Oct 14, 2022 09:30 PM
hi Antonio,
Antonio Linares wrote:Please try with SysWait( 1 )

YES, that Trick work.
Thx
greeting,

Jimmy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: SysRefresh() ( DO Events) / MsgInfo() and ActiveX()
Posted: Fri Oct 14, 2022 09:36 PM

Dear Jimmy,

You may try with other values less than 1, in example 0.5

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: SysRefresh() ( DO Events) / MsgInfo() and ActiveX()
Posted: Sat Oct 15, 2022 09:57 AM

hi Antonio,

using Syswait() now also CLASS Code work as expect :D

greeting,

Jimmy

Continue the discussion