Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using VFP-Skin? 1

Status
Not open for further replies.

Alexschmidt

IS-IT--Management
Jan 26, 2003
33
ZA
I have downloaded the VFP-Skin class from with the sample skins. Once extracted the sample consists of several bmp files which constitute the complete skin and a single text file. Can somebody explain how one is supposed to apply the skin to a form and then how would you go about creating your own skin (in pieces?). I find the text file that accompanies the class to be very limited as far as usage of the class is concerned.
Thanks
 
Alexschmidt

Can somebody explain how one is supposed to apply the skin to a form

There is a readme file that comes with the class that explains how to run the class, but basicaly its "put the class on the form and point to the text file."

then how would you go about creating your own skin (in pieces?)

The textfile hold the parameters to the skin, feel free to create your own text file with different parameters. Most of the calls for this skin class are API calls. Otherwise contact the author for some pointers. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thanks for the info but still no luck - carefully following the instructions in the articles mentioned still results in the following when running the form. Firstly the message "Cant find config file or it is empty" It's there and not empty eg. the bluecurve.txt config file in the bluecurve skin sample. I have tried it with and without quotes c:\filemon\bluecurve and with and without the file extension, no go. After closing this error message I get the next error message "File 'createrectrgn.prg does not exist" I run VFP7 sr1 Win 2000 Pro, not that I think this could be the source of the problem. Are there any other form properties that might need to be adjusted prior to inserting the class in the form?
Thanks - Alex
 
Alexschmidt

Are there any other form properties that might need to be adjusted prior to inserting the class in the form?

A couple of things I did to make it work.
1. You are in VFP7.0, so according to the readme text , there is a property called VFP7 in the class that needs to be set to true. ""File 'createrectrgn.prg does not exist" That error tells me you may have forgotten that since it is refering to a FoxTools function.
2. Set you files location prior to running the form, that way your class doesn't need to look too far. From the menu Tools->Options->File locations -> Default directory.
3. The file name is added to the skinname property with just the name of the textfile, no quotes and no extension.

And of course putting the class on to the form as a first step.
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Mike,
Thanks but all that still doesn't make it work. What version do/did you use? I have V2.
 
Alexschmidt

The only thing I can offer from here is to send you by e-mail the sample I made. Post your e-mail address. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thanks Mike, it is appreciated.
roliocat@telkomsa.net
 
Alexschmidt

On it's way. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
morning
had the same problem.

Starred Mgagnon for the dll tip.

Just putting the class on a form and running the form wasn't enough - needed a project & needed to put the foxtools in the CODE->API section of the project.

Now got got smart skinned forms & (with the aid of the XP controls class) sweet buttons too.

Looks good & and the performance hit appears to be negligable.

monkey
 
monkey

Thank you for confirming I wasn't the only one that was able to make this work. ;-)

P.S. Thanks for the star as well.
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Mike
Thanks - I ran your sample form and no problem. Then started looking for differences between my setup of the properties etc and all were the same. I found the error occurs after dropping the class onto the form and then (as I did) resizing the class to the full form size by dragging the class handles. It does not want this, after the resize action and then running you get the error message. Drop it and leave it, just set the properties.
Once again thanks for your patience and I beg forgiveness for being so persistant but it is a great class which I hope Pablo will continue to develop.
Alex
 
evening,

There are still some 'bugs' with the skin class that need working out - but otherwise it seems to be good.

I had problems with the skin title bar hiding my menu.

when setting the form Closable property to false the tooltip for the skin close button still says "Close" (there doesn't appear to be a bmp with disabled sections)

and when maximised the maximise button still returns the tooltip text of "Maximise" rather than "restore down"

still, minor glitches in a good class.

monkey

 
Monkey
You seem to be using the class extensivly so maybe you have had this experience and possibly have a solution for it!
I have a top level form 'skinned'. This, upon button selection, opens various other forms, also with the same skin applied. The skins in the 'other' forms display correctly until I add a 'SELECT tablename'command to the 'Init' method of the form. This results in the top middle graphic display of the skin leaving a rectangular hole in the form, meaning that the section of the complete skin (made up of pieces of a BMP), is not being displayed. If I remove the SELECT statement and re-run the form it displays OK. Have you, or anybody else experienced this?
I am using VFP7. Also have mailed this occurance to the author but have yet to get feedback.
Regards - Alex
 
alex

I'll try & duplicate the problem you're having & give some feedback

monkey
 
alex,

I tried 2 top level forms, both skinned, with a table called "INPUT" used in form1. A command button then opened form2 and in the init I put both a "select input" & a sql select * from input . Both worked fine & the forms remained skinned.

sorry have no idea why the top bitmap is not showing.

Both my forms were different scx files Are you using formsets?

I'm dropping a seperate instance on the class onto each form too.

monkey
 
Monkey
Nope, no formset, just plain forms, also a seperate class on each form. My guess is that something is messing with the API calls, but it is definitly associated with the SELECT command as everything is fine without the SELECT command, once I call to SELECT the problem occurs. Comment it out and everything is fine.
Greetings- Alex
 
monkey666
"when setting the form Closable property to false the tooltip for the skin close button still says "Close" (there doesn't appear to be a bmp with disabled sections)
and when maximised the maximise button still returns the tooltip text of "Maximise" rather than "restore down"
still, minor glitches in a good class"

The author gives you the full acces to the class so you can improve it. It's full of api calls and you'll find it there how you can change the tips of the max, min and close buttons. Also you could capture the state of window and change the tips of those buttons at runtime.
If you look deeper you'll find that the class is very flexible.

_________
FoxReaver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top