Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: General skinning in vb.net

  1. #1
    North of the land of Hey Huns
    Auto Apps:loading...

    Join Date
    Jun 2004
    Location
    Westminster, MD
    Posts
    2,127

    General skinning in vb.net

    I'm bored as my car is out of service (clutch swap). So I'm wondering, how do you skin in vb? I have my own vb player and I'm wondering how to incorperate a skinning language into it, I have no clue where to start. Help? (frodo?) Thanks in advance.
    "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
    RevFE
    My Shop

  2. #2
    Maximum Bitrate kiltjim's Avatar
    Join Date
    Feb 2004
    Location
    PA, USA
    Posts
    805
    I'm just starting in VB.net, but I've been playing around with changing the background image, and the button pictures. Nothing I've done has been skinnable, but I'm sure you could figure out a way to read a textfile to set these.
    2000 Subaru OBS

    Dell P3 @ 900 Mhz
    7" Lilliput TS w/DigitalWW in-dash mount
    80GB External HD

    I am Zero Bitrate....

  3. #3
    Raw Wave hijinks21's Avatar
    Join Date
    May 2002
    Location
    Albany, NY
    Posts
    1,803
    the best way is to use a xml file.. not sure how well vb supports it but .net should support it fairly well.. here is my 2 cents on skinning.. you can make a app skin to any res you want if you place the buttons and such at percentages..

    so if you want the play button at the button of the page.. you would say over 55% down 89%.. then the app can know its own width/height and do the easy math to find the x/y values based on the percentages.. and its easy to load a pixmap on the fly into a button for say
    '98 Explorer Sport
    http://mp3car.zcentric.com (down atm)
    AMD 800mhz 192megs RAM 60gig hard drive 9 inch widescreen VGA
    80% done

  4. #4
    North of the land of Hey Huns
    Auto Apps:loading...

    Join Date
    Jun 2004
    Location
    Westminster, MD
    Posts
    2,127
    Ok, I have gotten that much. But what about adding your own buttons through skins to do things? I thought I had seen that done before.
    "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
    RevFE
    My Shop

  5. #5
    Maximum Bitrate kiltjim's Avatar
    Join Date
    Feb 2004
    Location
    PA, USA
    Posts
    805
    Quote Originally Posted by hijinks21
    the best way is to use a xml file.. not sure how well vb supports it but .net should support it fairly well.. here is my 2 cents on skinning.. you can make a app skin to any res you want if you place the buttons and such at percentages..

    so if you want the play button at the button of the page.. you would say over 55% down 89%.. then the app can know its own width/height and do the easy math to find the x/y values based on the percentages.. and its easy to load a pixmap on the fly into a button for say
    Now, how do you load those values from the xml file?

    I've played with frodoskinner, and it makes an entry like this:

    [MAIN]
    MENU_LEFT=0.125000
    MENU_TOP=2.708333
    MENU_WIDTH=9.000000
    MENU_HEIGHT=7.083333

    So, how would I have VB.NET look at the text file, and load the buttons to those locations?
    2000 Subaru OBS

    Dell P3 @ 900 Mhz
    7" Lilliput TS w/DigitalWW in-dash mount
    80GB External HD

    I am Zero Bitrate....

  6. #6
    Raw Wave hijinks21's Avatar
    Join Date
    May 2002
    Location
    Albany, NY
    Posts
    1,803
    i'm not a windows programmer.. so i know know any of the xml api calles for vb.net.. i just gave you a good idea looks like frodo does it with a ini file.. i prefer xml since for me its just easier to deal with.
    '98 Explorer Sport
    http://mp3car.zcentric.com (down atm)
    AMD 800mhz 192megs RAM 60gig hard drive 9 inch widescreen VGA
    80% done

  7. #7
    Maximum Bitrate brrman's Avatar
    Join Date
    Aug 2003
    Location
    Indianapolis, IN USA
    Posts
    523
    VB.NET comes with the XML SDK. You simply call the XML object.
    In .net everything is an object.

    So declare an XML document, load it from file(your xml file/path).
    Declare xmlNodeSet/NodeList (which would be all the images.)
    - Populate the NodeList by fetching <IMAGES>

    Declare xmlNode as Node

    For each xmlNode in the xmlNodeSet,
    - xmlNode.innerXML = the data
    next

    thats totally pseudo... just to give you an idea on how to get started.
    I had a complete skinning app done in vb.net but lost it all when my HD crashed. Havent gotten up the guts to start it again.
    Car: 2000 Audi A4 Avant 1.8t
    Carputer 2.0: removed. Back to stock.

  8. #8
    Newbie
    Join Date
    Oct 2005
    Posts
    5
    Hi, I've been playing with D3 SDK in Vb6 for sometime, and now wish to use VB.Net 2005. I'm having trouble just getting started. Can anyone help - just a start is all I need.
    Thanks

  9. #9
    Mobile Impact Creator reddeath30's Avatar
    Join Date
    Mar 2005
    Location
    Fontana, California
    Posts
    1,142
    Here is a really simple way to code in VB using picture and image boxes. Here is a snippet from my code on Mobile Impact.

    Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Picture0.PaintPicture Picture1, 0, 720, 6735, 1250, 0, 720, 6735, 1250
    End Sub

    Private Sub Image1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Picture0.PaintPicture Picture0, 0, 720, 6735, 1250, 0, 720, 6735, 1250
    End Sub

    This code requires 2 picture boxes -> a source picture box and a destination picture box. Then an image box to overlay on the picture box so you can control the region of the mouse events.

    This code is extremely simple, effective and fast. You can use Jpg, Gif and Bmp format graphics in the picture boxes.
    Mobile Impact
    Highly innovative car computer multimedia/entertainment system software.
    http://mobileimpact.biz.tm

  10. #10
    FLAC IntellaWorks's Avatar
    Join Date
    Jun 2004
    Location
    NH
    Posts
    1,173
    There's a ton of ways to write skinning code pick a way that you're happy with.

    If it were me writing the code I'd use some sort of a file thats loaded with each form that depicts where to look for input. For example..

    Your play button's on a form is at X=80 and its 100 pixels wide, and Y=10 and 100 pixels long.

    in the click event on the form you have a statement looking something like this:

    Code:
    '*
                    'Play Button
                    
    If E.X > frm_audioplayer.loadedX and E.X < rm_audioplayer.loadedX_width Then
         If E.Y > frm_audioplayer.loadedY and frm_audioplayer.loadedY_height then
           media_class.playaudio
         End if
    
    
    End if
    This is Psuedo. When the form loads, it loads in the LoadedX,LoadedX_width and Y values into the form so that it knows what coordinates to look for...

    This way you can graphic design the whole skin in PSD, then just map the coordinates. This is .Net code BTW. And I would recommend against using percentages in this case because its less exact...
    Progress [I will seriously never be done!]
    Via EPIA MII
    512MB RAM
    OEM GPS (embedded)
    nLite WinXP pro on
    1GB Extreme III CF card
    Carnetix 1260 startup/ DC-DC regulator
    Software: Still, re-Writing my existing front end in .Net

Page 1 of 2 12 LastLast

Similar Threads

  1. Skinning tutorial?
    By erazor in forum FrodoPlayer
    Replies: 26
    Last Post: 11-06-2004, 08:36 AM
  2. Is skinning FP as easy as Winamp ??
    By Don 944 LA in forum FrodoPlayer
    Replies: 3
    Last Post: 09-27-2004, 10:52 AM
  3. General Questions
    By Roland in forum Newbie
    Replies: 18
    Last Post: 09-22-2004, 03:14 PM
  4. Software Skinning Question
    By veetid in forum Software & Software Development
    Replies: 5
    Last Post: 07-22-2004, 02:48 PM
  5. VB.net and FMOD
    By bondbond55 in forum Software & Software Development
    Replies: 0
    Last Post: 03-12-2004, 11:56 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
  •