cwellman
July 15th, 2006, 01:55 AM
OK, so I'm not a programmer (at least not for a LONG time), so I'm reading and going through the forum. I found a similar question to the one I had, but I didn't understand the answer.
I have modified the OSD sample code in G4, as follows. Can someone tell me the syntax for the OSD timeout behavior? I would have thought it would be
myosd:TimeOut(2000)
but it's not. I'm basically trying to translate the "Generic Style Keys and Methods" to the code below. How do Position, Timeout, Transparency, etc, fit in when I'm using "myosd=CreateOSD()" as below? If I'm using "OSD Object Methods" with this approach, tjem these methods don't include "timeout".
I'm missing something simple. Any help??
This is a fantastic product !!
Thanks!
function OnPaint()
print("Paint")
myosd:CopyBufferToScreen()
end
if myosd then
myosd:Destroy()
end
local width = 400
local x = 500;
local y = 300;
myosd = osd.CreateOSD()
myosd:OnEvent(osd.OnPaint, OnPaint);
myosd:Position(x,y)
myosd:WorkOnBuffer(true)
myosd:Size(width,100)
myosd:SetTransparency(nil,100)
myosd:CopyBufferToScreen()
local btext = osd.CreateSolidBrush(osd.MakeARGB(200,255,255,255) )
myosd:DrawString('Test for Testing Purposes','arial',25,10,10,btext)
myosd:CopyBufferToScreen()
myosd:Topmost(true)
myosd:Show()
I have modified the OSD sample code in G4, as follows. Can someone tell me the syntax for the OSD timeout behavior? I would have thought it would be
myosd:TimeOut(2000)
but it's not. I'm basically trying to translate the "Generic Style Keys and Methods" to the code below. How do Position, Timeout, Transparency, etc, fit in when I'm using "myosd=CreateOSD()" as below? If I'm using "OSD Object Methods" with this approach, tjem these methods don't include "timeout".
I'm missing something simple. Any help??
This is a fantastic product !!
Thanks!
function OnPaint()
print("Paint")
myosd:CopyBufferToScreen()
end
if myosd then
myosd:Destroy()
end
local width = 400
local x = 500;
local y = 300;
myosd = osd.CreateOSD()
myosd:OnEvent(osd.OnPaint, OnPaint);
myosd:Position(x,y)
myosd:WorkOnBuffer(true)
myosd:Size(width,100)
myosd:SetTransparency(nil,100)
myosd:CopyBufferToScreen()
local btext = osd.CreateSolidBrush(osd.MakeARGB(200,255,255,255) )
myosd:DrawString('Test for Testing Purposes','arial',25,10,10,btext)
myosd:CopyBufferToScreen()
myosd:Topmost(true)
myosd:Show()