forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


"DIALOG ADD, BITMAP" replacement

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Raymond175
Contributor
Contributor


Joined: 24 Apr 2002
Posts: 72

PostPosted: Sun Mar 09, 2008 9:43 pm    Post subject: "DIALOG ADD, BITMAP" replacement Reply with quote

Hello,

I've been looking all evening for a replacement for the "DIALOG ADD, BITMAP" function to add an image (BMP/JPG/GIF) to my dialog on a tab. I also want to resize the image and keep the aspect ratio, so I want to be able to retrieve the (original) width/height of the image.

The reason I want this is that I want to create some sort of photo-album. So I have to be able to load the photos and resize them for thumbnails while keeping the aspect ratio. I've looked at a lot of external dll-files, but I could not find anything working yet... Does anyone know a solution for my "problem"?

Thanks,
Raymond
Back to top
View user's profile Send private message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Sun Mar 09, 2008 9:57 pm    Post subject: Reply with quote

With VDS 6 look at the IMAGE element.

With VDS 5 look at the VDSOBJ.DLL from PGware.

With VDS 3,4,5 also look at VDSIMAGE in the VDSDLL 3 from TomSoft

BTW - Anyone know what ever happened to Tommy???


Last edited by Aslan on Sun Mar 09, 2008 11:22 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Raymond175
Contributor
Contributor


Joined: 24 Apr 2002
Posts: 72

PostPosted: Sun Mar 09, 2008 10:39 pm    Post subject: Reply with quote

I'm "still" using VDS 5, and I noticed that the VDSIMAGE did not work on tab elements; it just draws the image behind the tab element.

I had more success using VDSOBJ, but I was not able to get the width/height of the image so I was unable to resize the image with some calculations. I cannot believe that you are not able to get the actual image size with this extension, so does anyone know how to do this?

And I haven't seen, nor spoken Tommy since I bought the VDSDLL from him a couple of years ago... Sad

Thanks,
Raymond
Back to top
View user's profile Send private message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Sun Mar 09, 2008 11:24 pm    Post subject: Reply with quote

Just a thought, are you adding the image after or before the tab element?
Back to top
View user's profile Send private message Send e-mail
Raymond175
Contributor
Contributor


Joined: 24 Apr 2002
Posts: 72

PostPosted: Mon Mar 10, 2008 6:38 am    Post subject: Reply with quote

I have a TAB element containing a LINE element as element container. All elements that should appear on the tab will be placed on the LINE element. This way I can easily hide or remove all elements on the tab at once.

Using VDSIMAGE the image was drawn behind the TAB and/or LINE element. It did not matter if I first declared the TAB/LINE elements or the image...
Back to top
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1565

PostPosted: Mon Mar 10, 2008 6:00 pm    Post subject: Reply with quote

The VDSOBJ will work, there are commands and functions to use that are well documented in the help file.

Use OBJECT ADD, with the GRAPHIC dialog element. There is a style AUTOSIZE - which automatically will change the size of the dialog element control to fit the exact width/height of the image. There is also a STRETCH style allowing you to stretch the image.

Then use the @object(DLGPOS) function to determine the top, left width and height of the GRAPHIC dialog elment.

%A = @OBJECT(DLGPOS,GRAPHIC1,TLWH)
warn %A

returns the top, left, width, and height. You can specify T = top, L = left, W= width, H = height in any order and if you only want one value. Values are seperated by the | character which you can use the vds PARSE command to parse.


There is also the vdsconv extension which works with images directly (not placed on dialog) that lets you get the image width and size, also allows converting jpeg to bmp, gif to bmp, gif to jpeg, jpeg to gif, bmp to jpg and bmp to gif. This extension also allows you to crop and resize images.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group