如何控制在下拉列表中显示的屏幕保护程序的名字吗?屏幕保护程序、名字、列表中

2023-09-03 05:54:57 作者:恋上你的~唇

我有一个工作的屏幕保护程序,想弄清楚如何我可以控制屏幕保护程序的Windows显示名称下拉列表中。目前,这一切似乎是基于文件名,但我知道这不可能是这样的。下面是我试过,结果:

I have a working screensaver and would like to figure out how I can control the name Windows displays in the screensaver drop down list. Currently it all seems to be based on the filename but I know that can't be the case. Here's what I've tried and the results:

文件名: CC.Votd.scr 屏幕保护程序名称:抄送

Filename: CC.Votd.scr ScreenSaver Name: Cc

文件名: CC Votd.scr 屏幕保护程序名称:抄送VOTD

Filename: CC Votd.scr ScreenSaver Name: Cc Votd

我想有文件被命名为 CC.Votd.scr 并有屏幕保护程序名称显示为 CC.Votd (大写是重要的我,所以即使 CC VOTD 将是确定: - ))

I'd like to have the file be named CC.Votd.scr and have the screensaver name display as CC.Votd (capitalization is important to me so even CC Votd would be ok :-))

我是pretty的肯定,这是可能的,因为图片屏幕保护程序是 PhotoScreensaver.scr

I'm pretty sure this is possible because the Photos screensaver is PhotoScreensaver.scr

在此先感谢您的帮助。

推荐答案

这个讨论有答案了:

http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/35ea8aeb-e729-474c-b6d2-544fc3c48d8d

我想通了,我需要一个字符串表,我只是不知道如何   补充说,本土资源到我的组装。要添加此字符串表,我   有我的VS2003的解决方案转换为VS2005的解决方案,因为VS2003   不允许本地资源添加到您的项目。下面你会   找到你指着我的修改(由我)的副本。如何添加   好看的标题到你的屏幕保护程序(而其中,出现在   在显示属性的屏幕保护程序选项卡上的下拉列表)原创   资源:    http://forums.microsoft.com/MSDN/ShowPost.aspx ?PostID = 77460&放大器; SITEID = 1   修改步骤:   1.在Visual Studio中,选择文件 - >新建 - >文件   2.在常规节点下,选择本土资源模板,然后单击打开   3.在设计器窗口中,用鼠标右键单击该ResTempl1.rct节点,然后单击添加资源   4.在添加资源对话框中,选择字符串表,然后单击新建   5.修改第一条记录,因此具有以下值:ID:,值:1,标题:我的屏幕保护程序标题   6.选择文件 - >另存为,更改保存类型为32位的资源文件,并将文件保存到你会记得位置   7.在Solution Explorer中,用鼠标右键单击该项目节点,你想改变的产品版本,然后单击房源 -   8.在应用程序选项卡,检查资源文件,然后单击...   9.浏览到本地的资源文件,你在上面创建并单击确定   10.重建项目

I figured out I needed that String Table, I just didn't know how to add that native resource to my assembly. To add this String Table, I had to convert my VS2003 solution to a VS2005 solution, because VS2003 doesn't allow to add native resources to your project. Below you'll find a modified (by me) copy of what you pointed me to. How to add a nice looking title to your screen saver (The one that comes up in the dropdown list on the Screen Saver tab in Display Properties) original source: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=77460&SiteID=1 modified steps: 1. In Visual Studio, choose File -> New -> File 2. Under the General node, select Native Resource Template and click Open 3. In the Designer window, right-click the ResTempl1.rct node and click Add Resource 4. In the Add Resource dialog, select String Table and click New 5. Modify the first record so it has the following values: ID: , Value: 1, Caption: My Screen Saver Title 6. Choose File -> Save As, change Save as type to 32-bit Resource File and save the file to a location that you will remember 7. In Solution Explorer, right-click the Project node you want to change the Product Version of and click Properties 8. In the Application tab, check Resource File and click ... 9. Browse to the native resource file you created above and click OK 10. Rebuild your project

您现在大会应反映包含在资源的价值   文件。注意:如果你有在你的应用程序的图标,你现在得   手动添加这对本地资源文件。这是因为   项目属性,让您无论选择图标或资源   文件,而不是两个。所以一个图标添加到您的应用程序,将其添加到   刚刚创建本地资源文件,就像你添加字符串   表。

Your assembly should now reflect the values contained in the resource file. Note: If you had an Icon in your application, you'll now have to add this manually to the native resource file. This is because the Project Properties allow you to either choose "Icon" or "Resource File", not both. So to add an Icon to your application, add it to the just created native Resource File, just like you added the String Table.