Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default form size and protection

hi everyone, i need some help
i have a form that i want to display on fullscreen independent of screen
resolution(1024,800,....) i, want to show always on full screen...

the second question is, in this form i donĀ“t want the user rezise it or move
it the form must be "locked" from any movement,the user only put values in
the boxes available.....

sorry about my english if it is not good

thanks in advance
Miguel

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default form size and protection

Try something like this (put it in the UserForm's code module):

Private Sub UserForm_Initialize()
With Application
Top = .Top
Height = .Height
Left = .Left
Width = .Width
End With
Dim lHandle As Long, lCount As Long
On Error Resume Next
lHandle = FindWindowA(vbNullString, Me.Caption)
If lHandle < 0 Then
For lCount = 1 To 6
DeleteMenu GetSystemMenu(lHandle, False), 0, MF_BYPOSITION
Next lCount
End If
End Sub

--

Vasant



"Liedson31" wrote in message
...
hi everyone, i need some help
i have a form that i want to display on fullscreen independent of screen
resolution(1024,800,....) i, want to show always on full screen...

the second question is, in this form i don“t want the user rezise it or

move
it the form must be "locked" from any movement,the user only put values in
the boxes available.....

sorry about my english if it is not good

thanks in advance
Miguel



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default form size and protection

thanks vasant

the with application... works fine but after the end with part,the
FindWindowA my excel donĀ“t recognize it,gives me a "sub or function not
defined".it is a reference that i must insert? if it works what do the lines :
For lCount = 1 To 6
DeleteMenu GetSystemMenu(lHandle, False), 0, MF_BYPOSITION
Next lCount

thanks again for your help
Miguel


Try something like this (put it in the UserForm's code module):

Private Sub UserForm_Initialize()
With Application
Top = .Top
Height = .Height
Left = .Left
Width = .Width
End With
Dim lHandle As Long, lCount As Long
On Error Resume Next
lHandle = FindWindowA(vbNullString, Me.Caption)
If lHandle < 0 Then
For lCount = 1 To 6
DeleteMenu GetSystemMenu(lHandle, False), 0, MF_BYPOSITION
Next lCount
End If
End Sub

--

Vasant



"Liedson31" wrote in message
...
hi everyone, i need some help
i have a form that i want to display on fullscreen independent of screen
resolution(1024,800,....) i, want to show always on full screen...

the second question is, in this form i donĀ“t want the user rezise it or

move
it the form must be "locked" from any movement,the user only put values in
the boxes available.....

sorry about my english if it is not good

thanks in advance
Miguel




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default form size and protection

I apologize; I forgot the declarations. Paste the following at the top of
your module:

Private Const MF_BYPOSITION As Long = &H400
Private Declare Function GetSystemMenu Lib "user32" _
(ByVal hWnd As Long, ByVal bRevert As Long) As Long
Private Declare Function DeleteMenu Lib "user32" _
(ByVal hMenu As Long, ByVal nPosition As Long, _
ByVal wFlags As Long) As Long
Private Declare Function FindWindowA Lib "user32" _
(ByVal lpClassName As String, ByVal lpWindowName _
As String) As Long

--

Vasant

"Liedson31" wrote in message
...
thanks vasant

the with application... works fine but after the end with part,the
FindWindowA my excel don“t recognize it,gives me a "sub or function not
defined".it is a reference that i must insert? if it works what do the

lines :
For lCount = 1 To 6
DeleteMenu GetSystemMenu(lHandle, False), 0, MF_BYPOSITION
Next lCount

thanks again for your help
Miguel


Try something like this (put it in the UserForm's code module):

Private Sub UserForm_Initialize()
With Application
Top = .Top
Height = .Height
Left = .Left
Width = .Width
End With
Dim lHandle As Long, lCount As Long
On Error Resume Next
lHandle = FindWindowA(vbNullString, Me.Caption)
If lHandle < 0 Then
For lCount = 1 To 6
DeleteMenu GetSystemMenu(lHandle, False), 0, MF_BYPOSITION
Next lCount
End If
End Sub

--

Vasant



"Liedson31" wrote in message
...
hi everyone, i need some help
i have a form that i want to display on fullscreen independent of

screen
resolution(1024,800,....) i, want to show always on full screen...

the second question is, in this form i don“t want the user rezise it

or
move
it the form must be "locked" from any movement,the user only put

values in
the boxes available.....

sorry about my english if it is not good

thanks in advance
Miguel






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default form size and protection

Sorry the time i took to reply.....but i've been "captured" by my boss for
another application and i put this one back....but once iĀ“ve started it
again...i remember my earlier problem :)))))))

it works perfectly!!!

Thanks very much
Miguel

"Vasant Nanavati" wrote:

I apologize; I forgot the declarations. Paste the following at the top of
your module:

Private Const MF_BYPOSITION As Long = &H400
Private Declare Function GetSystemMenu Lib "user32" _
(ByVal hWnd As Long, ByVal bRevert As Long) As Long
Private Declare Function DeleteMenu Lib "user32" _
(ByVal hMenu As Long, ByVal nPosition As Long, _
ByVal wFlags As Long) As Long
Private Declare Function FindWindowA Lib "user32" _
(ByVal lpClassName As String, ByVal lpWindowName _
As String) As Long

--

Vasant

"Liedson31" wrote in message
...
thanks vasant

the with application... works fine but after the end with part,the
FindWindowA my excel donĀ“t recognize it,gives me a "sub or function not
defined".it is a reference that i must insert? if it works what do the

lines :
For lCount = 1 To 6
DeleteMenu GetSystemMenu(lHandle, False), 0, MF_BYPOSITION
Next lCount

thanks again for your help
Miguel


Try something like this (put it in the UserForm's code module):

Private Sub UserForm_Initialize()
With Application
Top = .Top
Height = .Height
Left = .Left
Width = .Width
End With
Dim lHandle As Long, lCount As Long
On Error Resume Next
lHandle = FindWindowA(vbNullString, Me.Caption)
If lHandle < 0 Then
For lCount = 1 To 6
DeleteMenu GetSystemMenu(lHandle, False), 0, MF_BYPOSITION
Next lCount
End If
End Sub

--

Vasant



"Liedson31" wrote in message
...
hi everyone, i need some help
i have a form that i want to display on fullscreen independent of

screen
resolution(1024,800,....) i, want to show always on full screen...

the second question is, in this form i donĀ“t want the user rezise it

or
move
it the form must be "locked" from any movement,the user only put

values in
the boxes available.....

sorry about my english if it is not good

thanks in advance
Miguel









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default form size and protection

Thanks for the feedback!

--

Vasant

"Liedson31" wrote in message
...
Sorry the time i took to reply.....but i've been "captured" by my boss for
another application and i put this one back....but once i“ve started it
again...i remember my earlier problem :)))))))

it works perfectly!!!

Thanks very much
Miguel

"Vasant Nanavati" wrote:

I apologize; I forgot the declarations. Paste the following at the top

of
your module:

Private Const MF_BYPOSITION As Long = &H400
Private Declare Function GetSystemMenu Lib "user32" _
(ByVal hWnd As Long, ByVal bRevert As Long) As Long
Private Declare Function DeleteMenu Lib "user32" _
(ByVal hMenu As Long, ByVal nPosition As Long, _
ByVal wFlags As Long) As Long
Private Declare Function FindWindowA Lib "user32" _
(ByVal lpClassName As String, ByVal lpWindowName _
As String) As Long

--

Vasant

"Liedson31" wrote in message
...
thanks vasant

the with application... works fine but after the end with part,the
FindWindowA my excel don“t recognize it,gives me a "sub or function

not
defined".it is a reference that i must insert? if it works what do the

lines :
For lCount = 1 To 6
DeleteMenu GetSystemMenu(lHandle, False), 0,

MF_BYPOSITION
Next lCount

thanks again for your help
Miguel


Try something like this (put it in the UserForm's code module):

Private Sub UserForm_Initialize()
With Application
Top = .Top
Height = .Height
Left = .Left
Width = .Width
End With
Dim lHandle As Long, lCount As Long
On Error Resume Next
lHandle = FindWindowA(vbNullString, Me.Caption)
If lHandle < 0 Then
For lCount = 1 To 6
DeleteMenu GetSystemMenu(lHandle, False), 0,

MF_BYPOSITION
Next lCount
End If
End Sub

--

Vasant



"Liedson31" wrote in message
...
hi everyone, i need some help
i have a form that i want to display on fullscreen independent of

screen
resolution(1024,800,....) i, want to show always on full screen...

the second question is, in this form i don“t want the user rezise

it
or
move
it the form must be "locked" from any movement,the user only put

values in
the boxes available.....

sorry about my english if it is not good

thanks in advance
Miguel









  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default form size and protection

Hi again Vasant......
After all my problem is bigger!

the code you give me works fine like a told you yesterday,but i have another
problem:

my form is optimized to 1024x768,in this resolution she really display on
fullscreen,centered and works perfectly,but....2 situations:

1-if the resolution changes to 1280x... or higher the form works fine but
the only change i need to made is that the form isnĀ“t centered...i already
have the form set in Startupposition - CenterScreen(Owner - i tried both),
but what really happen is that in the screen it increases the backcolor of
the form to the right and the form goes to the left ??? the increase of the
back color is no problem but the form menu goes to the left......it donĀ“t
like it its possible to have it centered?

2-this one i believe is even more dificult....and if the user uses a 800x600
resolution..he can even see the whole form :)))

thanks again
Miguel

"Vasant Nanavati" wrote:

Thanks for the feedback!

--

Vasant

"Liedson31" wrote in message
...
Sorry the time i took to reply.....but i've been "captured" by my boss for
another application and i put this one back....but once iĀ“ve started it
again...i remember my earlier problem :)))))))

it works perfectly!!!

Thanks very much
Miguel

"Vasant Nanavati" wrote:

I apologize; I forgot the declarations. Paste the following at the top

of
your module:

Private Const MF_BYPOSITION As Long = &H400
Private Declare Function GetSystemMenu Lib "user32" _
(ByVal hWnd As Long, ByVal bRevert As Long) As Long
Private Declare Function DeleteMenu Lib "user32" _
(ByVal hMenu As Long, ByVal nPosition As Long, _
ByVal wFlags As Long) As Long
Private Declare Function FindWindowA Lib "user32" _
(ByVal lpClassName As String, ByVal lpWindowName _
As String) As Long

--

Vasant

"Liedson31" wrote in message
...
thanks vasant

the with application... works fine but after the end with part,the
FindWindowA my excel donĀ“t recognize it,gives me a "sub or function

not
defined".it is a reference that i must insert? if it works what do the
lines :
For lCount = 1 To 6
DeleteMenu GetSystemMenu(lHandle, False), 0,

MF_BYPOSITION
Next lCount

thanks again for your help
Miguel


Try something like this (put it in the UserForm's code module):

Private Sub UserForm_Initialize()
With Application
Top = .Top
Height = .Height
Left = .Left
Width = .Width
End With
Dim lHandle As Long, lCount As Long
On Error Resume Next
lHandle = FindWindowA(vbNullString, Me.Caption)
If lHandle < 0 Then
For lCount = 1 To 6
DeleteMenu GetSystemMenu(lHandle, False), 0,

MF_BYPOSITION
Next lCount
End If
End Sub

--

Vasant



"Liedson31" wrote in message
...
hi everyone, i need some help
i have a form that i want to display on fullscreen independent of
screen
resolution(1024,800,....) i, want to show always on full screen...

the second question is, in this form i donĀ“t want the user rezise

it
or
move
it the form must be "locked" from any movement,the user only put
values in
the boxes available.....

sorry about my english if it is not good

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
Creating a form with different size lines PurseGirl24 Excel Discussion (Misc queries) 3 January 26th 10 05:26 PM
Workbook protection impacts file size when compressing a spreadshe Frank Canada Excel Worksheet Functions 0 October 16th 09 09:04 PM
Excel File Size Bloats when using Protection? [email protected] Excel Discussion (Misc queries) 1 January 29th 08 10:08 PM
Form Combo Box, Protection? John Keith[_2_] Excel Programming 2 April 14th 05 09:22 PM
size of user form jon brennan Excel Programming 1 June 28th 04 07:33 PM


All times are GMT +1. The time now is 04:06 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"