I'm trying to click on a menu item inside a program called Media Subtitler and whatever I'm trying to do it's not working.
First, I tried to use the function GetMenu but it returned IntPtr.Zero. Then, I tried using the ALT key + using the first letter of my menu (F stands for file) but it did nothing. Then, I tried using a simple MOUSEDOWN and MOUSEUP messages but again, it did nothing (I also tried creating a loop that clicks on everything in that range but there was no click in that area).
What I clearly know is that I'm working on the correct window.
What am I doing wrong?
If someone wants to test it out you can download Media Subtitler for free and it doesn't weight that much.
Also, Here's the code I've been testing: - Process p = Process.Start(@"C:\Program Files\DivXLand\Media Subtitler\MediaSub.exe");
-
p.WaitForInputIdle(1500);
-
Thread.Sleep(3000);
-
-
SetForegroundWindow(p.MainWindowHandle);
-
ShowWindow(p.MainWindowHandle, SW_MAXIMIZE);
-
-
IntPtr handle = p.MainWindowHandle;
-
-
SendMessage(handle, WM_NCHITTEST, 0, MakeLParam(18, 29));
-
-
//for (int i = 0; i < 200; i++)
-
//{
-
// for (int x = 0; x < 200; x++)
-
// {
-
// SendMessage(p.MainWindowHandle, WM_LBUTTONDOWN, 0, MakeLParam(i, x));
-
// SendMessage(p.MainWindowHandle, WM_LBUTTONUP, 0, MakeLParam(i, x));
-
// }
-
//}
-
//IntPtr menuItems = GetMenu(p.MainWindowHandle);
-
return;
-
//SendMessage(p.MainWindowHandle, WM_COMMAND, 6, 0);
-
SendMessage(p.MainWindowHandle, WM_KEYDOWN, VK_MENU, 0);
-
SendMessage(p.MainWindowHandle, WM_KEYUP, VK_MENU, 0);
-
SendMessage(p.MainWindowHandle, WM_KEYDOWN, VK_F, 0);
-
SendMessage(p.MainWindowHandle, WM_KEYUP, VK_F, 0);
Thanks for any help!
1 4310 Sign in to post your reply or Sign up for a free account.
Similar topics
by: Heather |
last post by:
I notice the Tag property for menu items. Is there a way to assign say a 1 to
the Tag property of certain menu items and then make those menu items not
visible programatically?
Thanks!
Heather
|
by: Ian Hinson |
last post by:
The pop-up (drop-down?) menu items that appear in both built-in and custom
menubars since Office 2000 now sometimes appear "sunken" and by default are
not visible, unless the chevron is clicked at...
|
by: Sakharam Phapale |
last post by:
Hi All,
How to show dropdown list of menu items just like click on Parent menu.
For example,
Edit (Parent menu)
Cut (child menu)
Copy (child menu)
Paste (child menu)
|
by: Elaine |
last post by:
I have a truly curious problem with HtmlHelp and Sibling Mode in Visual C++
..Net 2003 in an MFC app.
Sibling mode allows the help viewer to display on top of the app, but if the
app is clicked,...
|
by: tmaster |
last post by:
When I try to dynamically add a second sub menu item to this ContextMenu
item, I get an error 'Specified argument was out of the range of valid
values'.
Private Sub mnuTopics_Show_Select(ByVal...
|
by: Sakharam Phapale |
last post by:
Hi All,
How to show dropdown list of menu items just like click on Parent menu.
For example,
Edit (Parent menu)
Cut (child menu)
Copy (child menu)
Paste (child menu)
|
by: Bob Homes |
last post by:
In VB6, I used a system, which I loved, whereby I assigned a "helpId" to each
menu item; that way, you could rest the cursor on the item (without actually
running it) and then press F1 to get...
|
by: gs |
last post by:
I was able to set tooltips on objects other than main menu.
I would like to get the effect of tooltip or microhelp in the bottom status
bar when the mouse is hovering over a submenu item.
How do...
|
by: xpnctoc |
last post by:
Here's the 30,000-ft. view: I wrapped an asp:Menu control in an ascx control. When I try to dynamically populate the menu in the ascx control, the items appear, but clicking on them fails to trigger...
|
by: MCM |
last post by:
I'm working on a plotting control. The plotting control will have a context
menu with basic commands for "scaling", "zooming", etc. Is there a way
that, from the parent form, I can add more...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |