Main form change color when Popup windows open

djossh

Registered User.
Local time
Today, 19:15
Joined
Oct 19, 2011
Messages
89
Hi Im a newbie to access so please forgive me for my question.. Is there a way to change the color of mainform into a Light Black color upon opening of my popup form? (and return to its nomal color when I closed the popup form) I just think it looks nice to have this effects.. I read about "WindowTop Properties" but i can't find the way to do this.. I really don't have any Idea how to put all that codes.. thanks.
 
The windows Top Property is not what you want, as that only returns the screen position of a form

As part of the code that opens your pop up form, insert the following;
Code:
Me.Detail.BackColor = 8421504 [COLOR="SeaGreen"]'Insert your choice of colour[/COLOR]
Then in the code that is closing the pop up form use the following code to set the colour back;
Code:
Forms!YourOriginalFormName.Detail.BackColor = -2147483633 [COLOR="SeaGreen"]'Insert your choice of colour[/COLOR]
Both those pieces of code assume your form does not have a header or footer visible, if they do their back colour would be set and re-set in the same manner.
 
The windows Top Property is not what you want, as that only returns the screen position of a form

As part of the code that opens your pop up form, insert the following;
Code:
Me.Detail.BackColor = 8421504 [COLOR=seagreen]'Insert your choice of colour[/COLOR]
Then in the code that is closing the pop up form use the following code to set the colour back;
Code:
Forms!YourOriginalFormName.Detail.BackColor = -2147483633 [COLOR=seagreen]'Insert your choice of colour[/COLOR]
Both those pieces of code assume your form does not have a header or footer visible, if they do their back colour would be set and re-set in the same manner.

Hi.. thanks for the reply... can you check this discussion.
http://www.access-programmers.co.uk/forums/showthread.php?t=164321
(especially the attached picture) This effects is what I really wanted..but I dont know how to do this.. thanks...
 
OK I've had a good read of that thread now and a play with the code. (what it does and how it works is all explained in post #3)

What the code does
; it matches the size and position of the form being opened to the calling form, so that the calling form is hidden by the form being opened.

What the code dose not do; it does not create the black 20% transparent effect shown in the image.
 
The attached demonstrates the code in the thread you linked to.
 

Attachments

... you might also note, that another user has asked the question in the other thread, of how that effect was created.
 

Users who are viewing this thread

Back
Top Bottom