Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting rid of the fox at the top of each form
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01639835
Message ID:
01639888
Views:
52
>>>>>>How can I get rid of the fox which appears to the left of the screen caption on every form?
>>>>>
>>>>>Each form has a Icon property. I always use subclassed versions of the base form, where I change the icon in the subclassed version.
>>>>
>>>>Tore thanks
>>>>
>>>>I can get rid of the fox for each form by setting the control box property to .F. - how can i do it so that i don't have to wade through every form?
>>>>
>>>>Bur although I can add my own screen caption a fox always appears to the left - where do I find the subclassed version so that i can get rid of it
>>>
>>>If you work with the base classes, you have to change the icon for each form, one by one. This is one of many reasons why you should only work with subclasses.
>>>
>>>Personally I have one "personal" vcx which contains subclasses of every control that can be subclassed visually. In this class I have add a few properties and methods, and changed them according to my needs and preferences.
>>>
>>>When I start a new project, I make another vcx specific for this project where each control is subclassed from my "personal" vcx. In this vcx I will typically change the icon for the form, so that every new form will have this icon as its default.


>>
>>Thanks I understand that but how can I get rid of the fox which appears to the left of the screen caption above every form? I cant find any screen property which controls the screen caption icon
>
>Colins,
>are you sure you understand what Tore is telling you? It seems not as otherwise you would not ask this question.
>Let me try to explain it step by step
>1) Open a new project ( File -> New -> Project -> NewFile)
>2)Save this file, dy default Proj1 in preferably e new direcotry
>3)Click on Classes -> New enter in the prompt "MyBasicForm"
>4) Select from the combox Based on "Form"
>5) Save it somewhere on your HD, for this first time, save it in the same direcotory where you have saved the Proj. and save it as MyClass
>6) Press OK
>-- you have now created a classlib myClass.vcx with 1 class member: "myBasicClass" , this form is totaly default as a vanilla class
>now let us change it a little bit, and for the exsersie change the form icon
>7) Select Properties of the MyBasiForm (right click to activate a shortcur menu) and find Icon. Here you change the icon to any icon you like on your HD
>8) Save the form
>your project will now show a classlibrary "MyClass" with one member "MyForm"
>you are now ready to subclass this form as many times as you like in an other class.
>Let us, for an exersise change the icon of this MyForm
>9) open the form by selecting myForm and click on Modify button
>10) right click and select Properties
>11) go to Icon property and select any icon on your hard disk : the three dots command button on top will allow you to select a file
>12) when you have selected an icon it will change on myForm.
>13) Now save this form
>Now you are ready, your parent class is constructed. To subclass this myForm you shall have to do
>14) select new give it a new name e.g. myApplicationForm
>15) in the box Based on you select the classlibrary MyClass
>16) in the box Store in save this class in the Classlibrary I would suggest myApplication classlibrary and save it.
>now to actualy see this myApplicationForm, you have to click
>17) click on Add in your project manager and select myApplicationForm
>18) you will see that the tree myApplication has 1 node myApplicationForm
>Both the forms myForm from MyClass and myApplicationForm from myApplication have the same icon - this is since myApplicationForm is subclassed from myForm (inherritance)
>You can now for this application construct as many forms as you like, save them all in your myApplication class and they will all show the icon you had picked for myForm. Even if you would like to change
>that simply edit myForm and all your forms which were constructed / subclassed will show the new situation.
>Now if you make one of your forms to mainform, and maximize it you dont have to worry about _screen.icon anymore, even better in your config.fpw you have _screen = off
>Oh to actualy run the class myApplicationForm as a form (.scx) file:
>there are several methods, suppose this one is the easiest for you:
>type in your command window:
>create form myForm as myForm from ?
>This will prompt you for the classlibrary where the class myForm is located.
>Save it and you will have a myForm.scx which you can run.
>Same story for myApplicationForm
>Regards,
>Koen


Koen

Thank you very much - I will study what you have sent and implement it
Specialist in Advertising, Marketing, especially Direct Marketing

I run courses in Business Management and Marketing
Previous
Reply
Map
View

Click here to load this message in the networking platform