Hi,
Been messing with a DLL from Edwin Knoppert, pbsctrl.dll. Among other things, it has a picture control, which I have never been able to get going until now. As far as I am aware, it is now Freeware
Put the pbsctrl.lib into the libs folder - the rest can all go into the same folder, which is advisable
Displays JPG, BMP, GIF, EMF, WMF and ICO file types
I have included the help file and include file, but you don't need to put the include file into the inc folder, as I have included all the needed include commands in the program itself
If the graphic is smaller than the window, it attempts to centre it in the window
Be aware that if your graphic is larger than the window, the picture control will expand, and you then can't get at the Drive and File listboxes
If somebody knows how to do it, it could do with a routine to resize a too-large graphic to fit into the window proportionately. Would be a big help
I'm now working on what should happen if you resize the window
Enjoy!
Brian
Update attached to above program: Window resize works; better file handling; more muted colours in the Statusbar (easier to read text); spurious code removed
Brian
Program updated - see previous post to download
Program now saves last-visited path to ini file
Resizes loaded image if window resized, only if image is smaller than picture control
(That's why I need to know how to resize a bitmap, using code!)
Brian
I know this is an old thread, but have you figured out what you need to know? Wouldn't IWBasic's LOADIMAGE/SHOWIMAGE work for you? SHOWIMAGE allows you to position and size it however you want.
Later,
Clint
Clint,
I haven't re-visited that program in ages. I guess it's just how the pbsctrl.dll is written. VB has a similar picture control, and this DLL was written mainly with VB in mind, although a lot of the functions work with IWB
Brian
My personal preference hasn't been to use DLL if I can get around it. That is one reason I like IWBASIC. I like to create one exe file and that is all I need. You can make it so that one exe can be placed anywhere (just about) and it works without moving DLL's and other supporting program files like other programming languages. I just search for win32 api's for things that I think I need.
On another topic. Keep posting things even if you get no response. Sometimes I'm limited for time and can't respond but I do read posts on the forum. It is sad that there hasn't been any new members in awhile. When it comes to making a windows program I use IWBASIC. I wish there was a way to do more advertising because I think it is the best thing out there.
I was forced to use C++ to recreate a different program and you talk about a pain. There were somethings that were kind of cool but it took way longer, in fact, I never finished it. The new system that was being worked on didn't work (on their electronic end) and it was stopped.
Keep programming,
Clint
I am not sure that you can make good Image Viewer without using GDI+ api functions
i never use them in EB or CB and i dont know is there any example on forum
which use GDI+..
GDI+ can use most usual image format like bmp,jpg,png,gif to show images on windows
without using external .dll
as far as i know
Clint and Aurel,
You may like this program, done by Fasecero as an example for me quite a while ago. I don't think he will mind me posting it. Just click on an image to see it in the main window. Some clever stuff there!
Brian
This is the reason I don't like dependencies. I could not run the exe or compile that download. It said animation.dll not found. That dll isn't anywhere on my system and wasn't in the zip folder either. Is it possible to download a dll anymore? I know exe's doesn't work very well.
Later,
Clint
I found out it is part of "vc_redist.x64.exe". I'm downloading it to see if it will work.
Later,
Clint
Apparently, animation.dll is not in that setup. So... it looks like I can't run it.
Later,
Clint
Sorry, Clint, my mistake - I completely forgot about the DLL!
Brian
PS: I must be going loopy - I have forgotten another graphic, although the program does run without it
Thanks Brian. That worked.
Later,
Clint