Dll files

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MAK

    Dll files

    Hello everyone,
    I know how to add images and icons etc to dll file.
    What I would like to know is there is a way to add those icons on the forms
    during the run time from the dll or to reference it to the dll during the
    design time, then when I compile the project and install it, then all the
    images still inside the dll file. not to be installed into winnet, or system
    or system32 or any directory,
    1) is it possible ? and how ? link or examples
    2)do I need to open the dll file and save it as a resource then add it to my
    project ?
    3)add it as *.res file or what?

    Any help will be appreciated , I'm using VB5 or VB6 o/s XP.

    MAK


  • Kiteman \(Canada\)

    #2
    Re: Dll files

    Are you looking for a way to insert your own icons into a created .dll file
    -OR-
    are you trying to have several images/icons available to your program during
    execution
    -OR-
    are you just trying to have a nice little icon in the top left of each form
    (on the title bar)
    ?

    The second and third are easy, the first one I don't have clue about.
    Please elaborate.

    Tom

    "MAK" <Makdesign1@com cast.net> wrote in message
    news:7pednfZV0t [email protected]. ..[color=blue]
    > Hello everyone,
    > I know how to add images and icons etc to dll file.
    > What I would like to know is there is a way to add those icons on the[/color]
    forms[color=blue]
    > during the run time from the dll or to reference it to the dll during the
    > design time, then when I compile the project and install it, then all the
    > images still inside the dll file. not to be installed into winnet, or[/color]
    system[color=blue]
    > or system32 or any directory,
    > 1) is it possible ? and how ? link or examples
    > 2)do I need to open the dll file and save it as a resource then add it to[/color]
    my[color=blue]
    > project ?
    > 3)add it as *.res file or what?
    >
    > Any help will be appreciated , I'm using VB5 or VB6 o/s XP.
    >
    > MAK
    >
    >[/color]


    Comment

    • MAK

      #3
      Re: Dll files

      Thanks Kiteman,
      The second option what I'm looking for the first and last I can mange them.
      Would you have an example or code or link to explore such methodology?

      Thanks

      "Kiteman (Canada)" <NO-SPAMkiteman@sha w.ca> wrote in message
      news:odayb.5267 77$9l5.77702@pd 7tw2no...[color=blue]
      > Are you looking for a way to insert your own icons into a created .dll[/color]
      file[color=blue]
      > -OR-
      > are you trying to have several images/icons available to your program[/color]
      during[color=blue]
      > execution
      > -OR-
      > are you just trying to have a nice little icon in the top left of each[/color]
      form[color=blue]
      > (on the title bar)
      > ?
      >
      > The second and third are easy, the first one I don't have clue about.
      > Please elaborate.
      >
      > Tom
      >
      > "MAK" <Makdesign1@com cast.net> wrote in message
      > news:7pednfZV0t [email protected]. ..[color=green]
      > > Hello everyone,
      > > I know how to add images and icons etc to dll file.
      > > What I would like to know is there is a way to add those icons on the[/color]
      > forms[color=green]
      > > during the run time from the dll or to reference it to the dll during[/color][/color]
      the[color=blue][color=green]
      > > design time, then when I compile the project and install it, then all[/color][/color]
      the[color=blue][color=green]
      > > images still inside the dll file. not to be installed into winnet, or[/color]
      > system[color=green]
      > > or system32 or any directory,
      > > 1) is it possible ? and how ? link or examples
      > > 2)do I need to open the dll file and save it as a resource then add it[/color][/color]
      to[color=blue]
      > my[color=green]
      > > project ?
      > > 3)add it as *.res file or what?
      > >
      > > Any help will be appreciated , I'm using VB5 or VB6 o/s XP.
      > >
      > > MAK
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Kiteman \(Canada\)

        #4
        Re: Dll files

        Hello Mak.

        If you create a number of image controls at design time and place the
        graphics in them, the images are saved within the executable. You can set
        the Visible property to False at design time and have them appear by
        changing this property during run time. You can hold bmp, jpg, gif, ico,
        and wmf files within the Image control.

        You could alternately create a big non-displaying form as a placeholder for
        all your graphics and just have the required picture copy to your displayed
        form upon code request.

        eg.
        frmMain.Image1. Picture = frmPlaceHolder. Image7.Picture

        would have your Image1 control on your frmMain now contain the contents of
        the Image7 control on your non-displaying frmPlaceHolder form. Remember
        that you can add code to adjust Stretch, Placement and Size.

        Is this as much detail as you require?

        Tom



        "MAK" <Makdesign1@com cast.net> wrote in message
        news:X7CdnTmMq6 [email protected]. ..[color=blue]
        > Thanks Kiteman,
        > The second option what I'm looking for the first and last I can mange[/color]
        them.[color=blue]
        > Would you have an example or code or link to explore such methodology?
        >
        > Thanks
        >
        > "Kiteman (Canada)" <NO-SPAMkiteman@sha w.ca> wrote in message
        > news:odayb.5267 77$9l5.77702@pd 7tw2no...[color=green]
        > > Are you looking for a way to insert your own icons into a created .dll[/color]
        > file[color=green]
        > > -OR-
        > > are you trying to have several images/icons available to your program[/color]
        > during[color=green]
        > > execution
        > > -OR-
        > > are you just trying to have a nice little icon in the top left of each[/color]
        > form[color=green]
        > > (on the title bar)
        > > ?
        > >
        > > The second and third are easy, the first one I don't have clue about.
        > > Please elaborate.
        > >
        > > Tom
        > >
        > > "MAK" <Makdesign1@com cast.net> wrote in message
        > > news:7pednfZV0t [email protected]. ..[color=darkred]
        > > > Hello everyone,
        > > > I know how to add images and icons etc to dll file.
        > > > What I would like to know is there is a way to add those icons on the[/color]
        > > forms[color=darkred]
        > > > during the run time from the dll or to reference it to the dll during[/color][/color]
        > the[color=green][color=darkred]
        > > > design time, then when I compile the project and install it, then all[/color][/color]
        > the[color=green][color=darkred]
        > > > images still inside the dll file. not to be installed into winnet, or[/color]
        > > system[color=darkred]
        > > > or system32 or any directory,
        > > > 1) is it possible ? and how ? link or examples
        > > > 2)do I need to open the dll file and save it as a resource then add it[/color][/color]
        > to[/color]


        Comment

        • MAK

          #5
          Re: Dll files

          Hello Tom,
          First Thanks a lot for your quick answers, and help , I deeply appreciated.
          Second, I failed to say in my first post "any images", animated or not
          animated and icons.

          During the development of such project, forms some images which I used are
          imbedded by ocx to place them on the form. Once project completed. and,
          During packaging and create the installation setup.exe it will gather all
          the images, and as you know I have the choice to change the insulation
          directory during creating such package, and cab file.

          As you know, during the installation on another machine such images must be
          added back to the same exact reference directory which were chosen during
          the packaging, if I delete them or move them from the referenced directory
          the project still working but without the animation on such form.

          This is the reason why I'm asking about using "a dynamic link library(Dll)
          along with my setup.exe to be used for my images to avoid user from deleting
          such images. I used this methodology with AutoCAD and successfully used the
          dll with the AutoCAD tool bar menu, it was easy for me because I writ lisp/
          dcl routine for AutoCAD. But not easy in this stage as implementation to do
          it in VB for this portion I'm looking for help.

          Sorry for my bad second language, I did not mean mislead you, but my be you
          will find a link or tutorial which may lead to a resolution. I'm sure it is
          there I'm still looking. Also if you come across any thing to allow encrypt
          *.mdb file and decrypt, will be great... appreciated.

          MAK

          "Kiteman (Canada)" <NO-SPAMkiteman@sha w.ca> wrote in message
          news:otfyb.5233 06$6C4.323108@p d7tw1no...[color=blue]
          > Hello Mak.
          >
          > If you create a number of image controls at design time and place the
          > graphics in them, the images are saved within the executable. You can[/color]
          set[color=blue]
          > the Visible property to False at design time and have them appear by
          > changing this property during run time. You can hold bmp, jpg, gif, ico,
          > and wmf files within the Image control.
          >
          > You could alternately create a big non-displaying form as a placeholder[/color]
          for[color=blue]
          > all your graphics and just have the required picture copy to your[/color]
          displayed[color=blue]
          > form upon code request.
          >
          > eg.
          > frmMain.Image1. Picture = frmPlaceHolder. Image7.Picture
          >
          > would have your Image1 control on your frmMain now contain the contents of
          > the Image7 control on your non-displaying frmPlaceHolder form. Remember
          > that you can add code to adjust Stretch, Placement and Size.
          >
          > Is this as much detail as you require?
          >
          > Tom
          >
          >
          >
          > "MAK" <Makdesign1@com cast.net> wrote in message
          > news:X7CdnTmMq6 [email protected]. ..[color=green]
          > > Thanks Kiteman,
          > > The second option what I'm looking for the first and last I can mange[/color]
          > them.[color=green]
          > > Would you have an example or code or link to explore such methodology?
          > >
          > > Thanks
          > >
          > > "Kiteman (Canada)" <NO-SPAMkiteman@sha w.ca> wrote in message
          > > news:odayb.5267 77$9l5.77702@pd 7tw2no...[color=darkred]
          > > > Are you looking for a way to insert your own icons into a created .dll[/color]
          > > file[color=darkred]
          > > > -OR-
          > > > are you trying to have several images/icons available to your program[/color]
          > > during[color=darkred]
          > > > execution
          > > > -OR-
          > > > are you just trying to have a nice little icon in the top left of each[/color]
          > > form[color=darkred]
          > > > (on the title bar)
          > > > ?
          > > >
          > > > The second and third are easy, the first one I don't have clue about.
          > > > Please elaborate.
          > > >
          > > > Tom
          > > >
          > > > "MAK" <Makdesign1@com cast.net> wrote in message
          > > > news:7pednfZV0t [email protected]. ..
          > > > > Hello everyone,
          > > > > I know how to add images and icons etc to dll file.
          > > > > What I would like to know is there is a way to add those icons on[/color][/color][/color]
          the[color=blue][color=green][color=darkred]
          > > > forms
          > > > > during the run time from the dll or to reference it to the dll[/color][/color][/color]
          during[color=blue][color=green]
          > > the[color=darkred]
          > > > > design time, then when I compile the project and install it, then[/color][/color][/color]
          all[color=blue][color=green]
          > > the[color=darkred]
          > > > > images still inside the dll file. not to be installed into winnet,[/color][/color][/color]
          or[color=blue][color=green][color=darkred]
          > > > system
          > > > > or system32 or any directory,
          > > > > 1) is it possible ? and how ? link or examples
          > > > > 2)do I need to open the dll file and save it as a resource then add[/color][/color][/color]
          it[color=blue][color=green]
          > > to[/color]
          >
          >[/color]


          Comment

          • Kiteman \(Canada\)

            #6
            Re: Dll files

            My experience with Image controls is that if I place a picture within one,
            the control AND its contents are saved within the executable. I have
            written a program that has 22 separate forms and any graphic elements
            (mostly just .jpg and .wmf files) are fully containted within the single
            ..exe file. I have also placed .wmf files within the Picture property of a
            form (not inside an Image control) and it is also saved within the
            executable.

            My program in question can be found at

            It is the NPW9b Vulture Calculator program. It gives all the steps in
            making a (size of your choice) traction kite.

            I have never used animated gifs or .avi files so I don't know how they are
            handled. If you need to supply your graphics as separate files then you
            can place them within the same folder as your .exe and load them with the
            App.Path & filename string. I used to require that my end user keep
            database files in a specified directory, but since learning about App.Path I
            just put everything within the same folder as the .exe and everthing gets
            found just nicely.

            For Example:

            intFileNo = FreeFile
            Open App.Path & "\NPW9bStartup. ini" For Input As #intFileNo
            ' Read in the .ini file contents etc.
            Close #intFileNo

            This is about as far as I can help with my limited knowledge of VB.

            Tom
            [color=blue]
            > Hello Tom,
            > First Thanks a lot for your quick answers, and help , I deeply[/color]
            appreciated.[color=blue]
            > Second, I failed to say in my first post "any images", animated or not
            > animated and icons.
            >
            > During the development of such project, forms some images which I used[/color]
            are[color=blue]
            > imbedded by ocx to place them on the form. Once project completed. and,
            > During packaging and create the installation setup.exe it will gather all
            > the images, and as you know I have the choice to change the insulation
            > directory during creating such package, and cab file.
            >
            > As you know, during the installation on another machine such images must[/color]
            be[color=blue]
            > added back to the same exact reference directory which were chosen during
            > the packaging, if I delete them or move them from the referenced directory
            > the project still working but without the animation on such form.
            >
            >
            > Sorry for my bad second language, I did not mean mislead you, but my be[/color]
            you[color=blue]
            > will find a link or tutorial which may lead to a resolution. I'm sure it[/color]
            is[color=blue]
            > there I'm still looking. Also if you come across any thing to allow[/color]
            encrypt[color=blue]
            > *.mdb file and decrypt, will be great... appreciated.
            >
            > MAK
            >
            > "Kiteman (Canada)" <NO-SPAMkiteman@sha w.ca> wrote in message
            > news:otfyb.5233 06$6C4.323108@p d7tw1no...[color=green]
            > > Hello Mak.
            > >
            > > If you create a number of image controls at design time and place the
            > > graphics in them, the images are saved within the executable. You can[/color]
            > set[color=green]
            > > the Visible property to False at design time and have them appear by
            > > changing this property during run time. You can hold bmp, jpg, gif,[/color][/color]
            ico,[color=blue][color=green]
            > > and wmf files within the Image control.
            > >
            > > You could alternately create a big non-displaying form as a placeholder[/color]
            > for[color=green]
            > > all your graphics and just have the required picture copy to your[/color]
            > displayed[color=green]
            > > form upon code request.
            > >
            > > eg.
            > > frmMain.Image1. Picture = frmPlaceHolder. Image7.Picture
            > >
            > > would have your Image1 control on your frmMain now contain the contents[/color][/color]
            of[color=blue][color=green]
            > > the Image7 control on your non-displaying frmPlaceHolder form.[/color][/color]
            Remember[color=blue][color=green]
            > > that you can add code to adjust Stretch, Placement and Size.
            > >
            > > Is this as much detail as you require?
            > >
            > > Tom
            > >
            > >[/color][/color]


            Comment

            • MAK

              #7
              Re: Dll files

              Tom, nice site can I down load and use the calculator ?

              Your information and experience is 100% correct, however based on the two
              controls I have for animation, I have to have the path name, directory name,
              and file name correct as well as the animated images reside into the
              directory if I remove such images I will get blank form with other static
              images such icons Jpg, gif , or any control,etc as non animated files. I saw
              early your email while I was at work, and I tested my project on three
              different computer with the same results No No.

              Beside the above, and if I'm not mistaken that The advantage of DLL files is
              that, because they don't get loaded into random access memory (RAM) together
              with the main program, space is saved in RAM. When and if a DLL file is
              needed, then it is loaded and run.
              For example, as long as a user of Microsoft Word is editing a document, the
              printer DLL file does not need to be loaded into RAM. If the user decides to
              print the document, then the Word application causes the printer DLL file to
              be loaded and run. When I used this method in AutoCAD I did not have any
              smiley faces on my icons any more because I have them all in *.Dll

              So , I want to take advantage of such technology for my application, if I
              find a way out and how to declare it.

              Again thanks for your post. in return if you need a flash or animation logo
              to your site I will be happy to help you at no cost.

              MAK



              "Kiteman (Canada)" <NO-SPAMkiteman@sha w.ca> wrote in message
              news:X0qyb.5293 10$pl3.472335@p d7tw3no...[color=blue]
              > My experience with Image controls is that if I place a picture within one,
              > the control AND its contents are saved within the executable. I have
              > written a program that has 22 separate forms and any graphic elements
              > (mostly just .jpg and .wmf files) are fully containted within the single
              > .exe file. I have also placed .wmf files within the Picture property of[/color]
              a[color=blue]
              > form (not inside an Image control) and it is also saved within the
              > executable.
              >
              > My program in question can be found at
              > http://members.shaw.ca/kiteman/Downloads.htm
              > It is the NPW9b Vulture Calculator program. It gives all the steps in
              > making a (size of your choice) traction kite.
              >
              > I have never used animated gifs or .avi files so I don't know how they are
              > handled. If you need to supply your graphics as separate files then you
              > can place them within the same folder as your .exe and load them with the
              > App.Path & filename string. I used to require that my end user keep
              > database files in a specified directory, but since learning about App.Path[/color]
              I[color=blue]
              > just put everything within the same folder as the .exe and everthing gets
              > found just nicely.
              >
              > For Example:
              >
              > intFileNo = FreeFile
              > Open App.Path & "\NPW9bStartup. ini" For Input As #intFileNo
              > ' Read in the .ini file contents etc.
              > Close #intFileNo
              >
              > This is about as far as I can help with my limited knowledge of VB.
              >
              > Tom
              >[color=green]
              > > Hello Tom,
              > > First Thanks a lot for your quick answers, and help , I deeply[/color]
              > appreciated.[color=green]
              > > Second, I failed to say in my first post "any images", animated or not
              > > animated and icons.
              > >
              > > During the development of such project, forms some images which I used[/color]
              > are[color=green]
              > > imbedded by ocx to place them on the form. Once project completed. and,
              > > During packaging and create the installation setup.exe it will gather[/color][/color]
              all[color=blue][color=green]
              > > the images, and as you know I have the choice to change the insulation
              > > directory during creating such package, and cab file.
              > >
              > > As you know, during the installation on another machine such images must[/color]
              > be[color=green]
              > > added back to the same exact reference directory which were chosen[/color][/color]
              during[color=blue][color=green]
              > > the packaging, if I delete them or move them from the referenced[/color][/color]
              directory[color=blue][color=green]
              > > the project still working but without the animation on such form.
              > >
              > >
              > > Sorry for my bad second language, I did not mean mislead you, but my be[/color]
              > you[color=green]
              > > will find a link or tutorial which may lead to a resolution. I'm sure it[/color]
              > is[color=green]
              > > there I'm still looking. Also if you come across any thing to allow[/color]
              > encrypt[color=green]
              > > *.mdb file and decrypt, will be great... appreciated.
              > >
              > > MAK
              > >
              > > "Kiteman (Canada)" <NO-SPAMkiteman@sha w.ca> wrote in message
              > > news:otfyb.5233 06$6C4.323108@p d7tw1no...[color=darkred]
              > > > Hello Mak.
              > > >
              > > > If you create a number of image controls at design time and place the
              > > > graphics in them, the images are saved within the executable. You[/color][/color][/color]
              can[color=blue][color=green]
              > > set[color=darkred]
              > > > the Visible property to False at design time and have them appear by
              > > > changing this property during run time. You can hold bmp, jpg, gif,[/color][/color]
              > ico,[color=green][color=darkred]
              > > > and wmf files within the Image control.
              > > >
              > > > You could alternately create a big non-displaying form as a[/color][/color][/color]
              placeholder[color=blue][color=green]
              > > for[color=darkred]
              > > > all your graphics and just have the required picture copy to your[/color]
              > > displayed[color=darkred]
              > > > form upon code request.
              > > >
              > > > eg.
              > > > frmMain.Image1. Picture = frmPlaceHolder. Image7.Picture
              > > >
              > > > would have your Image1 control on your frmMain now contain the[/color][/color][/color]
              contents[color=blue]
              > of[color=green][color=darkred]
              > > > the Image7 control on your non-displaying frmPlaceHolder form.[/color][/color]
              > Remember[color=green][color=darkred]
              > > > that you can add code to adjust Stretch, Placement and Size.
              > > >
              > > > Is this as much detail as you require?
              > > >
              > > > Tom
              > > >
              > > >[/color][/color]
              >
              >[/color]


              Comment

              • Kiteman \(Canada\)

                #8
                Re: Dll files

                Hello MAK.
                [color=blue]
                > Tom, nice site can I down load and use the calculator ?[/color]

                It says free, so, ummm, I guess you can :-)
                It's free for anyone. I hate going to sites that say it is a free download
                but then they ask for money when you try to install or use the program.
                Sure, the download was free, but the program isn't. In my case, it is
                free, free, free. If you use the program to build a kite you are only
                asked to send me a picture of the finished kite in flight.
                [color=blue]
                > Your information and experience is 100% correct, however based on the two
                > controls I have for animation, I have to have the path name, directory[/color]
                name,[color=blue]
                > and file name correct as well as the animated images reside into the
                > directory if I remove such images I will get blank form with other static
                > images such icons Jpg, gif , or any control,etc as non animated files. I[/color]
                saw[color=blue]
                > early your email while I was at work, and I tested my project on three
                > different computer with the same results No No.
                > Beside the above, and if I'm not mistaken that The advantage of DLL files[/color]
                is[color=blue]
                > that, because they don't get loaded into random access memory (RAM)[/color]
                together[color=blue]
                > with the main program, space is saved in RAM. When and if a DLL file is
                > needed, then it is loaded and run.
                > For example, as long as a user of Microsoft Word is editing a document,[/color]
                the[color=blue]
                > printer DLL file does not need to be loaded into RAM. If the user decides[/color]
                to[color=blue]
                > print the document, then the Word application causes the printer DLL file[/color]
                to[color=blue]
                > be loaded and run. When I used this method in AutoCAD I did not have any
                > smiley faces on my icons any more because I have them all in *.Dll[/color]

                I will have to defer to the great minds that contribute here. I am out of
                my league now.
                [color=blue]
                >
                > "Kiteman (Canada)"wrote in message..[color=green]
                > > My program in question can be found at
                > > http://members.shaw.ca/kiteman/Downloads.htm
                > > It is the NPW9b Vulture Calculator program. It gives all the steps in
                > > making a (size of your choice) traction kite.
                > >
                > > I have never used animated gifs or .avi files so I don't know how they[/color][/color]
                are[color=blue][color=green]
                > > handled. If you need to supply your graphics as separate files then[/color][/color]
                you[color=blue][color=green]
                > > can place them within the same folder as your .exe and load them with[/color][/color]
                the[color=blue][color=green]
                > > App.Path & filename string. I used to require that my end user keep
                > > database files in a specified directory, but since learning about[/color][/color]
                App.Path[color=blue]
                > I[color=green]
                > > just put everything within the same folder as the .exe and everthing[/color][/color]
                gets[color=blue][color=green]
                > > found just nicely.[/color][/color]


                Comment

                Working...