Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 8th, 2003, 11:27 AM
Registered User
Join Date: Jun 2003
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default create custom vb form title bar


Anyone has any idea to create a custom form title bar in vb? I'd like some source code or API function names.

Reply With Quote
  #2 (permalink)  
Old September 22nd, 2005, 02:57 PM
Registered User
Join Date: Sep 2005
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to scancode

Option Explicit 

' API functions 
Private Declare Function ReleaseCapture Lib "user32" () As Long 
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long 
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long 

' Constants for above API calls 
Private Const HTCAPTION = 2 
Private Const WM_NCLBUTTONDOWN = &HA1 

Private Sub Form_Load() 
  Dim retVal As Long 

  retVal = SetWindowText(Me.hwnd, Label1) 
End Sub 

Private Sub Label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) 
  SendMessage hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0& 
End Sub
Code by nzjonboy
- Use google

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
url appears in title bar when refreshing shibp2pkumar Classic ASP Basics 3 May 4th, 2005 07:48 PM
How to trap Mouse events on Title bar/Caption bar chiefouko Pro VB.NET 2002/2003 0 September 21st, 2004 02:42 AM
Dynamically write to title bar. fs22 Javascript How-To 2 June 2nd, 2004 04:16 PM
Removing title bar - is this possible? larry HTML Code Clinic 4 January 26th, 2004 03:07 PM
How to create a custom form shape lotfi BOOK: Professional C#, 2nd and 3rd Editions 0 November 15th, 2003 08:55 AM

All times are GMT -4. The time now is 11:35 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.