469,352 Members | 1,694 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

Dll files

MAK
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
Jul 17 '05 #1
7 5440
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" <Ma********@comcast.net> wrote in message
news:7p********************@comcast.com...
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

Jul 17 '05 #2
MAK
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************@shaw.ca> wrote in message
news:odayb.526777$9l5.77702@pd7tw2no...
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" <Ma********@comcast.net> wrote in message
news:7p********************@comcast.com...
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


Jul 17 '05 #3
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" <Ma********@comcast.net> wrote in message
news:X7********************@comcast.com...
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************@shaw.ca> wrote in message
news:odayb.526777$9l5.77702@pd7tw2no...
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" <Ma********@comcast.net> wrote in message
news:7p********************@comcast.com...
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

Jul 17 '05 #4
MAK
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************@shaw.ca> wrote in message
news:otfyb.523306$6C4.323108@pd7tw1no...
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" <Ma********@comcast.net> wrote in message
news:X7********************@comcast.com...
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************@shaw.ca> wrote in message
news:odayb.526777$9l5.77702@pd7tw2no...
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" <Ma********@comcast.net> wrote in message
news:7p********************@comcast.com...
> 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


Jul 17 '05 #5
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
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 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
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.
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************@shaw.ca> wrote in message
news:otfyb.523306$6C4.323108@pd7tw1no...
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

Jul 17 '05 #6
MAK
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************@shaw.ca> wrote in message
news:X0qyb.529310$pl3.472335@pd7tw3no...
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
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 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
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.
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************@shaw.ca> wrote in message
news:otfyb.523306$6C4.323108@pd7tw1no...
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


Jul 17 '05 #7
Hello MAK.
Tom, nice site can I down load and use the calculator ?
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.
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
I will have to defer to the great minds that contribute here. I am out of
my league now.

"Kiteman (Canada)"wrote in message..
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
I
just put everything within the same folder as the .exe and everthing

gets found just nicely.

Jul 17 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

18 posts views Thread by JKop | last post: by
3 posts views Thread by pooja | last post: by
11 posts views Thread by ambika | last post: by
22 posts views Thread by Daniel Billingsley | last post: by
18 posts views Thread by UJ | last post: by
reply views Thread by wal | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.