Results 1 to 13 of 13

Thread: picturebox allowdrop property missing?

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    picturebox allowdrop property missing?

    Does anyone know why the .AllowDrop property of the picturebox control is missing at design time? My guess is it has to be a bug.

    Controls that allow drag/drop operations (even windows form does) have a .AllowDrop property to tell the control to receive drag/drop events or not. You can set this in the properties window at design time, except for the picturebox. The picturebox is missing the property and you have to set it in code in the form constructor or form load event (or anywhere prior to wanting it to get drag/drop events)

    My guess is the param they put on properties to indicate it to show up in the properties window is set wrong for the picturebox control... can anyone see if this exists on 05 beta 2? Its not installed here...

  2. #2
    Hyperactive Member
    Join Date
    Mar 2005
    Location
    Bath, England
    Posts
    411

    Re: picturebox allowdrop property missing?

    I think you must be right, the property is listed on MSDN2.

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: picturebox allowdrop property missing?

    It is not available at design time in 2005 either.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: picturebox allowdrop property missing?

    Maybe I will see if I can report it to MS, It just seems like the thing that they would already know about just from using the control...

  5. #5
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: picturebox allowdrop property missing?

    hmm I'm using C# and it doesnt even show up in intellisense! (compiles if I use it though).
    Maybe they didnt want us to use it for some reason?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  6. #6

    Thread Starter
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: picturebox allowdrop property missing?

    that is silly though because its the ONLY way to get drag/drop events to work on a picture box.

    Also AllowDrop is inherited from the control class, so it should be available to the picturebox without any reason otherwise..

    http://msdn.microsoft.com/library/de...mberstopic.asp
    Last edited by kleinma; Aug 24th, 2005 at 11:14 PM.

  7. #7
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: picturebox allowdrop property missing?

    There might be something stated about this on MSDN perhaps?
    the picturebox class seems to override that property and hide it from the user. See for yourself in Reflector if you want
    it sets browsable to false, and editbrowsabel to never

    maybe the bright developers intended for this to be a control merely for displaying pictures? you could put it in a panel control, OR, just do it via code
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  8. #8

    Thread Starter
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: picturebox allowdrop property missing?

    got a response from MS today.
    Matt,

    Thank you for contacting the .NET Framework team. We appreciate your comments. By taking the time to write, you are helping us to improve the quality of our documentation and samples.



    The PictureBox control is not designed to allow drag and drop procedures. However, since PictureBox inherits from control, it also inherits the AllowDrop property. To clarify this, in the next release of the documentation, the PictureBox.AllowDrop topic will be marked with the “for internal use only” boilerplate. Also, the PictureBox.AllowDrop property will not appear in intellisense if you are using the Visual Studio text editor.
    I emailed back asking why a control that simply inherits the functionality would need to "hide" it.. or from what they say, totally eliminate it in a future release. I asked what negative impact drag/drop with a picture box could have, since I can think of plenty of good reasons to have it.

  9. #9
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: picturebox allowdrop property missing?

    I see
    what's the reason though

    maybe they have had bugs with it
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  10. #10

    Thread Starter
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: picturebox allowdrop property missing?

    I emailed back asking that already

  11. #11
    New Member
    Join Date
    Aug 2012
    Posts
    1

    Re: picturebox allowdrop property missing?

    Ran into the same problem!!

    When your form loads:

    PictureBox1.AllowDrop = True

    This is how I get around it.

    Using VS2010.

  12. #12
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,424

    Re: picturebox allowdrop property missing?

    There are several (could be a lot more than i know of) properties that aren't listed in the properties window or intellisense.
    The PrintPreviewDialog's WindowState property is another example

  13. #13

    Thread Starter
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: picturebox allowdrop property missing?

    Not for nothing, this thread is 7 years old.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width