Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change font in MessageBox?
Message
De
20/05/1999 03:52:18
Franz Mueller
J. Schuh Ges.m.b.H.
Kirchberg, Autriche
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00219801
Message ID:
00220716
Vues:
35
Hi Nadya,

>>Yes, the code is a little bit complicated, but it has many advantages. You
can subclass some classes to adopt it to your need, or simple change some
lines.
>>
>>e.g.
>>existing code: (near the top)
>>LPARAMETERS txPara1, txPara2, txPara3
>>PRIVATE lcSystemFont, lxRetVal
>>lcSystemFont= GetSystemFont()
>>
>>changes to support if a special font (e.g. Tahoma) exists in your system:
>>lcSystemFont=IIF(!AFONT(laFont, "Tahoma"), GetSystemFont(), "Tahoma")

>This line of code changes System Font to "Tahoma" in all MessageBoxes,
>right?

Right

>>If you like, I can send you some pice of code to show how subclassing
works.

>Yes, it will be very helpful.

>Because I still don't know how use this, how pass my own string (consisting
>from many lines) and display my own message, my own title, my own set of
>buttons, using my own font for message and different for buttons and info
>icon.

>For example, I have:

>myString=String1+chr(13)+String2+chr(13)+...
>myTitle="Some title"
>myButton="Ok button"
>myFont for message - any proportional, for Example, Courier 10
>myFont for buttons - "Arial 9"
>myIcon - info

>What do I need to do next?

Step by step instructions:
1. include the dircetory, where you have MSGSVC installed to your path
2. copy the MSGSVC.DBF, .FPT and .CDX files to you project directory
3. run MSGDEMO.PRG to see what you can do with this tool
4. open MSGSVC located in your project directory and do a browse
5. append a record
6. insert "DynamicMessage" in the CKEY field
7. insert "Ok" in the CFUNCTION field
8. open the memo of the CORIGINAL field und insert follow text: This message
has more than one line: %c1% [press Enter] %c2% [press Enter] %c3%
9. insert "info.bmp"in the CGUIVISUAL field
10. insert "Some title" in the CTITLE field
11. insert "Courier,10,N~Arial,9,B" in the CWINFONT field. 1st font for the
messagetext, 2nd font for the buttontext
12. ok thats it, close the browse window
13. in the command window: input "DO msgsvc with "dynamicmessage",
"String1~String2~String3" and press Enter. You should see a message which
looks like the messagebox of VFP.

If you not need dynamic text, just input the text you need into CORIGINAL
memofield.
If you need only one font for every message you can change, as I write
before, the font in the msgsvc.prg

I did not send you any subclassed code, as I don't know, if you will need it
(e.g. for the Tips dialog ...). But just let it me know and you will get it (per email)

Regards

Franz

BTW: in the directory where you have installed the MSGSVC, there is a small
help file which may help you.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform