Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
GeneralRe: deploying .net application on pc without a common run time Pin
BigAndy9-Feb-03 22:56
BigAndy9-Feb-03 22:56 
GeneralAdding a form Pin
chito9-Feb-03 14:19
chito9-Feb-03 14:19 
GeneralTesting for whole number Pin
draco_iii9-Feb-03 11:30
draco_iii9-Feb-03 11:30 
GeneralRe: Testing for whole number Pin
Jon Sagara9-Feb-03 11:40
Jon Sagara9-Feb-03 11:40 
GeneralRe: Testing for whole number Pin
draco_iii9-Feb-03 13:51
draco_iii9-Feb-03 13:51 
GeneralTreeView selection Pin
Mr BallyDaHob9-Feb-03 4:59
Mr BallyDaHob9-Feb-03 4:59 
GeneralRe: TreeView selection Pin
Stephane Rodriguez.9-Feb-03 5:37
Stephane Rodriguez.9-Feb-03 5:37 
GeneralTrackpopupMenu(Ex) problem Pin
Thomas Caudal9-Feb-03 2:32
Thomas Caudal9-Feb-03 2:32 
I try to display the shell context menu of a file. When I get the
IContextMenu, I want to track the selected menuitem with the
TrackPopupMenu API call.

Here's the call :
int num = TrackPopupMenu(<br />
    menuHandle, // Handle of the menu<br />
    TPM.TPM_RETURNCMD | TPM.tpm,<br />
    pos.X, pos.Y,<br />
    handle, // Handle of my form<br />
    IntPtr.Zero);


The declarations :
public enum TPM :long<br />
{<br />
    TPM_LEFTBUTTON     = 0x0000L,<br />
    TPM_RIGHTBUTTON    = 0x0002L,<br />
    TPM_LEFTALIGN      = 0x0000L,<br />
    TPM_CENTERALIGN    = 0x0004L,<br />
    TPM_RIGHTALIGN     = 0x0008L,<br />
    TPM_TOPALIGN       = 0x0000L,<br />
    TPM_VCENTERALIGN   = 0x0010L,<br />
    TPM_BOTTOMALIGN    = 0x0020L,<br />
    TPM_HORIZONTAL     = 0x0000L,<br />
    TPM_VERTICAL       = 0x0040L,<br />
    TPM_NONOTIFY       = 0x0080L,<br />
    TPM_RETURNCMD      = 0x0100L,<br />
    TPM_RECURSE        = 0x0001L,<br />
    TPM_HORPOSANIMATION = 0x0400L,<br />
    TPM_HORNEGANIMATION = 0x0800L,<br />
    TPM_VERPOSANIMATION = 0x1000L,<br />
    TPM_VERNEGANIMATION = 0x2000L,<br />
    TPM_NOANIMATION     = 0x4000L,<br />
    TPM_LAYOUTRTL       = 0x8000L,<br />
}<br />
[DllImport("user32.dll", SetLastError=true)]<br />
public static extern int TrackPopupMenu(<br />
    IntPtr hmenu,<br />
    TPM fuFlags,<br />
    int x,<br />
    int y,<br />
    IntPtr hwnd,<br />
    IntPtr rect);


The menu is always displayed on the left side only even if the x value
is greater than 0...

Note that I know that the declaration of the API call is false :
normally, there is a "int res" between the y and the hwnd parameters.
But when I add "int res", the menu is no more displayed.

I also tried to use TrackPopupMenuEx but the menu is also not showed...

I have Windows XP Pro SP1.

Thank you
QuestionHow to reuse the WebBrower control in my c# windows application Pin
ybw9-Feb-03 0:54
ybw9-Feb-03 0:54 
AnswerRe: How to reuse the WebBrower control in my c# windows application Pin
PianoJazz10-Feb-03 4:42
PianoJazz10-Feb-03 4:42 
GeneralMicrosoft Windows Installer Pin
Jassim Rahma9-Feb-03 0:05
Jassim Rahma9-Feb-03 0:05 
GeneralFast ListView Pin
eytan levit8-Feb-03 23:03
eytan levit8-Feb-03 23:03 
GeneralRe: Fast ListView Pin
Stephane Rodriguez.8-Feb-03 23:54
Stephane Rodriguez.8-Feb-03 23:54 
GeneralRe: Fast ListView Pin
eytan levit8-Feb-03 23:57
eytan levit8-Feb-03 23:57 
GeneralRe: Fast ListView Pin
Stephane Rodriguez.9-Feb-03 0:03
Stephane Rodriguez.9-Feb-03 0:03 
GeneralRe: Fast ListView Pin
eytan levit9-Feb-03 2:25
eytan levit9-Feb-03 2:25 
GeneralRe: Fast ListView Pin
Stephane Rodriguez.9-Feb-03 2:50
Stephane Rodriguez.9-Feb-03 2:50 
GeneralAdding the contents of a Graphics class to another Graphics Class..... Pin
Jon Newman8-Feb-03 6:34
Jon Newman8-Feb-03 6:34 
Generalzeroing a byte array Pin
monrobot137-Feb-03 11:30
monrobot137-Feb-03 11:30 
GeneralRe: zeroing a byte array Pin
Nnamdi Onyeyiri7-Feb-03 11:54
Nnamdi Onyeyiri7-Feb-03 11:54 
GeneralRe: zeroing a byte array Pin
monrobot137-Feb-03 12:37
monrobot137-Feb-03 12:37 
GeneralRe: zeroing a byte array Pin
David Stone7-Feb-03 18:45
sitebuilderDavid Stone7-Feb-03 18:45 
GeneralThe correct way Pin
leppie7-Feb-03 21:51
leppie7-Feb-03 21:51 
GeneralRe: The correct way Pin
monrobot138-Feb-03 10:21
monrobot138-Feb-03 10:21 
GeneralChanging the Cursor hotspot at run-time Pin
draco_iii7-Feb-03 7:28
draco_iii7-Feb-03 7:28 

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.