Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
disable form movement
hi everyone
i know that is possible to disable form from any kind of movement.i don´t want that the user can move,minimize,maximize,move from one position to another, i want the form to be show always on fullscreen.i already disable the close buttom and show the form on fullscreen but the user can move it. how can i do it? thanks in advance Miguel |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
disable form movement
Hi Liedson31,
It is enough to remove the form title bar: (not to forget a Exit button) Private Declare Function FindWindow& _ Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName$, ByVal lpWindowName$) Private Declare Function SetWindowLong& _ Lib "user32" Alias "SetWindowLongA" _ (ByVal hWnd&, ByVal nIndex&, ByVal dwNewLong&) Private Declare Function DrawMenuBar& _ Lib "user32" (ByVal hWnd&) Private Sub UserForm_Initialize() Dim hWnd As Long hWnd = FindWindow(vbNullString, Me.Caption) SetWindowLong hWnd, -16, &H84080080 DrawMenuBar hWnd End Sub MP "Liedson31" a écrit dans le message de news: ... hi everyone i know that is possible to disable form from any kind of movement.i don´t want that the user can move,minimize,maximize,move from one position to another, i want the form to be show always on fullscreen.i already disable the close buttom and show the form on fullscreen but the user can move it. how can i do it? thanks in advance Miguel |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
disable form movement
thanks michel that solves my problem!
"Michel Pierron" wrote: Hi Liedson31, It is enough to remove the form title bar: (not to forget a Exit button) Private Declare Function FindWindow& _ Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName$, ByVal lpWindowName$) Private Declare Function SetWindowLong& _ Lib "user32" Alias "SetWindowLongA" _ (ByVal hWnd&, ByVal nIndex&, ByVal dwNewLong&) Private Declare Function DrawMenuBar& _ Lib "user32" (ByVal hWnd&) Private Sub UserForm_Initialize() Dim hWnd As Long hWnd = FindWindow(vbNullString, Me.Caption) SetWindowLong hWnd, -16, &H84080080 DrawMenuBar hWnd End Sub MP "Liedson31" a écrit dans le message de news: ... hi everyone i know that is possible to disable form from any kind of movement.i don´t want that the user can move,minimize,maximize,move from one position to another, i want the form to be show always on fullscreen.i already disable the close buttom and show the form on fullscreen but the user can move it. how can i do it? thanks in advance Miguel |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I disable the cursor movement after hitting enter in a cell | Excel Discussion (Misc queries) | |||
How do I set up top to bottom movement for a Form with two column | Excel Worksheet Functions | |||
I need to disable to X on a user form | Excel Discussion (Misc queries) | |||
Disable Label in a Form | Excel Programming | |||
User Form movement | Excel Programming |