Results 1 to 19 of 19

Thread: [RESOLVED] Help Needed with conversion to .Net

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2015
    Posts
    15

    Resolved [RESOLVED] Help Needed with conversion to .Net

    I wrote an mp3 player in VB6. I used to be a professional OS writer. No one has been successful with a conversion effort yet. The last time a vb6 image was successfully built was 2005. I do not remember what the version of Windows was. I do have the vb6 sources. Somehow mscomctl.ocx seems to be involved in the conversion errors.

    It would mean much to me to convert the mp3 player to .Net. But when I went to install VB6 it never stopped running from disc 1 on the Windows 64 bit preview and I know the trick with java.

    I need help with conversion which is both complex and straight forward. I've been a pedestrian hit by a car since then.

    Renee
    Last edited by Renee Culver; Jan 16th, 2015 at 04:46 PM.

  2. #2
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,117

    Re: Help Needed with conversion to .Net

    You are not likely to find anything that can convert the VB6 code to VB.Net to any great degree.
    The updates that tools usually do leave enough issues that it is about as much work trying to finish the port (and have worse code to work with), as it is to just port the code manually. You'll need to get familiar with the way .Net does things to best port the code.
    What are you using to play the mp3? (e.g. old Windows Media Player (msdxm.ocx), or newer Windows Media Player (wmp.dll), or MCI, or another mediaplayer API).

    How sophisticated is the player you wrote? How hard would it be to reimplement the design?

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2015
    Posts
    15

    Re: Help Needed with conversion to .Net

    "How hard would it be to reimplement the design?"

    Appearance wise or code wise?

    "You'll need to get familiar with the way .Net does things to best port the code."

    Before my accident I was highly adept at .Net.

    Renee
    Last edited by Renee Culver; Jan 16th, 2015 at 05:44 PM.

  4. #4

    Thread Starter
    New Member
    Join Date
    Jan 2015
    Posts
    15

    Re: Help Needed with conversion to .Net

    "What are you using to play the mp3? (e.g. old Windows Media Player (msdxm.ocx), or newer Windows Media Player (wmp.dll), or MCI, or another mediaplayer API)."

    Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

    I wish to god that this forum had a way of posting graphics.

    Renee
    Last edited by Renee Culver; Jan 16th, 2015 at 06:13 PM.

  5. #5
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,117

    Re: Help Needed with conversion to .Net

    You can attach a graphics file. Hit the "Go Advanced" button when replying and there should be a Manage Attachments button.

    You can still use the winmm.dll in .Net.
    Is there any other complicated or sophisticated things you do in VB6 that you think might be hard to port. Use any File I/O, User Defined Types, Control arrays, custom controls?

    I'm going to be out of pocket for a couple of hours. Heading home,

  6. #6

    Thread Starter
    New Member
    Join Date
    Jan 2015
    Posts
    15

    Re: Help Needed with conversion to .Net

    Well yes, I show a list of .mp3s in a directory with a listview. It will do random song selections.
    Renee

  7. #7

    Thread Starter
    New Member
    Join Date
    Jan 2015
    Posts
    15

    Re: Help Needed with conversion to .Net

    Name:  Renclock.png
Views: 95
Size:  13.0 KB

    This is Renclock. It uses an mp3 directory and selects randomly WAVs and .mp3s.

    Name:  MusDisp.png
Views: 93
Size:  44.7 KB

    Pics are from an XP node running Renclock. Control buttons are picture boxes.

    Name:  t.png
Views: 91
Size:  14.6 KB

    Renee
    Last edited by Renee Culver; Jan 16th, 2015 at 07:48 PM.

  8. #8

    Re: Help Needed with conversion to .Net

    Renee, I suggest trying to re-write this with WPF.

  9. #9

    Thread Starter
    New Member
    Join Date
    Jan 2015
    Posts
    15

    Re: Help Needed with conversion to .Net

    Yes Paul, you've suggested that before. But I don't know WPF at all and I dont like it at all. I wouldn't know AXML if it bit me. But what is more important is that I don't want to learn it...ever.
    Renee
    Last edited by Renee Culver; Jan 17th, 2015 at 09:44 AM.

  10. #10
    PowerPoster
    Join Date
    Jun 2013
    Posts
    4,930

    Re: Help Needed with conversion to .Net

    Since there seems to be VB6-Sourcecode for the project, why not just doing
    a "cleanup" of these old Sources in VB6 itself (throwing out old VB-Controls -
    replacing them with something nicer, in case a "visual refresh" is what you're after)?

    VB6-Apps run just fine on all current versions of Windows (up to Win 8.1).

    Olaf

  11. #11

    Thread Starter
    New Member
    Join Date
    Jan 2015
    Posts
    15

    Re: Help Needed with conversion to .Net

    I can answer that! VB6 did not install cleanly on my Preview system.

    "But when I went to install VB6 it never stopped running from disc 1 on the Windows 64 bit preview and I know the trick with java." Evidence is that the install hung.

    I have an msdn copy of vb6 as I used to be an MVP'

    But gee...Renclock was written in 2005,,,much of the stuff is readily available in system.environment which did not exist then.
    Renee

  12. #12
    PowerPoster
    Join Date
    Jun 2013
    Posts
    4,930

    Re: Help Needed with conversion to .Net

    Quote Originally Posted by Renee Culver View Post
    I can answer that! VB6 did not install cleanly on my Preview system.

    "But when I went to install VB6 it never stopped running from disc 1 on the Windows 64 bit preview and I know the trick with java." Evidence is that the install hung.
    I'd make a second attempt - then choosing "Userdefined install" - and deselecting everything
    which is not "IDE and BaseControls" (as e.g. Java, ADO, MSDN - I leave these all out in my installs).

    If you don't want to do it "manually" as described above - then perhaps a VB6-Installer-tool,
    provided by a community-member (Gibra) might help (never tested it, maybe it will do you good)...

    http://www.vbforums.com/showthread.p...o-on-windows-8

    Quote Originally Posted by Renee Culver View Post
    But gee...Renclock was written in 2005,,,much of the stuff is readily available in system.environment which did not exist then.
    <shrug>
    I don't really want to discourage you from a re-write in .NET - but the "player-engine" is
    usually only a handful of code - e.g. Bonnie West posted a short snippet here in this thread recently:
    http://www.vbforums.com/showthread.p...=1#post4809651

    Here's a project which shows how to use "4 state PNG-image-resources", to implement simple "Alpha-aware-Buttons":
    http://www.vbforums.com/showthread.p...mage-Sprite%29

    The rest is "finding a nice List- or Grid-Control" - and to implement the (potentially JET-DB-based)
    PlayList-Handling around it.

    FWIW, you can download a WireFrame-Project I wrote some years ago, which is perhaps
    a start in that ADO/JET ( *.mdb-based) direction for you.

    Here's the Download-Link for it:
    MusicMDB.zip

    And here a ScreenShot:



    HTH

    Olaf
    Last edited by Schmidt; Jan 17th, 2015 at 08:39 PM.

  13. #13
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: Help Needed with conversion to .Net

    Quote Originally Posted by Schmidt View Post
    Here's a project which shows how to use "4 state PNG-image-resources", to implement simple "Alpha-aware-Buttons":
    http://www.vbforums.com/showthread.p...mage-Sprite%29
    RichClient5 is a great library,especially for Graphic stuff... Thanks for sharing.
    BTW, where can we find Win7 Media Player buttons PNG files? I know we can create them in PD. But it is good have classic MS Buttons.
    Last edited by Jonney; Jan 18th, 2015 at 08:51 AM.

  14. #14
    PowerPoster
    Join Date
    Jun 2013
    Posts
    4,930

    Re: Help Needed with conversion to .Net

    Quote Originally Posted by Jonney View Post
    RichClient5 is a great library,especially for Graphic stuff...
    That it surely is - but the Png-Button-Demo I linked to above has no RC5-dependency at all.

    It is based on a few GDI+ calls to handle the PNGs and uses a normal (windowless) VB-UserControl.

    Quote Originally Posted by Jonney View Post
    BTW, where can we find Win7 Media Player buttons PNG files?
    I know we can create them in PD. But it is good have classic MS Buttons.
    Don't know ... I'd construct them myself perhaps - or derive them from a free SVG...
    InkScape is a nice free Vector-graphics Editor-App which supports SVG-files fully.

    E.g. the KDE Oxygen-Iconset - which is *huge* (thousands of Base-SVGs) comes
    under a liberal License (LGPL), which allows also commercial usage - and based on the SVGs it
    contains - you should easily find something that matches - or slightly adapt the SVG-image in question.
    Here's a link which describes the Oxygen-Project:
    http://en.wikipedia.org/wiki/Oxygen_Project

    Here's an overview of other free Iconsets - e.g. the Tango-Iconset is entirely in the Public Domain -
    but a few LGPL-sets are also listed:
    http://commons.wikimedia.org/wiki/Co...n_of_icon_sets

    Otherwise a Google-Image-Search with:
    [Mediaplayer Icon Iconset]
    might help ...

    Aside from those in the Links above there's also other large and free Iconsets which
    will contain such stuff - just make sure you take a good look at the license, when you
    find something interesting.

    Olaf
    Last edited by Schmidt; Jan 18th, 2015 at 12:32 PM.

  15. #15

    Thread Starter
    New Member
    Join Date
    Jan 2015
    Posts
    15

    Re: Help Needed with conversion to .Net

    "I don't really want to discourage you from a re-write in .NET - but the "player-engine" is usually only a handful of code - e.g. Bonnie West posted a short snippet here in this thread recently:"

    Thank you. But I was an OS developer by profession. Your mp3 player look very nice but I'd prefer to do it myself.
    The new and beginning development looks like the old one by design.

  16. #16
    PowerPoster
    Join Date
    Jun 2013
    Posts
    4,930

    Re: Help Needed with conversion to .Net

    Quote Originally Posted by Renee Culver View Post
    Your mp3 player look very nice but I'd prefer to do it myself.
    In case you mean the ScreenShot I've posted - this is not "a Player" - it is thought
    for those who want to add a DB-based SearchEngine to their existing Players -
    (or start with such a "DB-backed-up search-engine" from the beginning).

    It's a straight-forward and codewise pretty short *Demo* which contains only two Forms -
    and these Forms interact only with a (dynamically created on Startup) JET-MDB, which
    is filled with 25000 fictive Demo-Records (to allow better judgement about the later to be
    expected performance in Full Searches - the Cover-Art-Control for dynamic Downloading
    is only a gimmick, to make the Demo a bit more "visually appealing" - and it works only
    on the first 5 entries of the 25000 Records (since only those contain real Album-Names).

    So it's a Wire-Frame-Model which covers only the basics of "DB-based MP3-Info-Handling"
    (for those who want to adapt it to their needs - and then fill it with concrete Info from their
    own "Music-Folders" - there's still quite a lot to do, until all the Information sits in the DB-File,
    to allow for convenient and fast Searching/Filtering of its content.)

    However - good luck with your project...

    Olaf
    Last edited by Schmidt; Jan 18th, 2015 at 12:34 PM.

  17. #17

    Thread Starter
    New Member
    Join Date
    Jan 2015
    Posts
    15

    Re: Help Needed with conversion to .Net

    Thank you Olaf. I wish I knew how you mark this thread as "Resolved".

  18. #18

    Thread Starter
    New Member
    Join Date
    Jan 2015
    Posts
    15

    Re: Help Needed with conversion to .Net

    As far as media buttons I have always cut them out or made them with photoshop. I have my hands full with this project. I have the original art work!
    Renee

  19. #19
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,117

    Re: Help Needed with conversion to .Net

    Quote Originally Posted by Renee Culver View Post
    Thank you Olaf. I wish I knew how you mark this thread as "Resolved".
    Just above your first post you should see a menu bar and one of the menu items is "Thread Tools".
    As the Thread Starter you will have an item at the bottom of that menu to "Mark the Thread Resolved".

Posting Permissions

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



Click Here to Expand Forum to Full Width