Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to make a border less form draggable inside specified location in .net?

How to make a border less form draggable inside specified location in .net?

Scheduled Pinned Locked Moved C#
csharpcsscomtutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    srikrishnathanthri
    wrote on last edited by
    #1

    I have a requirement of enabling drag option for border less form within a fixed location of screen. I am reading the windows explorer’s position for this method. Then I will place an icon within window’s explorer window and planning to allow dragging of that form everywhere inside the windows explorer. How to do this ?

    B 1 Reply Last reply
    0
    • S srikrishnathanthri

      I have a requirement of enabling drag option for border less form within a fixed location of screen. I am reading the windows explorer’s position for this method. Then I will place an icon within window’s explorer window and planning to allow dragging of that form everywhere inside the windows explorer. How to do this ?

      B Offline
      B Offline
      BillWoodruff
      wrote on last edited by
      #2

      I'm not clear on what you describe here. You find the current position of Win Explorer ... what if there are multiple folder views open ? You move an icon within a Win Explorer window ... how do you keep it on top ? What is the borderless Form you refer to ... what is its relationship to the icon, or the Win Explorer window ? Making a Windows Form draggable is easy; how do you want the user to start dragging it ... by click-dragging anywhere on the Form not covered by a Control ? by clicking on some visual indicator ? by clicking on a certain region in the Form ?

      «There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008

      S 1 Reply Last reply
      0
      • B BillWoodruff

        I'm not clear on what you describe here. You find the current position of Win Explorer ... what if there are multiple folder views open ? You move an icon within a Win Explorer window ... how do you keep it on top ? What is the borderless Form you refer to ... what is its relationship to the icon, or the Win Explorer window ? Making a Windows Form draggable is easy; how do you want the user to start dragging it ... by click-dragging anywhere on the Form not covered by a Control ? by clicking on some visual indicator ? by clicking on a certain region in the Form ?

        «There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008

        S Offline
        S Offline
        srikrishnathanthri
        wrote on last edited by
        #3

        BillWoodruff wrote:

        You find the current position of Win Explorer ... what if there are multiple folder views open ? You move an icon within a Win Explorer window ... how do you keep it on top ?

        I manage multiple windows with the handle of the window. See my previous question. I am keeping the form on top of explorer by setting "me.topmost" property. I want to allow dragging of form on mouse left click down everywhere inside the form but that form should be draggable within specified location of window (i.e within windows explorer window)

        B 1 Reply Last reply
        0
        • S srikrishnathanthri

          BillWoodruff wrote:

          You find the current position of Win Explorer ... what if there are multiple folder views open ? You move an icon within a Win Explorer window ... how do you keep it on top ?

          I manage multiple windows with the handle of the window. See my previous question. I am keeping the form on top of explorer by setting "me.topmost" property. I want to allow dragging of form on mouse left click down everywhere inside the form but that form should be draggable within specified location of window (i.e within windows explorer window)

          B Offline
          B Offline
          BillWoodruff
          wrote on last edited by
          #4

          You still have not clearly explained what the use of the Icon and the Form is

          Quote:

          I want to allow dragging of form on mouse left click down everywhere inside the form but that form should be draggable within specified location of window (i.e within windows explorer window)

          This statement implies you have two Forms, and that one is dragged within the bounds of the other. Please try and describe clearly what you are trying to achieve, and, why are you trying to change the appearance of what the user sees in an Explorer Window ? Describe exactly what your app creates. The use of "me.topmost" suggests this is a VB Project ... is that correct ?

          «There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups