Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » Knowledge Base

Post new topic   Reply to topic
Disable the "X" of your form
View previous topic :: View next topic  
Author Message
Avis
Junior Poster


Joined: 07 Oct 2003
Posts: 510
Location: India

PostPosted: Oct 8th, 2003 05:35 AM    Post subject: Disable the "X" of your form Reply with quote

This will disable the "X" of the window.

Code:
Const MF_BYPOSITION = &H400
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

Private Sub Form_Load()
    RemoveMenu GetSystemMenu(Me.hWnd, 0), 6, MF_BYPOSITION
End Sub
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger ICQ Number
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » Knowledge Base All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic