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


Newest CodeGuru.com Articles:

  • Building Interactive UIs with ASP.NET Ajax: Rebinding Client-Side Events After a Partial Page Postback
  • Speed Up Repetitive Insert, Update, and Delete Query Statements
  • Binding Data to Silverlight 4.0 Controls Using ASP.NET MVC Framework 2.0
  • ADO.NET Data Services in the .NET Framework

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > .NET Programming > C-Sharp Programming
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    C-Sharp Programming Post questions, answers, and comments about C#.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old February 18th, 2010, 06:15 AM
    sclement sclement is offline
    Member
     
    Join Date: Jan 2003
    Posts: 70
    sclement is an unknown quantity at this point (<10)
    Convert Windows Application to Windows Control Library

    Dear All

    I have adapted a C# application (written in VS 2005) to run along side a VB6 app. At the moment the VB 6.0 app dictates when the c# application is run.

    Ideally what I would like to do is convert the C# application to a Windows Control Library to give the the VB 6.0 coder so he can use it as a component within his code.

    I'm not sure whether this conversion is actually possible, or whether I would have to copy and paste the contols in the C# app into a new Windows Control Library project.

    Any help/comments on this would be appreciated

    cheers

    simon
    Reply With Quote
      #2    
    Old February 18th, 2010, 06:24 AM
    HanneSThEGreaT's Avatar
    HanneSThEGreaT HanneSThEGreaT is offline
    Moderator / Reviewer
    Power Poster
     
    Join Date: Jul 2001
    Location: 26°40’24.82” S 27°55’50.95” E
    Posts: 9,085
    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: Convert Windows Application to Windows Control Library

    Best advice would be to create a new Windows Control Library project, and as you rightly say, copy and paste the contols into it
    __________________
    2008 - 2010
    My Latest Articles : Creating Your Own Tetris Game With VB.NET Part 1 || Part 2 || Part 3 || Visual Studio 2010 & .NET Framework 4 Available
    Find All My Articles : Here

    FAQs :
    .NET FrameWork FAQs || Visual Basic.NET FAQs || C# FAQs || VB 6 FAQs || CG Daily News

    Great battles kick up a lot of dirt. Obscures the battle field, so the generals can't see what's going on - House Season 2 Episode 18

    Read This Before You Post || Acceptable Use Policy
    Reply With Quote
      #3    
    Old February 18th, 2010, 10:41 AM
    sclement sclement is offline
    Member
     
    Join Date: Jan 2003
    Posts: 70
    sclement is an unknown quantity at this point (<10)
    Re: Convert Windows Application to Windows Control Library

    Hi Hannes

    I thought that might be the case, as I could find no references on conversion when I did a search. Oh well just means a bit more coding !

    cheers

    simon
    Reply With Quote
      #4    
    Old February 18th, 2010, 11:15 AM
    memeloo memeloo is offline
    Member +
     
    Join Date: Oct 2008
    Location: Cologne, Germany
    Posts: 618
    memeloo  is a jewel in the rough (300+)memeloo  is a jewel in the rough (300+)memeloo  is a jewel in the rough (300+)memeloo  is a jewel in the rough (300+)
    Re: Convert Windows Application to Windows Control Library

    I think there is a way (I've just tested it on a simple project and it worked)

    go to the "Project > Properties > Application" settings then on the right side change the "Output type" to "Class Library" and finally change the base class of your form(s) from Form to UserControl and change the class access modifier if necessary and if you are using any of the Form class'es method or properties other adjustments might be needed too.
    __________________
    win7 x86, VS 2008, C++/CLI, C#, .NET 3.5, VB.NET, VBA

    remeber to give feedback and if you think my response deserves recognition perhaps you may want to click the Rate this post link/button

    Last edited by memeloo; February 18th, 2010 at 11:18 AM.
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > .NET Programming > C-Sharp 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 02:09 AM.



    Acceptable Use Policy

    Internet.com
    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.