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

trying to insert my own icon into a Windows Forms application

AK
I have a Windows Forms.NET project & am modifying the GUI in Form1.h[Design] .
I click the Form, go to Properties, click the Icon Property, & change it to
the .ico file I want. It accepts the change & shows me a thumbnail of the
image in the Properties tab, but when I compile I get a "C2039: 'GetObjectA'
is not a member of System::Resources:ResourceManager".

I've tried to manipulate ResourceView so it will accept my image, but to no
avail (I'm really not sure if I'm doing the right thing).
Perhaps there's a setting in the project Properties that needs to be changed ?
Can anybody tell me how to setup a user-drawn bitmap as the icon to an
application ?

Thanks,

ak
Nov 17 '05 #1
4 1704
http://support.microsoft.com/default.aspx/kb/888267

"AK" <AK@discussions.microsoft.com> wrote in message
news:65**********************************@microsof t.com...
I have a Windows Forms.NET project & am modifying the GUI in
Form1.h[Design] .
I click the Form, go to Properties, click the Icon Property, & change it
to
the .ico file I want. It accepts the change & shows me a thumbnail of the
image in the Properties tab, but when I compile I get a "C2039:
'GetObjectA'
is not a member of System::Resources:ResourceManager".

I've tried to manipulate ResourceView so it will accept my image, but to
no
avail (I'm really not sure if I'm doing the right thing).
Perhaps there's a setting in the project Properties that needs to be
changed ?
Can anybody tell me how to setup a user-drawn bitmap as the icon to an
application ?

Thanks,

ak

Nov 17 '05 #2
AK
James, thanks for the lnik - the problem compiles but now I get an unhandled
exception :
MCppCodeDomParser Error: Line: 113, Column: 1 --- Unexpected token
for a 'term'

& the Form1 [Design] can no longer be opened - what's going on ?

ak

"James Park" wrote:
http://support.microsoft.com/default.aspx/kb/888267

"AK" <AK@discussions.microsoft.com> wrote in message
news:65**********************************@microsof t.com...
I have a Windows Forms.NET project & am modifying the GUI in
Form1.h[Design] .
I click the Form, go to Properties, click the Icon Property, & change it
to
the .ico file I want. It accepts the change & shows me a thumbnail of the
image in the Properties tab, but when I compile I get a "C2039:
'GetObjectA'
is not a member of System::Resources:ResourceManager".

I've tried to manipulate ResourceView so it will accept my image, but to
no
avail (I'm really not sure if I'm doing the right thing).
Perhaps there's a setting in the project Properties that needs to be
changed ?
Can anybody tell me how to setup a user-drawn bitmap as the icon to an
application ?

Thanks,

ak


Nov 17 '05 #3
If you are doing:

void InitializeComponent(void)
{
#ifdef GetObject
#pragma message("Undefine the GetObject function for your managed code.")
#pragma push_macro("GetObject")
#undef GetObject
#endif
....
#ifndef GetObject
#pragma message( "Redefine the GetObject function to the unmanaged code
definition.")
#pragma pop_macro("GetObject")
#endif
}

try:

#ifdef GetObject
#pragma message("Undefine the GetObject function for your managed code.")
#pragma push_macro("GetObject")
#undef GetObject
#endif
void InitializeComponent(void)
{
...
}
#ifndef GetObject
#pragma message( "Redefine the GetObject function to the unmanaged code
definition.")
#pragma pop_macro("GetObject")
#endif

"AK" <AK@discussions.microsoft.com> wrote in message
news:0F**********************************@microsof t.com...
James, thanks for the lnik - the problem compiles but now I get an
unhandled
exception :
MCppCodeDomParser Error: Line: 113, Column: 1 --- Unexpected token
for a 'term'

& the Form1 [Design] can no longer be opened - what's going on ?

ak

"James Park" wrote:
http://support.microsoft.com/default.aspx/kb/888267

"AK" <AK@discussions.microsoft.com> wrote in message
news:65**********************************@microsof t.com...
>I have a Windows Forms.NET project & am modifying the GUI in
>Form1.h[Design] .
> I click the Form, go to Properties, click the Icon Property, & change
> it
> to
> the .ico file I want. It accepts the change & shows me a thumbnail of
> the
> image in the Properties tab, but when I compile I get a "C2039:
> 'GetObjectA'
> is not a member of System::Resources:ResourceManager".
>
> I've tried to manipulate ResourceView so it will accept my image, but
> to
> no
> avail (I'm really not sure if I'm doing the right thing).
> Perhaps there's a setting in the project Properties that needs to be
> changed ?
> Can anybody tell me how to setup a user-drawn bitmap as the icon to an
> application ?
>
> Thanks,
>
> ak


Nov 17 '05 #4
AK
Thanks for the help - the program runs OK now, but the icon is the default one.
It doesn't seem to use my icon defined in Resource View as IDI_ICON1
& filename app.ico .

ak

"James Park" wrote:
If you are doing:

void InitializeComponent(void)
{
#ifdef GetObject
#pragma message("Undefine the GetObject function for your managed code.")
#pragma push_macro("GetObject")
#undef GetObject
#endif
....
#ifndef GetObject
#pragma message( "Redefine the GetObject function to the unmanaged code
definition.")
#pragma pop_macro("GetObject")
#endif
}

try:

#ifdef GetObject
#pragma message("Undefine the GetObject function for your managed code.")
#pragma push_macro("GetObject")
#undef GetObject
#endif
void InitializeComponent(void)
{
...
}
#ifndef GetObject
#pragma message( "Redefine the GetObject function to the unmanaged code
definition.")
#pragma pop_macro("GetObject")
#endif

"AK" <AK@discussions.microsoft.com> wrote in message
news:0F**********************************@microsof t.com...
James, thanks for the lnik - the problem compiles but now I get an
unhandled
exception :
MCppCodeDomParser Error: Line: 113, Column: 1 --- Unexpected token
for a 'term'

& the Form1 [Design] can no longer be opened - what's going on ?

ak

"James Park" wrote:
http://support.microsoft.com/default.aspx/kb/888267

"AK" <AK@discussions.microsoft.com> wrote in message
news:65**********************************@microsof t.com...
>I have a Windows Forms.NET project & am modifying the GUI in
>Form1.h[Design] .
> I click the Form, go to Properties, click the Icon Property, & change
> it
> to
> the .ico file I want. It accepts the change & shows me a thumbnail of
> the
> image in the Properties tab, but when I compile I get a "C2039:
> 'GetObjectA'
> is not a member of System::Resources:ResourceManager".
>
> I've tried to manipulate ResourceView so it will accept my image, but
> to
> no
> avail (I'm really not sure if I'm doing the right thing).
> Perhaps there's a setting in the project Properties that needs to be
> changed ?
> Can anybody tell me how to setup a user-drawn bitmap as the icon to an
> application ?
>
> Thanks,
>
> ak


Nov 17 '05 #5

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

Similar topics

5
by: Matthew Fitzpatrick | last post by:
when multiple similar forms are opened up, windows xp can group them into an application group button on the start bar. Unfortunately, this application group uses the icon of the application's...
7
by: Lalit | last post by:
Hi Friends, I have developed a Windows service. Now i need icon for this service in systray and context menu fo this icon. Can i do this? With regards, Lalit
10
by: Zeljko | last post by:
Hi, I have a form with a tray icon. However, when I minimize the form, it stays visible - not in the task bar (I have showintaskbar property set to false), but in a form of a rectangle sitting...
1
by: Abareblue | last post by:
I have no clue on how to insert a record into access. here is the whole thing using System; using System.Drawing; using System.Collections; using System.ComponentModel;
1
by: Brahm | last post by:
Hello, I have an application with a main class subclassing the System.Windows.Form and i changed the Icon setting for the application to point to a different icon file. Now, when my application...
7
by: Dica | last post by:
i've used the sample code from msdn to create an encyption/decryption assembly as found here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT10.asp i'm...
8
by: Dinesh Jain | last post by:
Hi al,, I have written a code which displays directory listing of files from FTP server directory.I display all the files in a listview with its associated icons. To display icons, I get the...
2
by: Randall Powell | last post by:
I am in the process of developing a Windows Service which will: (1) monitor multiple network shares; (2) marshal text file transfers into an SQL Server 2000 instance; and (3) provide messaging...
4
by: randy1200 | last post by:
I have a Windows application that previously had the company logo "MyCompany.ico" added to the upper left-most corner. The company has since issued a new version of "MyCompany.ico" that looks...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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...
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.