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 


Find Bitmap Size

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code
View previous topic :: View next topic  
Author Message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Thu Jan 10, 2002 9:27 pm    Post subject: Find Bitmap Size Reply with quote

Here is an easy script to find the size of a bitmap.

Code:

   rem - A script to find the size of a bitmap
   rem - create a dummy dialog without the Dialog Show
   rem - because Child dlgs are easire to distroy

   dialog create,dummy,0,0,0,0

   dialog CREATE,Find Bitmap Size,-1,0,221,86
   dialog ADD,STYLE,STYLE1,,,B,,004080
   dialog ADD,TEXT,TEXT1,16,6,76,13,Select Bitmap:
   dialog ADD,BUTTON,BUTTON1,14,100,64,24,Select,,HAND
   dialog ADD,TEXT,TEXT2,60,8,80,13,Shameless plug:
   dialog ADD,TEXT,TEXT3,60,92,114,13,www.CGingerich.cc,,CLICK,STYLE1,HAND
   dialog SHOW

:evloop
   wait event
   goto @event()

:button1button
   %%file = @filedlg(*.bmp)
   if @ok()
      if %%file
         gosub getsize
      end
   end
   info Width@tab()%%iwidth@cr()Height@tab()%%iheight
   goto evloop

:text3click
   shell open,http://www.cgingerich.cc
   goto evloop

:getsize
   dialog create,temp,0,0,0,0
   dialog add,bitmap,temp,0,0,0,0,%%file
   %%iwidth = @dlgpos(temp,W)
   %%iheight = @dlgpos(temp,H)
   dialog select,2
   dialog close
   %e = @event()
   dialog select,1
   exit

:close
stop


Why it's saying that the width and height is a link I have no idea! Very Happy

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Jan 10, 2002 9:51 pm    Post subject: Find Bitmap Size Reply with quote

LiquidCode wrote:

Why it's saying that the width and height is a link I have no idea!


If you leave a space before the first "@", it usually doesn't.
Maybe it thinks it's an email address otherwise...
Code:

info Width @tab()%%iwidth@cr()Height@tab()%%iheight


Cheers, Mac

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Fri Jan 11, 2002 12:14 am    Post subject: Reply with quote

Oh, I'll have to remember that! Laughing
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code 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