Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form's Caption_Assign
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00424701
Message ID:
00424803
Views:
14
>>>>>>Hi everybody,
>>>>>>
>>>>>>Do you know, how can I add a code into Caption_Assign method, if it's allowed. IOW, I'd like to add something to the form's caption (version number). Each time, when I change caption, I'd like to add something at the end, e.g. caption=caption+space(10)+'version 1.0'
>>>>>>
>>>>>>What would be the easiest way to do it?
>>>>>>
>>>>>>Thanks in advance.
>>>>>
>>>>>Hi Nadya,
>>>>>
>>>>>Just create form.caption_assign method with the code belos, it will work.
>>>>>
>>>>
>>>>>LPARAMETERS vNewVal
>>>> if not 'version' $ vNewVal && not already there
>>>>>   vNewVal = vNewVal + space(10)+'version 1.0'
>>>> endif
>>>>>THIS.CAPTION = m.vNewVal
>>>>
>>>>
>>>>Thanks, Nick and Trey. Will do. It's simpler, than I thought :)
>>>
>>>Ok, I just did. Works fine, but there is a problem: how can I put version 1.0 at the right corner of the screen? IOW, calculate number of spaces between 'normal' caption and 'version 1.0'? Otherwise it doesn't look right.
>>
>>I can't play with it right now, but I assume you can try to use SYSMETRIC() function to determine available space for the form caption, minus width of button used in the title bar, and then adjust the number of required spaces in the middle of your caption.
>
>Ok, this code seems to do the work (25 is empirical width of controlbox+icon).
>My question now is: how to determine Title Bar font, style, width (Windows Settings). Actually, this code is from Cetin Basoz, I just adjusted it a little.
>

I believe you can get them through Windows API calls,
Geo should know better. :)
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform