VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Convert a Child form in a popup Window

Dino Amoruso  (1 Submission)   Custom Controls/Forms/Menus   VB 6.0   Unknown Difficulty   Fri 10th March 2000   Mon 8th February 2021

Convert a Child form in a popup Window

API Declarations


' Aggiungere un controllo picture all'MDIForm e due commandbutton
' Inserire un form standard e impostare la proprietà MDIChild su True
' --- Codice form MDI ---

' Dichiarazioni API per eliminare la voce Successivo dal menu di sistema di un form child
Private Declare Function GetMenuItemInfo Lib "user32" Alias "GetMenuItemInfoA" (ByVal hMenu As Long, ByVal uItem As Long, ByVal fByPosition As Long, lpmii As MENUITEMINFO) As Long
Private Declare Function GetMenuItemCount Lib "user32" (ByVal hMenu As Long) As Long
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
' Menu flags
Private Const MF_BYPOSITION As Long = &H400
Private Const MF_REMOVE As Long = &H1000
Private Const MIIM_ID As Long = &H2
Private Const MIIM_TYPE As Long = &H10
Private Const MFT_STRING As Long = &H0
' Menu structure
Private Type MENUITEMINFO
cbSize As Long
fMask As Long
fType As Long
fState As Long
wID As Long
hSubMenu As Long
hbmpChecked As Long
hbmpUnchecked As Long
dwItemData As Long
dwTypeData As String
cch As Long
End Type
' Dichiarazioni API per la conversione di un form Child in una window popup
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Declare Function SetFocus Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
' Flag opzione stile di SetWindowLong
Private Const GWL_STYLE = (-16)
' Attributi SetWindowLong per impostare una window popup
Private Const WS_OVERLAPPED = &H0&
Private Const WS_THICKFRAME = &H40000
Private Const WS_SYSMENU = &H80000
Private Const WS_CAPTION = &HC00000 ' WS_BORDER Or WS_DLGFRAME
Private Const WS_OVERLAPPEDWINDOW = (WS_OVERLAPPED Or WS_CAPTION Or WS_SYSMENU Or WS_THICKFRAME)

Rate Convert a Child form in a popup Window (1(1 Vote))
Convert a Child form in a popup Window.bas

Convert a Child form in a popup Window Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters