Click here to Skip to main content
16,005,473 members
Home / Discussions / C#
   

C#

 
GeneralCOM+ in .NET::C# & DLLs Pin
sss_dr10-Feb-03 8:23
sss_dr10-Feb-03 8:23 
GeneralOwner Draw... Pin
Yuval Kaplan10-Feb-03 1:56
Yuval Kaplan10-Feb-03 1:56 
GeneralRe: Owner Draw... Pin
TigerNinja_10-Feb-03 2:40
TigerNinja_10-Feb-03 2:40 
GeneralRe: Owner Draw... Pin
Yuval Kaplan10-Feb-03 6:08
Yuval Kaplan10-Feb-03 6:08 
GeneralWebBrowser API problem. Pin
GriffonRL10-Feb-03 1:49
GriffonRL10-Feb-03 1:49 
GeneralRe: WebBrowser API problem (repost because first URL translated). Pin
GriffonRL10-Feb-03 1:54
GriffonRL10-Feb-03 1:54 
GeneralControl DLL and resx files problems Pin
Braulio Dez9-Feb-03 23:51
Braulio Dez9-Feb-03 23:51 
GeneralFileSystemWatcher with 98 and ME Pin
BigAndy9-Feb-03 23:04
BigAndy9-Feb-03 23:04 
GeneralRe: FileSystemWatcher with 98 and ME Pin
Thomas Caudal10-Feb-03 11:02
Thomas Caudal10-Feb-03 11:02 
GeneralRegex pattern Pin
Roger Alsing9-Feb-03 21:38
Roger Alsing9-Feb-03 21:38 
GeneralRe: Regex pattern Pin
Giles10-Feb-03 12:27
Giles10-Feb-03 12:27 
GeneralHooking into IE Pin
NishantD9-Feb-03 16:39
NishantD9-Feb-03 16:39 
Generaldeploying .net application on pc without a common run time Pin
king_of_the_world9-Feb-03 15:26
king_of_the_world9-Feb-03 15:26 
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 

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.