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 562953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:36:31+00:00 2026-05-13T12:36:31+00:00

I am creating a User Control in C#.Net 2.0. I have to apply drag

  • 0

I am creating a User Control in C#.Net 2.0.
I have to apply drag and Drop Images in between these controls.
I have done drag and drop effect.

But the problem is that i have to show the control movement while mouse dragging.
For that i am drawing a rectangle on screen with the help of ControlDraw.DrawReversibleFrame()

Problem is that while drawing with mouse move event Rectangle is drawn over whole screen and because no repaint on screen it exist on screen.

So please can anybody tell me either how to clear drawn graphics or how to force to redraw screen.

  • 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-13T12:36:31+00:00Added an answer on May 13, 2026 at 12:36 pm

    You must draw the ‘reversable’ frame in the same position as previously to reverse it, before drawing the next frame in the new position.

    The pseudo-code is:

    bool prev_rev_frame = false;
    Rect prev_rev_rect;
    
    ...
    
    void on_mouse_move() {
      if(prev_rev_frame)
        Control.drawReversableFrame(prev_rev_rect);
      Rect new_rev_rect = ....
      Control.drawReversableFrame(new_rev_rect);
      prev_rev_frame = true;
      prev_rev_rect = new_rev_rect;
    }
    

    But in general, I recommend changing the mouse cursor to a drag-drop icon or a thumbnail of the image would be far more appropriate.

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

Sidebar

Related Questions

When do you consider creating a user control in .NET? Do you have some
When creating scrollable user controls with .NET and WinForms I have repeatedly encountered situations
So I have this idea of creating a asp.net user control, to handle all
I have a simple ASP.NET Web User Control. It looks like this: <%@ Control
So I'm creating a custom user control in .NET 2.0 and this user control
I'm creating a user approval interface leveraging the .Net Membership class. I have a
Enviroment: Asp.Net 3.5, VS 2008, Windows XP Hello, i have a user control (uc:StackUC)
I am creating a user control where in i have different HTML text boxes
Given that you're creating a User Control in WPF that will be displayed on
I am creating a Windows forms user control. This control has a textbox and

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.