Page 1 of 6 123456 LastLast
Results 1 to 10 of 55

Thread: VB.Net FrontEnd with SourceCode (formerly VB6)

  1. #1
    Mod - Driveline forum
    Auto Apps:loading...
    ClockWorK's Avatar
    Join Date
    Oct 2003
    Location
    Michigan
    Posts
    692

    Lightbulb VB.Net FrontEnd with SourceCode (formerly VB6)

    Here it is. It's all VB6. It's all written well. It's not bloated. I've been using it for over about 6 months, making minor tweaks.

    This time, I'm including the program, the source code, a skin, and a very basic "Getting Started" doc (now in HTML format) which explains how the INI file works.

    This program doesn't do TV, Radio, or OBD yet. I need to buy more hardware for those. OBD is next. Then HDTV. Then maybe radio. However, in the mean time, your current tuner program can be embedded and used.

    Hopefully, some people like the program. And, if not, maybe the sourcecode will be of use to some of you. I'm certainly not saying it's the best program out there, but if you're a coder, I think it's a great start.

    Here's the images of the program.

    The main interface


    Browse. Choose Media Type.


    The media browser. Choose horizontal or vertical split.


    Visualization / Album Art. In Video mode, the video is fullscreen.


    GPS info.


    Apps. Click an icon to launch the app and embed it into this program.


    This is MS Streets and Trips embedded.


    This is Solitaire embedded. Useful while waiting for a pizza.


    This is the Config window. The dimmer can be programmed, the unit of speed can be adjusted, and other stuff.


    And lastly, the Exit window.



    I will be keeping this program updated on my website, along with a change-log. www.CompulsiveCode.com and I'll try to keep it updated here, if there's any interest.

  2. #2
    Maximum Bitrate NiSlo's Avatar
    Join Date
    Nov 2006
    Location
    Gold Coast, Australia
    Posts
    508
    Sweet. I'll definatley have a look at this over the weekend and have a play.

    As I'm at work I can't open it up, but how does the skinning work? I see the images can be changed, but what about position etc? Are the x,y of the images currently set in the VB IDE?

    I can also suggest the OBDPros OBD interface. Very well priced and very reliable.
    I installed my carpc into my pet Kangaroo, mate.

  3. #3
    Mod - Driveline forum
    Auto Apps:loading...
    ClockWorK's Avatar
    Join Date
    Oct 2003
    Location
    Michigan
    Posts
    692
    I guess I shouldn't really call it skinning. It's just a folder full of images. The sizing and position is all relative to the screen size, so it scales to different resolutions pretty well. But the position is all through the VB IDE. There's probably enough free code provided to make it more truly "skinned" if someone wanted to.


    You just reminded me of something. There's some code in the DriveLine_Init function:
    Code:
    If System_IsIDErunning() <> False Then    'Means VB is open, so we're probably testing
      frmMain.Width = 8460 * 2
      frmMain.Height = 4840 * 2
      frmMain.Left = (Screen.Width / 2) - (frmMain.Width / 2)
      frmMain.Top = (Screen.Height / 2) - (frmMain.Height / 2)
    Else
      frmMain.Width = Screen.Width
      frmMain.Height = Screen.Height
      frmMain.Left = 0
      frmMain.Top = 0
    End If
    This code controls how the program appears when you run it in the IDE. The hard-coded values (8460 and 4840) were just for testing the size of everything while I was using a 19" monitor, trying to simulate my 7" LCD.
    So, to anyone wanting to simulate their tiny screen while working on a big one, this block of code is the place to do it. Just tweak those two values until the window is the same visual size as your LCD.

    When you run the EXE, it runs full screen.

  4. #4
    Mod - Driveline forum
    Auto Apps:loading...
    ClockWorK's Avatar
    Join Date
    Oct 2003
    Location
    Michigan
    Posts
    692

    Functional FrontEnd with VB.Net 2005 SourceCode (attached)

    I decided that this deserved a reply instead of just an update to the original post.

    App supports:
    Media playback (music, video, images)
    Visualizations, album art
    GPS (with time-synchronizing)
    WiFi (for downloading weather/traffic alerts based on GPS position)
    Camera View
    OBD (ELM compatible)
    Hibernate / Resume (recommend devcon)
    Embedding programs
    Screen dimming (automatic and manual)
    Multiple skins. They're just images. Replace or modify as desired.


    App lacks:
    Volume Control
    Playlist builder / editor
    Voice Commands
    Tuner Control for Radio/TV cards
    BlueTooth


    All source code (including OBD) is provided. Now in VB.Net 2005.
    Updates: This site

    I use this front-end every day in my car. CPU usage is generally around 10%. Could be more now that OBD has been added.
    My CarPC: VIA 2GHz CPU, 1gig RAM, WindowsXP SP3.


    Main Window - click the status text to return to this screen.


    Browse Window - Choose: Music, Video, Images, Folder-Copier, or Alerts.


    Browse Music Window - Use tree to navigate, and click on list item to build/play playlist.


    Browse Alerts Window - Will list 'No Data' if unavailable.


    Viewing Alert - Traffic. By default it will list alerts within 30 miles of your GPS position.


    Viewing Alert - Weather.


    Image Slideshow Window


    Visualization Window - Music with Album Art. Click on album art to cycle through images.


    GPS Window - Showing basic info from GPS receiver


    GPS Window - Showing driving stats derived from GPS data.


    Apps Window - For embedding programs


    Ebedded App window - MS Streets & Trips 2006


    Ebedded App window - Solitaire (useful while waiting for food)


    Vehicle Window - This is the OBD information.


    Config Window - Basic settings.


    Exit Window - Close the program or Shut Down the PC.

  5. #5
    Mod - Driveline forum
    Auto Apps:loading...
    ClockWorK's Avatar
    Join Date
    Oct 2003
    Location
    Michigan
    Posts
    692

    Development History

    03-20-2009:
    If OBD speed is being used, the Speed/Bearing will be underlined.

    03-19-2009:
    The program will now prefer OBD-Speed (if available) over GPS-Speed if OBD data is less than 1 second old.
    Modified display text from "No GPS" to "No Speed" when neither GPS or OBD is present.

    03-17-2009:
    Added support for embedding Apps which require the OBD port. Similar to the GPS.
    Added OBD support. Still testing.

    03-16-2009:
    Fixed an issue with the dimmer not resetting when coming out of hibernate.
    Working on OBD.

    03-07-2009:
    Fixed an issue with the conversion from GMT to local time, where the wrong time would be displayed if the input time seconds was between 59.5 and 59.9999. Obviously, a rounding error.

    03-06-2009:
    Added seconds to the time display on the GPSinfo frame. It's normal for seconds to be skipped, which is probably why I chose to not display the seconds in the first place.
    Added support for version 3.0 of the NMEA sentence spec, and sentence $GPGLL.
    Removed all MSCOMM code. Replaced with Win32 FileAPI code to access COMM Port. So the MSCOMM COM Object is no longer required.
    Basically, there are 3 ways to access the COMM ports:
    1. Use the old MSCOMM object (a COM object). This is event-driven. I think I had issues getting this to work under Vista64.
    2. Use the Win32API and File functions. Setting this up to be event-driven is difficult, so it will be polling-based instead.
    3. Use the new System.IO.Ports.SerialPort class in Visual Studio 2005 and later. This is event-driven.
    Method # 3 is what I want to use, but the program will crash if a USB-Serial (most GPS and OBD) device is disconnected while running.
    So, method # 2 is what is now in place. The code for method # 3 is in place, but not used.

    03-01-2009:
    Upgraded all code to VB.Net 2005. Option Explicit, Option Strict.
    Modified auto-updater to copy all files from source folder (EXE and DLLs).

    02-26-2009:
    Removed the option for Horizontal Browser Split. Vertical is the way to go.
    Moved the RefreshInternet call into a separate timer.
    Corrected and clarified some code around the main timer and the interval.
    Added scrolling acceleration to the ListView (the bottom box of the Browser window).
    Reordered steps for setting current frame. Frames are now initialized before they are visible.

    02-25-2009:
    Alerts now expire after 60 minutes.

    02-24-2009:
    Fixed an error in the conversion from GMT date/time to local date/time.
    Fixed an error in the conversion of Longitude from DegsMinsSecs to Degs
    Added TimeStamps to Traffic Alerts.
    Alerts spanning multiple days now list the date-range.
    Alerts that expire today will list no date, only time-range.
    Added scrolling acceleration. The scroll-speed of the treeview doubles after 5 lines of scrolling.

    02-23-2009:
    Decreased precision of Bearing. No more NNW, WNW, etc. Now just N, NW, W, SW, S, SE, E, NE.
    Modified the internet detection code. Now it queries a URL to confirm online status.
    Internet detection is refreshed every 30 seconds now (instead of every second).
    Tweaked the weather/traffic updates.

    02-20-2009:
    Added Weather and Traffic alerts under the Media Browser.

    02-16-2009:
    Fixed an issue with the SlideShow Browser, where clicking a folder in the Listview would cause an error if the folder contained no images.
    Added functionality to the visualization window. Clicking on album art will now iterate through all images in the current media directory.
    Added BMP and JPG code into generic CarPC module. Probably didn't need to at this point.

    01-25-2009:
    Changed the album-art code to check for images containing the word "front" and if found, use that image first.

    01-12-2009:
    Added 'Copy Folder' functionality under the Media Browser. Copy the folder and contents, or just the contents, to another folder.

    01-05-2009:
    Modified the filename cleansing to also be able to remove repeated info from the end of filenames (album year, group names like h8me, whatever).

    12-31-2008:
    Fixed an issue with the ShutDown procedure, which would crash the program instead of shutting down the PC.
    Tweaked the GPS Statistics code to compensate for hibernate/suspend.

    12-30-2008:
    Changed the method of calculating average speeds.
    Changed the default unit within the program to KM. Using Knots was a pain for calculating averages.
    Fixed an issue with a date calculation function.
    Considering abandoning the GetTickCount function to avoid a potential overflow error after 49 days of not rebooting. Could be 25 days.

    12-29-2008:
    Changed the GPS Info window to a 2-page interface. One with basic GPS data, and one with derived GPS statistics.
    GPS Stats Include: Avg Moving Speed, Avg Overall Speed, Time Moving, Time Stopped, Peak Speed, Trip Meter, and Launch.

    12-18-2008:
    Modified the function that cleans up the filenames. Now, the underscore character is replaced with the space character.
    Also, the period character (except for the last one in the filename) is replaced with the space character.

    12-09-2008:
    Fixed a minor issue with the ListView for the FileList, where a click in empty space (below the last item) was treated like a click on the selected item in the list.
    Adjusted the TreeView Text Truncation by a few pixels.
    Still considering removing the TreeView, and potentially trying to use a ListView in it's place.

    12-01-2008:
    Fixed a type-o which would prevent the user from browsing for images for a slideshow.

    11-25-2008:
    Code Clean-Up. Made a few functions faster.

    11-21-2008:
    Fixed an issue where the visualization would remain full-screen after playing a video file, even if the next file was an audio file.
    Fixed the filename cleansing code to never remove all the characters from a file name.

    11-18-2008:
    If two media paths overlap (ie C:\ and C:\Media) and the current media is located in both (ie C:\Media\MySong.MP3), the browser will now choose the longest media path that contains the media file as the root of the current media.
    This now works for playlists and images as well.
    Treeview Text Truncation now applies to playlists and root entries as well as subfolders.
    Fixed an error that would prevent media from being displayed in a root folder.

    11-17-2008:
    Fixed minor issues with TreeView text truncation. This now seems to work perfectly.
    Fixed major issue where 2 media paths with the same root could not be specified. Paths now stored in TreeView Node.Tag instead of Node.Key.
    ListView still uses ListItem.Key for storing full path + filename.

    11-14-2008:
    Modified the TreeView to check text width and ensure no item causes a Horizontal ScrollBar to appear.
    At present, this check is only performed for media files. Not for special entries, such as playlists.

    11-13-2008:
    Fixed the code for the TreeView BackColor. Had to remove the tree-lines and the +button next to expandable nodes.
    Added functionality to remove repeated text from media file names (if text is in all visible filenames in directory).
    First it removes repeated text from the left. Then it breaks the filename into subfields, assuming a delimiter of "-" (hyphen), and checks for repeated values to remove.
    Then it does it all again, assuming a delimiter of " " (space char).

    11-10-2008:
    Modified the Browser code so that the TreeView and ListView controls can now have their colors specified.
    The bright white treeview and listview were an eye-sore at night in the dark.

    11-07-2008:
    Font sizes are now measured to one-tenth of a point, resulting in more accurate auto-sizing.
    All playlist files are now denoted with <LST: instead of separate identifiers for <M3U: and <PLS:.
    Cleaned up the code that links the treeview and listview in the Browser window.
    DVD Label is now displayed in the NavBar.

    11-06-2008:
    Changed Browser window to use a ListView control instead of a ListBox.
    Modified Browser window so PlayList files will appear in the Treeview, and can be browsed just like a folder.
    Had to tweak the format of the .PlayList file, changed the delimiter to a pipe | character.

    11-04-2008:
    Changed GPSinfo window to use a ListView control with 2 columns instead of a ListBox. The CommonControls library was already required for the TreeView in the Browser window.
    Changed GPSinfo window to display date and time on separate lines.
    Perfected BAT code for updater.

    11-03-2008:
    TimeZone offset is now updated upon resuming from hibernate/suspend. Also, GPS last-sync-date is cleared upon resuming, to force a refresh.
    Modified the BAT code for the updater to specifically wait for the DriveLine ProcessID to terminate before trying to install the new version.

    10-27-2008:
    Fixed an issue where the PC would resume from hibernation, but forget that the screen should be dimmed. The dimmer is now refreshed at time of resume. This appears to be a Windows issue.
    Finally made GPS reconnect after closing an embedded app that required the GPS and had to be force-terminated.
    Basically, after closing an embedded app, the program will attempt to reconnect to the GPS every 5 seconds for 30 seconds.
    Added UpdateScanner. This will search all drive letters (1 subfolder deep) for a new version when the program is executed, (or upon resuming from hibernation) and offer to install the new EXE.
    The purpose of the UpdateScanner is to be able to upgrade the program without a keyboard or mouse attached.

    10-24-2008:
    Added clock-sync. Once per day or per reboot, the clock will sync with the GPS date/time.
    Clicking the GPSinfo list will now reset the last-synced date, forcing the program to re-sync date/time.
    Fixed minor issue with embedding programs, which would cause the current track to restart.

    10-23-2008:
    Added support for playlist formats .M3U and .PLS. These are managed internally, and should NOT be specified in the INI file.

    10-22-2008:
    Cleaned up the GettingStarted document. Coded HTML manually. Now using PNG images instead of JPG images. Smaller files, better quality.
    Changes to GPSinfo window.
    -Combined Latitude and Longitude onto one line.
    -If the GPS device is present but there is no Satelite-Fix, the GPS info will show blank values instead of default values, and OS time instead of GPS time.

    10-21-2008:
    Modified the ONRESUME function to better handle resuming from hibernation. Media resumes as it should. GPS reconnects.
    Configuring the program ONRESUME settings to run DEVCON.EXE with the RESCAN parameter seems to work well for re-enabling USB devices on resume.

    10-20-2008:
    Set the program to always remain ONTOP of other programs. Considering making this an option in the DriveLine.ini file.
    Adjusted GPS sensitivity for tripmeter.
    The program will now display GPS Date/Time as Local Date/Time, using the TimeZone setting in Windows.

    10-16-2008:
    The "Getting Started" document is now provided as HTML, instead of a Word Doc. Smaller ZIP file, more compatibility.
    Adjusted the function that draws icons for the apps window. Now using the Image and ImageMask (DI_NORMAL instead of DI_IMAGE), the icons look better.
    Clicking the GPSinfo list will now reset the PeakSpeed and DistanceTraveled.
    Made it so more areas will hide the mouse if they are clicked (such as dead space, lists, etc).

    10-15-2008:
    Fixed an issue where the peak speed would occasionally not get updated.
    Fixed an issue that would prevent the NavBar from hiding when playing DVD video.
    Fixed an issue that would prevent the program from resuming a playlist when the item in the playlist was a DVD video.
    Fixed an issue that would prevent the program from ejecting an optical disc.
    The program is now set up to gracefully handle ejecting the media that is currently playing.

    10-13-2008:
    Added GPS-based tripmeter. Tried 2 different methods. By Lat/Lon, and by speed/time. Decided to go with speed/time method since it doesn't require trig.
    So far, I am very pleased with the accuracy of this.

    10-01-2008:
    Finally made application embedding work reliably, with a new method for finding the main hWnd of a process.

    09-29-2008:
    Clicking on the left half of the slideshow window will load the previous image.
    Clicking on the right half of the slideshow window will load the next image.
    Made it so more areas will hide the mouse if they are clicked (such as dead space, lists, etc).

    09-26-2008:
    The slideshow image-list is now saved (and loaded on startup), just like the media playlist.
    DriveLine.PlayList
    DriveLine.SlideList

    09-25-2008:
    Fixed an error in the image scaling routine, which would incorrectly re-calculate the aspect ratio of the image.
    Fixed an error that would crash the program if the Visualization window was loaded while no media was playing.

    09-24-2008:
    Fixed an error that would display the wrong track number if the file chosen in the browser was not the first file in the folder.
    Fixed the way folders are handled in the treeview when they have no subfolders.
    Added new functionality - SlideShow. Modified interface to accomodate.
    New icons!

    09-08-2008:
    When the browser window is loaded, the current track will be hilighted.

    09-05-2008:
    Made the Up/Down arrows hide the mouse when clicked, just like the Prev/Next arrows.
    Added detection of suspend and resume. Upon resume, the program will execute a specified program. I don't know if this has a purpose or not -- I'm thinking devcon.

    09-04-2008:
    Changed the way the program detects if an embedded program is idle.
    When a program is launched, it won't be embedded until CPU usage for that process drops below 4%.

    09-03-2008:
    Changed the way the scrolling works on the Browser window. Now using SCROLL commands instead of ARROW commands, like I should have from the beginning.
    Changed the way the treeview handles clicks on the Browser window. More consistent now.
    Changed the layout of the NavBar to be 3 lines of text instead of 2, and locked the positions of text on the top line.

    08-11-2008:
    Changed the format of the colors in the Skin.INI file to RGB format.
    Tweaked the embedding functions. Still not perfect.
    Changed the way album art is located. Now, the largest image in the folder (by filesize) is the one used.

    08-08-2008:
    Embedded Programs nearly complete.
    Now supports:
    -Disable Playback while program is embedded (for running tuner programs, media players).
    -Disable GPS while program is embedded (for running mapping software).
    -Maximize program. This should almost always be set to TRUE.
    -CommandLine to include when running the program.
    -Commands to run after loading the program. An example for Streets & Trips: <SLEEP02><ALTDOWN>TGS<ALTUP><CTRLDOWN>A<CTRLUP><AL TDOWN>VNL<ALTUP><ALTDOWN>TGM<ALTUP>
    One problem at the moment. A program cannot be embedded if an instance of the program is already running.

    08-06-2008:
    When a program is unembedded, a CLOSEWINDOW command is sent. If the window still exists after 5 seconds, the process is terminated.
    This works out well for programs that may prompt the user to save, or confirm something, such as Streets & Trips.

    08-05-2008:
    Removed the Streets & Trips code. Replaced with a generic "Embedded Programs" interface. Up to 18 programs can be embedded.
    By default, the program icon is used, but a different image may be specified in the program INI file.
    Still working on all of this.

    08-02-2008:
    Added album-art display in the Visualization window. Currently it checks for JPG and BMP images in the music folder.
    Tweaked the StatusText format. Removed Lat/Lon. Speed and bearing are now always displayed (if GPS is available).

    07-30-2008:
    Fixed a bug that would cause an incorrect track number to be displayed when navigating past the end of a playlist.
    Enabled Hold-and-Scroll on the PREV and NEXT buttons, similar to the UP and DOWN arrows.
    Added an option to view the Browser window with a Vertical split, or with a Horizontal split.
    Changed the way the Browser window loads the current media path -- Now all folders get populated.

    07-18-2008:
    Fixed a type-o, cleaned up the GettingStarted file. Made all of the source code available.

    07-17-2008:
    Clicking the PREV button when you are more than 5 seconds into a song will now restart the same song (like how most disc players work).

    07-16-2008:
    Unit of Speed is now an option. Choose MPH, KM/H, or Knots.
    Configuration window implemented.
    The program now keeps track of your peak speed.

    07-10-2008:
    Added "Launch" stats to GPS info. In other words, it displays your acceleration info (0 to 60 in 5.9 seconds, for example)

    06-30-2008:
    Separated code into two modules - one generic for CarPC programming, and one specific to this particular program.

    06-23-2008:
    Added network detection. The status text now indicates if the CarPC is online or not.

    06-21-2008:
    Made skin folder configurable. Separated program settings and skin settings.
    Fixed a bug which prevented the playlist from repeating.


    06-20-2008:
    Scrapped the original program. Wrote a new interface. Much cleaner, better code (might even make source code available).
    New images, new layout.
    Visualization no longer loads automatically.
    No more support for NumPad input. Sorry. Could add it again later. Or programmable key commands.
    Numerous things fixed or added.

  6. #6
    Mod - Driveline forum
    Auto Apps:loading...
    ClockWorK's Avatar
    Join Date
    Oct 2003
    Location
    Michigan
    Posts
    692
    If it sucks, let me know why. That way, I can try to make it not suck.

    If it doesn't suck, also let me know. If nobody's using it, I have no reason to continue to make the app and sourcecode updates available.

  7. #7
    Constant Bitrate
    Join Date
    Feb 2007
    Location
    Taylorsville, UT
    Posts
    135
    What is this in? (It seems like it was converted to .NET?) Is it C# or VB? I am currently in the process of making a new open source C# front end. I dont know if many other people will like it though, as it's not really made to be pretty or skinable, it's more designed for features and stuff that I want specifically. For example, one of the main points is it has a embedded mssql server for keeping track of all the music and playlists and stuff and has fast realtime search capabilities. Another feature I am planning is DVR like capability for the radio (after have a DVR on the TV it sucks not having it for the radio too, heh)

    Anyways I wouldn't mind having a look at your code for some ideas and things.
    -James
    Car: 2004 GTI VR6 24v Turbo 2.8L, GT35R, 630cc, Unitronic, Bosch 044, etc, etc..
    Main PC:i7 920@4Ghz, 6GB DDR3, MSI X-58 Pro-E, Win 7 x64 RTM, Scythe Mugen2, 128GB G.Skill Falcon, 2x ATI4850 512MB Crossfire, Auzentech X-Fi Forte, Grado Labs SR-80

  8. #8
    Mod - Driveline forum
    Auto Apps:loading...
    ClockWorK's Avatar
    Join Date
    Oct 2003
    Location
    Michigan
    Posts
    692
    The code is in VB.Net 2005. It uses a lot of Win32API, and uses no external components except Windows Media Player. The code is a couple posts above. Right after all the pics.

    Thank you for the feedback. I appreciate the response. Maybe I do need to focus more on interface than functionality at this point.

  9. #9
    Newbie
    Join Date
    Apr 2009
    Posts
    23

    Updated Version

    I've spent a few minutes looking at your source code and have been making improvments for you.

    its been upgraded to the latest version of VB.net

    i removed NO SPEED to a space.

    and the clock wouldnt always display correctly so i fixed that.

  10. #10
    Mod - Driveline forum
    Auto Apps:loading...
    ClockWorK's Avatar
    Join Date
    Oct 2003
    Location
    Michigan
    Posts
    692

    Exclamation ..

    We're going to have to coordinate better. I'm still making changes in the VB.Net 2005 version, and fixing the OBD and GPS code, while you're making changes to labels.

    Also, I'm not a fan of the new time display. 4:45: pm looks weird. Let's try to discuss changes before implementing them. That way we won't get too many disjointed versions, and ultimately confusion. And, we want to coordinate posting of versions.

Page 1 of 6 123456 LastLast

Similar Threads

  1. XUL Frontend....
    By SFiorito in forum Software & Software Development
    Replies: 2
    Last Post: 10-02-2009, 11:23 AM
  2. Replies: 2
    Last Post: 08-02-2007, 03:17 PM
  3. Skinning my FrontEnd in VB.net 2005
    By AxelDoomeyer in forum Software & Software Development
    Replies: 0
    Last Post: 03-23-2007, 10:14 AM
  4. Destinator SDK VB.Net
    By TommyGun in forum Software & Software Development
    Replies: 0
    Last Post: 10-08-2005, 03:35 AM
  5. Destinator 3 Frontend v1.1
    By Ninja Monkey in forum Map Monkey
    Replies: 139
    Last Post: 10-25-2004, 10:40 PM

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
  •