Use API to create a status bar in VB

Source: Internet
Author: User


In VB, do you want to create a simple status bar and use the OCX in MB? Is there any way to use it? The following is how to create an API.
A Status Bar, VB makes it easy for beginners to learn, but when you have some knowledge of VB, it is found that VB was originally a chicken rib ......
First, create a form, add two buttons to the form, and then write the following code:
'-----------------------------------------------
'
'Create Status Bar Demo
'
'Code by loveboom [DFCG] [FCG] [US]
'Email: loveboom # 163.com
'Http://blog.csdn.net/bmd2chen
'
'-------------------------------------------------
Dim hWndBar As Long; Status Bar handle
Private Const IDC_STATBAR As Long = & H2005 'status bar ID
Private Sub commandementclick ()
Dim ret As Boolean
Ret = CreateStatBar (Me. hwnd, IDC_STATBAR, hWndBar)
If ret = True Then
MsgBox "status bar created successfully! "
Else
MsgBox "failed to create Status Bar :-(! ", 48
End If
End Sub
Private Sub Command2_Click ()
SetBarText hWndBar, 1, "Create StatusBar Demo :-)! "
End Sub

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.