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