Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5952009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:37:11+00:00 2026-05-22T17:37:11+00:00

I try to explain my problem: I got many customcontrols of same type on

  • 0

I try to explain my problem:

I got many customcontrols of same type on a panel.

At runtime I’m free to move any custumcontrol ( mousedown and mousemove events) in the form with mouse over any others customcontrols using bringtofront() to have it over all.

Now I need to know when the control I’m moving is over any other control and which control is under.

So far I’ve tryed to use drag-n-drop events but without success, there’s some other way to do this or I’ve to re elaborate it with drag events?

thank you all for help

and sorry for my English.

EDIT:

The controls are cards game and my final goal is to use cards to create logical sequence following rules based on card value and/or color.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:37:12+00:00Added an answer on May 22, 2026 at 5:37 pm

    You can’t solve the problem with drag-and-drop because you’re not actually dropping one control onto the other control. You’re merely moving them around in the form.

    You need to become familiar with Z order, which is the front-to-back arrangement of objects in a virtual 3D space. To adjust the Z order, you can call the BringToFront and SendToBack methods of any object that derives from System.Windows.Forms.Control.

    The Z order is also exposed by the parent (container) control’s Controls collection. Using the GetChildIndex method, you can determine the position of any control within the Z order.

    So now, all you need to do is figure out which control the control you’re dragging is over. Do that by comparing the Location properties of the two controls. When you know that the locations of two controls overlap, check their respective Z order indices to see which one is on top.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right away i just try to explain my problem: Using BlazeDS i got the
I'll try to explain my problem the best I can, here goes: I have
I'll try to explain this problem the best way i can with code: double
I'll try to explain my problem as clear as possible :). I am using
I'm going to try to explain the problem. I am getting a string containing
I have a problem and I will try to explain the issue: I have
I'm having a problem with TRY...CATCH blocks. Can someone explain why the following code
I've got a problem with using the XPATH functions. When I try to call
let me try to explain my problem. I'm currently trying to develop a small
i will try to explain the problem very clear. I user MicroSoftReportViewer where i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.