http://msdn.microsoft.com/en-us/library/cc296381.aspx
http://karlshifflett.wordpress.com/2008/04/10/wpf-sample-series-wpf-mdi-task-switching/
http://blogs.msdn.com/b/llobo/archive/tags/wpf+samples/
http://blogs.msdn.com/b/llobo/archive/2008/02/26/drag-drop-library-updated.aspx
Showing posts with label WPF. Show all posts
Showing posts with label WPF. Show all posts
Friday, April 29, 2011
Friday, February 25, 2011
WPF : Restrict Multiple Instance
protected override void OnStartup(StartupEventArgs e){
// Get Reference to the current Process
Process thisProc = Process.GetCurrentProcess();
// Check how many total processes have the same name as the current one
if (Process.GetProcessesByName(thisProc.ProcessName).Length > 1)
{
// If ther is more than one, then it is already running.
MessageBox.Show("Another Instance is already running.");
Application.Current.Shutdown();
return;
}
base.OnStartup(e);
}
Wednesday, January 5, 2011
using System.Drawing;
using System.Reflection;
using System.IO;
//Decleration
Assembly _assembly;
Stream _imageStream;
//Option 1
Uri iconUri = new Uri("pack://application:,,,/favicon.ico", UriKind.RelativeOrAbsolute);
this.Icon = BitmapFrame.Create(iconUri);
//Option 2
_assembly = Assembly.GetExecutingAssembly();
_imageStream = _assembly.GetManifestResourceStream("EdwardsMbt.ClientApp.favicon.ico");
this.Icon = BitmapFrame.Create(_imageStream);
using System.Reflection;
using System.IO;
//Decleration
Assembly _assembly;
Stream _imageStream;
//Option 1
Uri iconUri = new Uri("pack://application:,,,/favicon.ico", UriKind.RelativeOrAbsolute);
this.Icon = BitmapFrame.Create(iconUri);
//Option 2
_assembly = Assembly.GetExecutingAssembly();
_imageStream = _assembly.GetManifestResourceStream("EdwardsMbt.ClientApp.favicon.ico");
this.Icon = BitmapFrame.Create(_imageStream);
Subscribe to:
Posts (Atom)