Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: List Boxes?

  1. #11
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,028
    well to prevent overlap, just move all labels above the selected one to:


    Label.Position = Label.Position - FonSize/2 + Padding


    ...and all labels below the selected one move to:


    Label.Position = Label.Position + FonSize/2 + Padding
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  2. #12
    Maximum Bitrate Borte's Avatar
    Join Date
    Jan 2006
    Location
    Norway
    Posts
    511
    Quote Originally Posted by portreathbeach View Post
    When you make your controls out of labels, do you have the facility to change the font size after the control is initialized. ie. If you had 10 labels in your control and then changed to a larger fontsize, you would end up with labels close together or even overlapped text.
    In my listbox you can only set the options at initialization time but I have created an "BuildList" routine to initialize the listbox. This is called when loading the form its used in. By doing this I can change whatever I want and then just rebuild the list using "BuildList". This would then delete the previously created controls (labels) and then add new ones with the new data.

    So how the control behaves when you're changing to a bigger fontsize would be up to the coding of the usercontrol (ie. you).

    Cheers
    Borte
    Failure is not an option...
    __________________________________________________ ______________________________
    The only full multizone / multiscreen cross platform open source Front End -> OpenMobile

  3. #13
    Variable Bitrate
    Auto Apps:loading...
    thekl0wn's Avatar
    Join Date
    Apr 2005
    Location
    PoCo, Indiana
    Posts
    284
    Am I missing something? Why wouldn't you be able to change the font size after initialization? If I'm not mistaken, shouldn't you just be able to set the font size on the control itself, and the labels inherit it automatically? (assuming you're not basing the label size off of the font size)
    Play with it, 'til it's broke.

  4. #14
    Maximum Bitrate Borte's Avatar
    Join Date
    Jan 2006
    Location
    Norway
    Posts
    511
    I am basing the label size of the font size (I actually use autosize to get the correct height). This is easier instead of calculating the correct height.
    I could change the font directly but this wouldnt rescale the labels unless I use "BuildList" afterwards...

    Cheers
    Borte
    Failure is not an option...
    __________________________________________________ ______________________________
    The only full multizone / multiscreen cross platform open source Front End -> OpenMobile

  5. #15
    Constant Bitrate
    Join Date
    Sep 2006
    Location
    Cornwall, England
    Posts
    161
    Thanks for your contributions. I've started to make my control. I have got it to build labels to fill the size of the control automatically on load-up. I use a FOR NEXT loop to place the labels and name them, label1, label2, label3.... I cannot get a click event to work with any of these labels.

    I used the same syntax to declare the sub click event that is normally generated when you first double click a label that you drag into the form, but it doesn't work.

    Sorry if this is a stupid question, but I've only been programming VB.Net for 10 weeks, and I have managed everything else, Winamp control, volume control, radio etc. using handles and sendmessages, but haven't done anything with custom controls.

    thanks again

  6. #16
    Maximum Bitrate Borte's Avatar
    Join Date
    Jan 2006
    Location
    Norway
    Posts
    511
    One thing that would make your coding easier is to use an Control array.
    Unless you're already using it though...

    If it's of any help I wouldn't mind sharing what I created so far. It's not complete on all aspects but it is working (but programmed in VB6 not .Net).

    Cheers
    Borte
    Failure is not an option...
    __________________________________________________ ______________________________
    The only full multizone / multiscreen cross platform open source Front End -> OpenMobile

  7. #17
    Constant Bitrate
    Join Date
    Sep 2006
    Location
    Cornwall, England
    Posts
    161
    How far have you got with your project Borte? As mentioned before. I have coded a module to control Winamp, one to control Radiator (for my radio), the volume control and have now finished my Listbox thing that I was trying to create at the start of this thread. What are you using for DVD. I have tried to use Windows Media Player, but it causes my computer to crash and reboot 50% of the time.

    Do you read MP3 file and get the TAG data from them. I can do it with ID3 v 1 but not with v2. I have donwloaded lots of code samples from the internet, but nothing works with all of my MP3s.

    As I've said before, I've only been programming VB.Net for 10 weeks, had to start from scratch, but I used to program Basic years ago, and I've eventually grasped Object Orientated Programming. It took a while!

  8. #18
    Variable Bitrate
    Auto Apps:loading...
    thekl0wn's Avatar
    Join Date
    Apr 2005
    Location
    PoCo, Indiana
    Posts
    284
    What version of the WMP SDK are you using? You can get/set the tags using an axWMP_lib object, but I believe it still would require an embedded Media Player on your form.
    Play with it, 'til it's broke.

  9. #19
    Maximum Bitrate Borte's Avatar
    Join Date
    Jan 2006
    Location
    Norway
    Posts
    511
    portreathbeach:
    I'm not developing a frontend (yet), i'm currently trying to make my own navigation software so I'm not able to help you out on the frontend issues. Sorry! I could help you out on the listbox issue since I just had created my own.

    Cheers
    Borte
    Failure is not an option...
    __________________________________________________ ______________________________
    The only full multizone / multiscreen cross platform open source Front End -> OpenMobile

  10. #20
    Newbie
    Join Date
    Feb 2006
    Posts
    13

    ScrollBar Removal

    I am subclassing a ListBox and drawing my own items, including album art for each item.

    The scrollbar is a separate control and is also owner drawn.



    This is the code I use to remove the scrollbar.

    Code:
    Declare Function ShowScrollBar Lib "user32" (ByVal hwnd As IntPtr, ByVal wBar As Integer, ByVal bShow As Integer) As Integer
    Public Const WM_NCCALCSIZE As Integer = &H83
    
    Protected Overrides Sub WndProc(ByRef m As Message)
            Try
                If m.Msg = WM_NCCALCSIZE Then
                        ShowScrollBar(Me.Handle, 1, False)
                End If
                MyBase.WndProc(m)
            Catch ex As Exception
            End Try
    End Sub
    And as for ID3 tags I use UltraID3Lib... works great with all flavors of tags.
    http://home.fuse.net/honnert/hundred/UltraID3Lib/

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Release new phoco integration preview
    By Robby BMW in forum Road Runner
    Replies: 544
    Last Post: 09-12-2009, 05:29 AM
  2. CUSTOM LISTS/ command list
    By liquid_smoke in forum Road Runner
    Replies: 2
    Last Post: 11-27-2006, 11:22 AM
  3. XM Station list is rather slow
    By DaveB in forum Road Runner
    Replies: 5
    Last Post: 03-15-2006, 12:57 PM
  4. thumbnail view for folder and list view for file?
    By civic5zigen in forum Road Runner
    Replies: 9
    Last Post: 11-01-2005, 12:55 AM
  5. "state of the art" parts list?
    By kbyrd in forum Newbie
    Replies: 13
    Last Post: 04-29-2005, 11:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •