Hide windows "start button bar"  
Author Message
ZopoStyle





PostPosted: Visual C# General, Hide windows "start button bar" Top

Hi,

Throw my application I need to hide the "windows start button bar" is there a way to do that, or to cover it with something

Searching on google I've found this code, but no idea on how to do it in c#

//================================================================//
// Languade.....: Harbour/xHarbour + HWGUI
// Plataform....: Windows
//================================================================//

#include "windows.ch"
#include "guilib.ch"

Function Main

Local oWin

INIT WINDOW oWin MAIN TITLE "Escondendo a Barra de Tarefas do
Windows" ;
COLOR COLOR_3DLIGHT+1 ;
AT 100,100 SIZE 300,200


100,40

{||MostraBarraDeTarefas(),SetFocus(oWin:handle)} SIZE 100,40

ACTIVATE WINDOW oWin

Return Nil

Static Function EscondeBarraDeTarefas ()

Local nHandleBarraDeTarefas := 0

nHandleBarraDeTarefas := HWG_FindWindow( "Shell_TrayWnd", "" )
HideWindow( nHandleBarraDeTarefas )
Return Nil

Static Function MostraBarraDeTarefas ()

Local nHandleBarraDeTarefas := 0

nHandleBarraDeTarefas := HWG_FindWindow( "Shell_TrayWnd", "" )
ShowWindow( nHandleBarraDeTarefas )
Return Nil

Thanks




Visual C#4  
 
 
RizwanSharp





PostPosted: Visual C# General, Hide windows "start button bar" Top

class TaskBar

{

private const int SW_HIDE = 0;
private const int SW_SHOW = 1;

[DllImport("user32.dll")]
private static extern int FindWindow(string className, string windowText);
[DllImport("user32.dll")]
private static extern int ShowWindow(int hwnd, int command);

public static void Show()

{

int hWnd = FindWindow("Shell_TrayWnd", "");
ShowWindow(hWnd, SW_SHOW);

}

public static void Hide()

{

int hWnd = FindWindow("Shell_TrayWnd", "");
ShowWindow(hWnd, SW_HIDE);

}

}

Add this class you your project and call thse functions:

TaskBar.Show(); //Show it...

TaskBar.Hide(); //Hide it...

I hope this will do work :)

Best Regards,

Rizwan