FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Can I show My Dialg Window in front of any other window?
Posts: 57
Joined: Sun Apr 12, 2009 10:51 AM
Can I show My Dialg Window in front of any other window?
Posted: Sun Sep 20, 2015 02:35 AM
How Can I show NEW Dialog Window in front of any other window?

We are on programming a CID prg for Telephone Caller identification..

As you know, CID prg stay back and the users are on work with other software..
When there is phone Call, there should be "POP-UP" as following.
http://pharmalink.kr/images/stay_back1.jpg

But, in certain case, my "POP-UP" stay back behind other window...
http://pharmalink.kr/images/stay_back.jpg


How can I place my new "POP-UP" infront of any other window?

My prg starts as following..
Code (fw): Select all Collapse
Main()
  DEFINE Window oWnd  TITLE "Caller ID"  ICON oIcon Menu BuildMenu()

   DEFINE BUTTONBAR oBar BUTTONSIZE 36, 36 3D TOP OF oWnd

   @ 0.4,220 say "" size 35, 18  of oBar

   DEFINE BUTTON oBtn resource "RED_1" of oBar 

  ACTIVATE WINDOW oWnd

return nil

Function EventCall()   //-- On evnet , Call Alarm()
  Alarm(Caller, Callee, cEvent, cCode) 
return nil

Function Alarm( Caller, Callee, cEvent, cCode) 
   Local oDlg, oBrush, oCursor
     Local nPos
     Local aInfo, uReturn

   DEFINE BRUSH oBrush COLOR CLR_BLUE // Transparent painting !

   DEFINE DIALOG oDlg ;
      FROM 0, nPos TO 132, nPos+370 ;
      STYLE WS_POPUP ;
      BRUSH oBrush PIXEL

      @ 19, 148  BUTTON "refuse(&X)" OF oDlg SIZE 30, 10   action  (nDap:=200, oDlg:end()) PIXEL   

   ACTIVATE DIALOG oDlg ;
      ON PAINT ( PalBmpDraw( oDlg:hDC, 0, 0, oBmp2:hBitmap, 0, 0, 0, SRCPAINT ),;
                 PalBmpDraw( oDlg:hDC, 0, 0, oBmp1:hBitmap, 0, 0, 0, SRCAND ) ,;
                 oDlg:Say( 43,147, aInfo[1,3],,, oFont,.t. ) ,oDlg:Say( 57, 147, aInfo[1,4],,, oFont, .T. ))  ; 
        ON LEFT CLICK (nDap:=100, oDlg:End()) ;
      ON INIT  SetTransparent( oDlg )

Return nil


Thanks..
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
Re: Can I show My Dialg Window in front of any other window?
Posted: Sun Sep 20, 2015 03:32 AM
yes.

exist a style for windows for this.

i dont remmenber, sorry, please search in thes forums
http://forums.fivetechsupport.com/viewtopic.php?f=6&t=14366&p=74173&hilit=Topmost#p74173
top most
Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 57
Joined: Sun Apr 12, 2009 10:51 AM
Re: Can I show My Dialg Window in front of any other window?
Posted: Sun Sep 20, 2015 01:19 PM
Mr. Carlos vargas,

Thanks for your post..

But, in my case, I hope to show my new Dialog to be shown in front of other windows, as soon as generated...

Code (fw): Select all Collapse
   DEFINE BRUSH oBrush COLOR CLR_BLUE 
   DEFINE DIALOG oDlg ;
      FROM 0, nPos TO 132, nPos+370 ;
      STYLE WS_POPUP ;
      BRUSH oBrush PIXEL

      @ 19, 148  BUTTON "Refuse(&X)" OF oDlg SIZE 30, 10   action  (nDap:=200, oDlg:end()) PIXEL       

   ACTIVATE DIALOG oDlg ;
      ON PAINT ( PalBmpDraw( oDlg:hDC, 0, 0, oBmp2:hBitmap, 0, 0, 0, SRCPAINT ),;
                 PalBmpDraw( oDlg:hDC, 0, 0, oBmp1:hBitmap, 0, 0, 0, SRCAND ) ,;
                 oDlg:Say( 43,147, aInfo[1,3],,, oFont,.t. ) ,oDlg:Say( 57, 147, aInfo[1,4],,, oFont, .T. ))  ; 
        ON LEFT CLICK (nDap:=100, oDlg:End()) ;
            ON INIT  SetTransparent( oDlg )                      //----------------Now...

         // ON INIT ( SetTransparent( oDlg ),   SetWindowPos( oDlg:hWnd, 0   , oDlg:nTop, oDlg:nLeft, 370, 132 ) )   //----> No change..
          //ON INIT  ( SetTransparent( oDlg ), SetForeGroundWindow( oDlg:hWnd ) )  //----? No Change also...


Advise... please!!
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: Can I show My Dialg Window in front of any other window?
Posted: Sun Sep 20, 2015 03:34 PM
Mr. Kim:

Try with ON TOP dialog as follow:

Code (fw): Select all Collapse
    ACTIVATE DIALOG oDlg ON INIT SetWindowPos( oDlg:hWnd, -1, 0, 0, 0, 0, 3 )


With best regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
Re: Can I show My Dialg Window in front of any other window?
Posted: Mon Sep 21, 2015 12:47 AM
Mr. Kim,

Try this
Code (fw): Select all Collapse
ACTIVATE WINDOW oWnd ON PAINT ( SetWindowPos( oWnd:hWnd, - 1, 0, 0, 0, 0, 3 ),;
                                oWnd:Refresh() )


-RAMESH BABU
Posts: 57
Joined: Sun Apr 12, 2009 10:51 AM
Re: Can I show My Dialg Window in front of any other window?
Posted: Mon Sep 21, 2015 01:28 AM

Dear Mr. Armando,and Mr.Rameshbabu

Thanks for you comments...
I will try, and will report..

Continue the discussion