Archive for the ‘Quick Tipp’ Category

Increase the Speed of your Visual Studio 2010 working on XAML

Sonntag, Juni 12th, 2011

If you are working with Blend as your Design tool you should disable the XAML rendering in Visual Studio.

How should you do this:

Open a WPF project in Visual studio

  1. Right click a XAML File
  2. Click on “open with…”
  3. Set the “Source Code (Text) Editor” as Default program
Open with screen

Open with screen

Be Happy because the waste of time looking to your Visual Studio because it’s rendering the view is over.

 

Share and Enjoy:
  • Print
  • Facebook
  • Twitter
  • Google Bookmarks
  • Live
  • PDF

C# Autostart

Montag, August 30th, 2010

 
 

  1. Prüfen ob eine Anwendung im Autostart eingetragen ist

    public static bool RunOnStartupCurrentUser( string applicationName )
         {
             RegistryKey regkey = Registry.CurrentUser.OpenSubKey
                 ( “SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run”true );
             if ( regkey.GetValue(applicationName) == null )
                 {
                 return false;
                 }
             else
                 {
                 return true;
                 }
         }

 
 

  1. Anwendung in der registry eintragen

    public static void AddCurrentUser(string executablePath, string applicationName)
        {
           RegistryKey regkey = Registry.CurrentUser.OpenSubKey
                ( “SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run”true );
            regkey.SetValue( applicationName, executablePath );
        }

     
     

  2. Anwendung aus der Registry löschen

    public static void RemoveCurrentUser(string applicationName)
        {
        RegistryKey regkey = Registry.CurrentUser.OpenSubKey
            ( “SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run”true );
        regkey.DeleteValue(applicationName,true);
        }

 
 

Mit msconfig.exe last sich dann auch noch recht einfach prüfen ob

die Werte wirklich eingetragen wurden.

Mehr gibt es nicht zu tun.

Share and Enjoy:
  • Print
  • Facebook
  • Twitter
  • Google Bookmarks
  • Live
  • PDF

Windows 7 vom USB Stick

Donnerstag, Mai 6th, 2010

Benötigt werden:
- Ein Image von Windows 7 als ISO File
- Windows 7 USB/DVD Download Tool von Codeplex
- Einen 4 GB USB Stick

1. Windows 7 USB/DVD Download Tool installieren

2. Sicherstellen das keine wichtigen Daten auf dem Stick sind

3. Windows 7 USB/DVD Download Tool starten (ich wollte erst Screenshots anhängen aber es ist so einfach das ich dem web die Bilder erspare ;))

4. Am PC/Notebook beim booten zum Bootmanager wechseln (HP = “F9″ ASUS = “F8″ ….) und vom USB-Stick booten

Bei mir hat die ganze Installation 8 Minuten gedauert, das heißt für mich nie wieder von DVD installieren!

Share and Enjoy:
  • Print
  • Facebook
  • Twitter
  • Google Bookmarks
  • Live
  • PDF

Form auf Tray Icon Minimieren

Montag, März 8th, 2010

Wir benötigen 3 Events.

Eins beim “resize” des Fensters:


private void frmMain_Resize(object sender, EventArgs e)
{
if (FormWindowState.Minimized == WindowState)
                Hide();
}

Eins beim “DoubleClick” auf das Icon:


private void notifyIcon_DoubleClick(object sender, EventArgs e)
{
if (FormWindowState.Minimized == WindowState)
{
                Show();
                WindowState = FormWindowState.Normal;
}
else
{
                Hide();
                WindowState = FormWindowState.Minimized;
}
}

Und zum schluss noch ein Event beim schliesen des Forms:
(Das muss nicht sein, aber es ist schöner wenn das Icon gleich aus dem tray verschwindet)


private void frmMain_FormClosing(object sender, FormClosingEventArgs e)
{
            notifyIcon.Visible = false;
}

Share and Enjoy:
  • Print
  • Facebook
  • Twitter
  • Google Bookmarks
  • Live
  • PDF

IE8 Kompatibilitätsmodus ausschallten

Mittwoch, März 3rd, 2010

Wenn man nicht explizit im Meta Tag der HTML Seite angibt,
das man den Kompatibilitätsmodus nicht haben will,
wird es vom IE8 möglich gemacht diesen Modus zu benutzen.

Das wollen wir ja aber gerade nicht!

Warum sollten wir eine Seite die bewusst nicht auf den IE6 abgestimmt ist,
in einem aktuellem Browser mit alter Technik anzeigen?

Ausgeschaltet ist dieser Modus schnell mit folgendem HTML meta Tag:

 meta http-equiv="X-UA-Compatible" content="IE=8"/

siehe auch MSDN Beitrag

Share and Enjoy:
  • Print
  • Facebook
  • Twitter
  • Google Bookmarks
  • Live
  • PDF