I have setup file of winform. but i want to change my icon how to change please help me
Assuming you are using VS to make the setup file.
In the winforms application [ not the setup project ]
Right click and choose Properties of the Project.
In the section Application, under Resources you can choose the icon for the project. It should be a .ico file.
Related
I am having an issue with Blend for Visual Studio 2019 version 16.11.3. When I create a .Net Framework project I can access the Resource Window via the "View" toolbar at the top.
However I seem to be unable to access the same window when the project is using .Net Core.
I am having trouble figuring out where and why the Resources window might be hidden? I want this functionality to make it easier to apply styles using the interface and just drag&dropping styles vs writing them out in xaml.
You could follow the steps below to display the Resources Window menu.
Click Customize... under the Tools menu.
Click Commands and select Menu bar as View.
Click Add Command... ->Select View and Resources Window on the Add Command page and click OK.
Click Close on the Customize page.
Then you could see the Resources Window under the View menu.
I have folder of images, which I want to load into my WinForms (C#) application. Once it is loaded into my application, then when I click on any image that should become "Button" control backgroundImage. What is the best way to do this?
Thanks is advance.
I am using a customized alert message for my whole application which generates from a .js file and a .css file. I have also used silverlight in my application and shows MessageBox from silverlight with its default design. Now i want to customized that MessageBox in silverlight.
So, can anyone plz help me to know how to add js and css file to silverLight application and how to use it
You can't change the built-in MessageBox style as easily as simply creating your own modal window. There are lots of custom messageboxes about and many have source code.
e.g.
Creating a reusable MessageBox dialog.
Silverlight Modal Dialog With Custom User Controls
Custom MessageBox Control for Silverlight 3
Note: these are all Silverlight solutions, so you are authoring in XAML and with style, not using JS and CSS.
It is also possible to call JS functions on the page from within Silverlight if you think that will be easier for your solution.
I need to create a "please wait" window at the start up of my application, start animation and at the lifetime of app change visibility. I don`t want create explicitly new thread (Maybe ThreadPool or BackgroundWorker).
Any ideas?
WPF has a very nice splash screen class exactly for that: http://www.codeproject.com/Articles/36418/WPF-Splash-Screen.aspx
Here is the quick steps:
Add the image file to the WPF Application project. For more information, see How to: Add Existing Items to a Project.
In Solution Explorer, select the image.
Add the image file to the WPF Application project. For more information, see How to: Add Existing Items to a Project.
In the Properties window, click the drop-down arrow for the Build Action property.
Select SplashScreen from the drop-down list
(source here: WPF SplashScreen implementing)
It is possible to set one Icon so, that it would be used on every window in current app. So that i set it once (not on every window by hand)..?
A good reference on the subject is here MSDN. States that you have an Icon for the Application (Desktop Icon), and one for each Window.
A WPF window always displays an icon. When one is not provided by setting Icon, WPF chooses an icon to display based on the following rules:
Use the assembly icon, if specified.
If the assembly icon is not specified, use the default Microsoft Windows icon.
Community Content Reference:
"A liitle tip : if you set the application icon and expect to see it on the window - it wont show up if running in debug from VS. Running externally or without attaching (ctrl + f5) the icon displays as expected."
Set the icon in the project properties on the "Application" tab in the "Resources" section. This icon will be the default icon for all windows in the application.
Under VS2010 open the Properties for the main application executable and open the Application tab. Set the icon under 'Icon and Manifest' in the Resources section.
To see the icon while debugging under VS2010 you need to open the Debug tab and uncheck the option for 'Enable the Visual Studio hosting process', otherwise you will only see the default icon on most windows.
I assume that the icon loading code is getting confused by the hosting process and is looking in "someapplication.vshost.exe" instead of "someapplication.exe" for the icons.
This looks like it's fixed in VS2013.
The reason that "Enable the Visual Studio hosting process" makes the icon not work is that it is started using the vshost.exe, and thereby the manifest is not read properly.
The same goes if you have other stuff in the manifest, like regfree ocx controls etc that requires the manifest to load.
You can also try this to set your own icon:
private void Page_Loaded_1(object sender, RoutedEventArgs e)
{
Uri iconUri = new Uri(#"C:\Apps\R&D\WPFNavigation\WPFNavigation\Images\airport.ico", UriKind.RelativeOrAbsolute);
(this.Parent as Window).Icon = BitmapFrame.Create(iconUri);
}