| View previous topic :: View next topic |
| Author |
Message |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Wed Dec 04, 2002 10:22 pm Post subject: |
|
|
Get out of Windows 95 world Mac
If yer going to skin an app you might as well use good looking BMP's with an up and clicked state. _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Dec 04, 2002 10:31 pm Post subject: |
|
|
Hmmm...
Wonder what I'd need to skin a sheep....
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 |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Wed Dec 04, 2002 10:38 pm Post subject: |
|
|
LOL... Windows 95 worl... Ahem. Sorry.
You've given me a great starting point. The group element was the biggest problem for me. I'll take a look at your ColorCell2 program Chris. The TRANSPARENT style for text in v4.5 is nice. I found that one snooping around in the help file.
Thanks for the suggestions!  |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Wed Dec 04, 2002 10:38 pm Post subject: |
|
|
A muzzle and hedge clippers. _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Dec 04, 2002 10:45 pm Post subject: |
|
|
Hortalonus,
I still use VDS 3.51 which has the TRANSPARENT style
for text as well.
Cheers, Mac
Lol Sheep - I figured the first thing I'd need was a
fast pair of runnin' shoes...  _________________ 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 |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2150 Location: A House
|
Posted: Thu Dec 05, 2002 5:25 am Post subject: |
|
|
| Mac wrote: | OOPS... Background adjustment height was off by one pixel.
It's fixed now. Also replaced the list with an edit element.
BTW, the "27" allows for title bar height, the "8" allows
for discrepancies between the @winpos() function and the
DIALOG SETPOS command (prolly some of this in the
title bar allowance as well).
Cheers, Mac  |
It's a shame that it's not that simple Mac. But each user could have
different settings for these things. Border can be different size, Title
bar, Menu bar. You can't just hard code these things. You have to
grab them dynamically.
I use to try and grab them from the registry, but there's a small cult
of people who still use the ancient system called "Windows 95". And
some of the registry stuff I normally use don't seem to be found in
that system.
So here's a little trick I tossed together (though there maybe more
simple ways to find out this stuff):
| Code: |
:WinDimensions
DIALOG CREATE,WinDimensionCollectTest,-1,0,200,200,RESIZABLE,CLASS WinDimensionCollectTest
%%Border = @fsub(@winpos(WinDimensionCollectTest,W),200)
%%TitleBar = @fsub(@fsub(@winpos(WinDimensionCollectTest,H),200),%%Border)
DIALOG ADD,MENU,test
%%MenuHigh = @fsub(@fsub(@fsub(@winpos(WinDimensionCollectTest,H),200),%%Border),%%TitleBar)
Dialog Select,1
Dialog Close
Exit |
%%Border should contain the border pixel offset, but I think that's x2
on that, since it's getting the border width from both left and right of
the dialog.
%%TitleBar would contain only the height of the title bar. It does not
take into consideration the border that is above it. So you need to
compensate for that win sizing things.
%%MenuHigh of course holds the height of the menu. This does not
take into consideration the (I believe it's) 1 or 2 pixels between the
title bar and the menu.
You could probably also grab the height of the STATUS bar with this if
needed, but I just never had a need for that.
I use that as a Gosub at the top of my RESIZE branch before
anything else.
-Garrett |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2150 Location: A House
|
Posted: Thu Dec 05, 2002 5:49 am Post subject: |
|
|
Hortalonus, I've got a program here I'm willing to share with you, but
here's the problem.... Right now it's about 1094 lines of source code
with absolutely not one line of commenting... I can probably and will
cut out some stuff that I dont' want to leave in it.
This program is just a remake of my old Memory-Trax program, which
was also a skinned vds program. This one is a complete skinned
program also, complete with a skin browser. But it's long, it's Garrett
style of code (which means it may not be orthodox when compared to
other source codes around here, or compared to examples provided
with VDS).
But I am willing to share it with you if you think you can take on a large
and maybe complicated example.
If you are interested in using this to learn how to make skinned apps,
then I will zip it and upload it for you somewhere, on these terms:
1. You may not take the source, images and other related files as-is
and release this program under your name or any one else's name.
2. You may not release a program of similar nature using the same
name of this program.
3. If you use a lot of the source and if you do use the images for
another project, or one similar to this, I only ask that maybe you give
a little thanks somewhere so that I know that you appreciated the
resources you were provided with. Even if it's 4 point MS Small Fonts
on the last page of 200 page license agreement that goes with your
software.
4. Basically, use this to learn with. Use some of the code, use
common sense, be honest and don't just flat out rip me off on this
program.
Now, if you agree to that, let me know.
-Garrett |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Dec 05, 2002 8:24 am Post subject: |
|
|
| Garrett wrote: |
It's a shame that it's not that simple Mac. But each user could have
different settings for these things. Border can be different size, Title
bar, Menu bar. You can't just hard code these things. You have to
grab them dynamically.
|
Thanks, Garret
I was under the impression that using OPTION SCALE, 96
would pretty much display the window as it was written...
Couldn't @sysinfo(PIXPERIN) be used to get an appropriate
scale of things? All my comps are the same OS, so I have
no way to check this kinda stuff.
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 |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2150 Location: A House
|
Posted: Thu Dec 05, 2002 11:16 am Post subject: |
|
|
As far as I can tell, the OPTION SCALE is good when the dialog is
created. It will adjust to fit the users system. But once you start
resizing things, OPTION SCALE is out the door.
By the way.... When you get a chance, go to your display settings
then advanced and set your font to "Large". Reboot your system
and now go run all your VDS programs, regardless if they have
Option Scale. Heheheheheee... Ya just gotta see what they look
like. While you're at it, increase the border width to maybe 6, make
your title bar 30 and same with the menu, make that sucker 30 or
maybe even 40. Now take a look at your VDS apps
Now, you want to go one step further for testing your applications....
Back to the display panel and then to Appearance tab. Click the
drop down menu for Scheme's and select "Rainy Day" and hit
apply. Now go run all your VDS apps. you might get a few gigles
out of that too.
When it comes to skinning, OPTION SCALE is almost useless. You
don't want to stretch your fancy images because stretch can seriously
make them look ugly. And if you're using hotspots, then you're going
to be in serious trouble when the image gets stretched, and the
coordinates no longer match up with the image.
So first thing, is if you have the ability to make the VDS Dialog with
NOTITLE and if you can, set it for INVISIBLE (vds 4.x only I think)
also, that way, Option Scale can do whatever it wants, the user isn't
going to see the gray dialog sticking out from behind your skins. From
here, the only thing to worry about is if you're using any text
elements. Even if you do use Option Scale, the font is still going to
be larger if the User has set their system's display properties to "Large"
fonts. But if you test your program under these conditions, you can
adjust the element's positions just a hair or two to make the large
font systems fit a little better.
Download my Memory-Trax III program, set your dispaly font to
large, and then run Memory-Trax. See what I mean about the
text? It almost doesn't fit within the image boundaries. I had to
re-adjust the position to compensate for this.
Now if you really wanted to go the distance and make sure your app
doesn't get royally toasted by large font systems, then you will want
to use the @sysinfo() to get the pixperinch of the system, then adjust
your elements. This would require that you design your app under
under different font size settings. Then, at runtime, you find out what
the user is set at, then run a sub to create the dialog for the appropriate
size needs. You might have 3 different dialog setups to try and cover
your program's butt. You get the idea? Pain in the rumpster.
One of the things I would love to see in VDS that I've seen in
other languages, is when you are creating the element, you set
the TOP,LEFT,RIGHT,BOTTOM and not TOP,LEFT,WIDTH,HEIGHT
like in VDS. And the right and bottom are set by telling the language
how far from those edges by denoting a minus factor at the start of
the number like this: 10,10,-10,-10
This would result in the all sides of the element staying 10 pixels from
the top, left, right and bottom no matter what size the dialog is. Hit
maximize, fine! Element still stays 10 pixels away from all sides.
It sure would beat trying to figure out the border width, title bar,
menu, status bar and so on.
-Garrett |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Dec 05, 2002 11:59 am Post subject: |
|
|
I gotta a question...
Ya mean if ya specify fonts (STYLE - font AND size) for
every element, AND set the option scale - the user settings
toss it all out the window? Lol, no pun intended...
If so, then what's the purpose of having a STYLE and
choosing fonts?
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 |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Dec 05, 2002 12:05 pm Post subject: |
|
|
Lol, OK. I made my title bar height 36 (ya don't have
to reboot, BTW). Now everything looks like giant Tonka
toys, including some VDS programs. This is ridiculous.
VDS SMALLCAPS don't seem to be affected.
OOPS - yes they are, just not the title bar...
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 |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Dec 05, 2002 12:51 pm Post subject: |
|
|
Well Garrett, I agree that your idea to get the dimensions
is gonna be necessary. I can't believe I wasn't aware of
this, but I prolly haven't played with the "appearance"
settings since Windows 3.1...
The title height is more accurate if ya divide the border
width by 2 first (as you mentioned). Also, using @diff()
rather than @float() should save a few CPU cycles. The
screen info is all whole numbers anyway...
I'm gonna play around with this some, but I gotta get
some sleep first..
Thanks again for the info Garrett.
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 |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Thu Dec 05, 2002 3:30 pm Post subject: |
|
|
Wow! There is a lot more to skinning a dialog than I thought...
Mac: I didn't realize that text elements in VDS 3 supported the TRANSPARENT style. It's not in the right click style menu of the Dialog Designer. But I tried it out this morning and it worked fine. Thanks for the tip! |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2150 Location: A House
|
Posted: Thu Dec 05, 2002 9:28 pm Post subject: |
|
|
Mac, I'm sure my routine could probably use some work. It was a quick
throw together that I never went back to improve.
Using Option Scale does at least keep the dialogs from totally getting
toasted... Without using it, the dialogs would be seriously whack.
-Garrett |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Dec 05, 2002 11:10 pm Post subject: |
|
|
Hey Garrett,
I'm gonna add a status bar height check as well (unless it's the
same as menu height). Also, normal and RESIZABLE title bars
are different height, so I've allowed for that.
You mentioned:
"You don't want to stretch your fancy images because stretch
can seriously make them look ugly. And if you're using hotspots,
then you're going to be in serious trouble when the image gets
stretched, and the coordinates no longer match up with the image."
I think the hotspot issue can be dealt with by using percentages
and proportionate resizing, which should also solve the "out of
proportion" (ugly?) image problem.
I'm beginning to see why NOTITLE (and non-resizable) skinnable
windows would be a lot easier though. Would window text be the
the only problem left then?
_____________________________________________________________
Hey Hortalonus,
You're welcome. I'm not sure if the TRANSPARENT style is even
in the VDS3 help file - there's several things that arent...
BTW, I think you'll find that most of us don't use the Dialog
Designer. It's kinda like training wheels - good if ya really
need 'em, but at a certain point they begin to hinder your
progress. LOL, that's my opinion anyway.
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 |
|
 |
|
|
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
|
|