Click here to Skip to main content
15,913,722 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to get first and last date given a year and a weeknr Pin
David Skelly9-Dec-09 4:25
David Skelly9-Dec-09 4:25 
GeneralRe: How to get first and last date given a year and a weeknr Pin
Richard MacCutchan9-Dec-09 5:04
mveRichard MacCutchan9-Dec-09 5:04 
QuestionHow to make FolderBrowserDialog TopMost window. Pin
Calla9-Dec-09 3:09
Calla9-Dec-09 3:09 
AnswerRe: How to make FolderBrowserDialog TopMost window. Pin
Calla9-Dec-09 3:20
Calla9-Dec-09 3:20 
QuestionDo not close ContextMenuStrip Pin
eyalle9-Dec-09 2:14
eyalle9-Dec-09 2:14 
AnswerRe: Do not close ContextMenuStrip Pin
BillWoodruff9-Dec-09 12:19
professionalBillWoodruff9-Dec-09 12:19 
GeneralRe: Do not close ContextMenuStrip Pin
eyalle9-Dec-09 19:59
eyalle9-Dec-09 19:59 
GeneralRe: Do not close ContextMenuStrip Pin
BillWoodruff11-Dec-09 5:06
professionalBillWoodruff11-Dec-09 5:06 
Hi Eyalle,

I think there is a "structural problem" here, but I have to disclaimer what I'll say by letting you know I'm working with a 3rd. party WinForms tree control whose behavior may be different than the standard WinForms TreeView, and I don't have time to go back and test against the standard WinForms TreeView.

The problem as I see it is the rather unique dynamics of drag and drop : first the control the drag is coming from continues to capture the mouse until Drop time.

Yes you can put up a context menu strip, or a menustrip, in the DragDrop of the drop-target control event, and set some global variable by selecting one of its items : the problem seems to be it runs on another thread : it's not modal : it doesn't block the rest of the code running in your DragDrop handler from proceeding : in fact, if you put a Console.WriteLine in your context menu selectItem code to print out your choice : you'll find it's written out after the DragDrop completes.

I have one prototype I wrote where I completely bypassed all of the regular WinForms drag and drop : in that prototype I was successful, in doing exactly what you are describing here (and with a much better drag-drop preview image, and a nice option menu that stuck around until you dismissed it). If I have the time I intend to publish that technique here on CP.

Perhaps one of our resident "gurus" will "weigh in" here with some wisdom Smile | :)

best, Bill

"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844

GeneralRe: Do not close ContextMenuStrip Pin
eyalle13-Dec-09 20:38
eyalle13-Dec-09 20:38 
GeneralRe: Do not close ContextMenuStrip Pin
BillWoodruff14-Dec-09 3:25
professionalBillWoodruff14-Dec-09 3:25 
QuestionPositioning MdiChild in the Parent Form Pin
Randal Vance Cunanan9-Dec-09 2:14
Randal Vance Cunanan9-Dec-09 2:14 
AnswerRe: Positioning MdiChild in the Parent Form Pin
Randal Vance Cunanan9-Dec-09 2:18
Randal Vance Cunanan9-Dec-09 2:18 
Questionclasses as enum (or something like an enum) Pin
Nathan Gloyn9-Dec-09 1:53
Nathan Gloyn9-Dec-09 1:53 
AnswerRe: classes as enum (or something like an enum) Pin
Keith Barrow9-Dec-09 2:32
professionalKeith Barrow9-Dec-09 2:32 
GeneralRe: classes as enum (or something like an enum) Pin
Nathan Gloyn9-Dec-09 3:11
Nathan Gloyn9-Dec-09 3:11 
GeneralRe: classes as enum (or something like an enum) Pin
Keith Barrow9-Dec-09 3:36
professionalKeith Barrow9-Dec-09 3:36 
AnswerRe: classes as enum (or something like an enum) Pin
PIEBALDconsult9-Dec-09 5:10
mvePIEBALDconsult9-Dec-09 5:10 
GeneralRe: classes as enum (or something like an enum) Pin
Nathan Gloyn9-Dec-09 5:19
Nathan Gloyn9-Dec-09 5:19 
QuestionHow to query a matrix using LINQ Pin
@_csharp9-Dec-09 1:33
@_csharp9-Dec-09 1:33 
AnswerRe: How to query a matrix using LINQ Pin
Sir Dot Net9-Dec-09 8:46
Sir Dot Net9-Dec-09 8:46 
GeneralRe: How to query a matrix using LINQ Pin
@_csharp9-Dec-09 13:02
@_csharp9-Dec-09 13:02 
GeneralRe: How to query a matrix using LINQ Pin
Sir Dot Net10-Dec-09 14:07
Sir Dot Net10-Dec-09 14:07 
QuestionDeplying a C# Application with Database Connection! Pin
dennis_max279-Dec-09 1:23
dennis_max279-Dec-09 1:23 
AnswerRe: Deplying a C# Application with Database Connection! Pin
loyal ginger9-Dec-09 4:25
loyal ginger9-Dec-09 4:25 
AnswerRe: Deplying a C# Application with Database Connection! Pin
vtchris-peterson9-Dec-09 4:45
vtchris-peterson9-Dec-09 4:45 

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.