ginsonic
asked on
Embedded form
how can I create a Form vcl and when drop it in my main form to become a part of my main form ? An embedded form I think.
I wish to work as a panel but to derive from TForm and not from TPanel.
Sorry no more points :(
I wish to work as a panel but to derive from TForm and not from TPanel.
Sorry no more points :(
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Change the parent of your sub form. e.g.
Windows.SetParent(MySubFor m.Handle, MainForm.Handle);
Windows.SetParent(MySubFor
Without a complete knowledge of the problem I suggest use Frames. There a lot of advantages, by example the visual use of them.
T++, Radler.
T++, Radler.
ASKER
I found on net that Delphi can embbed forms but nowhere how can I do this.
ginsonic,
Have you seen this before with another tool?
Frames behavior is like forms at design time, and based in your information the frame use is acceptable.
Any help about this approuch?
T++, Radler.
Have you seen this before with another tool?
Frames behavior is like forms at design time, and based in your information the frame use is acceptable.
Any help about this approuch?
T++, Radler.
ASKER
Can I set an alphablending just for this frame?
You rake a lot!
Copied from VCL, how provide a alpha blend.
procedure TCustomForm.SetLayeredAttr ibs;
const
cUseAlpha: array [Boolean] of Integer = (0, LWA_ALPHA);
cUseColorKey: array [Boolean] of Integer = (0, LWA_COLORKEY);
var
AStyle: Integer;
begin
// if not (csDesigning in ComponentState) and
// (Assigned(SetLayeredWindow Attributes )) and HandleAllocated then
// begin
AStyle := GetWindowLong(Handle, GWL_EXSTYLE);
if FAlphaBlend or FTransparentColor then
begin
if (AStyle and WS_EX_LAYERED) = 0 then
SetWindowLong(Handle, GWL_EXSTYLE, AStyle or WS_EX_LAYERED);
SetLayeredWindowAttributes (Handle, FTransparentColorValue, FAlphaBlendValue,
cUseAlpha[FAlphaBlend] or cUseColorKey[FTransparentC olor]);
end
else
begin
SetWindowLong(Handle, GWL_EXSTYLE, AStyle and not WS_EX_LAYERED);
RedrawWindow(Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_FRAME or RDW_ALLCHILDREN);
end;
end;
//end;
Without a test and how TFrame is a TScrollingWinControl descendent this is implementable. Maybe some extra effort required in code to set this attributes.
T++, Radler.
Copied from VCL, how provide a alpha blend.
procedure TCustomForm.SetLayeredAttr
const
cUseAlpha: array [Boolean] of Integer = (0, LWA_ALPHA);
cUseColorKey: array [Boolean] of Integer = (0, LWA_COLORKEY);
var
AStyle: Integer;
begin
// if not (csDesigning in ComponentState) and
// (Assigned(SetLayeredWindow
// begin
AStyle := GetWindowLong(Handle, GWL_EXSTYLE);
if FAlphaBlend or FTransparentColor then
begin
if (AStyle and WS_EX_LAYERED) = 0 then
SetWindowLong(Handle, GWL_EXSTYLE, AStyle or WS_EX_LAYERED);
SetLayeredWindowAttributes
cUseAlpha[FAlphaBlend] or cUseColorKey[FTransparentC
end
else
begin
SetWindowLong(Handle, GWL_EXSTYLE, AStyle and not WS_EX_LAYERED);
RedrawWindow(Handle, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_FRAME or RDW_ALLCHILDREN);
end;
end;
//end;
Without a test and how TFrame is a TScrollingWinControl descendent this is implementable. Maybe some extra effort required in code to set this attributes.
T++, Radler.
ASKER
I have try with TFrame but still can't make it alphablended. Just the frame and not the main form.
Hi ginsonic,
I made a great effort to remember, but always record that I´ve posted the FIRST comment to this question. morever we follow a track to solve the alpha problem. To my surprise emerged from scratch a geobul answer whitout another comment about the alpha problem. Seams a joke but, have I made mad?
T++, Radler
I made a great effort to remember, but always record that I´ve posted the FIRST comment to this question. morever we follow a track to solve the alpha problem. To my surprise emerged from scratch a geobul answer whitout another comment about the alpha problem. Seams a joke but, have I made mad?
T++, Radler
ASKER
First of all non of you don't answer to my question - embedded forms ??? This is my reason for a C. I just wish to close the topic but I don't get any answer.
Your alphablending don't work for frames. Sorry!
Your alphablending don't work for frames. Sorry!
ASKER