Width Property missing from Listview (mscomctl.dll) in VB6

  • Thread starter Thread starter Eric Hofer
  • Start date Start date
E

Eric Hofer

Has anybody ever experienced referencing the listview and then not
being able to access the width property? Any thoughts what might be
the cause.

Using the Object Browser, width is not shown for ListView.

Also, myListview.name causes an error though if the mouse hovers, it
shows the name of the element.
 
(e-mail address removed) (Eric Hofer) wrote ...
Has anybody ever experienced referencing the listview and then not
being able to access the width property? Any thoughts what might be
the cause.

Using the Object Browser, width is not shown for ListView.

Also, myListview.name causes an error though if the mouse hovers, it
shows the name of the element.

Have you noticed, for the MSForms library in the Object Browser that
e.g. the ComboBox has no Width nor Name property but the object called
'Control' does? The following works for me:

Private Sub UserForm_Activate()
Debug.Print ListView1.Name, ListView1.Width
End Sub

Jamie.

--
 
Interesting. I cannot get the same to work.

Instead I get "Compile error: method or data member not found".

I worked round this by finding the related control in the generic
controls.

'WORKAROUND as WIDTH isn't working
For i = 0 To Me.Controls.Count - 1
If lvwTarget Is Me.Controls(i) Then
vRemWidth = Me.Controls(i).Width
Exit For
End If
Next i



*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top