Click here to Skip to main content
15,921,156 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
this is my code I found on the web

C#
private void Window_Loaded(object sender, RoutedEventArgs e)
        {

IntPtr hwnd = new WindowInteropHelper(this).Handle;

    //Set backgroung to black
    HwndSource source = HwndSource.FromHwnd(hwnd);
    source.CompositionTarget.BackgroundColor = Color.FromArgb(0, 0, 0, 0);

    //Set glass
    VistaControls.DWM.DWMManager.EnableGlassSheet(hwnd);

        }


the problem with this code is
C#
//Set glass
    VistaControls.DWM.DWMManager.EnableGlassSheet(hwnd);


I get this error
Error 1 The name 'VistaControls' does not exist in the current context Z:\areo\areo\MainWindow.xaml.cs 38 2 areo

And I was wondering if I missed something, the form is meant to look like glass areo
Posted

1 solution

Check you page or Assembly Reference in your project. There some thing is missing or Check the Name of page correctly.
 
Share this answer
 
Comments
[no name] 19-Jun-12 1:51am    
this is the site i got it off

http://windowsformsaero.codeplex.com/wikipage?title=Glass%20on%20WPF

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900