judico
asked on
Changing an icon
I'd like to change the icon both of the application and of the individual forms (the small icon which appears at the upper left corner of the forms).
I was able to change the icon of the application by replacing the default app.ico with a custom made one. Unfortunately, this doesn't replace the small icons which appear on the upper left corner of the form. When I try to change the icon in the property sheet the following error appears upon compilation:
error C2039: 'GetObjectA' : is not a member of 'System::Resources::Resour ceManager'
To avoid the above error in changing these small icons I wrote the following code into the constructor:
System::Drawing::Icon *IC = new System::Drawing::Icon("app .ico");
this->Icon = IC;
Interestingly, this compiles well despite the following error appearing in the task list:
'The variable 'IC' is either undeclared or was never assigned.'
What is even worse, I can't get the compiled .exe file to work. How is this problem fixed?
I was able to change the icon of the application by replacing the default app.ico with a custom made one. Unfortunately, this doesn't replace the small icons which appear on the upper left corner of the form. When I try to change the icon in the property sheet the following error appears upon compilation:
error C2039: 'GetObjectA' : is not a member of 'System::Resources::Resour
To avoid the above error in changing these small icons I wrote the following code into the constructor:
System::Drawing::Icon *IC = new System::Drawing::Icon("app
this->Icon = IC;
Interestingly, this compiles well despite the following error appearing in the task list:
'The variable 'IC' is either undeclared or was never assigned.'
What is even worse, I can't get the compiled .exe file to work. How is this problem fixed?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
thanks judico good luck to you for the future, i am glad we helped you
pjcrooks2000
pjcrooks2000
ASKER
#undef GetObject
For more details please take a look at:
http://www.dotnet247.com/247reference/msgs/36/184054.aspx