EDMI: First version of Updating files by replacing them!
This commit is contained in:
@@ -13,59 +13,7 @@ Imports DigitalData.Modules.Messaging
|
||||
Imports DigitalData.Modules.Windows
|
||||
|
||||
Public Class frmFlowForm
|
||||
#Region "Sidebar Declarations"
|
||||
Private Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal hwnd As IntPtr, ByVal hWndInsertAfter As Integer, ByVal x As Integer, ByVal y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal wFlags As Integer) As Integer
|
||||
Public Declare Auto Function MoveWindow Lib "user32.dll" (ByVal hWnd As IntPtr, ByVal X As Int32, ByVal Y As Int32, ByVal nWidth As Int32, ByVal nHeight As Int32, ByVal bRepaint As Boolean) As Boolean
|
||||
Declare Function SHAppBarMessage Lib "shell32.dll" Alias "SHAppBarMessage" (ByVal dwMessage As Integer, ByRef pData As APPBARDATA) As Integer
|
||||
Declare Function SetWindowPos Lib "user32.dll" (ByVal hwnd As Integer, ByVal hWndInsertAfter As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal cX As Integer, ByVal cY As Integer, ByVal wFlags As Integer) As Integer
|
||||
|
||||
Structure APPBARDATA
|
||||
Dim cbSize As Integer
|
||||
Dim hwnd As Integer
|
||||
Dim uCallbackMessage As [Delegate]
|
||||
Dim uEdge As Integer
|
||||
Dim rc As RECT
|
||||
Dim lParam As Integer ' message specific
|
||||
End Structure
|
||||
|
||||
Structure RECT
|
||||
Dim Left As Integer
|
||||
Dim Top As Integer
|
||||
Dim Right As Integer
|
||||
Dim Bottom As Integer
|
||||
End Structure
|
||||
|
||||
Const ABE_LEFT As Integer = 0
|
||||
Const ABE_TOP As Integer = &H1
|
||||
Const ABE_RIGHT As Integer = 2
|
||||
Const ABE_BOTTOM As Integer = 3
|
||||
|
||||
Const ABM_NEW As Integer = 0
|
||||
Const ABM_REMOVE As Integer = 1
|
||||
Const ABM_QUERYPOS As Integer = 2
|
||||
Const ABM_SETPOS As Integer = &H3
|
||||
Const ABM_GETSTATE As Integer = 4
|
||||
Const ABM_GETTASKBARPOS As Integer = 5
|
||||
Const ABM_ACTIVATE As Integer = 6
|
||||
Const ABM_GETAUTOHIDEBAR As Integer = 7
|
||||
Const ABM_SETAUTOHIDEBAR As Integer = 8
|
||||
Const ABM_WINDOWPOSCHANGED As Integer = 9
|
||||
|
||||
Const ABS_AUTOHIDE As Integer = 1
|
||||
Const ABS_ALWAYSONTOP As Integer = 2
|
||||
|
||||
Const HWND_NOTTOPMOST As Integer = -2
|
||||
Const HWND_TOPMOST As Integer = -1
|
||||
Const HWND_TOP As Integer = 0
|
||||
Const SHOWNORMAL As Integer = 5
|
||||
|
||||
Const SWP_NOSIZE As Integer = &H1
|
||||
Const SWP_NOMOVE As Short = &H2
|
||||
Const SWP_NOZORDER As Integer = 4
|
||||
Const SWP_NOACTIVATE As Integer = &H10
|
||||
Const SWP_DRAWFRAME As Integer = &H20
|
||||
Const SWP_SHOWWINDOW As Integer = &H40
|
||||
#End Region
|
||||
|
||||
' Constants
|
||||
Private Const OPACITY_INITIAL = 0
|
||||
@@ -101,7 +49,7 @@ Public Class frmFlowForm
|
||||
Private ESCHitCount As Integer = 0
|
||||
Private IndexForm As frmGlobix_Index
|
||||
Private AdminForm As frmAdmin_Start
|
||||
Private Sidebar As APPBARDATA
|
||||
|
||||
|
||||
' Events
|
||||
Public Event ClipboardChanged As EventHandler(Of IDataObject)
|
||||
@@ -128,8 +76,8 @@ Public Class frmFlowForm
|
||||
Init.InitializeApplication()
|
||||
|
||||
' Register Form as Sidebar
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
|
||||
RegisterSidebar(My.UIConfig.SidebarScreen)
|
||||
My.Application.Sidebar = New Sidebar(Handle)
|
||||
My.Application.Sidebar.RegisterSidebar(My.UIConfig.SidebarScreen)
|
||||
End Sub
|
||||
|
||||
Private Sub Init_Completed(sender As Object, e As EventArgs)
|
||||
@@ -938,42 +886,6 @@ Public Class frmFlowForm
|
||||
frmSearchNeu.Show()
|
||||
End Sub
|
||||
|
||||
Private Sub frmFlowForm_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
|
||||
UnregisterSidebar()
|
||||
End Sub
|
||||
|
||||
Private Sub RegisterSidebar(pScreenName As String)
|
||||
Sidebar.hwnd = Me.Handle.ToInt32
|
||||
Sidebar.cbSize = Len(Sidebar)
|
||||
|
||||
Dim oSelectedScreen = System.Windows.Forms.Screen.PrimaryScreen
|
||||
|
||||
' TODO: Make Sidebar Screen configurable
|
||||
'If pScreenName <> "" Then
|
||||
' Dim oScreens = System.Windows.Forms.Screen.AllScreens
|
||||
' For Each oScreen In oScreens
|
||||
' If oScreen.DeviceName = pScreenName Then
|
||||
' oSelectedScreen = oScreen
|
||||
' End If
|
||||
' Next
|
||||
'End If
|
||||
|
||||
With Sidebar
|
||||
.uEdge = ABE_RIGHT
|
||||
.rc.Top = oSelectedScreen.WorkingArea.Top '0
|
||||
.rc.Right = oSelectedScreen.WorkingArea.Right ' right
|
||||
.rc.Left = oSelectedScreen.WorkingArea.Right - 200 ' width of our appbar
|
||||
.rc.Bottom = oSelectedScreen.WorkingArea.Height ' bottom
|
||||
SHAppBarMessage(ABM_NEW, Sidebar)
|
||||
SetWindowPos(Sidebar.hwnd, HWND_TOP, .rc.Left, .rc.Top, .rc.Right - .rc.Left, .rc.Bottom, SWP_SHOWWINDOW Or SWP_NOACTIVATE)
|
||||
SHAppBarMessage(ABM_SETPOS, Sidebar)
|
||||
End With
|
||||
End Sub
|
||||
|
||||
Private Sub UnregisterSidebar()
|
||||
SHAppBarMessage(ABM_REMOVE, Sidebar)
|
||||
End Sub
|
||||
|
||||
Private Sub BasisKonfigurationToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles BasisKonfigurationToolStripMenuItem.Click
|
||||
frmConfigBasic.ShowDialog()
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user