ahhhhhh ok ok pues en las propiedaades del form pones borderstyle "none"
y si kieres q no se poda salir este codigo:
Option Explicit
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
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const SWP_FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Const valorDock As String = "enPicDock"
Private Declare Function SetParent Lib "User32" _
(ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Enum eShowWindow
HIDE_eSW = 0&
SHOWNORMAL_eSW = 1&
NORMAL_eSW = 1&
SHOWMINIMIZED_eSW = 2&
SHOWMAXIMIZED_eSW = 3&
MAXIMIZE_eSW = 3&
SHOWNOACTIVATE_eSW = 4&
SHOW_eSW = 5&
MINIMIZE_eSW = 6&
SHOWMINNOACTIVE_eSW = 7&
SHOWNA_eSW = 8&
RESTORE_eSW = 9&
SHOWDEFAULT_eSW = 10&
MAX_eSW = 10&
End Enum
Private Declare Function ShowWindow Lib "User32" _
(ByVal hwnd As Long, ByVal nCmdShow As eShowWindow) As Long
Private Declare Function MoveWindow Lib "User32" _
(ByVal hwnd As Long, ByVal X As Long, ByVal Y As Long, _
ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
Private Type POINTAPI
X As Long
Y As Long
End Type
Private Type RECTAPI
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Type WINDOWPLACEMENT
Length As Long
Flags As Long
ShowCmd As Long
ptMinPosition As POINTAPI
ptMaxPosition As POINTAPI
rcNormalPosition As RECTAPI
End Type
Private Declare Function GetWindowPlacement Lib "User32" _
(ByVal hwnd As Long, ByRef lpwndpl As WINDOWPLACEMENT) As Long
Private Sub MiFuncionDeAjuste(Formulario As Form, Estado As Boolean)
Dim retorno As Long
If Estado = True Then
retorno = SetWindowPos(Formulario.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_FLAGS)
Else
retorno = SetWindowPos(Formulario.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_FLAGS)
End If
End Sub
Private Sub dockForm(ByVal formhWnd As Long, _
ByVal picDock As PictureBox, _
Optional ByVal ajustar As Boolean = True)
Call SetParent(formhWnd, picDock.hwnd)
posDockForm formhWnd, picDock, ajustar
Call ShowWindow(formhWnd, NORMAL_eSW)
End Sub
Private Sub posDockForm(ByVal formhWnd As Long, _
ByVal picDock As PictureBox, _
Optional ByVal ajustar As Boolean = True)
Dim nWidth As Long, nHeight As Long
Dim wndPl As WINDOWPLACEMENT
'
If ajustar Then
nWidth = picDock.ScaleWidth \ Screen.TwipsPerPixelX
nHeight = picDock.ScaleHeight \ Screen.TwipsPerPixelY
Else
Call GetWindowPlacement(formhWnd, wndPl)
With wndPl.rcNormalPosition
nWidth = .Right - .Left
nHeight = .Bottom - .Top
End With
End If
Call MoveWindow(formhWnd, 0, 0, nWidth, nHeight, True)
End Sub
Private Sub Form_Load()
End Sub
Private Sub Timer2_Timer()
MiFuncionDeAjuste Me, True
End Sub
y listo,asi no se puede salir asta que alguna orden q le des se produzca(unload por ejemplo)
creo q esto ya si es lo que kieres
un saludo