Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
V

Viswa Teja

@Viswa Teja
About
Posts
3
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Small help
    V Viswa Teja

    Can we get an sql server on internet. Means i want to create a database my system doesnt support sql. So are there any server thats i can create and use it online through internet.

    MySQL database sql-server sysadmin help

  • Glass Effect using dwmapi.dll in windows xp on C#
    V Viswa Teja

    Hii i am writing a code to make the glass effect on windows form. Well the code works fine on vista but my target is on windows xp. I have copyed all the dll's that are reqired and when i debug i am getting an error "DLL NOT FOUND EXCEPTION UNHANDILED". Here is the code that i am using:- ----------------------------------------------------------------------------------------------------------------------------- This is the class where i import dwmapi dll. using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; namespace welcome_page { class VistaGlassEffect { internal class VistaApi { [DllImport("dwmapi.dll")] internal static extern void DwmExtendFrameIntoClientArea(System.IntPtr hWnd, ref Margins pMargins); [DllImport("dwmapi.dll")] internal static extern void DwmIsCompositionEnabled(ref bool isEnabled); internal struct Margins { public int Left, Right, Top, Bottom; } // consts for wndproc internal const int WM_NCHITTEST = 0x84; internal const int HTCLIENT = 1; internal const int HTCAPTION = 2; } } } ----------------------------------------------------------------------------------------------------------------------------- This the form where i call this class "VistaGlassEffect" using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Microsoft.DirectX.AudioVideoPlayback; using System.Diagnostics; using System.Drawing.Drawing2D; namespace welcome_page { public partial class Form2 : Form { public Form2() { InitializeComponent(); this.FitGlass(); } Video video; private welcome_page.VistaGlassEffect.VistaApi.Margins marg; private Rectangle topRect = Rectangle.Empty; private Rectangle botRect = Rectangle.Empty; private Rectangle lefRect = Rectangle.Empty; private Rectangle rigRect = Rectangle.Empty; private void FitGlass() { // If DWM is not enabled then get out if (!this.IsGlassEnabled()) { return; } // Set the Margins to their default values marg.Top = 600; // extend from the

    C# graphics csharp game-dev debugging help

  • Glass Effect in XP using dwmapi.dll
    V Viswa Teja

    hii I am desining a form that has glass effect. Well this code works on vista but i need it on Xp. The i am using gets an error saying that "DllNotFound Exception was unhandled". Well I have copyied all the dll that reqired for glass effect from vista. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Microsoft.DirectX.AudioVideoPlayback; using System.Diagnostics; using System.Drawing.Drawing2D; namespace welcome_page { public partial class Form2 : Form { public Form2() { InitializeComponent(); this.FitGlass(); } Video video; private welcome_page.VistaGlassEffect.VistaApi.Margins marg; private Rectangle topRect = Rectangle.Empty; private Rectangle botRect = Rectangle.Empty; private Rectangle lefRect = Rectangle.Empty; private Rectangle rigRect = Rectangle.Empty; private void FitGlass() { // If DWM is not enabled then get out if (!this.IsGlassEnabled()) { return; } // Set the Margins to their default values marg.Top = 600; // extend from the top marg.Left = 400; // not used in this sample but could be marg.Right = 200; // not used in this sample but could be marg.Bottom = 860;// not used in this sample but could be this.Paint += new PaintEventHandler(this.Form1_Paint); // call the function that gives us glass, // passing a reference to our inset Margins welcome_page.VistaGlassEffect.VistaApi.DwmExtendFrameIntoClientArea(this.Handle, ref marg); } private void apply() { this.Paint -= new System.Windows.Forms.PaintEventHandler(this.Form1_Paint); this.RecreateHandle(); //needed if changing on the fly this.FitGlass(); } private bool IsGlassEnabled() { //if (Environment.OSVersion.Version.Major < 6) //{ // Debug.WriteLine("How about trying this on Vista?"); // return false; //} //Check if DWM is enabled bool isGlassSupported = false; welcome_page.VistaGlassEffect.VistaApi.DwmIsCompositionEnabled(ref isGlassSupported); return isGlassSupported; } // Alpha-blending Paint after the glass extension //

    C# graphics game-dev debugging help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups