Click here to Skip to main content
15,894,180 members
Home / Discussions / C#
   

C#

 
GeneralRe: Tab control question Pin
Shizam4-Feb-04 8:00
Shizam4-Feb-04 8:00 
GeneralRe: Tab control question Pin
Alex Korchemniy4-Feb-04 8:02
Alex Korchemniy4-Feb-04 8:02 
GeneralRe: Tab control question Pin
Heath Stewart4-Feb-04 8:44
protectorHeath Stewart4-Feb-04 8:44 
GeneralRe: CrystalReportViewer Pin
Alex Korchemniy4-Feb-04 9:53
Alex Korchemniy4-Feb-04 9:53 
GeneralVS problem Pin
Judah Gabriel Himango4-Feb-04 5:26
sponsorJudah Gabriel Himango4-Feb-04 5:26 
GeneralRe: VS problem Pin
Heath Stewart4-Feb-04 5:35
protectorHeath Stewart4-Feb-04 5:35 
GeneralRe: VS problem Pin
Judah Gabriel Himango4-Feb-04 5:48
sponsorJudah Gabriel Himango4-Feb-04 5:48 
GeneralRe: VS problem Pin
Heath Stewart4-Feb-04 5:53
protectorHeath Stewart4-Feb-04 5:53 
GeneralRe: VS problem Pin
Judah Gabriel Himango4-Feb-04 6:15
sponsorJudah Gabriel Himango4-Feb-04 6:15 
GeneralMDAC Pin
Mazdak4-Feb-04 4:42
Mazdak4-Feb-04 4:42 
GeneralRe: MDAC Pin
Heath Stewart4-Feb-04 5:33
protectorHeath Stewart4-Feb-04 5:33 
GeneralRe: MDAC Pin
Meysam Mahfouzi4-Feb-04 17:31
Meysam Mahfouzi4-Feb-04 17:31 
GeneralRe: MDAC Pin
Mazdak4-Feb-04 18:59
Mazdak4-Feb-04 18:59 
QuestionAdding Custom components to Windows ContextMenu? Pin
mdundek4-Feb-04 3:26
mdundek4-Feb-04 3:26 
AnswerRe: Adding Custom components to Windows ContextMenu? Pin
Heath Stewart4-Feb-04 4:34
protectorHeath Stewart4-Feb-04 4:34 
In .NET, almost every control (and many other classes) actually encapsulate native resources (like HMENUs in this case, and the related APIs) unlike in Java (although frames and othe controls are still tied to HWNDs, which is accessible via JNI).

Since this is possible using the Win32 APIs, it is also possible - though not always easy - in .NET (on that note, .NET 2.0 will apparently have a new WinBar class and derivative classes that will make this MUCH easier, but it's still pretty raw when I tried it from the PDC build).

I tried a quick search on CodeGuru[^] (has lots of custom controls like this) but couldn't pinpoint something specific. I'm sure you'll find some information there, though I'm betting it'll be in VC++/MFC. The same practices can be applied to your derivative ContextMenu through the Handle property (gets the HMENU you can use in native function calls).

Also, I did manage to find one example that is free for non-profit applications at http://www.divil.co.uk/net/controls/sandbar/[^]. There are several other commercial implementations that would do much the same thing (or that just define their own ContenxtMenu-like components from scratch without using native resources) such as http://www.infragistics.com[^].

 

Microsoft MVP, Visual C#
My Articles
GeneralAmazing error from VisualStudio.NET Pin
Inam4-Feb-04 0:12
Inam4-Feb-04 0:12 
GeneralRe: Amazing error from VisualStudio.NET Pin
LongRange.Shooter5-Feb-04 2:27
LongRange.Shooter5-Feb-04 2:27 
GeneralRe: Amazing error from VisualStudio.NET Pin
Inam5-Feb-04 18:58
Inam5-Feb-04 18:58 
GeneralRe: Amazing error from VisualStudio.NET Pin
LongRange.Shooter6-Feb-04 3:43
LongRange.Shooter6-Feb-04 3:43 
GeneralRe: Amazing error from VisualStudio.NET Pin
Inam6-Feb-04 8:26
Inam6-Feb-04 8:26 
GeneralRe: Amazing error from VisualStudio.NET Pin
LongRange.Shooter9-Feb-04 2:29
LongRange.Shooter9-Feb-04 2:29 
GeneralAdo.Net Pin
GetOn&GetGoing4-Feb-04 0:05
GetOn&GetGoing4-Feb-04 0:05 
GeneralRe: Ado.Net Pin
Rampas Tomas4-Feb-04 0:28
Rampas Tomas4-Feb-04 0:28 
GeneralRe: Ado.Net Pin
Rampas Tomas4-Feb-04 0:29
Rampas Tomas4-Feb-04 0:29 
GeneralForm Authenticaton Pin
GetOn&GetGoing4-Feb-04 0:01
GetOn&GetGoing4-Feb-04 0:01 

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.