Click here to Skip to main content
16,016,067 members
Home / Discussions / C#
   

C#

 
GeneralwParam, lParam Help Pin
Keith La Force21-Oct-04 6:23
Keith La Force21-Oct-04 6:23 
GeneralRe: wParam, lParam Help Pin
Heath Stewart21-Oct-04 6:50
protectorHeath Stewart21-Oct-04 6:50 
GeneralDrag-and-drop Panel control Pin
zsiga21-Oct-04 6:02
zsiga21-Oct-04 6:02 
GeneralRe: Drag-and-drop Panel control Pin
Heath Stewart21-Oct-04 7:07
protectorHeath Stewart21-Oct-04 7:07 
GeneralRe: Drag-and-drop Panel control Pin
zsiga22-Oct-04 3:33
zsiga22-Oct-04 3:33 
GeneralRe: Drag-and-drop Panel control Pin
Heath Stewart22-Oct-04 8:30
protectorHeath Stewart22-Oct-04 8:30 
GeneralRe: Drag-and-drop Panel control Pin
zsiga23-Oct-04 2:51
zsiga23-Oct-04 2:51 
GeneralRe: Drag-and-drop Panel control Pin
Heath Stewart23-Oct-04 5:32
protectorHeath Stewart23-Oct-04 5:32 
No you don't. You use the Type only as the clipboard format (if you don't understand what a clipboard format is, then you really should read about native Drag and Drop in the Shell documentation in the Platform SDK), but the object itself (instances are unique) is packed into the clipboard. Whatever control you click on, be it a Button or MyButton or a different MyButton (and one instance of a control can't be used in multiple places at once because Windows Forms encapsulates the Windows APIs and Common Controls, which wouldn't allow that), are all different instances.

If you're creating controls from a menu, then you simply use the Type passed to Activator.CreateInstance (there's other ways using reflection yourself) to create an instance. Then when a user drags it, they are dragging yet another unique instance of your control. You do not need to distinguish it from another control because the instance is already unique.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: Drag-and-drop Panel control Pin
zsiga24-Oct-04 0:43
zsiga24-Oct-04 0:43 
GeneralRe: Drag-and-drop Panel control Pin
Heath Stewart24-Oct-04 4:40
protectorHeath Stewart24-Oct-04 4:40 
GeneralOutlook-style mini calendar Pin
machocr21-Oct-04 4:57
machocr21-Oct-04 4:57 
GeneralRe: Outlook-style mini calendar Pin
Heath Stewart21-Oct-04 7:07
protectorHeath Stewart21-Oct-04 7:07 
GeneralRe: Outlook-style mini calendar Pin
machocr21-Oct-04 7:15
machocr21-Oct-04 7:15 
GeneralRe: Outlook-style mini calendar Pin
Heath Stewart21-Oct-04 7:44
protectorHeath Stewart21-Oct-04 7:44 
GeneralRe: Outlook-style mini calendar Pin
machocr21-Oct-04 9:40
machocr21-Oct-04 9:40 
GeneralRe: Outlook-style mini calendar Pin
Jordi Corominas7-Nov-04 21:47
Jordi Corominas7-Nov-04 21:47 
Generalrun .net app in all systems Pin
visitsaadi21-Oct-04 4:50
visitsaadi21-Oct-04 4:50 
GeneralRe: run .net app in all systems Pin
J4amieC21-Oct-04 4:59
J4amieC21-Oct-04 4:59 
GeneralRe: run .net app in all systems Pin
McClamm21-Oct-04 5:29
McClamm21-Oct-04 5:29 
GeneralRe: run .net app in all systems Pin
Heath Stewart21-Oct-04 7:14
protectorHeath Stewart21-Oct-04 7:14 
GeneralRe: run .net app in all systems Pin
McClamm21-Oct-04 9:01
McClamm21-Oct-04 9:01 
GeneralRe: run .net app in all systems Pin
Heath Stewart21-Oct-04 13:42
protectorHeath Stewart21-Oct-04 13:42 
Generaldatagrid column sorting Pin
ddelapasse21-Oct-04 4:35
ddelapasse21-Oct-04 4:35 
GeneralAdd-In VS .NET 2003 ToolTip on Words in Editor Pin
Nxsis21-Oct-04 3:46
Nxsis21-Oct-04 3:46 
GeneralRe: Add-In VS .NET 2003 ToolTip on Words in Editor Pin
Heath Stewart21-Oct-04 7:20
protectorHeath Stewart21-Oct-04 7:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.