2Questions: Application icon and username
-
Hi, all: I am writing WinForm App in C# and I have following two questions: 1. I modified App.ico in the project. when I rebuild the project, the icon in the Windows Explorer and shortcut changed to what I made. However the icon on the top right of the application titlebar did not change when I run my app. How can I add my own icon replace the default icon on the titlebar of the main window? 2. What is the easiest way to get current username? Thanks in advance. Dion
-
Hi, all: I am writing WinForm App in C# and I have following two questions: 1. I modified App.ico in the project. when I rebuild the project, the icon in the Windows Explorer and shortcut changed to what I made. However the icon on the top right of the application titlebar did not change when I run my app. How can I add my own icon replace the default icon on the titlebar of the main window? 2. What is the easiest way to get current username? Thanks in advance. Dion
1. There should be an Icon property for your form that you can access in the Designer view. Use that to find whatever icon you want displayed in the title bar for that particular form. I think you have to do this for each form you want the icon displayed in (unless anyone knows a better way). 2. Use
System.Environment.UserName
property to find the current user name. Hope that helps. Daniel E. Blanchard -
1. There should be an Icon property for your form that you can access in the Designer view. Use that to find whatever icon you want displayed in the title bar for that particular form. I think you have to do this for each form you want the icon displayed in (unless anyone knows a better way). 2. Use
System.Environment.UserName
property to find the current user name. Hope that helps. Daniel E. Blanchard