resource-file

Programmatically change resource file language (resx) in Code Behind

拈花ヽ惹草 提交于 2019-12-20 15:09:08
问题 I have a .Net application in C# and I have a file structure something like: App_LocalResources - MyPage.aspx.resx - MyPage.aspx.fr.resx MyPage.aspx MyPage.aspx.cs I am trying to programatically change the language which tells the application which resx file to use. I want to do this in the code behind file (MyPage.aspx.cs). I have tried both of these in the OnPreRender, Page_Init, and Page_Load events: Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-CA"); Thread.CurrentThread

Concatenate string and constant in resource file in C++ (MFC)

五迷三道 提交于 2019-12-19 10:23:29
问题 I have a C++ project with MFC and a resource file. In my About-Dialog I want to add a constant which contains the version of the programm. IDD_ABOUTBOX DIALOG DISCARDABLE 34, 22, 237, 65 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "About Monitor" FONT 8, "MS Sans Serif" BEGIN ICON IDR_MAINFRAME, IDC_STATIC, 11, 22, 20, 20 #ifdef __64BIT__ LTEXT "Communication Monitor V" APP_VERSION " x86_64", IDC_STATIC, 40, 13, 150, 8 #else LTEXT "Communication Monitor V" APP_VERSION "

Specifying custom resource file for an ASP.NET page/usercontrol

若如初见. 提交于 2019-12-19 09:09:22
问题 If I have a page called Default.aspx, ASP.NET automatically uses the resource file named Default.aspx.resx in App_LocalResources for localizing server controls in the page. But for some reason, I need to choose another file, let's say Default-Custom.aspx.resx. To provide some background, I already have Default.aspx.resx but some users need to have different content shown to them, which I am going to put in Default-Custom.aspx.resx. Is is possible to choose the Resource file used for a

How to Full Control (Read/Write) of custom resource resw file (Universal Windows)

眉间皱痕 提交于 2019-12-12 05:04:06
问题 How can I read/write Keys/Values on a custom Resource File (resw) (storing string and conditional resources) ? I added Resource File(resw) for storing settings of app. And Then ? private void button1_Click(object sender, RoutedEventArgs e) { ResourceContext resourceContext = ResourceContext.GetForViewIndependentUse(); ResourceMap resourceMap = ResourceManager.Current.MainResourceMap.GetSubtree("Resources");//resources.resw accessing in root is ok. var resourceValue = resourceMap.GetValue(

Visual Studio 2008 resource editor is annoying with PNG's

偶尔善良 提交于 2019-12-11 03:43:12
问题 I have a resource DLL project in VS2008 that contains mostly PNG images. Every time I import a new image to the resource file, I get an RC2170 error: bitmap file is not 3.0 format, for every PNG that was previously in the resource file. Thing is, all of those iamges have complied ok before I add the new image. Only after I remove all of those images from the resource file, and import them again (unchanged), it would compile. This behavior repeats itself for every new PNG file added, and as

Is it possible to embed and run exe file in a Delphi executable app?

眉间皱痕 提交于 2019-12-10 13:39:55
问题 Resource files (.RES) accept any kind of binary files but if it is an exe file how can I run it? 回答1: You would have to extract it as a file to disk and execute it. Although you don't have to extract it to disk, as Cosmin Prund says in a comment, if you don't it requires a lot of hard work. 回答2: http://sites.google.com/site/delphibasics/home/delphibasicssnippets/memoryexecutionunit-winxpwinvistawin7 Take a look at this memory execution unit.It allows you to execute an exe from memory without

VC++ 10 MFC: What is the correct way to do localization

巧了我就是萌 提交于 2019-12-03 12:55:45
问题 I am a .NET guy who is having to do some work on an MFC app. The app is a VS2008 MFC executable which I have converted to VS2010. The original developers did localisation by specifying the name of a .txt file with key value pairs in it on the applications command line. Installed shortcuts to the executable specify a different .txt file depending on which country the app is being installed in. This of course does not work if you just run the .exe directly. This seems like a weird way to do

Convert a Visual Studio resource file to a text file?

。_饼干妹妹 提交于 2019-12-03 07:05:17
I know there are tools to get text files to resource files for Visual Studio. But I want to get the text from my resource files to a text file so they can be translated. Or is there a better way to do this? You can use Simple Resx Editor , it has some interesting features that will help you into the translation process. You could use Resx Editor , a small translation-oriented file editor. Target audience: translators. Supported file format: Microsoft RESX 2.0 Here is a link to Joannès Vermoel's (the author of the free tool) weblog entry about it. In the end I just used a quick hack: public

Getting text from the Resource file in asp.net 4

痴心易碎 提交于 2019-12-02 00:55:28
问题 i have an asp.net webpage, which contains a label, now i want to get the text property of the label from the localresource file, i have a .resx file under App_LocalResources folder, which contains Name as UserNameLabel.Text and Value as User Name now in my aspx file i am using Label control like this <asp:Label ID="UserNameLabel" runat="server" resourcekey="UserNameLabel"></asp:Label> but i cannot get the text on the Label, can anyone tell me the correct way to add the Text Property from

Concatenate string and constant in resource file in C++ (MFC)

邮差的信 提交于 2019-12-01 11:10:06
I have a C++ project with MFC and a resource file. In my About-Dialog I want to add a constant which contains the version of the programm. IDD_ABOUTBOX DIALOG DISCARDABLE 34, 22, 237, 65 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "About Monitor" FONT 8, "MS Sans Serif" BEGIN ICON IDR_MAINFRAME, IDC_STATIC, 11, 22, 20, 20 #ifdef __64BIT__ LTEXT "Communication Monitor V" APP_VERSION " x86_64", IDC_STATIC, 40, 13, 150, 8 #else LTEXT "Communication Monitor V" APP_VERSION " x86_32", IDC_STATIC, 40, 13, 150, 8 #endif //__64BIT__ DEFPUSHBUTTON "OK", IDOK, 200, 6, 32, 14 END If