Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

A continuación se ofrece una tabla de los colores disponibles en Visual FoxPro, que incluye los códigos

de color y sus valores RGB correspondientes.

Color Código de color Valores RGB


Blanco W+ 255,255,255

Negro N 0,0,0

Gris oscuro N+ 64,64,64 (25% gris)

Gris W 192,192,192

Rojo R+ 255,0,0

Rojo oscuro R 128,0,0

Amarillo GR+ 255,255,0

Amarillo oscuro GR 128,128,0

Verde G+ 0,255,0

Verde oscuro G 0,128,0

Aguamarina BG+ 0,255,255

Verde azulado BG 0,128,128

Azul B+ 0,0,255

Azul marino B 0,0,128

Fucsia RB+ 255,0,255

Fucsia oscuro RB 128,0,128

Espacio en blanco X N/D

El siguiente código te sirve para darle color a la hwnd


barra del menú. declare integer SetMenuInfo in user32 integer
hmenu, string @mi
declare integer GetMenu in user32 integer hwnd
declare integer CreateSolidBrush in gdi32 integer **** ****
crColor *menuinfo_styles * menuinfo_styles
declare integer DrawMenuBar in user32 integer mns_nocheck = 0x80000000
mns_nocheck = 0x80000000 ( "_Screen.menuh =", 20, "") +
mns_modeless = 0x40000000 Ltrim (Str ( getmenu (_Screen.HWnd))) + Chr (13)
mns_modeless = 0x40000000 + Padl ( "_Vfp.menuh
mns_dragdrop = 0x20000000 =", 20, "") + Ltrim (Str (uc_menuh)))
mns_dragdrop = 0x20000000 uc_fmask=mim_background
mns_autodismiss = 0x10000000 &&+mim_applytosubmenus uc_fmask =
mns_autodismiss = 0x10000000 mim_background & & + mim_applytosubmenus
mns_notifybypos = 0x8000000 uc_dwstyle=mns_nocheck
mns_notifybypos = 0x8000000 uc_cymax=0
mns_checkorbmp =0x4000000 uc_hbrback=CreateSolidBrush(rgb(237,250,232))
mns_checkorbmp = 0x4000000 &&-????????? uc_hbrback
= createsolidbrush (Rgb (255,0,0)) & & - the act of
mim_maxheight = 0x1 setting the
mim_maxheight = 0x1 background color
mim_background = 0x2 uc_dwcontexthelpid=0
mim_background = 0x2 uc_dwmenudata=0
mim_helpid = 0x4 uc_len = 28
mim_helpid = 0x4 menuinfo = num2dword (uc_len) + num2dword
mim_menudata = 0x8 (uc_fmask) + num2dword
mim_menudata = 0x8 (uc_dwstyle) + num2dword (uc_cymax) +
mim_style = 0x10 num2dword (uc_hbrback) +
mim_style = 0x10 num2dword (uc_dwcontexthelpid) + num2dword
mim_applytosubmenus = 0x80000000 (uc_dwmenudata)
mim_applytosubmenus = 0x80000000
**** **** =SetMenuInfo(uc_menuh,@menuinfo)
*Private Type MENUINFO * Private Type =DrawMenuBar(uc_hwnd)
MENUINFO
* cbSize As Long * CbSize As Long function num2dword(lnvalue)
* fMask As Long * FMask As Long #define m0 0x0000100 &&# Define m0 0x0000100
* dwStyle As Long * DwStyle As Long
* cyMax As Long * CyMax As Long #define m1 0x0010000 &&# Define m1 0x0010000
* hbrBack As Long * HbrBack As Long
* dwContextHelpID As Long * DwContextHelpID #define m2 0x1000000 &&# Define m2 0x1000000
As Long
* dwMenuData As Long * DwMenuData As Long if lnvalue < 0 &&If lnvalue <0
*End Type * End Type         lnvalue = 0x100000000 + lnvalue &&€lnvalue
uc_hwnd=_vfp.hwnd &&uc_hwnd = _vfp.HWnd = 0x100000000 + lnvalue
uc_menuh=GetMenu(uc_hwnd) &&uc_menuh = endif endif
getmenu (uc_hwnd) local b0, b1, b2, b3
*Messagebox(Padl("Thisform.hwnd=",20," ") b3 = int(lnvalue/m2)
+Ltrim(Str(getactivewindow())) b2 = int((lnvalue - b3*m2)/m1)
+Chr(13)+Padl("_Screen.hwnd=",20," ") b1 = int((lnvalue - b3*m2 - b2*m1)/m0)
+Ltrim(Str(_Screen.HWnd)) b0 = mod(lnvalue, m0)
+Chr(13)+Padl("_Vfp.hwnd=",20," ") return chr(b0)+chr(b1)+chr(b2)+chr(b3)
+Ltrim(Str(_vfp.HWnd))
+Chr(13)+Chr(13)+Padl("Thisform.menuh=",20," ")

+Ltrim(Str(getmenu(Thisform.HWnd)))
+Chr(13)+Padl("_Screen.menuh=",20,"
")+Ltrim(Str(getmenu(_Screen.HWnd)))
+Chr(13)+Padl("_Vfp.menuh=",20," ")
+Ltrim(Str(uc_menuh))) * Messagebox (Padl
( "Thisform.hwnd =", 20, "")
+ Ltrim (Str (getactivewindow ()))+ Chr (13) + Padl
( "_Screen.hwnd
=", 20, "") + Ltrim ( Str (_Screen.HWnd)) + Chr
(13) + Padl
( "_Vfp.hwnd =", 20, "") + Ltrim (Str (_vfp.HWnd)) +
Chr (13) + Chr
(13) + Padl ( "Thisform.menuh =", 20, "") + Ltrim
(Str (getmenu
(Thisform.HWnd))) + Chr (13) + Padl

You might also like