Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / December 2004

Tip: Looking for answers? Try searching our database.

embedded resource

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pascal Cloup - 30 Dec 2004 11:44 GMT
Hi,

How to to create an object (like Cursor) from a .Cur file embedded in a dll
of C# classes?

Thanks in advance,

Pascal
Herfried K. Wagner [MVP] - 30 Dec 2004 13:24 GMT
"Pascal Cloup" <pascal-cloup@biogesta.fr> schrieb:
> How to to create an object (like Cursor) from a .Cur file embedded in a
> dll of C# classes?

The following sample will show you how to do that for an icon, but it will
work very similar for cursors:

<URL:http://groups.google.de/groups?selm=OIoCi89qEHA.3988%40tk2msftngp13.phx.gbl>

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/

Pascal Cloup - 30 Dec 2004 18:13 GMT
Thnak you Herfried for your help.

to resolve my problem, i use the something like this in my code:

public class    myDllClass
{

public Cursor    GetCursor1()
{
...
aCursor = new Cursor(
Assembly.GetAssembly(this.GetType()).GetManifestResourceStream(
"EmbeddedRsrc.Photo1.Cur" ) );
...
return( aCursor);
}

}

where EmbeddedRsrc is the namespace defined in the dll and Photo1.Cur is the
name of the cursor file added in the dll project with the property eembedded
resource.

I wish you to all an happy new year

Pascal

> "Pascal Cloup" <pascal-cloup@biogesta.fr> schrieb:
>> How to to create an object (like Cursor) from a .Cur file embedded in a
[quoted text clipped - 4 lines]
>
> <URL:http://groups.google.de/groups?selm=OIoCi89qEHA.3988%40tk2msftngp13.phx.gbl>
Herfried K. Wagner [MVP] - 30 Dec 2004 18:41 GMT
Hi Pascal, *.*,

"Pascal Cloup" <pascal-cloup@biogesta.fr> schrieb;
> I wish you to all an happy new year

I wish you and all the others reading this group a Happy New Year too!

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.