Jump to content
Fivewin Brasil

Omitir Botão "X" de sair na Window


jfaguiar

Recommended Posts

   ACTIVATE WINDOW oWnd MAXIMIZED                                           ;
            ON INIT( TIRA_X() )                                             ;
            ON PAINT( oImage:Refresh() )                                    ;
            VALID ENCERRA( oWnd )
	/*
SHOWTASKBAR() // Habilita
HIDETASKBAR() // Desabilita
TIRA_X()      // Desabilita o X da Janela
PISCA_EXE()   // Vai Piscar o Seu EXE na Barra do Windows
*/
	#pragma BEGINDUMP
	#include "windows.h"
#include "shlobj.h"
#include "hbapi.h"
#include "math.h"
#include "hbvm.h"
#include "hbstack.h"
#include "hbapiitm.h"
#include "hbapigt.h"
	HB_FUNC ( SHOWTASKBAR ) //Habilita o botao INICIAR
{
HWND hWnd = FindWindow("Shell_TrayWnd", "");
	ShowWindow( hWnd, 1 );
}
	HB_FUNC ( HIDETASKBAR ) //Desabilita o botao Iniciar
{
HWND hWnd = FindWindow("Shell_TrayWnd", "");
	ShowWindow( hWnd, 0 );
}
	HB_FUNC ( PISCA_EXE ) // VAI PISCAR O SEU EXE NA BARRA
{
HWND Handle = GetForegroundWindow();
	FlashWindow(Handle,TRUE); // VAI PISCAR O SEU EXE NA BARRA
	Sleep(300); // TEMPO DE ESPERA
}
	
HB_FUNC ( TIRA_X ) // DESABILITA O X da janela
	{
HMENU MenuH = GetSystemMenu(GetForegroundWindow(),FALSE);
	EnableMenuItem(MenuH,SC_CLOSE,MF_GRAYED);
}
	HB_FUNC ( VOLTA_X ) // HABILUTA O X da janela
	{
HMENU MenuH = GetSystemMenu(GetForegroundWindow(),TRUE);
	EnableMenuItem(MenuH,SC_CLOSE,MF_GRAYED);
}
	#pragma ENDDUMP
	//--------------------------------------------------------------------------//


 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...