
October 8th, 2009, 03:01 PM
|
|
Registered User
|
|
Join Date: Sep 2009
Posts: 5
Time spent in forums: 1 h 1 m 42 sec
Reputation Power: 0
|
|
|
MDI problem
I have search almost the entire internet looking for the answer to this problem but no luck. I am working on a project that requires me make a MDI, which I did. The problem that I am having is that none of the menus like the cut and paste work in the MDI Child, Please help because I don't know what I am doing wrong. I have tried different types of code and still can't get it to work. All I am trying to do is copy or paste text using MDI parent menu controls, rather then creating menu controls for all the MDI children
Code:
Private Sub CutToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles CutToolStripMenuItem.Click
' Use My.Computer.Clipboard to insert the selected text or images into the clipboard
If (Me.ActiveMdiChild Is Nothing) Then
Exit Sub
End If
Dim strType As String = Me.ActiveMdiChild.ActiveControl.GetType().ToString
If (strType = "Sytstem.Windows.Forms.TextBox") Then
CType(Me.ActiveMdiChild.ActiveControl, Windows.Forms.TextBox).Cut()
End If
End Sub
Please any help is appericated 
|