[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Child/Parent Form Transparency Problem

Posted on 2011-03-10
9
Medium Priority
?
1,325 Views
Last Modified: 2012-05-11
I have a parent form that is alphablended, but I dont want its child form to be transparent at all. The problem I am having is that Delphi seems to make the child form inherit the alphablending properties from its parent. I have tried all obvious things bu to no avail.

Under Visual Basic 6 it seems to work fine, but now that I am porting this application to Delphi this behavour is different.

Is there any way to stop this?
0
Comment
Question by:Chris Nillissen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 3
9 Comments
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 35096030
look in the dfm code

it will start with inherited FormX

and properties you have changed will be listed

compare the dfm of the parent with the dfm of the child
to see differences

defaults are not saved, unless explicit indicated

property Opaque default False stored True;
0
 

Author Comment

by:Chris Nillissen
ID: 35102426
Sorry I am not creating an inhereted form. Let me rephrase the question a bit to make it clearer:

I create a form (Form1) that I am using as a background form. I set its AlphaBlend property to True and set its AlphaBlendValue to 128, making the form transparent.

I then create a second, totally independent, form (Form2) with its AlphaBlend property to False (I even implicitly set this when creating the form). I then set Form1 as the parent window of Form2 (via Form2.ParentWindow = Form1.Handle).

This makes the child window take on the parent windows AlphaBlend Properties which then cant be independently changed. I am unable to modify the Alpha properties on Form2 at all.

I require Form2 to be a child of Form1 but cant have the Alpha properties inherited.
0
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 35106440
Form2.ParentWindow = Form1.Handle

have you tried this instead ?
Form2.Parent := Form1
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 32

Expert Comment

by:Ephraim Wangoya
ID: 35111745

Interesting my comment never came through yesterday

This is by design, you can't change it at least I have never come a cross a way of doing it. Even if you override the form, still won't work

@Geert
Form2.Parent := Form1
This makes no difference
0
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 35141616
no ?
then what does ?
0
 
LVL 32

Expert Comment

by:Ephraim Wangoya
ID: 35141762
You tell me
0
 

Author Comment

by:Chris Nillissen
ID: 35143822
Yes I have tried Form2.Parent := Form1 and it has the same effect as Form2.ParentWindow = Form1.Handle.

It seems strange that this behavour cant be changed. Its fine in other languages just not Delphi.
0
 

Author Comment

by:Chris Nillissen
ID: 35170028
There must be a way to do this?
0
 
LVL 32

Accepted Solution

by:
Ephraim Wangoya earned 2000 total points
ID: 35237562

Apparently not in Delphi.
You can try placing a component that will not support transparency on the child form.

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question