Click here to Skip to main content
15,913,669 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How can show the the message to StatusItem1 when I click the btnSave? Pin
Muhammad Javed Khan18-Jan-06 18:54
Muhammad Javed Khan18-Jan-06 18:54 
QuestionSub Main() Pin
OldDog.Net18-Jan-06 14:31
OldDog.Net18-Jan-06 14:31 
AnswerRe: Sub Main() Pin
Joshua Quick18-Jan-06 15:41
Joshua Quick18-Jan-06 15:41 
QuestionDateTimePicker Pin
welbert18-Jan-06 13:56
welbert18-Jan-06 13:56 
AnswerRe: DateTimePicker Pin
Joshua Quick18-Jan-06 16:48
Joshua Quick18-Jan-06 16:48 
QuestionCan't see the horizontal scrollbar in listbox VB6 Pin
Joy Anne18-Jan-06 13:55
Joy Anne18-Jan-06 13:55 
AnswerRe: Can't see the horizontal scrollbar in listbox VB6 Pin
Joshua Quick18-Jan-06 16:00
Joshua Quick18-Jan-06 16:00 
GeneralRe: Can't see the horizontal scrollbar in listbox VB6 Pin
Joy Anne18-Jan-06 17:06
Joy Anne18-Jan-06 17:06 
Yes, I call the UpdateHorizontalScrollbar() method after I've added my strings to the ListBox.
I did debug inside the UpdateHorizontalScrollbar() and found the information there (such as lstCtrl.ListCount, lstCtrl.Style etc.) is correct.
But I can't see the Horizontal scrollbar there. Please have a look the code related to this issue.

Public lstCtrl As ListBox
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

(after I've added my strings to the ListBox)
Set lstCtrl = frmjoy.List3
Call UpdateHorizontalScrollbar

' Analyzes given listbox and displays a horizontal scroll bar if needed.
Public Sub UpdateHorizontalScrollbar()
Dim fMax As Single
Dim fValue As Single
Dim iIndex As Integer

' Get length of longest text in listbox.
fMax = 0
For iIndex = (lstCtrl.ListCount - 1) To 0 Step -1
fValue = lstCtrl.Parent.TextWidth(lstCtrl.List(iIndex))
If (fValue > fMax) Then fMax = fValue
Next
' Convert max text length to pixels.
fMax = fMax / Screen.TwipsPerPixelX
' Increase length for checkboxes and margins (in pixels).
If (1 = lstCtrl.Style) Then fMax = fMax + 13 ' Offset for checkbox.
fMax = fMax + 4 ' Offset for margins.
' Set horizontal scrollbar length.
SendMessage lstCtrl.hwnd, &H194, CLng(fMax) + 1, 0&
End Sub

Joy Anne
GeneralRe: Can't see the horizontal scrollbar in listbox VB6 Pin
Joshua Quick18-Jan-06 17:21
Joshua Quick18-Jan-06 17:21 
QuestionControl a Scanner with VB.net Pin
GerhardKreuzer18-Jan-06 12:51
GerhardKreuzer18-Jan-06 12:51 
Questionhow to transfer sql table to access via module code.Please help!! Pin
marclenoir200518-Jan-06 5:20
marclenoir200518-Jan-06 5:20 
QuestionGetting the value of an item in a nested array Pin
jszpila18-Jan-06 5:04
jszpila18-Jan-06 5:04 
AnswerRe: Getting the value of an item in a nested array Pin
Guffa18-Jan-06 14:16
Guffa18-Jan-06 14:16 
GeneralRe: Getting the value of an item in a nested array Pin
jszpila19-Jan-06 3:43
jszpila19-Jan-06 3:43 
Questionadding details in a ListView Pin
Devraj Raut18-Jan-06 4:19
Devraj Raut18-Jan-06 4:19 
AnswerRe: adding details in a ListView Pin
Dave Kreskowiak18-Jan-06 4:56
mveDave Kreskowiak18-Jan-06 4:56 
AnswerRe: adding details in a ListView Pin
hmklakmal18-Jan-06 5:02
hmklakmal18-Jan-06 5:02 
QuestionInvalid printer specified Pin
misecprj18-Jan-06 4:19
misecprj18-Jan-06 4:19 
AnswerRe: Invalid printer specified Pin
Dave Kreskowiak18-Jan-06 4:43
mveDave Kreskowiak18-Jan-06 4:43 
QuestionIcon problem Pin
Brightday18-Jan-06 4:12
Brightday18-Jan-06 4:12 
AnswerRe: Icon problem Pin
Dave Kreskowiak18-Jan-06 4:40
mveDave Kreskowiak18-Jan-06 4:40 
QuestionRe: Icon problem Pin
Brightday19-Jan-06 5:22
Brightday19-Jan-06 5:22 
AnswerRe: Icon problem Pin
Dave Kreskowiak19-Jan-06 9:28
mveDave Kreskowiak19-Jan-06 9:28 
QuestionRe: Icon problem Pin
Brightday19-Jan-06 15:04
Brightday19-Jan-06 15:04 
AnswerRe: Icon problem Pin
Dave Kreskowiak19-Jan-06 17:31
mveDave Kreskowiak19-Jan-06 17:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.