dcsimg
Results 1 to 6 of 6

Thread: How can i add dlls in a single program.

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2019
    Posts
    3

    How can i add dlls in a single program.

    I'm new here, if you can help me, I have a few questions:
    1. I added all the files to resources here
    i found a code but i do not know how to make the program run DLLs without the help of dlls


    Code:
     Private WithEvents Domain As AppDomain = AppDomain.CurrentDomain
        Private Function DomainCheck(sender As Object, e As System.ResolveEventArgs) As System.Reflection.Assembly Handles Domain.AssemblyResolve
            If e.Name.Contains("MetroFramework") Then
                Return System.Reflection.Assembly.Load(My.Resources.MetroFramework)
            ElseIf
    
                Return System.Reflection.Assembly.Load(My.Resources.MetroFramework_Design) Then
            Else
    
                Return System.Reflection.Assembly.Load(My.Resources.MetroFramework_Fonts)
    
            End If
    thank you

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    33,758

    Re: How can i add dlls in a single program.

    Normally, you would add a reference to a dll if you want to use it, rather than adding it to Resources. Is there a reason why you are doing it this way?
    My usual boring signature: Nothing

  3. #3
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    102,229

    Re: How can i add dlls in a single program.

    I see a lot of people foolishly trying to achieve the ability to deploy their application as a single EXE file and trying silly things to get DLLs and other dependencies hidden in that EXE. Is that what you're trying to do? If so, I suggest that you get over it. If you want your users to be able to download a single file then either create a proper installer for your app or just use a ZIP file, as developers have been doing for decades. If your users are somehow incapable of extracting your app form a ZIP file then they are just too stupid to use your app or a computer in the first place.

    If that's not what you're doing then my apologies to your users but you'll need to provide more explanation about what you actually are trying to achieve. MetroFramework is available as s NuGet package and that is what you should be adding to your project. It will take care of the required references and then you can simply deploy the contents of your output folder in the manner I mentioned previously/

  4. #4

    Thread Starter
    New Member
    Join Date
    Jun 2019
    Posts
    3

    Re: How can i add dlls in a single program.

    ok, i want to do a "windows tool" to download some programs by pressing a button (steam etc.) and i would like to be just one file
    I saw that you can use "MetroFramework" without owning those 3 dlls
    or if you can not help me you can give me some new main themes for vb.net similar to the metro framework


    thank you for helping me

  5. #5
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    102,229

    Re: How can i add dlls in a single program.

    Quote Originally Posted by Suspectxyz View Post
    i would like to be just one file
    You should get over that.
    Last edited by jmcilhinney; Jun 13th, 2019 at 10:45 AM.

  6. #6

    Thread Starter
    New Member
    Join Date
    Jun 2019
    Posts
    3

    Re: How can i add dlls in a single program.

    ok but you can if you want or know some themes for vb.net as a "metro framework" after you can close

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width