DesktopTaskBarItem

Answered
0
0

How can I add DesktopTaskBarItem click event ?

 

Thanks

  • You must to post comments
Best Answer
0
0

Also You can add a desktopTaskBarItem. On your Desktop click event do something like this:

 


private void MyDesktop_ItemClick(object sender, DesktopTaskBarItemClickEventArgs e)
{
try
{
switch (e.Item.Name)
{
case "desktopTaskBarItemFacturacion":
Facturacion.WindowFacturacion Facturacion = new WisejEscritorio.Facturacion.WindowFacturacion();
Facturacion.Show();
break;
case "desktopTaskBarItemCompras":

break;
default:

break;
}
}
catch (Exception ex)
{
MessageBox.Show("Error en la aplicación." + ex.Message);
}

}

  • You must to post comments
0
0

The event is fired at the Desktop level. Look for Desktop.ItemClick and Desktop.ItemClick. Usually child components that are not “designable” directly fire an even at the container level.

You can also try also the DesktopTaskBarItemControl:

  • Add a DesktopTaskBarItemControl
  • Drop a normal control  on the Desktop, like a button or a gage.
  • Open the Desktop Items editor and select the DesktopTaskBarItemControl
  • Click on the Control property and select the control you dropped on the desktop.

The control should disappear from the desktop and be incorporated in the taskbar item. If it gives you problems, simply close the Desktop from design mode end reopen it.

When a control is imported in the taskbar you can handle the events on the control itself. See screenshot below. It’s a justgage control in the taskbar.

control-in-taskbar

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.