Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I disable the cursor movement after hitting enter in a cell Randy R Excel Discussion (Misc queries) 1 September 16th 09 02:30 AM
How do I set up top to bottom movement for a Form with two column Teresa Excel Worksheet Functions 9 March 6th 07 10:40 PM
I need to disable to X on a user form cwwolfdog Excel Discussion (Misc queries) 2 March 28th 05 02:33 AM
Disable Label in a Form Stuart[_21_] Excel Programming 4 March 13th 05 11:04 PM
User Form movement Zygoid[_3_] Excel Programming 2 January 28th 04 06:58 PM


All times are GMT +1. The time now is 04:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"