473,586 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form resource files

Hi there,

Given an arbitrary ".resx" file (not ."resources" ), does anybody know how I
can identify that this file actually contains a Windows form (in code). Once
identified, I then want to collect information about the form and all its
controls. Presumably I would want to read this file into a
"System.Windows .Forms.Form" class so I can obtain the necessary info. How
would I do this. Thanks.in advance.
Jun 2 '06 #1
2 2240
Dave Brown wrote:
Hi there,

Given an arbitrary ".resx" file (not ."resources" ), does anybody know how I
can identify that this file actually contains a Windows form (in code). Once
identified, I then want to collect information about the form and all its
controls. Presumably I would want to read this file into a
"System.Windows .Forms.Form" class so I can obtain the necessary info. How
would I do this. Thanks.in advance.


There is no form in the .resx file, and no source code either. It only
contains binary resources, such as images and image lists (or other
types of embedded multimedia streams). The form itself and its controls
are always in source code format in the .cpp (or .cs or .vb) file, named
similarly as the .resx but having a different extension. The resource is
just a supplement for those properties that can not be described in
source code.

Tom
Jun 2 '06 #2
> There is no form in the .resx file, and no source code either. It only
contains binary resources, such as images and image lists (or other types
of embedded multimedia streams). The form itself and its controls are
always in source code format in the .cpp (or .cs or .vb) file, named
similarly as the .resx but having a different extension. The resource is
just a supplement for those properties that can not be described in source
code.


Thanks for the reply. Well, let me clarify this a little (note BTW that I'm
a very experienced C++ (WinAPI) developer but am fairly new to .NET). As I'm
sure you know, the VS IDE automatically creates a ".resx" file for each form
created in the IDE (and one for each localized version if the form's
"Localizabl e" property is set to "True"). Now, if I pass this ".resx" file
to the native .NET utility "Winres.exe ", it can re-construct (display) the
form based on the "resx" file alone (no other project files need be
present). I need to do the same thing but here's the twist. I'll be
enumerating all ".resx" files in an arbitrary project so as I encounter each
".resx" file, I first need to determine if it is in fact a VS-generated
".resx" file (containing the form's resources). If so then I want to gather
information about the form in code (possibly displaying it) but I'm not sure
how to do this. "Winres.exe " can do it however ((hopefully relying on
documented techniques) but I still can't figure out how (after lots of
digging). Any suggestions? Thanks again.
Jun 2 '06 #3

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

Similar topics

1
5818
by: Gabriel Lozano-Morán | last post by:
First of all sorry for the cross-posting but I am not sure wether this belongs under internationalization or just general. Environment: Visual Studio .NET 2003 Problem: Newly added and renamed resource files are not automatically linked to the object they belong by the IDE
1
3993
by: Namratha Shah \(Nasha\) | last post by:
Hi All, This is a resource file generation tool which converts an xml based resource formats to .net resource file i.e. (.resources) and vice-versa. Today we will see how we will generate ==> .txt files from .resources or .resx files. ==> .resources files from text or .resx files.
13
1682
by: david | last post by:
I can not figure out what is the problem that I can protect ASP.NEt form resource but not some other type of files, for example, images. All my aspx forms located in Demo folder and image files located in a subfolder of Demo, named images. I implement Role based form authentication. When I access all aps forms, it works fine and ask me...
0
2004
by: Kleanthis | last post by:
I have a problem, when deploying multilingual applications using cab files on Compact Framework 2.0. It seems that something is going wrong with compact framework 2.0 Below I have a description of the problem The main Smart Device Application contains 3 resource files under the Properties folder, in order to produce localization satellite...
0
255
by: Dave Brown | last post by:
Hi there. I apolgize for posting this again (from June 2nd) but I've been researching for many days now with no success. I have an app that will be reading arbitrary ".resx" or "resources" files passed on the command line for instance. Given only a resource file IOW, does anyone know: 1) How the app can determine if the passed resource file...
10
2220
by: Jake Forson | last post by:
Hi there, I'd like to re-create a form given only its resource file. I was going to simply read the resource file and re-create the "Form" object and all its controls as found in this file (applying all properties in the file and relying on the default properties for those not found). After looking at "InitializeComponent()" however (which...
7
2099
by: craig | last post by:
....quick question for anyone who might have some experience with .net resource files in VS 2003. I have an application that is not localized, but I would still like to be able to place all of the images that are used for icons across all of the forms in all of the assemblies in a single resource file so that swaping out an image in the...
8
2308
by: TomC | last post by:
I want to bypass the Windows Form Designer in VS, to create a form programmatically. The elements of the form are to be arranged in a table, and I want the size of the table (and therefore the number of elements) to be determined at runtime, so dragging and dropping on the Form Designer won't cut the mustard. I'm coming from a Java...
12
5252
by: TS | last post by:
i have a need to possibly enable mutli language support. What benefit do i get by using a resource file instead of a custom xml solution? thanks!
0
8202
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3837
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3865
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1449
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.