dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Visual Basic
Expertise: Advanced
Sep 10, 1998

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Use Toolbar-Style Title Bars

To make a form use a small toolbar-style title bar, set the form's WS_EX_TOOLWINDOW extended style:

 Declare Function GetWindowLong Lib "user32" _
	Alias "GetWindowLongA" ( _
	ByVal hwnd As Long, _ 
	ByVal nIndex As Long) As Long
Declare Function SetWindowLong Lib "user32" _
	Alias "SetWindowLongA" ( _
	ByVal hwnd As Long, _
	ByVal nIndex As Long, _
	ByVal dwNewLong As Long) As Long
Public Const WS_EX_TOOLWINDOW = &H80&
Public Const GWL_EXSTYLE = (-20)
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
Public Const SWP_FRAMECHANGED = &H20
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOZORDER = &H4
Public Const SWP_NOSIZE = &H1
Private Sub Form_Load()
Dim old_style As Long
	old_style = GetWindowLong(hwnd, GWL_EXSTYLE)
	old_style = SetWindowLong(hwnd, _
		GWL_EXSTYLE, old_style Or _
		WS_EX_TOOLWINDOW)
	SetWindowPos hwnd, 0, 0, 0, 0, 0, _
		SWP_FRAMECHANGED Or SWP_NOMOVE Or _
		SWP_NOZORDER Or SWP_NOSIZE
End Sub
Rod Stephens
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date