CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Faltering Windows support
  • Internet Explorer 8 Click Clever Click Safe
  • Release Candidate 2 for ASP.NET MVC 2
  • Learn How to Create Dual Mode Windows Services

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Visual Basic Programming > Visual Basic 6.0 Programming
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Visual Basic 6.0 Programming Ask questions about VB 6.0 (or earlier versions) or help others by answering their question.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old November 10th, 2009, 05:33 AM
    UKDavid UKDavid is offline
    Junior Member
     
    Join Date: Jun 2009
    Posts: 4
    UKDavid is an unknown quantity at this point (<10)
    filelistbox integral height

    Is there any way to turn OFF integral height on a filelistbox?

    Because it is on the control size 'jumps' when the form is resized, which looks poor...

    Thanks in advance!
    Reply With Quote
      #2    
    Old November 11th, 2009, 07:28 AM
    WoF's Avatar
    WoF WoF is offline
    Elite Member
     
    Join Date: Jul 2006
    Location: Germany
    Posts: 2,791
    WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+)
    Re: filelistbox integral height

    I don't understand, sorry.
    What is the integral height? When does it jump?
    Reply With Quote
      #3    
    Old November 11th, 2009, 10:02 AM
    HanneSThEGreaT's Avatar
    HanneSThEGreaT HanneSThEGreaT is online now
    The Unstable Mod
    Power Poster
     
    Join Date: Jul 2001
    Location: Vereeniging, South Africa
    Posts: 8,006
    HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+)
    Re: filelistbox integral height

    Can you elaborate more please UKDavid. When I put a FileListBox on my Form and resize the form, I don't see anything weird ¿
    __________________
    My Latest Articles :
    Changing Mouse Settings with VB.NET || Creating Your Own Encryption / Decryption Program Using VB.NET 2005 || Autorun Menu Creator in VB.NET || Creating Your Own Tetris Game With VB.NET Part 1
    Find All My Articles : Here

    FAQs :
    .NET FrameWork FAQs || Visual Basic.NET FAQs || C# FAQs

    Be The Change That You Want To See In The World - Michael Scofield, Prison Break; Season 1 Episode 1

    Read This Before You Post || Acceptable Use Policy
    Reply With Quote
      #4    
    Old November 11th, 2009, 09:44 PM
    vb5prgrmr vb5prgrmr is offline
    Member
     
    Join Date: Apr 2009
    Posts: 232
    vb5prgrmr is a jewel in the rough (200+) vb5prgrmr is a jewel in the rough (200+) vb5prgrmr is a jewel in the rough (200+)
    Re: filelistbox integral height

    The FileListBox, much like the Listbox only resizes to specific sizes based upon the font size of the control in question so it does not automatically show the upper half of an entry whilst hiding the bottom part of the text under the 3d border of the control. This is the integral height the OP is talking about and while the standard listbox has this property (t/f), the FileListBox does not have this property.

    As for solving this, use a standard listbox and populate it from a hidden FileListBox or...
    Code:
    Option Explicit
    
    Private Const LB_ADDFILE = &H196
    Private Const LB_DIR = &H18D
    
    Private Const DDL_ARCHIVE = &H20
    Private Const DDL_HIDDEN = &H2
    Private Const DDL_READONLY = &H1
    Private Const DDL_DRIVES = &H4000
    Private Const DDL_DIRECTORY = &H10
    Private Const DDL_EXCLUSIVE = &H8000
    
    Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
    
    Private Sub Command1_Click()
    SendMessage List1.hwnd, LB_DIR, DDL_EXCLUSIVE Or DDL_ARCHIVE Or DDL_HIDDEN Or DDL_READONLY, ByVal "E:\*.*"
    End Sub



    Good Luck
    Reply With Quote
      #5    
    Old November 12th, 2009, 12:56 AM
    HanneSThEGreaT's Avatar
    HanneSThEGreaT HanneSThEGreaT is online now
    The Unstable Mod
    Power Poster
     
    Join Date: Jul 2001
    Location: Vereeniging, South Africa
    Posts: 8,006
    HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+) HanneSThEGreaT has a reputation beyond repute (3000+)
    Re: filelistbox integral height

    Brilliant stuff vb5prgrmr!
    __________________
    My Latest Articles :
    Changing Mouse Settings with VB.NET || Creating Your Own Encryption / Decryption Program Using VB.NET 2005 || Autorun Menu Creator in VB.NET || Creating Your Own Tetris Game With VB.NET Part 1
    Find All My Articles : Here

    FAQs :
    .NET FrameWork FAQs || Visual Basic.NET FAQs || C# FAQs

    Be The Change That You Want To See In The World - Michael Scofield, Prison Break; Season 1 Episode 1

    Read This Before You Post || Acceptable Use Policy
    Reply With Quote
      #6    
    Old November 12th, 2009, 04:53 AM
    UKDavid UKDavid is offline
    Junior Member
     
    Join Date: Jun 2009
    Posts: 4
    UKDavid is an unknown quantity at this point (<10)
    Re: filelistbox integral height

    vb5prgrmr's explanation is exactly what I meant

    Thanks all for looking and especially to vb5prgrmr for his solution.
    Reply With Quote
      #7    
    Old November 12th, 2009, 09:42 AM
    vb5prgrmr vb5prgrmr is offline
    Member
     
    Join Date: Apr 2009
    Posts: 232
    vb5prgrmr is a jewel in the rough (200+) vb5prgrmr is a jewel in the rough (200+) vb5prgrmr is a jewel in the rough (200+)
    Re: filelistbox integral height

    Thanks to the both of you, but now if you don't mind Dave (Good Morning Dave ), could you please use the thread tools and mark this thread as resolved.



    Thanks once again
    Reply With Quote
      #8    
    Old November 12th, 2009, 10:30 AM
    WoF's Avatar
    WoF WoF is offline
    Elite Member
     
    Join Date: Jul 2006
    Location: Germany
    Posts: 2,791
    WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+)
    Re: filelistbox integral height

    Very good. I didn't know about that integral height. Only I'm a little confused...
    Quote:
    This is the integral height the OP is talking about and while the standard listbox has this property (t/f), the FileListBox does not have this property.
    It must be the other way round, then. FileListBox HAS the integral height and ListBox has NOT. Or did I mistake that?
    Reply With Quote
      #9    
    Old November 13th, 2009, 12:57 AM
    vb5prgrmr vb5prgrmr is offline
    Member
     
    Join Date: Apr 2009
    Posts: 232
    vb5prgrmr is a jewel in the rough (200+) vb5prgrmr is a jewel in the rough (200+) vb5prgrmr is a jewel in the rough (200+)
    Re: filelistbox integral height

    No, I think I got it right. Just add the controls to the form and look at their properties...

    Yep! The Listbox control (List1) does have this property listed but the FileListBox (File1) does not have this property listed in the properties list.

    Now, how to see this in action...

    Add a standard list box, text box, and file list box to a dummy form.

    Click on the text box, hold the shift key down, and hold the down arrow key down for a second. You should see the text box change dimensions, specifically its height. (CTRL+Arrow key will move control around on form.).

    Now do the same for the list box. You should not be able to change its height this way until you set its integralheight property to false.

    Now, once you have resized the list box in this fashion, reset its integralheight to true and you will see that it changes dimension (height) to fit the closest size of x# of entries.

    The filelistbox on the other hand does not have this property and to resize this control during runtime, you must either use the mouse or directly enter a value in the height property.


    Hope that explains it a little better.



    Good Luck
    Reply With Quote
      #10    
    Old November 13th, 2009, 12:03 PM
    WoF's Avatar
    WoF WoF is offline
    Elite Member
     
    Join Date: Jul 2006
    Location: Germany
    Posts: 2,791
    WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+) WoF has much to be proud of (1500+)
    Re: filelistbox integral height

    Ok. Understood now. I misunderstood the term "having the integral height property".
    As it seems, both List- and FileListBox HAVE the integral height property, only the FileListBox does not expose it, so you can't turn it off.
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Visual Basic Programming > Visual Basic 6.0 Programming


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 10:51 AM.



    Acceptable Use Policy


    The Network for Technology Professionals

    Search:

    About Internet.com

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.