[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 465
  • Last Modified:

Drop on a MDI Child Form in VB 2008

I have a Windows application in VS 2008.

I want to drop some files (from Outlook 200&) on my form. This form is a MDI child form. When I drop some files on this form the Event 'DragEnter' on the parentform is Fired. How can I solve this problem?

  • 3
1 Solution
you can check which child form is active by me.activemdichild and past the information to that child form.
Program1981Author Commented:
I think that can work, but I don't know how at this moment.
Please, can you give me a short example?
Éric MoreauSenior .Net ConsultantCommented:
Program1981Author Commented:
No, that part of my code works fine. I am only looking for the solution of the child / parent problem.
Program1981Author Commented:
It works now!

I added the following code to the dragdrop handler of the parent:

 Dim f As myForm

        If (Me.ActiveMdiChild.Name = "myForm") Then
            f = Me.ActiveMdiChild
            f.sbDragDrop(sender, e)
        End If

sbDragDrop is a public handler of myForm

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now