Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How can I find resource values like Cut/Copy/Paste names in Win?

How can I find resource values like Cut/Copy/Paste names in Win?

Scheduled Pinned Locked Moved C#
questioncsharptutoriallearning
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    A Wegierski
    wrote on last edited by
    #1

    I want to get international names of menu items on mouse right click. How to get them using standard .net classes without using Win functions? Hi, AW

    H 1 Reply Last reply
    0
    • A A Wegierski

      I want to get international names of menu items on mouse right click. How to get them using standard .net classes without using Win functions? Hi, AW

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      ResX files. Read about localization in the .NET Framework and see the ResourceManager class documentation for details and examples. Basically, you use ResX files to store localized strings for your application. For properly named ResX files (like ClassName.de.resx for culture-neutral German language), a satellite assembly is created that the CLR loads when the Thread.CurrentUICulture is set to something other than the neutral resources language (the language of the resource in your source code, see also the NeutralResourcesLanguageAttribute for more information and use this to increase assembly resolution performance). You'll have to put all the values for Cut, Copy, Paste, and anything else in the ResX files. I recommend using a Singleton pattern for the ResourceManager like Microsoft does so that you can 1) eliminate wasted memory resources by having a single instance of a ResourceManager, and 2) easily share localized resources amongst many classes. If you use a disassembler or decompiler to look at Microsoft's BCL assemblies, you'll notice this in their SR classes (usually one per assembly). This won't get them from Windows, but there really isn't a way to do that. Windows MUI usually stores localized resources per application or library. This way with .NET is pretty much the same thing (specially named libraries or similarly named libraries in specially name directories is common).

      -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

      A 1 Reply Last reply
      0
      • H Heath Stewart

        ResX files. Read about localization in the .NET Framework and see the ResourceManager class documentation for details and examples. Basically, you use ResX files to store localized strings for your application. For properly named ResX files (like ClassName.de.resx for culture-neutral German language), a satellite assembly is created that the CLR loads when the Thread.CurrentUICulture is set to something other than the neutral resources language (the language of the resource in your source code, see also the NeutralResourcesLanguageAttribute for more information and use this to increase assembly resolution performance). You'll have to put all the values for Cut, Copy, Paste, and anything else in the ResX files. I recommend using a Singleton pattern for the ResourceManager like Microsoft does so that you can 1) eliminate wasted memory resources by having a single instance of a ResourceManager, and 2) easily share localized resources amongst many classes. If you use a disassembler or decompiler to look at Microsoft's BCL assemblies, you'll notice this in their SR classes (usually one per assembly). This won't get them from Windows, but there really isn't a way to do that. Windows MUI usually stores localized resources per application or library. This way with .NET is pretty much the same thing (specially named libraries or similarly named libraries in specially name directories is common).

        -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

        A Offline
        A Offline
        A Wegierski
        wrote on last edited by
        #3

        I thought I can get option names from standard context menu for right mouse click. Thx. Hi, AW

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups