Click here to Skip to main content
15,901,853 members
Home / Discussions / C#
   

C#

 
GeneralRe: XML lookup tablString Pin
mail57235230-Apr-07 1:19
mail57235230-Apr-07 1:19 
QuestionProblem with overloaded constructor Pin
microslav29-Apr-07 23:40
microslav29-Apr-07 23:40 
AnswerRe: Problem with overloaded constructor Pin
Colin Angus Mackay29-Apr-07 23:49
Colin Angus Mackay29-Apr-07 23:49 
QuestionAuthenticate to a site Pin
ne0h29-Apr-07 22:30
ne0h29-Apr-07 22:30 
AnswerRe: Authenticate to a site Pin
althamda29-Apr-07 22:42
althamda29-Apr-07 22:42 
GeneralRe: Authenticate to a site Pin
ne0h29-Apr-07 23:41
ne0h29-Apr-07 23:41 
GeneralRe: Authenticate to a site Pin
althamda29-Apr-07 23:54
althamda29-Apr-07 23:54 
QuestionManually displaying a context menu Pin
jozsurf29-Apr-07 21:57
jozsurf29-Apr-07 21:57 
Hi all,

This is the scenario: the user is able to initiate some process by selecting some data from a form, dragging it and dropping it onto another independent form. I want to add the option of introducing a context menu if the user were to use the right mouse button to do the drag&drop just before said process is initiated (using the context menu, the user can define how that process behaves).

My initial attempt looks something like this:

<br />
...<br />
private void HandleDragDrop()<br />
{<br />
doSomething<br />
...<br />
contextMenuStrip.Show();<br />
...<br />
doSomethingElse<br />
}<br />


Two problems with this:

1. contextMenuStrip.Show(); by itself doesn't appear to be blocking. It does display the context menu but then goes ahead and executes all subsequent commands without waiting for user input.
2. The selection made is handled elsewhere using a standard Click event handler so even if I were able to stop the program to await user selection, I wonder if the context would leap from the Click event handler back to the statement immediately following the .Show() command. Sounds too easy for it to be correct...

Ideally, I would like to be able to do something similar to

<br />
...<br />
DialogResult response = MessageBox.Show(...);<br />
if (response == DialogResult.OK)<br />
...<br />


...but using a context menu (because I want to be able to select from a list of options and not just Yes or No but mainly so that users do not get upset if they were to see a Message Box rather than a context menu...).

Any ideas or help would be greatly appreciated!

cheers!
AnswerRe: Manually displaying a context menu Pin
Seishin#30-Apr-07 0:26
Seishin#30-Apr-07 0:26 
GeneralRe: Manually displaying a context menu Pin
jozsurf2-May-07 14:54
jozsurf2-May-07 14:54 
QuestionDate Measurements in C# Pin
zoroyster29-Apr-07 21:32
zoroyster29-Apr-07 21:32 
AnswerRe: Date Measurements in C# Pin
Colin Angus Mackay29-Apr-07 21:43
Colin Angus Mackay29-Apr-07 21:43 
GeneralRe: Date Measurements in C# Pin
zoroyster30-Apr-07 15:11
zoroyster30-Apr-07 15:11 
QuestionHow can I use existing .resx file in a new project. Pin
asithabk29-Apr-07 21:12
asithabk29-Apr-07 21:12 
AnswerRe: How can I use existing .resx file in a new project. Pin
netJP12L30-Apr-07 16:10
netJP12L30-Apr-07 16:10 
GeneralRe: How can I use existing .resx file in a new project. Pin
asithabk1-May-07 13:30
asithabk1-May-07 13:30 
QuestionExport PDF images Pin
danasegaranea29-Apr-07 21:11
danasegaranea29-Apr-07 21:11 
AnswerRe: Export PDF images Pin
Christian Graus29-Apr-07 22:49
protectorChristian Graus29-Apr-07 22:49 
GeneralRe: Export PDF images Pin
danasegaranea30-Apr-07 1:52
danasegaranea30-Apr-07 1:52 
GeneralRe: Export PDF images Pin
Christian Graus30-Apr-07 2:08
protectorChristian Graus30-Apr-07 2:08 
GeneralRe: Export PDF images Pin
danasegaranea30-Apr-07 2:14
danasegaranea30-Apr-07 2:14 
Questiondisplay a dialog in another dialog Pin
nathan729-Apr-07 20:46
nathan729-Apr-07 20:46 
AnswerRe: display a dialog in another dialog Pin
Colin Angus Mackay29-Apr-07 21:45
Colin Angus Mackay29-Apr-07 21:45 
Questionneed help for converting c# code to c++ Pin
MIsahq29-Apr-07 20:16
MIsahq29-Apr-07 20:16 
AnswerRe: need help for converting c# code to c++ Pin
Christian Graus29-Apr-07 23:13
protectorChristian Graus29-Apr-07 23:13 

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.