473,586 Members | 2,754 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

AppActivate after a Context menu doesn't work?

I need to activate another application, after clicking in a right
click menu/context menu in my application.

Problem is that the other application doesn't get activated and
brought to the front as expected.

All it does is flash it's "icon" in the taskbar. I then have to click
on the flashing icon, to actually activate the other application.

If i call AppActivate directly from a commandbutton it works just
fine, but when calling it from a Context menu, no luck.

I have also tried going the API way with Setforeground window and so
on, but with the same results.

Anybody have a solution to this problem?

Regards

Lars G.
Nov 21 '05 #1
1 1598
DOH!

Always exhaust all posibilities before posting a question!

Just do AppActivate via a Thread, and it will work as expected.

Lars G.

On Fri, 03 Dec 2004 10:51:01 +0100, Lars Gaarde <> wrote:
I need to activate another application, after clicking in a right
click menu/context menu in my application.

Problem is that the other application doesn't get activated and
brought to the front as expected.

All it does is flash it's "icon" in the taskbar. I then have to click
on the flashing icon, to actually activate the other application.

If i call AppActivate directly from a commandbutton it works just
fine, but when calling it from a Context menu, no luck.

I have also tried going the API way with Setforeground window and so
on, but with the same results.

Anybody have a solution to this problem?

Regards

Lars G.


Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1941
by: Gustavo Franco | last post by:
Hi, Basic Question, difficult answer 1) Thread one; Open Context Menu.
4
14171
by: Aaron Queenan | last post by:
How can I use the designer to add a context menu to a class which inherits from a control, e.g. treeview, without adding the context menu to a form? For example, to add a context menu with "Select All" and "Clear Selection" to a checked list box? Thanks, Aaron Queenan.
2
2506
by: Eric | last post by:
I implemented owner drawing on the main and context menus of my main form. It works fine. There is also a notify icon control that has a context menu. When the icon is in the status bar, it works perfectly fine when it is double-clicked. However, when I try to initialize the notify icon's context menu as an owner-drawn menu, all the text...
5
5482
by: Dean L. Howen | last post by:
Dear friends, Could we determine when context menu should appear?
0
1372
by: allen | last post by:
If I create a control library control (and change the base control from usercontrol to control). Add that control to the toolbox, then add that control to a windows form. Then add a context menu to the control. Within the control, how do you tell when a context menu has been instanced? I don't see any overrides I can work with. Trapping...
10
4126
by: Sender | last post by:
I wrote about this yesterday...and many people advised the solution. But it didn't work. Let me put it again: I have a form with just command button. Then I inserted a context menu (contextmenu1). Now when I want to run the form I want to display this context menu when someone LEFT click (not right click) this command button. Many people...
2
1997
by: PJSimon | last post by:
I have a system tray icon for my application. Each time the user pastes some text into the application, I add a submenu item in the system tray's context menu. The first time I right-click the icon in the system tray, the submenu item is there. After that, any subsequent right-clicks only show the same menu that was displayed at the first...
5
10269
by: diSangro | last post by:
Hello Community, I have a question : why , if I try to use AppActivate applied to cmd.exe it doesn't work? My purpose is to run a VB script from Excel which opens a Telnet or an ftp session, then it gives commands using SendKeys method. I am using the following code: '---------------------------------------------------------------...
1
5582
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
I've got one Context Menu named mi_EasterEggs with three (3) menu items: * mi_FontArial * mi_FontCourier * mi_RawData All menu items have their Visible properties set to False when the form loads. This context menu is included in one (1) ListView control and one (1) TextBox control.
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7954
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3836
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1448
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.