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 / Design Time / November 2004

Tip: Looking for answers? Try searching our database.

Reference & Resource, help needed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MikeY - 17 Nov 2004 00:17 GMT
Being a newbie with Reference/Resource is there a way of embedding the
.resource file within a folder of my application instead of having it in the
main project /executing assembly area. i.e. if I have a folder pertaining to
variables, I would like to have that "variables.resource" file within that
folder and be able to call it from there instead of calling it from the
executing assembly area. So far I am unable to figure out the complete
syntax of redirecting the Assembly.GetExecutingAssebly() which I believe is
where the syntax must take place. I am desinging a windows form application
and a sample of my code is as follows:

private void Upload_Data( )
{
   Assembly assembly = Assembly.GetExecutingAssembly( );

   rm = new ResourceManager("Coding_Corner.variables", assembly);
   this.pBoxReflection.Image = (Image)rm.GetObject("myPicture");
   this.rtxtBoxTitle.Text = rm.GetString("myTitle");
   this.rtxtBoxData.Text = rm.GetString("myData");
}

Any and all help is appreciated. Thank you all in advance.

MikeY
MikeY - 29 Nov 2004 17:49 GMT
I have found the solution. The syntax is as follows as if I was going to
hold my .resource in a folder call "new_folder".

rm = new ResourceManager("Coding_Corner.variables.new_folder", assembly);

Hope that helps anyone else that might have this problem.

> Being a newbie with Reference/Resource is there a way of embedding the
> .resource file within a folder of my application instead of having it in the
[quoted text clipped - 19 lines]
>
> MikeY

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.