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);
}
}
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:
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.
Please login first to submit.