473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Focus App. Via notifyicon?

Kevinyy
77
How can i focus/make active/bring to front my program when i double click the notify icon?
I have:
show in taskbar = false
i have tried:
dll reference or setforegroundwindow(this.handle);
this.activate();
this.bringtofront();
this.focus() (and a combo of those)


What is going on??? and what can i do?

im using C#.net2.2
Aug 22 '08 #1
6 1408
Plater
7,872 Expert 4TB
What state is your window in when you try to do this?
If it is minimized, try changing the WindowState
Aug 22 '08 #2
Kevinyy
77
What state is your window in when you try to do this?
If it is minimized, try changing the WindowState
Not minimized, but nonetheless ive also tried those windowstates :(
Aug 22 '08 #3
Plater
7,872 Expert 4TB
So your application is in a visible state, just some other window is on top of it?
Is the window that is on top of it a "top most" window?
Have you tried setting the TopMost property of your window to true, just to see if it forces it to the front?
Aug 22 '08 #4
Kevinyy
77
So your application is in a visible state, just some other window is on top of it?
Is the window that is on top of it a "top most" window?
Have you tried setting the TopMost property of your window to true, just to see if it forces it to the front?
yea..just other windows on top of it, how would i force the Topmost property?
Aug 22 '08 #5
Curtis Rutland
3,256 Expert 2GB
yea..just other windows on top of it, how would i force the Topmost property?
Set this.TopMost = true
Aug 22 '08 #6
Kevinyy
77
Set this.TopMost = true
Thank you, it;s workin now :)
Aug 22 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Phil Galey | last post by:
VB.NET 2002 on Windows 2000 SP 3 When I start my program, the NotifyIcon appears in the tray, as it should. However, when I close the program, the NotifyIcon remains until I hover over it with...
0
by: petterl | last post by:
I have tried to find the error in the code below but I always get " An unhandled exception of type 'System.NullReferenceException' occurred in Unknown Module. Additional information: Object...
2
by: Rob Mayo | last post by:
OK, maybe this is my opinion, maybe these are bugs. Given the folowing: I have a NotifyIcon on my Form, a Context menu associated with the NotifyIcon, and a MenuItem on the ContextMenu set as...
3
by: Glen | last post by:
Can anyone tell me if there is a workable method to get the mouse cursor position on the screen or the NotifyIcon position? I need to display a context menu for the NotifyIcon when clicked and I'd...
2
by: Derrick | last post by:
I've been working on an application which has a NotifyIcon (system tray icon), and a corresponding ContextMenu. I want to be able to update this menu dynamically. However, when I make changes to...
2
by: Jesper | last post by:
Hi, I'm showing a usercontrol containing a textbox on the screen by clicking a notifyIcon in the taskpane. I use textBox.Focus() to set the focus for the texbox, and I also get a blinking...
7
by: Matthew | last post by:
I have a taskbar icon in my application. When the user double-clicks it I would like it to give focus to a form that is already open, but is behind other windows unrelated to my program. Is...
2
by: Jesper | last post by:
Hi, I have an C# windows application running that has the property WindowsState of the main form set to 'Minimized' and the property ShowInTaskBar set to false. I've asingned a notifyIcon to the...
1
by: \Ji Zhou [MSFT]\ | last post by:
Hello Jason, Thanks for using Microsoft Newsgroup Support Service, my name is Ji Zhou and I will be working on this issue with you. I have tried to but cannot reproduce your issue on my side....
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.