Click here to Skip to main content
15,881,791 members
Home / Discussions / C#
   

C#

 
AnswerRe: Context menu Pin
Martin#20-Feb-07 4:34
Martin#20-Feb-07 4:34 
GeneralRe: Context menu Pin
CodeItWell20-Feb-07 5:01
CodeItWell20-Feb-07 5:01 
AnswerRe: Context menu Pin
Martin#20-Feb-07 5:07
Martin#20-Feb-07 5:07 
GeneralRe: Context menu Pin
CodeItWell20-Feb-07 6:02
CodeItWell20-Feb-07 6:02 
GeneralRe: Context menu Pin
Martin#20-Feb-07 6:08
Martin#20-Feb-07 6:08 
GeneralRe: Context menu Pin
Stefan Troschuetz20-Feb-07 6:13
Stefan Troschuetz20-Feb-07 6:13 
GeneralRe: Context menu Pin
CodeItWell20-Feb-07 8:24
CodeItWell20-Feb-07 8:24 
GeneralRe: Context menu Pin
Martin#20-Feb-07 21:08
Martin#20-Feb-07 21:08 
Hello Stefan,

Stefan Troschtz wrote:
button1.ContextMenu.Show(button1, Cursor.Current.Position);

I assume that this was out of your head without testing and in big hurry. Wink | ;)

Because it's not compiling (at least not in framework1.1).
I think what you meant was:
button1.ContextMenu.Show(button1, Cursor.Position);

But this is also not the right solution because the position of the contextmenu is relative to the button location. So you would have an offset depending on the position of the form.

I think only the eventarg members X and Y are giving the right location, without an additional calculation of offsets.

All the best,

Martin
GeneralRe: Context menu Pin
Stefan Troschuetz20-Feb-07 21:35
Stefan Troschuetz20-Feb-07 21:35 
GeneralRe: Context menu Pin
Martin#20-Feb-07 21:41
Martin#20-Feb-07 21:41 
QuestionDynamic Gantt chart Pin
shamsteady20-Feb-07 4:16
shamsteady20-Feb-07 4:16 
AnswerRe: Dynamic Gantt chart Pin
Colin Angus Mackay20-Feb-07 5:06
Colin Angus Mackay20-Feb-07 5:06 
GeneralRe: Dynamic Gantt chart Pin
shamsteady20-Feb-07 5:21
shamsteady20-Feb-07 5:21 
GeneralRe: Dynamic Gantt chart Pin
Colin Angus Mackay20-Feb-07 13:30
Colin Angus Mackay20-Feb-07 13:30 
Questionsettings in C# Pin
hadjy10120-Feb-07 3:58
hadjy10120-Feb-07 3:58 
AnswerRe: settings in C# Pin
DavidNohejl20-Feb-07 4:43
DavidNohejl20-Feb-07 4:43 
AnswerRe: settings in C# Pin
Radgar20-Feb-07 4:44
Radgar20-Feb-07 4:44 
AnswerRe: settings in C# Pin
hadjy10120-Feb-07 5:32
hadjy10120-Feb-07 5:32 
QuestionDLL Hell? Pin
Radgar20-Feb-07 3:41
Radgar20-Feb-07 3:41 
AnswerRe: DLL Hell? Pin
kubben20-Feb-07 3:49
kubben20-Feb-07 3:49 
GeneralRe: DLL Hell? Pin
Radgar20-Feb-07 3:51
Radgar20-Feb-07 3:51 
GeneralRe: DLL Hell? Pin
Dave Kreskowiak20-Feb-07 6:44
mveDave Kreskowiak20-Feb-07 6:44 
QuestionBezier Points Pin
Jim Warburton20-Feb-07 3:12
Jim Warburton20-Feb-07 3:12 
AnswerRe: Bezier Points Pin
Obaid ur Rehman20-Feb-07 3:59
Obaid ur Rehman20-Feb-07 3:59 
QuestionHow to press a key Pin
sharpiesharpie20-Feb-07 3:05
sharpiesharpie20-Feb-07 3:05 

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.