Я так понял Леха у тебя классическая схема в винде? Попробуй так (первое , что пришло в голову):
Код
#Include "window9.bi"
Dim As Integer iEvent,iColor
Dim As HWND hw
Function GetTranspColorHwnd(hw As HWND) As Integer
Dim As HDC hdc
hdc = GetDC(hw)
' В GetPixel можно получать цвет по координатам рядом с гаджетом (TextGadget),
' если по координатам (1,1) в окне что-то предусматривается
' Например: GetPixel(hdc,9,10)
Function = GetPixel(hdc,1,1)
ReleaseDC(hw,hdc)
End Function
hw = OpenWindow("1",300,10,500,500)
iColor = GetTranspColorHwnd(hw)
TextGadget(1,10,10,80,30,"Hello World")
SetGadgetColor(1, iColor,0,1)
Do
iEvent = WaitEvent()
If iEvent = EventClose Then Exit Do
Loop