Skip to content

DesktopTaskBarItem #1062

Closed
Closed

Description

@itg-assistant

Hans asked 2017-08-29 20:29:00 UTC

How can I add DesktopTaskBarItem click event ?

Thanks

Activity

  1. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Luca answered 2017-08-29 20:37:29 UTC

    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.

  2. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    ARTURO ESTIGARRIBIA answered 2017-12-02 10:59:18 UTC

    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);
                }
    
            }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GeneralQuestions, how-tos and everything else.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions