MdiWindowListItem


Author
Message
Russell Scott Brown
Russell Scott Brown
StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)
Group: Forum Members
Posts: 124, Visits: 597
Thanks. I would be interested in this too.

Russ Brown (Using C#2010/SQL Server 2008)
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hiya.

Nope, this is not a StrataFrame control. This is deeply and specificaly built into PracticeStudio. Iwill see if I can get some hints on how to accomplish this and pass them to you.

lastcanary
lastcanary
StrataFrame User (155 reputation)StrataFrame User (155 reputation)StrataFrame User (155 reputation)StrataFrame User (155 reputation)StrataFrame User (155 reputation)StrataFrame User (155 reputation)StrataFrame User (155 reputation)StrataFrame User (155 reputation)StrataFrame User (155 reputation)
Group: StrataFrame Users
Posts: 81, Visits: 270

Hi,

I would like to use a tabbed form interface similar to the practice studio. Is this a control contained in Strataframe? Could you please help me to create a similar one?

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
That will work fine Smile
Keith Gordijn
Keith Gordijn
StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)
Group: Forum Members
Posts: 35, Visits: 2.6K
Hooray, I've had some success! Maybe I should get up at 2am more often. BigGrin



So, now my question is, is this the best way of doing this?



private void tlmSecurity_ItemClicked(object sender, ThemedLinkMenuClickEventArgs e)

{

if (e.Item.Key.Equals("SecurityEditor", StringComparison.OrdinalIgnoreCase))

{

MainForm loForm;

loForm = (MainForm)this.ParentForm;



loForm.LaunchDialog(typeof(SecurityDialog));

}

}




Cheers,

Keith
Keith Gordijn
Keith Gordijn
StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)
Group: Forum Members
Posts: 35, Visits: 2.6K
Trent L. Taylor (06/14/2007)
I think that the best thing to do would be to expose the MDI client...or....if your main form just has the MDIContainer property set you can reference it directly. When the form is launched it will have a reference to the parent form in the ParentForm property which you can type and reference. You may need to make your LauncForm method public or Friend so it can be accessed though.



DirectCast(Me.ParentForm, MainForm).LaunchForm(GetType(MyChildForm))




If you are using an MDIClient control and manually adding it to the form, then you can just expose it through a public property and basically do the same thing:



DirectCast(Me.ParentForm, MainForm).MDIClientProperty.LaunchForm(GetType(MyChildForm))




Hi Trent,



My project follows the ideas outlined in this topic by following the StrataFlix example and I would also like to use the LaunchDialog method of the mainform from a "Setup and Configuration" form (strangely also very similar to the PracticeStudio.NET screen shot earlier in this topic) to open a maintenance form as a child form in the main mdi form.



Unfortunately my still limited knowledge of C# wont let me alter the above VB code to a C# version so any help on doing this would be great.



Cheers,

Keith
Paul Chase
Paul Chase
Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Just to add another option to this thread you can also handle the Mdi Client Control Added and Removed on your Main MDI Form.

#Region " MDI Client Handled Events"

Protected Sub MDIClient_ControlAdded(ByVal sender As Object, ByVal e As Windows.Forms.ControlEventArgs)

'--> Cast To My Base Class so we get custom properties

Dim loChild As Payroll.Base.WindowsForms.DevExMaintFormBase = CType(e.Control, System.Windows.Forms.Form)

' do anything you need to do -add handlers update custom lists etc

End Sub

Protected Sub MDIClient_ControlRemoved(ByVal sender As Object, ByVal e As Windows.Forms.ControlEventArgs)

'--> Cast To Base Class so we get custom properties

Dim loChild As Payroll.Base.WindowsForms.DevExMaintFormBase = CType(e.Control, System.Windows.Forms.Form)

' do anything you need to do - remove handlers update custom lists etc

End Sub

#End Region


Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Teddy,

Thanks for sharing this approach, it definitely provide ideas on how to get similar results in different ways which is very good, specially when learning .NET.

Edhy Rijo

Teddy Jensen
Teddy Jensen
StrataFrame Novice (112 reputation)StrataFrame Novice (112 reputation)StrataFrame Novice (112 reputation)StrataFrame Novice (112 reputation)StrataFrame Novice (112 reputation)StrataFrame Novice (112 reputation)StrataFrame Novice (112 reputation)StrataFrame Novice (112 reputation)StrataFrame Novice (112 reputation)
Group: StrataFrame Users
Posts: 52, Visits: 8K
In case anyone wants a ToolStripDropDownButton instead of a windowslist in a sidepanel or on a menu you can use this approach.

On the toolstrip i have a button called tsbVinduer so my code on the main form is

Private Sub tsbVinduer_DropDownOpening(ByVal sender As Object, ByVal e As System.EventArgs) Handles tsbVinduer.DropDownOpening

 

        tsbVinduer.DropDownItems.Clear()

 

        For Each f As Form In Me.MdiChildren

 

            Dim item As ToolStripMenuItem = New ToolStripMenuItem(f.Text)

            item.Tag = f

 

            AddHandler item.Click, AddressOf item_Click

 

            tsbVinduer.DropDownItems.Add(item)

        Next

 

    End Sub

 

    Private Sub item_Click(ByVal sender As Object, ByVal e As EventArgs)

 

        Dim item As ToolStripItem = TryCast(sender, ToolStripItem)

        If item IsNot Nothing Then

            Dim f As Form = TryCast(item.Tag, Form)

            If f IsNot Nothing Then

                f.Activate()

            End If

        End If

    End Sub

It gives me this result:

/Teddy

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
You would be passing it into some method.  If you look further up the food-chain on this thread, you will see that they have a collection that stores off the open forms.  So when the form is loaded, you would add this guid to the collection with probably a title or something else so that it could be identified in the list (if you are using the panel on the left approach).
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search