Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transparent Form in Vfp8
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00920570
Message ID:
00921191
Vues:
18
Terry,

Thanks for the help. Your code is very similar to what I finally ended up with. My problem was that I had a series of misspellings in the code that were easily overlooked that caused the errors.

Stephen

>This PRG does what you want (VFP 8/XP)
>
>
* FadingForm.PRG
>PUBLIC frmSplash,nctr
>
>nctr=255
>frmSplash=CREATEOBJECT('ofoo')
>frmSplash.ADDOBJECT('timer1' , 'subtimer')
>frmSplash.Show
>frmSplash.timer1.interval=10
>CLEAR EVENTS
>CANCEL
>
>DEFINE CLASS ofoo as Form
>showwindow=2 && Has to be top level
>PROCEDURE init
>IF VAL(OS(3))<5
>	RETURN .F.
>ENDIF
>DECLARE SetWindowLong In Win32Api AS _Sol_SetWindowLong Integer, Integer, Integer
>DECLARE SetLayeredWindowAttributes In Win32Api AS ;
>       _Sol_SetLayeredWindowAttributes Integer, String, Integer, Integer
>_Sol_SetWindowLong(THISFORM.hWnd, -20, 0x00080000)
>_Sol_SetLayeredWindowAttributes(THISFORM.hWnd, 0, 255, 2)
>ENDPROC
>
>PROCEDURE StartClock
>_Sol_SetLayeredWindowAttributes(THISFORM.hWnd, 0, nctr, 2)
>nctr=nctr-1
>IF nctr<4
>   _Sol_SetLayeredWindowAttributes(THISFORM.hWnd, 0, 0, 2)
>   thisform.Release
>ENDIF
>ENDPROC
>ENDDEFINE
>
>define class subtimer as Timer
>procedure timer
>thisform.startclock
>ENDPROC
>ENDDEFINE
>* End of PRG
>
>>All,
>>
>>I have a Vfp7 application that I am considering porting over to Vfp8 and enhancing somewhat. The application has a splash screen that disappears after 3 seconds followed by a logon form. I took a look at the Transparent Form example in the solutions and added the DODEFALT() and DECLARE code to the form.init and lnValue ties to a TIMER event (since I don't have a slider on the splash screen). When I try to run the form I get an error of "Cannot load 32-bit DLL Winapi32." I probably need to add an ActiveX or FFD control to the form but I can't determine from the sample which one.
>>
>>Any hints or at least where I should look?
>>
>>TIA,
>>Stephen Land
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform