Tools Links Login

Browsing Visual Basic 6

Prev   Next

Flex-Print
Print a FlexGrid.
Posted:2020-08-30, 306 views

Span a picture on multiple pages
Print a big picture on four pages Private Sub cmdPrint_Click()   Const PAGE_WIDTH = 8.
Posted:2020-08-30, 184 views

Drag a Control
Drag a control at runtimePrivate Declare Function ReleaseCapture Lib "user32" () As LongPrivate Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, _ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As LongConst WM_NCLBUTTONDOWN = &HA1Const HTCAPTION = 2Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)   ReleaseCapture   SendMessage Picture1.
Posted:2020-08-30, 192 views

Search and Highlight
Find a string in a textbox and highlightPrivate Function FindString (Control As Control, FindStr As String, Optional StartPos As Integer = 1 ) As Boolean   Dim a As Integer   a = InStr(StartPos, LCase$(Control.
Posted:2020-08-30, 240 views

Place a progress bar in a status bar panel
Place a status bar and a progress bar on a form and make the progress bar invisible.
Posted:2020-08-30, 230 views

Tabs in Listbox
Set tab stops in listboxPrivate Declare Function SendMessage Lib "USER32" Alias "SendMessageA" (ByVal hWnd As Long, _ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As LongPrivate Declare Function GetDialogBaseUnits Lib "USER32" () As LongConst LB_SETTABSTOPS = &H192Sub SetTabStops(lListWindowHandle As ListBox, iNoTabStops As Integer, lTabPositions() As Long)   Dim iIndex As Integer   Dim lDialogBaseUnits As Long   Dim iDialogUnitsX As Integer   lDialogBaseUnits = GetDialogBaseUnits()   iDialogUnitsX = (lDialogBaseUnits And &HFFFF&) \ 4   ReDim lTabPos(0 To iNoTabStops - 1) As Long   For iIndex = 0 To iNoTabStops - 1      lTabPos(iIndex) = lTabPositions(iIndex) * iDialogUnitsX * 2   Next iIndex   Call SendMessage(lListWindowHandle.
Posted:2020-08-30, 249 views

Search a Listbox

Posted:2020-08-30, 209 views

Prev   Next