MyTetra Share
Делитесь знаниями!
Окно приложения MS Access - Скрытие окна приложения
Время создания: 16.03.2019 23:43
Раздел: Разные закладки - VBA - Access - msa.polarcom.ru - 09 Интерфейс
Запись: xintrea/mytetra_db_adgaver_new/master/base/1532016857a9dsxd8i51/text.html на raw.githubusercontent.com

Окно приложения MS Access - Скрытие окна приложения

'--------------------------------------------------------------------------

' Module : modHideAccessWindow

' Author : ????????

' Date : 22.11.2017

' Purpose : Скрытие окна приложения

' у Форм PopUp = True !!!!

'--------------------------------------------------------------------------

'По материалам: http://www.cyberforum.ru/ms-access/thread2140997.html

'--------------------------------------------------------------------------

Option Compare Database

Option Explicit


#If VBA7 Then

#If Win64 Then

Private Declare PtrSafe Function SetWindowLongPtr Lib "user32" Alias "SetWindowLongPtrA" (ByVal hWnd As LongPtr, ByVal nIndex As Long, ByVal dwNewLong As LongPtr) As LongPtr

Private Declare PtrSafe Function GetWindowLongPtr Lib "user32" Alias "GetWindowLongPtrA" (ByVal hWnd As LongPtr, ByVal nIndex As Long) As LongPtr

#Else

Private Declare PtrSafe Function SetWindowLongPtr Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As LongPtr, ByVal nIndex As Long, ByVal dwNewLong As LongPtr) As LongPtr

#End If

Private Declare PtrSafe Function SetWindowPos Lib "user32" (ByVal hWnd As LongPtr, ByVal hwndInsertAfter As LongPtr, ByVal x As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long

#Else

Private Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hwndInsertAfter As Long, ByVal x As Long, ByVal Y As Long, _

ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long

Private Declare Function apiShowWindow Lib "user32" _

Alias "ShowWindow" (ByVal hWnd As Long, _

ByVal nCmdShow As Long) As Long

Declare Sub MessageBeep Lib "user32" (ByVal N As Long)

#End If


Public Function hidde_on()

Dim HWND_TOPMOST, SWP_SHOWWINDOW

SetWindowPos Application.hWndAccessApp, HWND_TOPMOST, -40, -40, 0, 0, SWP_SHOWWINDOW

End Function

Public Function hidde_off()

Dim HWND_TOPMOST, SWP_NOACTIVATE, SWP_SHOWWINDOW

SetWindowPos Application.hWndAccessApp, HWND_TOPMOST, 0, 0, 700, 500, SWP_SHOWWINDOW

End Function


Так же в этом разделе:
 
MyTetra Share v.0.65
Яндекс индекс цитирования