Welcome to MSDN Blogs Sign in | Join | Help

The v0.90 release of Windows API Code Pack for Microsoft .NET Framework is now live on Code Gallery.  

Features added in this release are

  •  DirectX – D3D10.1/10.0, D2D 1.0, DirectWrite and Windows Imaging Component
  • Taskbar – Tabbed Thumbnail and Thumbnail Toolbar
  • Power Management
  • Application Restart and Recovery
  • Command Link
  • System defined Shell icons
  • Network List Manager

Other enhancements done in this release are

  • A large number of bugs fixes in the previously released features
  • Refactoring of Shell Property system
  • Addition of many new and improved samples.
  • Addition of VB.NET samples for some features
  • Improved API Reference documentation and addition of some conceptual documents

For a full list of features supported in this release please visit the Code Gallery

And official release post on the Windows SDK blog is here

The Windows® API Code Pack for Microsoft® .NET Framework provides a source code library that can be used to access new Windows 7 features (and some related Windows Vista features) from managed code. These features are not available to developers today in the .NET Framework.
The features included in this version (v0.85) of the library are:

  • Support for Windows Shell namespace objects, including the new Windows 7 libraries, Known Folders and non file system containers.
  • Windows Vista and Windows 7 Task Dialogs.
  • Windows 7 Explorer Browser Control supporting both WPF and Windows Forms.
  • Support for Shell property system.
  • Helpers for Windows 7 Taskbar Jumplists, Icon Overlay and Progress bar.
  • Support for Windows Vista and Windows 7 common file dialogs, including custom file dialog controls.
  • Support for Direct3D 11.0 and DXGI 1.0/1.1 APIs.
  • Sensor Platform APIs
  • Extended Linguistic Services APIs

Find more information on MSDN Code Gallery Here

The Windows SDK for Windows 7 and .NET Framework 3.5 SP1: Release Candidate has been released in both ISO and Web Setup format.  Web setup allows you to install a specific subset of the SDK you select without having to download the entire SDK; whereas the DVD ISO setup allows you to download the entire SDK to install later. 

What’s New:

The following is a small sampling of what’s new or updated in this SDK.

  • Documentation – Approximately 80% of the SDK documentation set has been refreshed
  • Headers/Libraries – numerous new and updated – please see What’s New in the Windows API under the top-level Getting Started section in the documentation
  • Samples – Over 200 new and/or updated samples
  • Tools – Several new tools added
  • Visual Studio 2008 SP1 C++ command line compiler toolset and matching CRT
Learn more on Windows SDK Blog and Windows SDK MSDN Developer Center

Windows logo key keyboard shortcuts

The following table contains keyboard shortcuts that use the Windows logo key clip_image001.

Press this key

To do this

Windows logo key clip_image001[1]

Open or close the Start menu

Windows logo key clip_image001[2]+Pause

Display the System Properties dialog box

Windows logo key clip_image001[3]+D

Display the desktop

Windows logo key clip_image001[4]+M

Minimize all windows

Windows logo key clip_image001[5]+Shift+M

Restore minimized windows to the desktop

Windows logo key clip_image001[6]+E

Open Computer

Windows logo key clip_image001[7]+F

Search for a file or folder

Ctrl+Windows logo key clip_image001[8]+F

Search for computers (if you are on a network)

Windows logo key clip_image001[9]+L

Lock your computer or switch users

Windows logo key clip_image001[10]+R

Open the Run dialog box

Windows logo key clip_image001[11]+T

Cycle through programs on the taskbar

Windows logo key clip_image001[12]+Tab

Cycle through programs on the taskbar by using Windows Flip 3-D

Ctrl+Windows logo key clip_image001[13]+Tab

Use the arrow keys to cycle through programs on the taskbar by using Windows Flip 3-D

Ctrl+Windows logo key clip_image001[14]+B

Switch to the program that displayed a message in the notification area

Windows logo key clip_image001[15]+Spacebar

Preview the desktop

Windows logo key clip_image001[16]+G

Cycle through gadgets

Windows logo key clip_image001[17]+U

Open Ease of Access Center

Windows logo key clip_image001[18]+X

Open Windows Mobility Center

Windows logo key clip_image001[19]with any number key

Open the Quick Launch shortcut that is in the position that corresponds to the number. For example, Windows logo key clip_image001[20]+1 to launch the first shortcut in the Quick Launch menu.

For a More comprehensive list of all windows 7 keyboard shortcuts, Search windows help your help for Keyboard Shortcuts or refer to the post on CtrlF5 about Windows7 Keyboard shortcuts here.

This post at Ctrl+F5 includes 10 links from all over the web last week that are interesting for Developers, more biased towards web developers. Read more on Ctrl+F5 here.

Developers will not be able to uninstall Windows SDK for Windows Server 2008 without having Install Sources available

Web Setup:

  • Users who installed using Websetup, will be able to Uninstall if they have network connection available.
ISO Install:
  • Users who installed by exploding Windows SDK For Windows Server 2008 ISO, will have to explode again and point SDKSetup to the sources when asked for during uninstall.
  • Users who installed by mounting an ISO, will have to mount Windows SDK ISO again and point setup to the sources when asked during uninstall.
UNC Install:
  • Developers who installed from an UNC share, will be able to Uninstall if UNC share is still accessible. If the UNC share does not exist they have to either Download or Provide a new location for the Windows SDK sources and point setup to the sources when asked for during uninstall.

There are several other articles describing how to edit Silverlight 2.0 templates shipped with Expression encoder 2.0 SP1.  These are some MSDN article explaining this here and here.

I am assuming that you have already opened your Encoder media template in Visual Studio.

After opening the template in Visual Studio

1. Navigate to the MediaPlayer project and open MediaPlayer.cs to edit

Edit Silverlight Encoder Template 1

 

 

 

 

 

 

 

 

 

 

 

 

 

2. Edit below code in GoToPlaylistItem method as following

Edit Silverlight Encoder Template 2

change it to …

else if (playlistItemIndex >= Playlist.Count)
            {
                // Reached end -- flag that playback is paused.
                // Show Replay button

                ShowReplayButton();
            }
 
3. Add new Function ShowReplayButton
 
public void ShowReplayButton()
        {
            m_inPlayState = false;
            m_currentPlaylistIndex = 0;
            DisplayPoster(m_currentPlaylistIndex);
            if (m_mediaElement != null)
            {
                m_mediaElement.Stop();
                m_mediaElement.AutoPlay = false;

            }

            if (m_buttonStart != null)
            {
                m_buttonStart.Visibility = Visibility.Visible;

            }
        }

Note: I did not create Xaml button for replay, instead I am just going to pop the big Start Button the template shows in the middle. You should be able to create any Xaml control and show it

You should be good to go after building the project. Hope this helps

I noticed that my RSS feeds in IE are no longer updating after upgrading from Vista to Windows 7 beta.

Thanks for the very helpful blog entry “ Feeds not updating? ” by Walter vonKoch over the RSS team blog, I was able to fix the issue easily by running the following simple steps at the command prompt.

msfeedssync disable

msfeedssync enable

Of course, before doing these, I had to verify if there was an error in the feed sync by following the steps mentioned in the above linked blog post from RSS team.

And I found an error after running

schtasks /query | findstr /i "user_feed

Which returned..

ERROR: The task image is corrupt or has been tampered with.
ERROR: Task cannot be loaded: User_Feed_Synchronization-{…

 

Hope this helps.

For starters,

The Vista Bridge Sample Library contains source code for assemblies that provide managed code developers access to Windows Vista features that are not available in the .NET Framework. Some of the features included in the Vista Bridge Sample Library are - Vista style Task and File Dialogs, Common Open and Save dialogs, Application Recovery and Restart, Known Folders, Network Lists, Power Management, User Account Control, CommandLink control, Aero Wizard Control, System provided icons etc.

Vista Bridge 1.4 can be downloaded from Vista Bridge Sample Library 1.4.

Vista Bridge 1.4 has two new classes GlassWindow and GlassForm which enable users to write Aero aka Glass enabled WPF and Windows applications. GalssWindow class is for WPF applications and GlassForm is intended for windows applications. In windows applications inheriting from different base class instead of default System.Windows.Forms.From is straight forward. You can just do some thing like “public partial class Form1 :  GlassForm”  and it will just work fine. But it is not the same with WPF xaml windows. You cannot just inherit from a custom Window class, instead you have modify both the code behind and the xaml too.

He is an example of implementation of GalssWindow for WPF applications from VistaBridge

<src:GlassWindow x:Class="Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:src="clr-namespace:Microsoft.SDK.Samples.VistaBridge.Dialogs;assembly=VistaBridgeLibrary"
    Title="DWM Manager Demo App" Height="435" Width="506">
    <Grid>
        <Button Margin="12,193,160,181" Name="ActivateGlassButton" Click="ActivateGlassButton_Click">Activate Glass</Button>
        <Button Height="23" Margin="12,0,160,152" Name="ExtendFrameButton" VerticalAlignment="Bottom" Click="ExtendFrameButton_Click">Extend 
Frame Into Client Area</Button> </Grid> </src:GlassWindow>

and in the code behind window.xaml.cs…

    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : GlassWindow
    {
        public Window1()
        {
            InitializeComponent();
        }

        private void ActivateGlassButton_Click(object sender, RoutedEventArgs e)
        {

            // Set the background to transparent from the WPF perspective
            this.Background = Brushes.Transparent;

            this.IsGlassEnabled = true;

        }

        private void ExtendFrameButton_Click(object sender, RoutedEventArgs e)
        {
           this.FrameThickness = new Thickness(0, 45, 0, 0);
        }
               
    }

Here is the Sample implementation for Winforms application

You do not have to change anything in the .design file. Just in the code behind Form1.cs.

   public partial class Form1 : Form GlassForm
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.IsGlassEnabled = !this.IsGlassEnabled;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.FormThickness = new Padding(0, 45, 0, 0);
        }

     } 
and do not forget to include below libraries for both WPF and Winform applications. (You should add Vista Bridge Libraries and references to get these working)
using Microsoft.SDK.Samples.VistaBridge.Library; 
using Microsoft.SDK.Samples.VistaBridge.Dialogs;

Hope this helps.

I recentrly came across this cool installer for web applications. The Web Application Installer is designed to help get you up and running with the most widely used Web Applications freely available for your Windows Server.

more information @ http://www.microsoft.com/web/channel/products/WebApplicationInstaller.aspx

 

Five years in and counting, the battle still rages with no clear victor. However, according to a new survey, .NET appears to be widening its lead over Java EE.....

More info @ http://reddevnews.com/news/article.aspx?editorialsid=10250

 

I saw several questions in MSDN forums asking for how to develop a transparent TextBox or RichTextBox control that is not only ReadOnly but also transparent and does not display a “caret” icon when clicked on it. He is some sample code that can get you started..

public class TransparentTextBox : RichTextBox
    {
        public TransparentTextBox()
        {}

        protected override CreateParams CreateParams
        {
            get
            {
                CreateParams TransparentTextBoxParams = base.CreateParams;

//0x20 for transparent style TransparentTextBoxParams.ExStyle |= 0x20; return TransparentTextBoxParams; } } protected override void OnPaintBackground(PaintEventArgs pevent) { //We dont want to paint anything in the back ground. //base.OnPaintBackground(pevent); //Do nothing } protected override void WndProc(ref Message message) { // Supress the below events (To hide the blinking caret in the RichTextBox) // WM_NCLBUTTONDOWN WM_LBUTTONUP WM_LBUTTONDOWN // WM_LBUTTONDBLCLK WM_RBUTTONDOWN WM_RBUTTONUP WM_RBUTTONDBLCLK if (!(base.ReadOnly && (message.Msg == 0xa1 || message.Msg == 0x201 || message.Msg == 0x202 || message.Msg == 0x203 || message.Msg == 0x204 || message.Msg == 0x205 || message.Msg == 0x206))) base.WndProc(ref message); }
    }

 

Happy Coding!

Installing Windows Software Development Kit (SDK) for Windows Server 2008 and .NET Framework 3.5 to a custom location can potentially result in unreadable docs and may also cause some tools to fail. This is because, when the When the Windows SDK is installed to a custom location, the Microsoft Documentation Explorer and the ATL/MFC runtime are not installed by the Windows SDK. There will not issues if these components are already installed by other applications, such as Visual Studio or MSDN. If these items have not been installed previously, then documentation will not open and some tools, such as guidgen.exe, will not run

To workaround this issue:

  1. Navigate to <system drive>\Program Files\Microsoft SDKs\Windows\v6.1\Setup\sfx
  2. Double-click on dexplore.exe and vcredist.exe to install Microsoft Document Explorer and the ATL/MFC runtime.

More information in available in the Windows SDK online release notes at Release Notes.

We are working on next version of the Windows SDK. One of the features in discussion is a PowerShell based build environment for Windows SDK. We would like to know what do you think about this feature. Do you see yourself using this?

Any information related to how you use our build environment will be of great help for us in making this decision.

Thanks in advance for your feedback!

The Windows SDK for Windows Server 2008 includes a new SDK Configuration Tool that sets the Visual Studio include, library and tools directories for you. This tool allows you to switch quickly between the headers, libraries and tools in the installed Windows SDK(s) and those that are embedded in Visual Studio. If you install the Windows Server 2008 SDK before you install Visual Studio, you will need to use the SDK Configuration Tool to set the directories manually.

The SDK Configuration Tool has a GUI interface but it works only on the Visual Studio Retail (non-Express) SKUs. (This is scheduled be fixed in the next release.) You will use the SDK Configuration tool at the command line with VC++ Express.

1. Launch the Windows SDK Command Window (Start, All Programs, Microsoft Windows SDK v6.1, Command Window)

2. CD to Windows SDK install location (Example: C:\Program Files\Microsoft\Windows\v6.1\Setup>)

3. Type:  WindowsSdkVer.exe -version:v6.1

This command will set the Windows SDK for Windows Server 2008 (v 6.1) as the “current” SDK for Visual Studio to use for headers, libraries and tools. Use ‘-version:v6.1’ for the Windows Server 2008 SDK content. Use ‘-version:v6.0A’ for the Visual Studio 2008 content.

More Posts Next page »
 
Page view tracker