Edit Any .dll Files's Resource Like Bitmap?
Dec 30, 2009I want to edit any .dll files's Resource like bitmap, strings and replace it as resource hacker or peexplorer do.
View 4 RepliesI want to edit any .dll files's Resource like bitmap, strings and replace it as resource hacker or peexplorer do.
View 4 RepliesDim ResDllHandle As IntPtr = Kernel32Dll.LoadLibrary("C:WINDOWSsystem32shell32.dll")
Dim ResHandle As IntPtr = FindResource(ResDllHandle, "#130", New IntPtr(WinUserH.RT_BITMAP))
Dim ResSize As Integer = Kernel32Dll.SizeofResource(ResDllHandle, ResHandle)
Dim ResPtr As IntPtr = Kernel32Dll.LoadResource(ResDllHandle, ResHandle)
Dim ResByteData As Byte() = New Byte(ResSize - 1) {}
[Code]...
I want to extract 2 bitmaps from a file in vista called "winload.exe.mui" hw can i extract it
View 1 RepliesHow can i make it so when my application has been compiled, a user can press a button, and then save a file within the exe its self (thus, a resource). Or text in a text document (not a setting, because when the exe changes places on a user computer, it will loose its settings. The main need for this is so that the exe can change locations / computers, but still retain the origional data (or text) stored in it.
View 2 RepliesIs it posible to edit a string from my.resources in runtime?
View 2 RepliesSo i created resource file New --> new file --> Native Resource Template Then added icons with custom id, like "x", "u_100", .. so i understand, what the files (in my case icons) is.. And i saved as 32-bit resource file (*.res) So i have a question, how can i use these files inside of resource file in my apps? i know how to add icons in to my app.. Me.Icon = New Icon(C:/icon.ico)
View 6 RepliesI have a resource file for a program, and i have determined that the resource file just a big string of files glued together whole, i know that the movies contained in the file are quicktime mov. Where can i find information on the quicktime header? and how can i determine the length of a file once i find it?
View 1 RepliesThat i need to do is running file that i have put in the resource files (exe file)So the idea of this when i click the button the file that i have put run so it cant be happen with shell.
View 4 RepliesI am trying to take a png file (around 2000 x 2400) and split it into 8 smaller images of 500 x 1250 each (2 rows of 4), each of which is saved as a png file. I then which to display these smaller png files in a picture box so that they look as if they were one image.
My problem is that when I display the png files in the picture box, lines that look like grid lines show up in the picture box at the points where the png files sit next to each other.
When I view the smaller png files in Paint it appears as if the left column (x=0)and top row (y=0) of each file is set to clear (or transparent). What shows up in the picture box is the background colour of the picture box.
This clear/transparent row and column are not added on to size of the smaller png files. They are still 500 x 1250.Not every file is affected. If the smaller files are created from the original bitmap in the following order[code]...
when i add a few resource files and add them in go to debug i get this error
View 9 RepliesGenerating resource files
View 1 RepliesCan't we do localization with out Resource files ?
View 8 Replieshow do i open a .exe file from inside the resource by click a button which will open a .exe file in the resource folder, which will work on any pc. The .exe will be like a installer or something. so basicy Click the button it will launch the installer and this will with on any pc?How do i do this?
View 3 RepliesIf I have added an html file to my vb 2008 form app project - for use with the webbrowser control. What would be the correct syntax for navigatingto it from the webbrowser.navigateto method.
View 11 Repliespreviously i have coded: Me.PictureBox1.Image = Image.FromFile(Application.StartupPath + "\JPG LandoltC" + filePath + ".jpg") where filePath is the function to locate the name of the pictures but now i have to put everything into the .exe to make it more "sightly" so now i'm trying Me.PictureBox1.Image = My.Resources.filePath and its not working.
View 6 RepliesI have an application that uses resource files (.resx) to switch the application between languages.These resource files are compiled at development time to create the dll'sHowever, there are many times when an application gets deployed onsite, and there are spelling mistakes, or general mistakes in the translated text.
View 1 RepliesI want to create a patcher/installer type program. I have 3 files that need to be embedded or stored in a file. Two files need to be extracted when user clicks a button and one of those two files need to be run with a parameter when the button is clicked and last file needs to be extracted when program closes down. All 3 files need to be able to be updated in the program.
View 7 RepliesI have a VB project which has a list of forms, one of the Forms resx file doesn't contain information about controls and seems to be corrupted, now I want to regenerate the resource files again for the form, how can I do that?
View 3 RepliesI'm having an issue linking a lot of .resx file into a compiled assembly to be used in an asp.net web app. The error message I get is:
Could not find any resources appropriate for the specified culture or the neutral culture.
Make sure "Reports.My.Resources.ArgsRptAgeAtAdmission.resources" was correctly embedded or linked into assembly "Reports" at compile time, or that all the satellite assemblies required are loadable and fully signed.
My solution is set up as so:
Two .dll projects, both building a 'Reports.dll' at the same location (to be able to compile different sets of reports into the website).
One web app project
Each project is located in their own separate folders.
When I build my reports dll project, it saves the assembly in the site /bin folder. I then run the site, builds without errors. I get the exception when I try to load the report that uses the embedded resources. I find it odd, as in code I can access Reports.My.Resources.ArgsRptAgeAtAdmission just fine with Intellisense.
In the report code files, the exception is being thrown from the code
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Resources.ArgsRptAgeAtAdmission))
'Exception is thrown here _____ / _______
Me.textBox3.Text = resources.GetString("textBox3.Text")
The assembly is also being loaded in to the page through reflection, if that makes any difference.
What am I doing wrong in this scenario? I can retrieve the string value by directly calling Reports.My.Resources.ArgsRptAgeAtAdmission.textBox3_Text without error
i have been looking over the msdn article to translate an application over here http://msdn.microsoft.com/en-us/libr...(v=vs.80).aspx this makes sense to include resource files for each language, giving each resource the file naming convention e.g de-DE for german and letting the system pull the correct resource string through based on the regional system settings. I can see how this will work for strings such as message boxes the article states I need a resource file for each language. all variables will be the same accross all resources, I just need to store the translated string against the correct variable.
I have a question about designer contents I have several forms I've used the form designer to set the forms text and controls text.I can see that a form has a language property that you can set and translate the strings from the designer. my understanding is that a resource file will be generated per form per language changing the language property of the form.
my question is can the above msdn article be mixed with forms designer language method? if so, will this be too many resource files?What is the best practice for application translation?
I have written a simple app that allows our clients to access documents they might need throughout their time of doing business with us. They access these document via a button click event. First off I'd like to publish this program and install it onto a CD so that the end user does not have to install anything on their machine. They just simply pop the CD in and the program runs and they can click on whatever document they need. I'm having to trouble figuring out how to install it on a CD. I am also pretty sure i've done my mouse click events incorrectly because i have the exact path to the documents in my resources file.
i'm currently using the "System.dianogistics...process"(i'm not sure if thats the exact syntax and i forgot a couple of the words) function(i'm not sure if this is a function or not. i'm not super familar with VB). but when i use this method it requires the exact path for the file. which doesn't make sense if i want it on a CD which would change the location of the file for my C: to E:.
I have a question about creating a multi-language application and the use of resource files. I will explain what I have done and what I would like the final product to be like.I am doing this in VB.Net and using Visual Studio 2008 After creating a new project, I added a resource file to the project (Add -> New Item, Selected Resource File, named it Resource1.resx).
I then double clicked the resource file and was able to add some names and values. For example,
Name - lblFirstName, value - John
Name - lblLastName, value - Smith
On my form, I have 2 labels: FirstName, and LastName
In Code, I added
FirstName.Text = My.Resources.Resource1.lblFirstName
LastName.Text = My.Resources.Resource1.lblLastName
If I run this code, it works fine. John and Smith are displayed on the labels. Now for my question. Say instead of first and last name the labels (buttons, menu items, etc.) were actually words that would be different in different languages. What I would like is to have something like
EnglishText.resx
SpanishText.resx
GermanText.resx
Each resource file would contain the same names, just different values. Depending on what language was selected, decided by the user (from a menu), how can I get the matching resource file to be used.
Basically what I want would be FirstName.Text = My.Resources.<Language Specific Resource File>.lblFirstName
Is something like this possible? Is this an acceptable approach? Is there a better way of doing this? I try to check often to see if there are follow up questions or if more information needs to be provided.
Lets say I have a multi ligual application where I have 3 resources files for each form
1.Form4.fr.resx
2.Form4.fil.resx
3.Form4.resx
I have saved some strings in each file , can i read the resource from code where I can specify the file want. Lets say I want to read the .fr file only and when the user chooses another language I choose the other - I am saving not the controsl text, I am saving msgs.
I am working with .net resources using LINQ to XML. I want to edit some resources, so I coded this:
Public Shared Sub AddTranslation(ByVal filename As String, ByVal name As String, ByVal value As String)
Dim items = From translation In XElement.Load(filename).Elements("data") Where translation.Attribute("name").Value = name
[Code]....
This seems to work, and even when I debug VisualStudio says that the file changed, but actually it doesn't. I think the problem is in the Save() action, but I don't know other way to save it...
implmentation of using resource files for my UI, based of user preference.
Note: Ive never worked with resources files before for creating a multi-lingual app.
also this might be placed on the wrong forum board.
I'm not sure if I'm gonna feel like an idiot after posting this, but here goes . I have taken my first shot a writing a code generator. not too shabby for my first go round, but I already see some ways it can be vastly improved. Not there yet, however. One of the things this code generator does is pull text templates (MANY text templates! Over and OVER again!) from a project resource file. I have added them to the resource designer as linked text files.
Now, the way the generator is written, there can at times be a LOT of iteration (think writing property declarations for a Classs which represents a database entity, as well as the backing fields for those property declarations, etc.).
Is there any significant performance hit to repeatedly accessing a resource? I have looked around on msdn and this forum (and will continue to investigate), but I am hoping someone can give me some clarification.
I SUSPECT that use of a resource file means a trip to the Hard drive each time one accesses it . . . Right? It IS a FILE, linked by it's PATH, right? Due to it's having been designated as a project resource, id a resource file somehow "magially" made available in memory, so that the disk round trip is not necessary?
I suspect I should be retreiving popular resources into a persisted Class-level variable if I plan to use them often within a specific class scope, and at the method level if I plan to perform a significant number of iterations whihc require the resource within the method.
AM I on the right track, or is the resource retreival trivial? I am NOT concerned about milking maximum performance out of a generator tool; it is acceptable for this process to take a little time. However, I also don't want to be sloppy unecessarily.
As I'm working with some image files for my project, where should I store it ?I mean, they will be displayed frequently to the user. What I do currently is store in the app directory and when needed, I use:
vb.net
PictureBox1.Image=New Bitmap(Application.StartupPath & "ImageName.png"
For some background images, I used to set it at design time. That is, selecting the image needed using the Image property and never changes it at runtime.So, what will be best place to store it efficiently.
I've been searching in google for some time now and i've just found answers like "Resources are embedded in the exe so you can't retrieve the path" and other answers which are complicated and not even explained how to use the code. ~~However my problem is that i have a .txt resource file in my resources and i want to edit the content of the file so i triedIO.File.WriteAllText(My.Resources.MyTextFile, "some string")but that didn't work out since [My.Resources.MyTextFile] retrieves the content/value of the resource so what i want to do is edit the resource file simply, from within my application, not by going to My Project > Resources and from there, edit the file
View 1 RepliesI have an VB application in which all UI controls are displaying in english language, i wanted to convert them into Chinese language.I was able to create Chinese locale specific resource files which has file extension as zh-CHS using a tool,
View 2 RepliesAll right, here's my issue. I have a resource that is a text file. I'm trying to use a StreamWriter to edit it. I've done it in C# but can't find my example files.
View 3 Replies