![]() |
Visual Basic 6.0 Form Effects
Hi,
Does anyone know some code which enables a form to "Fade in and Fade Out" Also Does anyone know how to make a form "Shrink" Below is some code to make a form Grow You must first create a module (See Below) :
Public Sub CentreForm(F As Form)Now insert this into the form :
Private Sub Form_Load()Timers must be set to an interval of 1 Can the above code be change to make it shrink? Any Ideas about the fading? Thanks :rolleyes: |
I can't be held responsible for tasteless misuse of this code
So put this in your form: :
Const LWA_COLORKEY = &H1 |
Fade not working in MDI
Hi. The fading form works if its mdi value is false. I have created an mdi main form and two mdi client form and i want to apply the fading effect on one of the client mdi form. Does anyone know how to make this happen?
Thanks! |
Unfortunately the layered window attribute LWA_ALPHA is only directly exposed for parent (top level) objects, meaning you could use this code only on the MDI parent as it is. One work-around, aside from complex subclassing, would be to use the SetParent API plus pictureboxes instead of the MDI form system (which I personally think is rather crap).
So say if you had two forms, Form1 and Form2 on screen, form1 being the simulated "MDI parent" with a picture box called PictureBox1: :
' in some moduleAs an aside, I think that's a much better way of creating container forms than the built in VB6 way, as it allows much more control over layout, window region etc, even in VB.NET and C# when using Windows.Forms. |
i downloaded some help for vb6 and the shrink code was in it but not the fade sorry. here is the grow shrink anyway:
:
'Shrink the form |
by the way make a command box and put that code in
|
Quote:
Also the question was fairly specific, about alphablending on a MDI form, as well as being several months old! :) |
i mean a command box. you click the button and the form shrinks and shrinks untill u stop.
|
| All times are GMT -5. The time now is 6:26 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC