Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Playground (misc)
 
.

Hey everyone,

I have decided to privately fund ad-free web-mirrors of fellow programmer's project sites (anything compiled with the ClickOnce feature in VS.NET)

if you have a project that you want hosted for you, you can have your project hosted for free by www.paradisim.net (subhosting by siteground)

I don't have any minimum requirements except that its non-offensive, original content, and non-profit (that means, if you charge in any way, it cannot be for purpose of proffiting). I also am looking for people interested on a collaberation of a Keyboard-Driven/Sound Responsive shell for Windows (for the visually impaired), if anyone is interested in either of these let me know and write me at admin@paradisim.net or gabriel@verizon.net. All of us at PE say: Pinvokers, Keep up the good Wiki!! and thanks to the Pinvoke.net staff for having such a wonderful site https://pinvoke.net/emoticons/regular_smile.gif

- Gabriel Sharp web admin, project leader, sub-hosted publishing liason

- Alisha Baldonieri graphics team leader, marketing and publications coordinator

PS

SOURCE CODE:

Imports System.Runtime.InteropServices

Public Class VistaConfig

    Public Structure SHELLEXECUTEINFO
    Public cbSize As Integer
    Public fMask As Integer
    Public hwnd As IntPtr
    <MarshalAs(UnmanagedType.LPTStr)> Public lpVerb As String
    <MarshalAs(UnmanagedType.LPTStr)> Public lpFile As String
    <MarshalAs(UnmanagedType.LPTStr)> Public lpParameters As String
    <MarshalAs(UnmanagedType.LPTStr)> Public lpDirectory As String
    Dim nShow As Integer
    Dim hInstApp As IntPtr
    Dim lpIDList As IntPtr
    <MarshalAs(UnmanagedType.LPTStr)> Public lpClass As String
    Public hkeyClass As IntPtr
    Public dwHotKey As Integer
    Public hIcon As IntPtr
    Public hProcess As IntPtr
    End Structure
    Const SW_HIDE As Integer = 0
    Const SW_SHOWNORMAL As Integer = 1
    Const SW_NORMAL As Integer = 1
    Const SW_SHOWMINIMIZED As Integer = 2
    Const SW_SHOWMAXIMIZED As Integer = 3
    Const SW_MAXIMIZE As Integer = 3
    Const SW_SHOWNOACTIVATE As Integer = 4
    Const SW_SHOW As Integer = 5
    Const SW_MINIMIZE As Integer = 6
    Const SW_SHOWMINNOACTIVE As Integer = 7
    Const SW_SHOWNA As Integer = 8
    Const SW_RESTORE As Integer = 9
    Const SW_SHOWDEFAULT As Integer = 10
    Const SW_FORCEMINIMIZE As Integer = 11
    Const SW_MAX As Integer = 11
    <DllImport("shell32.dll", CharSet:=CharSet.Auto)> _
   Private Shared Function ShellExecuteEx(ByRef lpExecInfo As SHELLEXECUTEINFO) As Boolean
    End Function

    Private Sub VistaConfig_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim flip As New Flip3D.Flip3DPolicyChanger(Me)
    flip.SetFlip3DPolicy(Flip3D.Flip3DPolicy.ExcludeAbove)
    VistaControls.DWM.DWMManager.EnableGlassSheet(Me)
    GlowButton1.Renderer = New GlowingButton.DiamondRed
    End Sub

    Private Sub VistaConfig_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
    GlowButton1.Text = "Close"
    End Sub

    Private Sub PictureBox2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox2.Click
    VistaControls.TaskDialog.TaskDialog.Show("Security Shield", "UAC Shield Information", "Throughout Windows Vista and many applications, you will see the security shield. The secrity shield appears next to commands that will require an adminisrative account.", VistaControls.TaskDialog.TaskDialogButton.OK, VistaControls.TaskDialog.TaskDialogIcon.SecurityShield)
    End Sub

    Private Sub GlowButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GlowButton1.Click
    Me.Close()
    End Sub

    Private Sub GlowButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GlowButton2.Click
    Me.Hide()
    Dim ShellEx As New SHELLEXECUTEINFO
    ShellEx.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(ShellEx)
    ShellEx.lpVerb = "RunAs"
    ShellEx.lpFile = "SetLogonMessage.exe"
    ShellEx.hIcon = Me.Icon.Handle
    ShellEx.nShow = SW_SHOW
    ShellExecuteEx(ShellEx)
    'Shell("SetLogonMessage.exe", AppWinStyle.NormalFocus, True)
    Me.Show()
    End Sub

End Class

 
Access PInvoke.net directly from VS:
Terms of Use
Find References
Show Printable Version
Revisions