Hi
I am in process of developing a C# application to do some printing operations.For this i am using macros that was used previuosly in the VB version.
Basically, this app will look for the docs to be printed in every 10 seconds.The logic is being implemented in a Timer_Tick event. In this event i am changing the app icon to show the status(Red or Green). This app will be running continously. I am destroying the icon to avoid memory issues.
The problem i am facing is the app is getting stuck or hung in between,that point of time the Task manager will not show any application that are being opened in the system. The moment i restore or maximise the app it will start working as exepcted.
Any help???Here is the code i am using to destroy the icon in the tick event: -
using (Bitmap bmp2 = new Bitmap(picGreenLight.Image))
-
{
-
using (Icon ico = System.Drawing.Icon.FromHandle(bmp2.GetHicon()))
-
{
-
this.Icon = ico;
-
System.Windows.Forms.Application.DoEvents();
-
bmp2.Dispose();
-
DestroyIcon(ico.Handle); // API to destroy the icon
-
}
-
}
-
Thanks in advance.
Regards
Biju
2 1452
Will you please take time to read the stickies at the top of the forums, specifically this forum's stickies, especially This One it says not to post questions in the Introductions forums, this is for introductions only not technical questions. Please read the Posting Guidelines, as I can see you have not used code tags[#]. This question should have probably been posted in the .Net Forum. I will inform an Admin or Moderator
joedeene
Plater 7,872
Recognized Expert Expert
You need to look in the correct tab of the TaskManager. You are only looking in the "Applicatio ns" tab, which will only list an entry for programs that have an active window with a title visible. If your form is hidden, then there is no window and the entry is not shown.
Your program will still be listed under the "Processes" tab if you need to find it.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Jaans |
last post by:
I have a problem that relates to running "cleanup" code when an application
is forcibly ended using the "End Process" of "Task Manager" (Please note that
this is very different from "End Task" since end task sends a message to the
application, requesting it to close)
My real problem is that our application makes entries into a database when
the application starts, and then corresponding entries when the application
closes ("cleanup")....
|
by: rodchar |
last post by:
hey all,
i'm trying to use Windows' Task Manager to kick off my win form. Am I
correct to say that this is not going to work because everytime it runs I see
it task manager but no window ever shows.
no way around this?
thanks,
rodchar
|
by: Strah |
last post by:
Is there a way to catch the event of terminating the application from the the
processes tab in task manager?
I have created windows app, and if a user termintates the app in the task
manager, I'd like to be notified. I tried few combinations of Close, Closing,
Application.Exit method, ApplicationExit Event, etc, but nothing seems to be
working.
Thanks in advance
Strah@Langan
|
by: nkoranda |
last post by:
I have been running into an issue that I just cant figure out. I have created an ActiveX EXE and in the Project Properties I have the Thread Model set to Thread Pool = 1. If I create an instance of this object I do not see the ActiveX component in the Applications list of the Task Manager. NOW, if I switch the Thread Model to Thread per Object or increase the Thread Pool to greater than 1, I see the ActiveX EXE in the Application list of the...
|
by: ray well |
last post by:
on my developing system, when my app exits, it always gets removed withing a
second from the task manager. on my clients machine, the app exits but stays
indefinitely in the task manager.
i tried every which way to kill the process, i did all of the following to
no avail:
in the module whose sub main loads the form and then starts
Application.Run(), i made an exit sub, in whichi set the app form to
Nothing, i set the apps class to...
| |
by: NEWSGROUPS |
last post by:
I have some users that continuously end task on my database when a search
takes to long. In turn corrupting the application. Is there any way to
prevent this? The Microsoft KB for Methods That Can Be Used to Prevent
Corruption suggests not allowing Task Manager to shut down the application
but gives no way to prevent this. Any suggestions would help.
Thanks in advance,
Mark
|
by: JamesB |
last post by:
I am writing a service that monitors when a particular app is started.
Works, but I need to get the user who is currently logged in, and of course
Environment.UserName returns the service logon (NT_AUTHORITY\SYSTEM).
I understand that when the service starts, no user may be logged in, but
that's ok, as the app I am monitoring can only be run by a logged in user.
Do I need to use WMI to get the user context of Explorer.exe or is there a...
|
by: e-Ricc |
last post by:
Hi guys!
Im trying to detect when a user "kills" my c# app using windows task
manager, i've tried with the form events _closing and _closed managing
for example putting an if inside to detect it:
if (e.CloseReason == CloseReason.TaskManagerClosing)
{
MessageBox.Show("from task manager");
}
|
by: romcab |
last post by:
Hi guys,
I would like to ask your idea about my current problem. I would like to create an application which run on the background. Then when I press a certain key, the GUI of the program will display on the screen. A good example of this is the Task Manager where it running on the background and the GUI will display when Ctrl+Alt+Del then choose Task manager. My initial idea is to hide the window then display it when the key is pressed....
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |