|
I am thinking this is a Windows thing but after my application closes, the notify icon will still appear in the taskbar. The only time it will disappear is when you roll your mouse over it.
Could there be something wrong that I am doing (that maybe Visual Studio is doing something wrong) or is this just something messed up with Windows OS?
This happened on XP but I am currently on Windows 7 and it is doing the same thing. Thats why I chose to ask the question.
I am using some background workers in my application but they should be ended when the application exits. I have also checked the task manager and do not see the application running
|
|
|
|
|
This happens on all kinds of Windows.
Your app should call Dispose() on its NotifyIcons prior to app exit.
One way of achieving this is by using
protected override void Dispose(bool disposing) {
if(disposing) {
notifyIcon.Dispose();
}
}
If your app does not, or just crashes, or gets killed, the icon remains intact until your mouse erases it. Unless you got this nice little tool[^] up and running (except it needs a fix for Win7).
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Sweet that works! Sounds like Windows wasn't very good at cleaning up?
|
|
|
|
|
i had the same problem, and fixing it is quite easy,
in your Program.cs text just place :
myIcon.Dispose();
right after Application.Run(new myForm());
the code should look like:
Application.Run(new myForm());
myIcon.Dispose();
that way when your application exits, the icon will hide
|
|
|
|
|
yes, that suffices when all is fine.
Not when an unhandled exception occurs, your app crashes or gets killed.
Luc Pattyn [Forum Guidelines] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
i have interface
interface1<t,r>
{
list<t> returnall;
lsit<r> returnall1
}
i need to have the ability to pass r ot not when implemrnt interface and is that cas doesn't impelement methods that return r
thanks
md_refay
|
|
|
|
|
md_refay wrote: i need to have the ability to pass r ot not when implemrnt interface and is that cas doesn't impelement methods that return r
This makes no sense, did your post contain tags that have been stripped ? You can't do generic interfaces AFAIK.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian Graus wrote: You can't do generic interfaces
IEnumerable<T> ?
|
|
|
|
|
I have no idea what you mean. Your post doesn't make sense to me.
However, maybe this helps:
public interface Abase<T> {
string Xyz(T arg);
}
public class A<T> : Abase<T> where T : class {
public string Xyz(T arg) { return arg.GetType().ToString(); }
}
[EDIT]<> fixed[/EDIT]
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
modified on Wednesday, November 11, 2009 6:54 PM
|
|
|
|
|
Did your angles get eaten?
|
|
|
|
|
seems like my entire post got de-angled by the HTML mob.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Hi
I create a tablelayoutpanel in FormDesign and because it is a big one and i need another one in the same form;
Now i want to use it twice at the same time but i want to change the text of the labels of that tablelayout for the second one,and remove some controls of the first one in CODE.
How can i change them in CODE?
THX
|
|
|
|
|
By setting the text property on the labels. IF you need to use it twice at the same time, create the whole thing as a user control, and then put two of them on the form.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
THX;
how can create a user control?
|
|
|
|
|
I suggest you abandon this task and buy a basic book on winforms and read it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi all, I am trying to insert data into sqlite datetime, but it seems like making my life really deficult.
this is what I have done to do this;
con.Open();<br />
cmd = new SQLiteCommand();<br />
cmd = con.CreateCommand();<br />
cmd.Connection = con;<br />
cmd.CommandText = " INSERT INTO Hall_Call_Up (Call,Time) VALUES ('1','" + dateTime.Now.ToString("YYYY-MM-DD HH:MM:SS") + "')";<br />
cmd.ExecuteNonQuery();
this is giving me error saying "Unable to read data"
But if I connect to datagridview and I do this;
this.hall_Call_UpTableAdapter.Insert(1, DateTime.Now);
it is working.
Can some one please help me.
thanks
|
|
|
|
|
Use a parameterised query and pass in a DateTime.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hi Christian Graus,
Sorry for delay. I am very very new to database. infact this is for the first time I need to use database i any of my application. Do you mind to help me little more by showing how it should be done. I appolize if I am asking too much.
this is how[] the SQLite is telling me to do. Since I have never used it I don't know honeslty speaking.
thanks again.
|
|
|
|
|
The string your using will create an incorrect and unparseable DateTime string (read the MS docs for the correct DateTime templates).
The template you DO want is this: "yyyy-MM-dd HH:mm:ss".
|
|
|
|
|
I am doing a speech recognition project for amharic ( Ethiopian) language. and i want to use sapi.Is there any interface used to extract the recognized phenomes; not the final recognized words...
tnx
modified on Wednesday, November 11, 2009 2:06 PM
|
|
|
|
|
Am working on a Software, Does anyone have an idea on Socket programming?.. i need to capture the wireless port of my laptop using C# code.. Pls help out Cheers!!
|
|
|
|
|
|
hello all...
i have logical trouble in my windows application
there is one eventHandler (Button1_click)
contains
two sqlcommands
the first sqlcommand insert into parent table (primary key table)
the second sqlcommand insert into references table
as expected the code generate sql exception because the referial constraint
the question is : how to solve this problem without adding new eventHandler and without modifying the tables relation?
best regards
|
|
|
|
|
You have to return the newly created ID's from the first insert and update your data before sending the second insert.
A better solution may be to parcel the whole data set up as xml, pass it into a stored procedure, then you can process the whole lot in one shot.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
The application shouldn't know or care about the details; all that should be handled in the Data Access Layer.
|
|
|
|