473,322 Members | 1,188 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,322 software developers and data experts.

Default icon for window

UJ
Is there a way to change the default icon for a window to be the application
icon? It's just that if you create a new window you have to remember to go
in and set the icon where it would be nice if it defaulted to the
application icon.

TIA - Jeff.
Mar 27 '06 #1
1 1461
One way to do this is to declare a base class (: Form) which defines this
sort of thing; you then inherit your forms from this one, and presto.

Note that the base form need not be done in the designer, but it shouldn't
be abstract, and must have a default ctor, otherwise designer support for
derived forms starts falling over.

Variants are available, sunch as basing the icon on the type (presumably
cached in a static dictionary of Icons that is only populated in you Main()
method).

Marc

"UJ" <fr**@nowhere.com> wrote in message
news:OV*************@TK2MSFTNGP11.phx.gbl...
Is there a way to change the default icon for a window to be the
application icon? It's just that if you create a new window you have to
remember to go in and set the icon where it would be nice if it defaulted
to the application icon.

TIA - Jeff.

Mar 27 '06 #2

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

Similar topics

11
by: Grant Edwards | last post by:
I'm trying in vain to set the icon for the executable generated by py2exe. According to various sources there are two answers: 1) Do it on the command line: python setup.py py2exe --icon...
4
by: Tim Jarman | last post by:
Apologies in advance for the long post - I wanted to be sure I included all the relevant details. The answer is probably very, very simple. I am doing something stupid here, but I don't know what...
3
by: Diego F. | last post by:
Hi. Can you explain me how to change the default icon that Visual Studio sets to all applications? I mean Windows Forms apps. I want to change it for another icon, but I don't find any property...
4
by: utkarsh | last post by:
Hi, I want to develop a Window Service in C# that should be capable of sisplaying the a icon in the window tray. Based on some logic in service, icon should be changed to some other...
3
by: Brett | last post by:
How do I get the default VS.NET form icon back after changing icons? Thanks, Brett
2
by: Peter Stojkovic | last post by:
I have programmed a window with an icon. Now I want, that this window has NO Icon. But I can not remove the icon within VS.NET. I can only select an other ICON ! How can I remove the icon...
3
by: Nina | last post by:
Hi there, I assigned icon for a window's form using form's Icon property at design time. Now I want to change the icon. I tried to replace the old icon with the new icon using form's Icon...
1
by: quest | last post by:
I created windows application using C#. I tried to replace the default application icon by replacing the app.ico file in the project directory but the application still load the old icon. Can...
3
by: MarkS | last post by:
Is there any way to get rid of that ugly blown-up blue window icon that appears on all of my VB.net executables? I would rather just have the system's default application icon, like in C# and C++....
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
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...
1
isladogs
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...
0
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...
0
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
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...

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.