tag:blogger.com,1999:blog-87793422304688196142024-02-02T14:28:59.276-08:00Windows 7 Aero Glass, How to Make Transparent FormKlampok Childhttp://www.blogger.com/profile/13867130473786364775noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-8779342230468819614.post-34371427692256222372011-06-24T03:38:00.000-07:002011-06-24T03:38:03.907-07:00Custom Windows Form Border With Background Opacity<div dir="ltr" style="text-align: left;" trbidi="on">Lnguage: <b>VB net</b> (<b>NetFramework</b> 4.0) (will work in <b>NetFramework</b> 3.5 or before)<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbKuewMxAES0kwZHlV57w9JVQA0WZCyEX_8MeLNYXofReua5Y83yt6C_gaymo0nZtskmIuIazz-vRb9WoQT485Mrx1QRQMy2hy5Vhls1JDOiSBqaqiEe6l1rEGlVEH92c_W9zVCz8DU7Mq/s1600/Custom-Form-Border-With-Background-Opacity-using-VB-net-Csharp-in-Visual-Studio-with-Windows-API-dll.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Custom Form Border With Background Opacity using VB net Csharp in Visual Studio with Windows API dll" border="0" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbKuewMxAES0kwZHlV57w9JVQA0WZCyEX_8MeLNYXofReua5Y83yt6C_gaymo0nZtskmIuIazz-vRb9WoQT485Mrx1QRQMy2hy5Vhls1JDOiSBqaqiEe6l1rEGlVEH92c_W9zVCz8DU7Mq/s400/Custom-Form-Border-With-Background-Opacity-using-VB-net-Csharp-in-Visual-Studio-with-Windows-API-dll.jpg" title="Custom Form Border With Background Opacity using VB net Csharp in Visual Studio with Windows API dll" width="400" /></a></div><a name='more'></a><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOmmBWKlIeirC_VPkHFrdjwq99B561jdwxS4l3IPVlKdT03LzIaJZzaEykxnTylfUVXo-i8f7utetdV79qgGSoWPhKQdJO5Hn93dsxTqWc-CjHID2eKViR3w5sxqj8JOHkI5C_XQGsVSHm/s1600/Custom-Border-Resizable-windows-scroll-bar-enabled-VB-net-Csharp-in-Visual-Studio-with-Windows-API-dll.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Custom Border Resizable windows scroll bar enabled VB net Csharp in Visual Studio with Windows API dll.jpg" border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOmmBWKlIeirC_VPkHFrdjwq99B561jdwxS4l3IPVlKdT03LzIaJZzaEykxnTylfUVXo-i8f7utetdV79qgGSoWPhKQdJO5Hn93dsxTqWc-CjHID2eKViR3w5sxqj8JOHkI5C_XQGsVSHm/s400/Custom-Border-Resizable-windows-scroll-bar-enabled-VB-net-Csharp-in-Visual-Studio-with-Windows-API-dll.jpg" title="Custom Border Resizable windows scroll bar enabled VB net Csharp in Visual Studio with Windows API dll.jpg" width="266" /></a></div><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPzv2CTyhtfrSzcNvkWnK152u2V6Z7bhznZx08YMZUgL39xxIsaKMyALOj4je9_9lAtXb0DaWd3icGqhS5GTntsoMglvtzLIn4tWOejSmffDFmdwLFdy5ffZkT-ryn6hHPDHUBTmAMe9Tl/s1600/Transparent-Form-Background-With-Opacity-using-VB-net-Csharp-in-Visual-Studio-with-Windows-API-dll.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Transparent Form Background With Opacity using VB net Csharp in Visual Studio with Windows API dll" border="0" height="96" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPzv2CTyhtfrSzcNvkWnK152u2V6Z7bhznZx08YMZUgL39xxIsaKMyALOj4je9_9lAtXb0DaWd3icGqhS5GTntsoMglvtzLIn4tWOejSmffDFmdwLFdy5ffZkT-ryn6hHPDHUBTmAMe9Tl/s320/Transparent-Form-Background-With-Opacity-using-VB-net-Csharp-in-Visual-Studio-with-Windows-API-dll.jpg" title="Transparent Form Background With Opacity using VB net Csharp in Visual Studio with Windows API dll" width="320" /></a></div><b><br />
</b><br />
To make <b>Forms</b> with Custom Appearance, but standard Behaviour This program use the following dll: <br />
<ul><li><b>user32.dll</b></li>
<li><b>uxtheme.dll</b></li>
<li><b>gdi32.dll</b></li>
</ul>The following <b>dll</b> is on the <b>Windows</b> System by default, you don't need to download the <b>dll</b> again, exept your system is missing the files.<br />
With <b>Windows API</b> in the <b>dll</b>, <b>Program</b> will use the following method/function:<br />
<ul><li><b>CreateCompatibleDC</b></li>
<li><b>UpdateLayeredWindow</b></li>
<li><b>DeleteDC</b></li>
<li><b>DeleteObject</b></li>
<li><b>GetDC</b></li>
<li><b>GetScrollBarInfo</b></li>
<li><b>SelectObject</b></li>
<li><b>SetWindowTheme</b></li>
</ul>This The Code Of The Sample <b>Program</b>:<br />
<br />
<span style="color: blue; font-family: 'Courier New',Courier; font-size: 11px; height: 500px; overflow: scroll; width: 100%;">Imports System<br />
Imports System.Drawing<br />
Imports System.Windows.Forms<br />
Imports System.Runtime.InteropServices<br />
Imports System.Drawing.Imaging<br />
Imports System.Drawing.Drawing2D<br />
Partial Public Class Form1<br />
Public Sub New()<br />
InitializeComponent()<br />
AddPaintHandlers(Me)<br />
End Sub<br />
Protected Overrides ReadOnly Property CreateParams() As CreateParams<br />
Get<br />
Dim cp As CreateParams = MyBase.CreateParams<br />
If Not Me.DesignMode Then<br />
cp.ExStyle = cp.ExStyle Or NativeMethods.WS_EX_LAYERED<br />
End If<br />
Return cp<br />
End Get<br />
End Property<br />
Protected Overrides Sub CreateHandle()<br />
MyBase.CreateHandle()<br />
'Disable VisualStyles as we're doing all painting ourselves.<br />
If OSFeature.Feature.IsPresent(OSFeature.Themes) Then<br />
NativeMethods.SetWindowTheme(Me.Handle, Nothing, "")<br />
End If<br />
End Sub<br />
Protected Overrides Sub OnResize(ByVal e As EventArgs)<br />
MyBase.OnResize(e)<br />
If Me.Created Then<br />
UpdateWindow()<br />
End If<br />
End Sub<br />
Protected Overrides Sub OnLocationChanged(ByVal e As EventArgs)<br />
MyBase.OnLocationChanged(e)<br />
If Me.Created Then<br />
UpdateWindow()<br />
End If<br />
End Sub<br />
Protected Overrides Sub OnVisibleChanged(ByVal e As EventArgs)<br />
MyBase.OnVisibleChanged(e)<br />
If Me.Visible Then<br />
UpdateWindow()<br />
End If<br />
End Sub<br />
Protected Overrides Sub OnScroll(ByVal se As ScrollEventArgs)<br />
MyBase.OnScroll(se)<br />
If (Me.Created) Then<br />
Me.UpdateWindow()<br />
End If<br />
End Sub<br />
Private Sub AddPaintHandlers(ByVal control As Control)<br />
For Each ctl As Control In control.Controls<br />
AddHandler ctl.MouseEnter, AddressOf ctl_Paint<br />
AddHandler ctl.MouseLeave, AddressOf ctl_Paint<br />
AddHandler ctl.MouseDown, AddressOf ctl_Paint<br />
AddHandler ctl.MouseUp, AddressOf ctl_Paint<br />
AddHandler ctl.MouseMove, AddressOf ctl_Paint<br />
AddPaintHandlers(ctl)<br />
Next<br />
End Sub<br />
Private Sub ctl_Paint(ByVal sender As Object, ByVal e As EventArgs)<br />
Me.UpdateWindow()<br />
End Sub<br />
Public Sub UpdateWindow()<br />
If (Me.IsDisposed OrElse Me.Width <= 0 OrElse Me.Height <= 0) Then<br />
Return<br />
End If<br />
Using backBuffer As New Bitmap(Me.Width, Me.Height, PixelFormat.Format32bppPArgb)<br />
Using gr As Graphics = Graphics.FromImage(backBuffer)<br />
gr.SmoothingMode = SmoothingMode.AntiAlias<br />
Dim pt As Point = Me.PointToScreen(Point.Empty)<br />
pt.Offset(-Me.Left, -Me.Top)<br />
Dim rc As Rectangle = Me.RectangleToScreen(Me.ClientRectangle)<br />
rc.Offset(-Me.Left, -Me.Top)<br />
If Me.ClientSize.Width > 0 AndAlso Me.ClientSize.Height > 0 Then<br />
'Paint the ClientArea<br />
Using backBrush As New SolidBrush(Color.FromArgb(128, SystemColors.Control))<br />
gr.FillRectangle(backBrush, rc)<br />
End Using<br />
'Allow for AutoScroll behaviour<br />
Using clientBuffer As New Bitmap(Me.DisplayRectangle.Width, Me.DisplayRectangle.Height, PixelFormat.Format32bppPArgb)<br />
Dim pos As Point = Me.AutoScrollPosition<br />
'Paint the Controls<br />
For Each ctl As Control In Me.Controls<br />
Dim rcCtl As Rectangle = ctl.Bounds<br />
rcCtl.Offset(-pos.X, -pos.Y)<br />
ctl.DrawToBitmap(clientBuffer, rcCtl)<br />
Next<br />
gr.DrawImage(clientBuffer, New Rectangle(rc.Location, Me.ClientSize), New Rectangle(New Point(-pos.X, -pos.Y), Me.ClientSize), GraphicsUnit.Pixel)<br />
End Using<br />
End If<br />
'Paint the NonClientArea<br />
gr.SetClip(rc, CombineMode.Exclude)<br />
gr.FillPath(Brushes.CornflowerBlue, Me.CreateFormShape())<br />
If Me.WindowState <> FormWindowState.Minimized Then<br />
Using scrollFont As New Font("Marlett", SystemInformation.VerticalScrollBarArrowHeight, FontStyle.Regular, GraphicsUnit.Pixel)<br />
Using sf As New StringFormat()<br />
sf.Alignment = StringAlignment.Center<br />
sf.LineAlignment = StringAlignment.Center<br />
'Paint any scrollbars<br />
If Me.HScroll Then<br />
Dim hScrollRect As Rectangle = Me.RectangleToScreen(New Rectangle(0, Me.ClientSize.Height, Me.ClientSize.Width, SystemInformation.HorizontalScrollBarHeight))<br />
hScrollRect.Offset(-Me.Left, -Me.Top)<br />
gr.FillRectangle(Brushes.Aqua, hScrollRect)<br />
Dim thumbRect As Rectangle = New Rectangle(hScrollRect.X, hScrollRect.Y, hScrollRect.Height, hScrollRect.Height)<br />
gr.FillRectangle(Brushes.Green, thumbRect)<br />
gr.DrawString("3", scrollFont, Brushes.White, thumbRect)<br />
Dim sbi As New NativeMethods.SCROLLBARINFO()<br />
sbi.cbSize = Marshal.SizeOf(sbi)<br />
NativeMethods.GetScrollBarInfo(Me.Handle, NativeMethods.OBJID_HSCROLL, sbi)<br />
thumbRect = Me.RectangleToScreen(Rectangle.FromLTRB(sbi.xyThumbTop, Me.ClientRectangle.Bottom + 1, sbi.xyThumbBottom, Me.ClientRectangle.Bottom + hScrollRect.Height + 1))<br />
thumbRect.Offset(-Me.Left, -Me.Top)<br />
gr.FillRectangle(Brushes.Red, thumbRect)<br />
thumbRect = New Rectangle(hScrollRect.Right - hScrollRect.Height, hScrollRect.Y, hScrollRect.Height, hScrollRect.Height)<br />
gr.FillRectangle(Brushes.Green, thumbRect)<br />
gr.DrawString("4", scrollFont, Brushes.White, thumbRect)<br />
End If<br />
If (Me.VScroll) Then<br />
Dim vScrollRect As Rectangle = Me.RectangleToScreen(New Rectangle(Me.ClientSize.Width, 0, SystemInformation.VerticalScrollBarWidth, Me.ClientSize.Height))<br />
vScrollRect.Offset(-Me.Left, -Me.Top)<br />
gr.FillRectangle(Brushes.Aqua, vScrollRect)<br />
Dim thumbRect As Rectangle = New Rectangle(vScrollRect.X, vScrollRect.Y, vScrollRect.Width, vScrollRect.Width)<br />
gr.FillRectangle(Brushes.Green, thumbRect)<br />
gr.DrawString("5", scrollFont, Brushes.White, thumbRect)<br />
Dim sbi As New NativeMethods.SCROLLBARINFO()<br />
sbi.cbSize = Marshal.SizeOf(sbi)<br />
NativeMethods.GetScrollBarInfo(Me.Handle, NativeMethods.OBJID_VSCROLL, sbi)<br />
thumbRect = Me.RectangleToScreen(Rectangle.FromLTRB(Me.ClientRectangle.Right + 1, sbi.xyThumbTop, Me.ClientRectangle.Right + vScrollRect.Width + 1, sbi.xyThumbBottom))<br />
thumbRect.Offset(-Me.Left, -Me.Top)<br />
gr.FillRectangle(Brushes.Red, thumbRect)<br />
thumbRect = New Rectangle(vScrollRect.X, vScrollRect.Bottom - vScrollRect.Width, vScrollRect.Width, vScrollRect.Width)<br />
gr.FillRectangle(Brushes.Green, thumbRect)<br />
gr.DrawString("6", scrollFont, Brushes.White, thumbRect)<br />
End If<br />
'Paint the Caption Buttons<br />
Dim buttonSize As Size = SystemInformation.SmallCaptionButtonSize<br />
buttonSize.Width -= 3<br />
Dim buttonRect As Rectangle = New Rectangle(Me.Width - buttonSize.Width - 5, 5, buttonSize.Width, buttonSize.Height)<br />
gr.FillEllipse(Brushes.Red, buttonRect)<br />
buttonRect.Offset(-buttonRect.Width - 2, 0)<br />
gr.FillEllipse(Brushes.Orange, buttonRect)<br />
buttonRect.Offset(-buttonRect.Width - 2, 0)<br />
gr.FillEllipse(Brushes.Yellow, buttonRect)<br />
'Paint the Caption String<br />
sf.Alignment = StringAlignment.Near<br />
sf.Trimming = StringTrimming.EllipsisCharacter<br />
gr.DrawString(Me.Text, SystemFonts.CaptionFont, Brushes.White, RectangleF.FromLTRB(3, buttonRect.Top, buttonRect.Left, buttonRect.Bottom), sf)<br />
End Using<br />
End Using<br />
gr.ResetClip()<br />
End If<br />
End Using<br />
'Use Interop to transfer the bitmap to the screen.<br />
Dim screenDC As IntPtr = NativeMethods.GetDC(IntPtr.Zero)<br />
Dim memDC As IntPtr = NativeMethods.CreateCompatibleDC(screenDC)<br />
Dim hBitmap As IntPtr = backBuffer.GetHbitmap(Color.FromArgb(0))<br />
Dim oldBitmap As IntPtr = NativeMethods.SelectObject(memDC, hBitmap)<br />
Dim blend As New NativeMethods.BLENDFUNCTION(255)<br />
Dim ptDst As Point = Me.Location<br />
Dim szDst As Size = backBuffer.Size<br />
Dim ptSrc As Point = Point.Empty<br />
NativeMethods.UpdateLayeredWindow(Me.Handle, screenDC, ptDst, szDst, memDC, ptSrc, 0, blend, NativeMethods.ULW_ALPHA)<br />
NativeMethods.SelectObject(memDC, oldBitmap)<br />
NativeMethods.DeleteObject(hBitmap)<br />
NativeMethods.DeleteDC(memDC)<br />
NativeMethods.DeleteDC(screenDC)<br />
End Using<br />
End Sub<br />
Private Function CreateFormShape() As GraphicsPath<br />
Dim formShape As GraphicsPath = New GraphicsPath()<br />
formShape.AddArc(0, 0, 12, 12, 180, 90)<br />
formShape.AddArc(Me.Width - 13, 0, 12, 12, 270, 90)<br />
formShape.AddLine(Me.Width - 1, 12, Me.Width - 1, Me.Height - 1)<br />
formShape.AddLine(Me.Width - 1, Me.Height - 1, 0, Me.Height - 1)<br />
formShape.CloseFigure()<br />
Return formShape<br />
End Function<br />
End Class<br />
Public Class NativeMethods<br />
<DllImport("user32.dll", SetLastError:=True)> _<br />
Friend Shared Function UpdateLayeredWindow(ByVal hwnd As IntPtr, ByVal hdcDst As IntPtr, ByRef pptDst As Point, ByRef psize As Size, ByVal hdcSrc As IntPtr, ByRef pptSrc As Point, ByVal crKey As Int32, ByRef pblend As BLENDFUNCTION, ByVal dwFlags As Int32) As Boolean<br />
End Function<br />
<br />
<DllImport("uxtheme.dll")> _<br />
Friend Shared Function SetWindowTheme(ByVal hwnd As IntPtr, ByVal pszSubAppName As String, ByVal pszSubIdList As String) As IntPtr<br />
End Function<br />
<DllImport("user32.dll", SetLastError:=True)> _<br />
Friend Shared Function GetDC(ByVal hWnd As IntPtr) As IntPtr<br />
End Function<br />
<DllImport("gdi32.dll")> _<br />
Friend Shared Function CreateCompatibleDC(ByVal dc As IntPtr) As IntPtr<br />
End Function<br />
<DllImport("gdi32.dll")> _<br />
Friend Shared Function SelectObject(ByVal hdc As IntPtr, ByVal hObj As IntPtr) As IntPtr<br />
End Function<br />
<DllImport("gdi32.dll")> _<br />
Friend Shared Function DeleteDC(ByVal dc As IntPtr) As IntPtr<br />
End Function<br />
<DllImport("gdi32.dll")> _<br />
Friend Shared Function DeleteObject(ByVal hObj As IntPtr) As IntPtr<br />
End Function<br />
<DllImport("user32.dll", SetLastError:=True)> _<br />
Friend Shared Function GetScrollBarInfo(ByVal hwnd As IntPtr, ByVal idObject As Int32, ByRef psbi As SCROLLBARINFO) As Boolean<br />
End Function<br />
<StructLayout(LayoutKind.Sequential, Pack:=1)> _<br />
Friend Structure BLENDFUNCTION<br />
Public BlendOp, BlendFlags, SourceConstantAlpha, AlphaFormat As Byte<br />
Public Sub New(ByVal alpha As Byte)<br />
Me.BlendOp = AC_SRC_OVER<br />
Me.BlendFlags = 0<br />
Me.SourceConstantAlpha = alpha<br />
Me.AlphaFormat = AC_SRC_ALPHA<br />
End Sub<br />
End Structure<br />
<StructLayout(LayoutKind.Sequential)> _<br />
Friend Structure SCROLLBARINFO<br />
Public cbSize As Int32<br />
Public rcScrollBar As RECT<br />
Public dxyLineButton, xyThumbTop, xyThumbBottom, reserved As Int32<br />
Public scrollbar, incbtn, pgup, thumb, pgdn, decbtn As Int32<br />
End Structure<br />
<br />
<StructLayout(LayoutKind.Sequential)> _<br />
Friend Structure RECT<br />
Public Left, Top, Right, Bottom As Int32<br />
End Structure<br />
Friend Const AC_SRC_OVER As Int32 = &H0<br />
Friend Const AC_SRC_ALPHA As Int32 = &H1<br />
Friend Const ULW_ALPHA As Int32 = &H2<br />
Friend Const WS_EX_LAYERED As Int32 = &H80000<br />
Friend Const OBJID_HSCROLL As Int32 = &HFFFFFFFA '-6<br />
Friend Const OBJID_VSCROLL As Int32 = &HFFFFFFFB '-5<br />
End Class</span><br />
<br />
<br />
This Program uses a <b>Layered</b> <b>Window</b> so that all drawing is done by you, including that of child <b>controls</b>. This type of <b>window</b> will never recieve or respond to a standard Paint message.<br />
<br />
Advantages of this method include the ability to draw the <b>Scrollbars</b> in any style you wish as well as having the ability to change <b>Alpha</b> levels on a pixel by pixel basis. Just be aware that if you set <b>alpha</b> to zero, then the mouse events will fall through to the <b>window</b> below.<br />
<br />
A disadvantage to this <b>method</b> is that not all child <b>windows</b> support <b>DrawToBitmap()</b> and so will not render themselves correctly with the simple <b>UpdateWindow()</b> <b>method</b> used here.<br />
<br />
You will need to expand the code to paint the <b>window</b> differently depending upon <b>window</b> focus and mouse position, but adding non client mouse handling is beyond the scope of this simple example. You may call <b>UpdateWindow()</b> whenever the Form or one of it's child <b>controls</b> needs repainting.<br />
<br />
<a href="http://graind16.6te.net/Klampok_Child_File_Download/Custom%20Border.rar"><b><span style="font-size: large;">DOWNLOAD PROJECT VB NET HERE!</span></b></a><br />
<br />
<br />
<br />
<center> by: <a href="http://klampokchild.blogspot.com/">Klampok_Child</a> | Original Source Code by: <a href="http://dotnetrix.co.uk/">http://dotnetrix.co.uk</a><br />
</center></div>Klampok Childhttp://www.blogger.com/profile/13867130473786364775noreply@blogger.comtag:blogger.com,1999:blog-8779342230468819614.post-7126168271248916142011-06-06T03:46:00.000-07:002011-06-06T03:48:25.341-07:00Face detection using vb net 2010<div dir="ltr" style="text-align: left;" trbidi="on"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHFeMWbUHM6noR7t37iCrFqK29yI5MsRxv8f1_lLjSy6Bw7VasMDm-0T_RKCVB2VYT70nJhm4f15ppijm8JLML4hvoV9pjHFB9fjaFDM4Eic0wfrGlAzOZWE16znyeRWEWvxBX6K5o7HU/s1600/Sample-Face-Detection-with-VB-net-%25282010%2529.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Sample Face Detection with VB net 2010" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHFeMWbUHM6noR7t37iCrFqK29yI5MsRxv8f1_lLjSy6Bw7VasMDm-0T_RKCVB2VYT70nJhm4f15ppijm8JLML4hvoV9pjHFB9fjaFDM4Eic0wfrGlAzOZWE16znyeRWEWvxBX6K5o7HU/s1600/Sample-Face-Detection-with-VB-net-%25282010%2529.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Sample Face Detection</td></tr>
</tbody></table><br />
Create new WindowsForm Project, and drop a PictureBox Control. You must add the Emgu libraries, by adding reffences of this DLL:<br />
- Emgu.CV.dll<br />
- Emgu.CV.UI.dll<br />
- Emgu.Util.dll<br />
<br />
<a name='more'></a><br />
<br />
Write this code:<br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">Imports</span><span style="font-family: Consolas; font-size: 9.5pt;"> Emgu.CV</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">Imports</span><span style="font-family: Consolas; font-size: 9.5pt;"> Emgu.Util</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">Imports</span><span style="font-family: Consolas; font-size: 9.5pt;"> Emgu.CV.Structure</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">Imports</span><span style="font-family: Consolas; font-size: 9.5pt;"> Emgu.CV.UI</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">Public</span><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Class</span> <span style="color: #2b91af;">Form1</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Private</span> <span style="color: blue;">Sub</span> Form1_Load() <span style="color: blue;">Handles</span> <span style="color: blue;">MyBase</span>.Load</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Dim</span> p <span style="color: blue;">As</span> <span style="color: blue;">String</span> = <span style="color: #2b91af;">Application</span>.StartupPath</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> PictureBox1.Image = <span style="color: #2b91af;">Image</span>.FromFile(<span style="color: #a31515;">"image.jpg"</span>)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Dim</span> ImageBgr <span style="color: blue;">As</span> <span style="color: blue;">New</span> <span style="color: #2b91af;">Image</span>(<span style="color: blue;">Of</span> <span style="color: #2b91af;">Bgr</span>, <span style="color: blue;">Byte</span>)(PictureBox1.Image)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Dim</span> HaarXML <span style="color: blue;">As</span> <span style="color: blue;">New</span> <span style="color: #2b91af;">HaarCascade</span>(<span style="color: #a31515;">"haarcascade_frontalface_alt_tree.xml"</span>)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Dim</span> GrayImage <span style="color: blue;">As</span> <span style="color: #2b91af;">Image</span>(<span style="color: blue;">Of</span> <span style="color: #2b91af;">Gray</span>, <span style="color: blue;">Byte</span>) = ImageBgr.Convert(<span style="color: blue;">Of</span> <span style="color: #2b91af;">Gray</span>, <span style="color: blue;">Byte</span>)()</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Dim</span> ImgGraphics <span style="color: blue;">As</span> <span style="color: #2b91af;">Graphics</span> = <span style="color: #2b91af;">Graphics</span>.FromImage(PictureBox1.Image)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Dim</span> MPen <span style="color: blue;">As</span> <span style="color: blue;">New</span> <span style="color: #2b91af;">Pen</span>(<span style="color: #2b91af;">Brushes</span>.YellowGreen, 8)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: green;">' Will take a several minute.. please wait..</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">For</span> <span style="color: blue;">Each</span> m <span style="color: blue;">In</span> GrayImage.DetectHaarCascade(HaarXML)(0)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> ImgGraphics.DrawRectangle(MPen, m.rect)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Next</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">End</span> <span style="color: blue;">Sub</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">End</span><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Class</span></span></div><br />
this DLL must in the same folder of exe file:<br />
- cvextern.dll <br />
- Emgu.CV.dll<br />
- Emgu.CV.UI.dll<br />
- Emgu.Util.dll<br />
<span style="font-size: large;"><a href="http://download.kr3w.de/get_VB10.net%20Face%20Detection.rar">DOWNLOAD HERE</a></span></div>Klampok Childhttp://www.blogger.com/profile/13867130473786364775noreply@blogger.comtag:blogger.com,1999:blog-8779342230468819614.post-57774596408821520722011-05-29T16:04:00.000-07:002011-05-29T16:04:57.369-07:00VB net, Draw Text On Glass Window<div dir="ltr" style="text-align: left;" trbidi="on"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZRHVtRVH72WzGw4nTNK5H_YmnzmQ0yiFh9j6gaL8ZIibbuFs3pxADtgpI6SiW8boI09C3XvjlXzT5qrgGMd1UK_dDTAoHF8bCue7ylBbZHQ02dGRhJKZ7l2BnEB07xUO-0OSnezsO1NYn/s1600/Draw-Text-On-Glass-Window.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZRHVtRVH72WzGw4nTNK5H_YmnzmQ0yiFh9j6gaL8ZIibbuFs3pxADtgpI6SiW8boI09C3XvjlXzT5qrgGMd1UK_dDTAoHF8bCue7ylBbZHQ02dGRhJKZ7l2BnEB07xUO-0OSnezsO1NYn/s1600/Draw-Text-On-Glass-Window.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Text On Glass Window</td></tr>
</tbody></table>When you make a glasses window, and you drop a label to the form designer, you will see that the label is not good. to fix this problem, you can use this way (sample code):<br />
<a name='more'></a><br />
<br />
<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF/> <w:LidThemeOther>EN-US</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> <w:SplitPgBreakAndParaMark/> <w:DontVertAlignCellWithSp/> <w:DontBreakConstrainedForcedTables/> <w:DontVertAlignInTxbx/> <w:Word11KerningPairs/> <w:CachedColBalance/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathPr> <m:mathFont m:val="Cambria Math"/> <m:brkBin m:val="before"/> <m:brkBinSub m:val="--"/> <m:smallFrac m:val="off"/> <m:dispDef/> <m:lMargin m:val="0"/> <m:rMargin m:val="0"/> <m:defJc m:val="centerGroup"/> <m:wrapIndent m:val="1440"/> <m:intLim m:val="subSup"/> <m:naryLim m:val="undOvr"/> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/> <w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/> <w:LsdException Locked="false" Priority="39" Name="toc 1"/> <w:LsdException Locked="false" Priority="39" Name="toc 2"/> <w:LsdException Locked="false" Priority="39" Name="toc 3"/> <w:LsdException Locked="false" Priority="39" Name="toc 4"/> <w:LsdException Locked="false" Priority="39" Name="toc 5"/> <w:LsdException Locked="false" Priority="39" Name="toc 6"/> <w:LsdException Locked="false" Priority="39" Name="toc 7"/> <w:LsdException Locked="false" Priority="39" Name="toc 8"/> <w:LsdException Locked="false" Priority="39" Name="toc 9"/> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/> <w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/> <w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/> <w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/> <w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/> <w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/> <w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/> <w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/> <w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/> <w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/> <w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/> <w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/> <w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/> <w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/> <w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/> <w:LsdException Locked="false" Priority="37" Name="Bibliography"/> <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/> </w:LatentStyles> </xml><![endif]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style> <![endif]--> <br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">Imports</span><span style="font-family: Consolas; font-size: 9.5pt;"> System.Runtime.InteropServices</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">Imports</span><span style="font-family: Consolas; font-size: 9.5pt;"> System.Drawing.Drawing2D</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">Public</span><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Class</span> <span style="color: #2b91af;">Form1</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Private</span> <span style="color: blue;">Sub</span> Form1_Paint() <span style="color: blue;">Handles</span> <span style="color: blue;">Me</span>.Paint</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Dim</span> g <span style="color: blue;">As</span> <span style="color: #2b91af;">Graphics</span> = <span style="color: blue;">Me</span>.CreateGraphics</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Dim</span> tx <span style="color: blue;">As</span> <span style="color: blue;">New</span> <span style="color: #2b91af;">GraphicsPath</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: green;">'Set black to get nice transparent</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Me</span>.BackColor = <span style="color: #2b91af;">Color</span>.Black</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: green;">'Set this form transparent</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>DwmExtendFrameIntoClientArea(<span style="color: blue;">Me</span>.Handle, <span style="color: blue;">New</span> <span style="color: #2b91af;">MARGINS</span>(-1, -1, -1, -1))</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: green;">'begin draw text</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>tx.AddString(<span style="color: #a31515;">"Klampok Child"</span>, <span style="color: blue;">New</span> <span style="color: #2b91af;">FontFamily</span>(<span style="color: #a31515;">"Tahoma"</span>), <span style="color: #2b91af;">FontStyle</span>.Regular, 30,</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">New</span> <span style="color: #2b91af;">Point</span>(12, 12), <span style="color: #2b91af;">StringFormat</span>.GenericDefault)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: green;">' Set Smoothing Mode to get smooth text</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>g.SmoothingMode = <span style="color: #2b91af;">SmoothingMode</span>.AntiAlias</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: green;">'Fill form with text and color (brush)</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>g.FillPath(<span style="color: blue;">New</span> <span style="color: #2b91af;">SolidBrush</span>(<span style="color: #2b91af;">Color</span>.Black), tx)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">End</span> <span style="color: blue;">Sub</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Private</span> <span style="color: blue;">Sub</span> Form1_ResizeEnd() <span style="color: blue;">Handles</span> <span style="color: blue;">Me</span>.ResizeEnd</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: green;">' When form resize, re-draw the form and show it smooth again</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Me</span>.Refresh()</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">End</span> <span style="color: blue;">Sub</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: green;">' DwmApi To Call Glasses Window</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><<span style="color: #2b91af;">StructLayout</span>(<span style="color: #2b91af;">LayoutKind</span>.Sequential)> _</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Public</span> <span style="color: blue;">Structure</span> <span style="color: #2b91af;">MARGINS</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Public</span> LeftWidth <span style="color: blue;">As</span> <span style="color: blue;">Integer</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Public</span> RightWidth <span style="color: blue;">As</span> <span style="color: blue;">Integer</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Public</span> TopHeight <span style="color: blue;">As</span> <span style="color: blue;">Integer</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Public</span> Buttomheight <span style="color: blue;">As</span> <span style="color: blue;">Integer</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Public</span> <span style="color: blue;">Sub</span> <span style="color: blue;">New</span>(<span style="color: blue;">ByVal</span> left <span style="color: blue;">As</span> <span style="color: blue;">Integer</span>, <span style="color: blue;">ByVal</span> right <span style="color: blue;">As</span> <span style="color: blue;">Integer</span>, <span style="color: blue;">ByVal</span> top <span style="color: blue;">As</span> <span style="color: blue;">Integer</span>, <span style="color: blue;">ByVal</span> bottom <span style="color: blue;">As</span> <span style="color: blue;">Integer</span>)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>LeftWidth = left</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>RightWidth = right</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>TopHeight = top</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>Buttomheight = bottom</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">End</span> <span style="color: blue;">Sub</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">End</span> <span style="color: blue;">Structure</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><<span style="color: #2b91af;">DllImport</span>(<span style="color: #a31515;">"dwmapi.dll"</span>)> _</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Shared</span> <span style="color: blue;">Sub</span> DwmExtendFrameIntoClientArea(<span style="color: blue;">ByVal</span> hwnd <span style="color: blue;">As</span> <span style="color: #2b91af;">IntPtr</span>, <span style="color: blue;">ByRef</span> mrg <span style="color: blue;">As</span> <span style="color: #2b91af;">MARGINS</span>)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">End</span> <span style="color: blue;">Sub</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">End</span><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Class</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal"><a href="http://download.kr3w.de/get_VB.net%20Draw%20Text%20On%20Glass%20Window%20%5Bsource%5D.rar"> Download Project Here</a></div></div>Klampok Childhttp://www.blogger.com/profile/13867130473786364775noreply@blogger.comtag:blogger.com,1999:blog-8779342230468819614.post-56302340997601290642011-05-26T21:07:00.000-07:002011-05-26T21:07:21.431-07:00Create Simple Form With Aero Glass Effect (CSharp)<div dir="ltr" style="text-align: left;" trbidi="on">Language: <a href="http://win7aero.blogspot.com/search/label/CSharp">CSharp</a><br />
<br />
<div style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBSI803lMvibKRLfTj8MQ6ZbyFB7LUY4uXd3dykDOEPoe7wjIPGhj-pHGFyJkAWF06aaJiwdyOaP1A8HuzJWsthFf1Swu8FCmTRzjAp7DWkAT1l_tdgkz6vU-u9vUXlSEAutC5xAm61zE/s1600/Transparent-Form-Aero-Glass.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBSI803lMvibKRLfTj8MQ6ZbyFB7LUY4uXd3dykDOEPoe7wjIPGhj-pHGFyJkAWF06aaJiwdyOaP1A8HuzJWsthFf1Swu8FCmTRzjAp7DWkAT1l_tdgkz6vU-u9vUXlSEAutC5xAm61zE/s1600/Transparent-Form-Aero-Glass.jpg" /></a></div><div style="text-align: center;"><span style="font-size: xx-small;">Simple Form With Aero Glass Effect</span></div><br />
<a name='more'></a>THE CODE<br />
<br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: "Courier New"; font-size: 10pt;">using</span><span style="font-family: "Courier New"; font-size: 10pt;"> System;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: "Courier New"; font-size: 10pt;">using</span><span style="font-family: "Courier New"; font-size: 10pt;"> System.Collections.Generic;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: "Courier New"; font-size: 10pt;">using</span><span style="font-family: "Courier New"; font-size: 10pt;"> System.ComponentModel;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: "Courier New"; font-size: 10pt;">using</span><span style="font-family: "Courier New"; font-size: 10pt;"> System.Data;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: "Courier New"; font-size: 10pt;">using</span><span style="font-family: "Courier New"; font-size: 10pt;"> System.Drawing;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: "Courier New"; font-size: 10pt;">using</span><span style="font-family: "Courier New"; font-size: 10pt;"> System.Linq;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: "Courier New"; font-size: 10pt;">using</span><span style="font-family: "Courier New"; font-size: 10pt;"> System.Text;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: "Courier New"; font-size: 10pt;">using</span><span style="font-family: "Courier New"; font-size: 10pt;"> System.Windows.Forms;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: "Courier New"; font-size: 10pt;">using</span><span style="font-family: "Courier New"; font-size: 10pt;"> System.Runtime.InteropServices;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: "Courier New"; font-size: 10pt;">namespace</span><span style="font-family: "Courier New"; font-size: 10pt;"> WindowsFormsApplication1</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;">{</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> <span style="color: blue;">public</span> <span style="color: blue;">partial</span> <span style="color: blue;">class</span> <span style="color: #2b91af;">Form1</span> : <span style="color: #2b91af;">Form</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> {</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> [<span style="color: #2b91af;">DllImport</span>(<span style="color: #a31515;">"dwmapi.dll"</span>, PreserveSig = <span style="color: blue;">false</span>)]</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> <span style="color: blue;">public</span> <span style="color: blue;">static</span> <span style="color: blue;">extern</span> <span style="color: blue;">void</span> DwmExtendFrameIntoClientArea(</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> <span style="color: #2b91af;">IntPtr</span> hWnd, <span style="color: #2b91af;">MARGINS</span> pMargins);</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> [<span style="color: #2b91af;">StructLayout</span>(<span style="color: #2b91af;">LayoutKind</span>.Sequential)]</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> <span style="color: blue;">public</span> <span style="color: blue;">class</span> <span style="color: #2b91af;">MARGINS</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> {</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> <span style="color: blue;">public</span> <span style="color: blue;">int</span> cxLeftWidth, cxRightWidth,</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> cyTopHeight, cyBottomHeight;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> }</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> <span style="color: blue;">public</span> Form1()</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> {</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> InitializeComponent();</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> }</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> <span style="color: blue;">private</span> <span style="color: blue;">void</span> Form1_Load(<span style="color: blue;">object</span> sender, <span style="color: #2b91af;">EventArgs</span> e)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> {</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> <span style="color: blue;">this</span>.BackColor = <span style="color: #2b91af;">Color</span>.Black;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> <span style="color: #2b91af;">MARGINS</span> m = <span style="color: blue;">new</span> <span style="color: #2b91af;">MARGINS</span>();</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> m.cxLeftWidth = -1;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> m.cxRightWidth = -1;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> m.cyBottomHeight = -1;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> m.cyTopHeight = -1;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> <span style="color: green;">//set all value -1 to apply glass effect to the all of visible window</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> DwmExtendFrameIntoClientArea(<span style="color: blue;">this</span>.Handle, m);</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> }</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;"> }</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10pt;">}</span></div><div class="MsoNormal"><br />
<a href="http://download.kr3w.de/?f/CSharp%20Simple%20Aero%20Glass%20[source].rar">Download Project Here</a></div></div>Klampok Childhttp://www.blogger.com/profile/13867130473786364775noreply@blogger.comtag:blogger.com,1999:blog-8779342230468819614.post-33503343414503174522011-05-26T20:28:00.001-07:002011-05-26T20:40:29.853-07:00CSharp Dwmapi Class<div dir="ltr" style="text-align: left;" trbidi="on">Language: CSharp<br />
<br />
<a name='more'></a><br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">internal</span><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">class</span> <span style="color: #2b91af;">DwmApi</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;">{</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> [DllImport(<span style="color: #a31515;">"dwmapi.dll"</span>, PreserveSig = <span style="color: blue;">false</span>)]</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">static</span> <span style="color: blue;">extern</span> <span style="color: blue;">void</span> DwmEnableBlurBehindWindow(</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> IntPtr hWnd, DWM_BLURBEHIND pBlurBehind);</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> [DllImport(<span style="color: #a31515;">"dwmapi.dll"</span>, PreserveSig = <span style="color: blue;">false</span>)]</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">static</span> <span style="color: blue;">extern</span> <span style="color: blue;">void</span> DwmExtendFrameIntoClientArea(</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> IntPtr hWnd, MARGINS pMargins);</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> [DllImport(<span style="color: #a31515;">"dwmapi.dll"</span>, PreserveSig = <span style="color: blue;">false</span>)]</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">static</span> <span style="color: blue;">extern</span> <span style="color: blue;">bool</span> DwmIsCompositionEnabled();</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> [DllImport(<span style="color: #a31515;">"dwmapi.dll"</span>, PreserveSig = <span style="color: blue;">false</span>)]</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">static</span> <span style="color: blue;">extern</span> <span style="color: blue;">void</span> DwmEnableComposition(<span style="color: blue;">bool</span> bEnable);</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> [DllImport(<span style="color: #a31515;">"dwmapi.dll"</span>, PreserveSig = <span style="color: blue;">false</span>)]</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">static</span> <span style="color: blue;">extern</span> <span style="color: blue;">void</span> DwmGetColorizationColor(</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">out</span> <span style="color: blue;">int</span> pcrColorization, </span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> [MarshalAs(UnmanagedType.Bool)]<span style="color: blue;">out</span> <span style="color: blue;">bool</span> pfOpaqueBlend);</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> [DllImport(<span style="color: #a31515;">"dwmapi.dll"</span>, PreserveSig = <span style="color: blue;">false</span>)]</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">static</span> <span style="color: blue;">extern</span> IntPtr DwmRegisterThumbnail(</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> IntPtr dest, IntPtr source);</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> [DllImport(<span style="color: #a31515;">"dwmapi.dll"</span>, PreserveSig = <span style="color: blue;">false</span>)]</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">static</span> <span style="color: blue;">extern</span> <span style="color: blue;">void</span> DwmUnregisterThumbnail(IntPtr hThumbnail);</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> [DllImport(<span style="color: #a31515;">"dwmapi.dll"</span>, PreserveSig = <span style="color: blue;">false</span>)]</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">static</span> <span style="color: blue;">extern</span> <span style="color: blue;">void</span> DwmUpdateThumbnailProperties(</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> IntPtr hThumbnail, DWM_THUMBNAIL_PROPERTIES props);</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> [DllImport(<span style="color: #a31515;">"dwmapi.dll"</span>, PreserveSig = <span style="color: blue;">false</span>)]</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">static</span> <span style="color: blue;">extern</span> <span style="color: blue;">void</span> DwmQueryThumbnailSourceSize(</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> IntPtr hThumbnail, <span style="color: blue;">out</span> Size size);</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> [StructLayout(LayoutKind.Sequential)]</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">class</span> <span style="color: #2b91af;">DWM_THUMBNAIL_PROPERTIES</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> {</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">uint</span> dwFlags;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> RECT rcDestination;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> RECT rcSource;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">byte</span> opacity;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> [MarshalAs(UnmanagedType.Bool)]</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">bool</span> fVisible;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> [MarshalAs(UnmanagedType.Bool)]</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">bool</span> fSourceClientAreaOnly;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">const</span> <span style="color: blue;">uint</span> DWM_TNP_RECTDESTINATION = 0x00000001;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">const</span> <span style="color: blue;">uint</span> DWM_TNP_RECTSOURCE = 0x00000002;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">const</span> <span style="color: blue;">uint</span> DWM_TNP_OPACITY = 0x00000004;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">const</span> <span style="color: blue;">uint</span> DWM_TNP_VISIBLE = 0x00000008;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">const</span> <span style="color: blue;">uint</span> DWM_TNP_SOURCECLIENTAREAONLY = 0x00000010;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> }</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> [StructLayout(LayoutKind.Sequential)]</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">class</span> <span style="color: #2b91af;">MARGINS</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> {</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">int</span> cxLeftWidth, cxRightWidth, </span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> cyTopHeight, cyBottomHeight;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> MARGINS(<span style="color: blue;">int</span> left, <span style="color: blue;">int</span> top, <span style="color: blue;">int</span> right, <span style="color: blue;">int</span> bottom)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> {</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> cxLeftWidth = left; cyTopHeight = top; </span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> cxRightWidth = right; cyBottomHeight = bottom;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> }</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> }</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> [StructLayout(LayoutKind.Sequential)]</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">class</span> <span style="color: #2b91af;">DWM_BLURBEHIND</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> {</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">uint</span> dwFlags;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> [MarshalAs(UnmanagedType.Bool)]</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">bool</span> fEnable;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> IntPtr hRegionBlur;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> [MarshalAs(UnmanagedType.Bool)]</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">bool</span> fTransitionOnMaximized;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">const</span> <span style="color: blue;">uint</span> DWM_BB_ENABLE = 0x00000001;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">const</span> <span style="color: blue;">uint</span> DWM_BB_BLURREGION = 0x00000002;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">const</span> <span style="color: blue;">uint</span> DWM_BB_TRANSITIONONMAXIMIZED = 0x00000004;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> }</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> [StructLayout(LayoutKind.Sequential)]</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">struct</span> <span style="color: #2b91af;">RECT</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> {</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> <span style="color: blue;">int</span> left, top, right, bottom;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">public</span> RECT(<span style="color: blue;">int</span> left, <span style="color: blue;">int</span> top, <span style="color: blue;">int</span> right, <span style="color: blue;">int</span> bottom)</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> {</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">this</span>.left = left; <span style="color: blue;">this</span>.top = top; </span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">this</span>.right = right; <span style="color: blue;">this</span>.bottom = bottom;</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> }</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;"> }</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: Consolas; font-size: 9.5pt;">}</span></div><div class="MsoNormal"><br />
</div><br />
<br />
</div>Klampok Childhttp://www.blogger.com/profile/13867130473786364775noreply@blogger.comtag:blogger.com,1999:blog-8779342230468819614.post-30339468415760715022011-05-26T19:33:00.000-07:002011-05-26T21:10:07.277-07:00Create Simple Form With Aero Glass Effect (VB net)<div dir="ltr" style="text-align: left;" trbidi="on"><div style="text-align: left;">Language: <a href="http://vb.net/">VB.net</a><a href="http://win7aero.blogspot.com/search/label/VB%20net"></a></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBSI803lMvibKRLfTj8MQ6ZbyFB7LUY4uXd3dykDOEPoe7wjIPGhj-pHGFyJkAWF06aaJiwdyOaP1A8HuzJWsthFf1Swu8FCmTRzjAp7DWkAT1l_tdgkz6vU-u9vUXlSEAutC5xAm61zE/s1600/Transparent-Form-Aero-Glass.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBSI803lMvibKRLfTj8MQ6ZbyFB7LUY4uXd3dykDOEPoe7wjIPGhj-pHGFyJkAWF06aaJiwdyOaP1A8HuzJWsthFf1Swu8FCmTRzjAp7DWkAT1l_tdgkz6vU-u9vUXlSEAutC5xAm61zE/s1600/Transparent-Form-Aero-Glass.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Simple Form With Aero Glass Effect</td></tr>
</tbody></table><br />
<a name='more'></a>THE CODE<br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">Imports</span><span style="font-family: Consolas; font-size: 9.5pt;"> System.Runtime.InteropServices</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><br />
</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">Public</span><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Class</span> <span style="color: #2b91af;">Form1</span></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: #2b91af;"><span style="color: black;"><</span>StructLayout</span>(<span style="color: #2b91af;">LayoutKind</span>.Sequential)> _</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Public</span> <span style="color: blue;">Structure</span> <span style="color: #2b91af;">MARGINS</span></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Public</span> cxLeftWidth <span style="color: blue;">As</span> <span style="color: blue;">Integer</span></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Public</span> cxRightWidth <span style="color: blue;">As</span> <span style="color: blue;">Integer</span></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Public</span> cyTopHeight <span style="color: blue;">As</span> <span style="color: blue;">Integer</span></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Public</span> cyButtomheight <span style="color: blue;">As</span> <span style="color: blue;">Integer</span></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">End</span> <span style="color: blue;">Structure</span></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: #2b91af;"><DllImport</span>(<span style="color: #a31515;">"dwmapi.dll"</span>)> _</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Private</span> <span style="color: blue;">Shared</span> <span style="color: blue;">Function</span> DwmExtendFrameIntoClientArea(<span style="color: blue;">ByVal</span> hwnd <span style="color: blue;">As</span> <span style="color: #2b91af;">IntPtr</span>, <span style="color: blue;">ByRef</span> margin <span style="color: blue;">As</span> <span style="color: #2b91af;">MARGINS</span>) <span style="color: blue;">As</span> <span style="color: blue;">Integer</span></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">End</span> <span style="color: blue;">Function</span></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><br />
</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Private</span> <span style="color: blue;">Sub</span> Form1_Load(<span style="color: blue;">ByVal</span> sender <span style="color: blue;">As</span> System.<span style="color: #2b91af;">Object</span>, <span style="color: blue;">ByVal</span> e <span style="color: blue;">As</span> System.<span style="color: #2b91af;">EventArgs</span>) <span style="color: blue;">Handles</span> <span style="color: blue;">MyBase</span>.Load</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Dim</span> mg <span style="color: blue;">As</span> <span style="color: #2b91af;">MARGINS</span> = <span style="color: blue;">New</span> <span style="color: #2b91af;">MARGINS</span></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> mg.cxLeftWidth = -1</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> mg.cxRightWidth = -1</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> mg.cyTopHeight = -1</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> mg.cyButtomheight = -1</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: green;">'set all value -1 to apply glass effect to the all of visible window</span></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Try</span></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> DwmExtendFrameIntoClientArea(<span style="color: blue;">Me</span>.Handle, mg)</span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Catch</span> ex <span style="color: blue;">As</span> <span style="color: #2b91af;">Exception</span></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">End</span> <span style="color: blue;">Try</span></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">End</span> <span style="color: blue;">Sub</span></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span class="fullpost"><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">End</span><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">Class</span></span></span><br />
<br />
<div style="color: black;"><a href="http://download.kr3w.de/?f/VBnet%20Simple%20Aero%20Glass%20[source].rar"><span class="fullpost"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="font-family: inherit;">DOWNLOAD PROJECT HERE </span></span></span></a></div></div></div>Klampok Childhttp://www.blogger.com/profile/13867130473786364775noreply@blogger.com