Click here to Skip to main content
15,886,056 members
Articles / Desktop Programming / Windows Forms

i00 Spell Check and Control Extensions - No Third Party Components Required!

Rate me:
Please Sign up or sign in to vote.
4.95/5 (117 votes)
11 Jan 2014Ms-PL16 min read 1.3M   22   266  
Simple to use, open source Spell Checker for .NET
Imports System.Runtime.InteropServices

Public NotInheritable Class DWM
    Private Sub New()
    End Sub

    <DllImport("dwmapi.dll", PreserveSig:=False)> _
    Public Shared Function DwmIsCompositionEnabled() As Boolean
    End Function

    <DllImport("dwmapi.dll")> _
    Public Shared Function DwmRegisterThumbnail(ByVal dest As IntPtr, ByVal source As IntPtr, <System.Runtime.InteropServices.Out()> ByRef hthumbnail As IntPtr) As Integer
    End Function

    <DllImport("dwmapi.dll")> _
    Public Shared Function DwmUnregisterThumbnail(ByVal HThumbnail As IntPtr) As Integer
    End Function

    <DllImport("dwmapi.dll")> _
    Public Shared Function DwmUpdateThumbnailProperties(ByVal HThumbnail As IntPtr, ByRef props As ThumbnailProperties) As Integer
    End Function

    <DllImport("dwmapi.dll")> _
    Public Shared Function DwmQueryThumbnailSourceSize(ByVal HThumbnail As IntPtr, <System.Runtime.InteropServices.Out()> ByRef size As Size) As Integer
    End Function

    Public Structure Point
        Public x As Integer
        Public y As Integer
    End Structure

    Public Structure Size
        Public Width As Integer, Height As Integer
    End Structure

    Public Structure WindowPlacement
        Public Length As Integer
        Public Flags As Integer
        Public ShowCmd As Integer
        Public MinPosition As Point
        Public MaxPosition As Point
        Public NormalPosition As Rect
    End Structure

    Public Structure ThumbnailProperties
        Public Flags As ThumbnailFlags
        Public Destination As Rect
        Public Source As Rect
        Public Opacity As [Byte]
        Public Visible As Boolean
        Public SourceClientAreaOnly As Boolean
    End Structure

    Public Structure Rect
        Public Sub New(ByVal x As Integer, ByVal y As Integer, ByVal x1 As Integer, ByVal y1 As Integer)
            Me.Left = x
            Me.Top = y
            Me.Right = x1
            Me.Bottom = y1
        End Sub

        Public Left As Integer, Top As Integer, Right As Integer, Bottom As Integer
    End Structure

    <Flags()> _
    Public Enum ThumbnailFlags As Integer
        RectDetination = 1
        RectSource = 2
        Opacity = 4
        Visible = 8
        SourceClientAreaOnly = 16
    End Enum

    Public Enum GetWindowCmd As UInteger
        First = 0
        Last = 1
        [Next] = 2
        Prev = 3
        Owner = 4
        Child = 5
        EnabledPopup = 6
    End Enum
End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


Written By
i00
Software Developer (Senior) i00 Productions
Australia Australia
I hope you enjoy my code. It's yours to use for free, but if you do wish to say thank you then a donation is always appreciated.
You can donate here.

Comments and Discussions