combit List & Label 29 - .NET Help
combit.Reporting Namespace / CreateDesignerObjectHandler Delegate


In This Topic
    CreateDesignerObjectHandler Delegate
    In This Topic

    The event CreateDesignerObject is triggered when the user creates a new object. If desired, you can show the initial dialog to the user. This can, for instance, be an assistant that makes it simple for the user to configure the new object. If you don't want to offer this, simply forego processing of the event. The following example shows the display of a MessageBox as soon as the new object is placed in the workspace for the first time. You gain access to the designer window through the event argument. The passed class supports the IWin32Window interface and can, as a result, be used for a MessageBox or another window as a parent.

    Syntax
    'Declaration
     
    
    Public Delegate Sub CreateDesignerObjectHandler( _
       ByVal sender As Object, _
       ByVal e As CreateDesignerObjectEventArgs _
    ) 
    public delegate void CreateDesignerObjectHandler( 
       object sender,
       CreateDesignerObjectEventArgs e
    )
    public delegate void CreateDesignerObjectHandler( 
       Object^ sender,
       CreateDesignerObjectEventArgs^ e
    )

    Parameters

    sender
    e
    Example
    private void designerObject1_CreateDesignerObject(object sender, CreateDesignerObjectEventArgs e)
    {
         MessageBox.Show(e.DesignerWindow, "Das neue Objekt wird nun angelegt.");
    } 
    
    Requirements

    Platforms: Windows 10 (Version 21H2 - 23H2), Windows 11 (21H2 - 22H2), Windows Server 2016 - 2022
    .NET: .NET Framework 4.8, .NET 6, .NET 7, .NET 8

    See Also