Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Transparency

Status
Not open for further replies.

sheronne

Programmer
Jun 1, 2001
71
0
0
US
I am trying to work with form transparency similar to what is in the What's New In VFP8.0 examples. Everything works fine except when I initially call SetWindowLong and SetLayeredWindowAttributes. The form goes BLACK for a couple of seconds. Is there anyway to get around this? I have tried to hide the form even and that didn't work.

Thanks
 
What OS are you running under? Have you tried changing your video resolution and/or color depth? Have you tried it with updated Video drivers? Have you tried chaging the video hardware acceleration value? Have you tried it on a different video card? (or a totally different system?)

Rick
 
OS = XP Pro
res = 1280 x 1024 (but the form is 800x600)
color depth = 32-bit

I keep my dev machine pretty updated....it does the samething on my laptop (Windows 2000).......and the VFP demo flickers too. Didn't know if this was just something that has to happen or if there was something else going on? I did manage to cut the blackout down to a "flicker" by:

form.visible = .F.
<call transparency function>
form.visible = .t.

Not so bad......survivable, but would like it better if it didn't flicker.....

Thanks Rick for your reply.
 
Have you tried using the LockScreen form property? (&quot;Explanation & Usage of the LOCKSCREEN Property&quot; -
The reason I mentioned trying a different color depth / video driver, is that most aren't written optimally for ALL resolutions and color depths, so changing these can sometimes make a HUGE difference.

Rick
 
Note: If LockScreen doesn't work, try the following, but be careful - if you don't do the unlock, nothing will appear to be happening until you shut down the application!
Code:
** Lock the window using API
DECLARE INTEGER GetFocus IN user32
DECLARE INTEGER LockWindowUpdate IN Win32API INTEGER nHandle
LOCAL lnHwnd
lnHwnd = GetFocus()
LockWindowUpdate( lnHwnd )

* do changes here

** Release WinAPI lock window.
LockWindowUpdate( 0 )
CLEAR DLLS &quot;GetFocus&quot;, &quot;LockWindowUpdate&quot;
RELEASE lnHwnd
Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top