تغییر رنگ نوشته ی یک command

Majid 3D

Member
برام خیلی عجیبه !
چه جوری میشه یه کامند که تو وی بی میزاریم رنگ تکستش رو عوض کرد ؟
فقط یه فور کالر داره که برای تغییر رنگ پیش زمینه شه.
 

saalek110

Well-Known Member
منبع:
http://www.martin2k.co.uk/vb6/tips/vb_42.php


Coloured Text
It is not possible to change the colour of the text of the CommandButton's text as there is no ForeColor property. The only way to do it is to create a picture of coloured text and use it as the Picture property. Remember to set the following properties:
Caption: "" (no text)
MaskColor: the background colour of the picture if its not already transparent
Picture: the picture of the coloured text
Style: 1 - Graphical
UseMaskColor: True (if necessary)


vb_42_5.png
 

Majid 3D

Member
عه ... خوب چرا براش همچین چیزی نساختن ؟ مجبوریم راه بالا رو بریم. کم کم دارم قدر ام ام بی رو می فهمم.
 

saalek110

Well-Known Member
من هم در تعجبم. چرا نباید داشته باشه. دلفی 7 هم دکمه رنگی ندارد. ولی کامپوننتش هست.

ولی وی بی دات نت 2005 دارد. 2003 را ندارم تست کنم.

b7.gif
 

جدیدترین ارسال ها

بالا