How to implement Show Desktop functionality in FWH.

How to implement Show Desktop functionality in FWH.

Postby RAMESHBABU » Sat May 29, 2010 12:37 am

Hi Friends,

Can anybody help to implement Show Desktop functionality in FWH please ?

Image

Regards,

- Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 624
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: How to implement Show Desktop functionality in FWH.

Postby anserkk » Sat May 29, 2010 6:06 am

Dear Mr.Ramesh,

Try this

Code: Select all  Expand view
#Include "FiveWin.ch"

//----------------------------------------//
Function Main()
    Local oDlg,oBtn
   
    DEFINE DIALOG oDlg TITLE "Test Desktop"
   
        @1,10 BUTTON oBtn PROMPT "DeskTop" ACTION Test()
   
    ACTIVATE DIALOG oDlg CENTERED
   
Return

//----------------------------------------//
Function Test()    
   
    Local oShell
   
    oShell:=CreateObject("Shell.Application")
    oShell:ToggleDesktop()
    oShell:=NIL

Return NIL


Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: How to implement Show Desktop functionality in FWH.

Postby lailton.webmaster » Sat May 29, 2010 6:24 am

Other Option:

Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

  ShowDesktop()

return nil

Function ShowDesktop()

 keybd_event( 92, 0, 0, 0)
 keybd_event( 77, 0, 0, 0)
 keybd_event( 92, 0, 2, 0)
 keybd_event( 77, 0, 2, 0)

Return

DLL static FUNCTION keybd_event( bvk AS LONG, bScan AS LONG, nFlags AS LONG, dwExtraInfo AS PTR ) AS VOID PASCAL LIB "user32.dll"
 


:D
lailton.webmaster
 
Posts: 603
Joined: Sun May 04, 2008 8:44 pm

Re: How to implement Show Desktop functionality in FWH.

Postby RAMESHBABU » Sat May 29, 2010 7:29 am

Dear Mr.Anser and Mr.Lailton

Thank you very much for your quick help.

Both the solutions are meeting my 100% requirement.

My best regards to you both,

- Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 624
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Marc Venken, Silvio.Falconi and 106 guests