Solved

Embedded form

Posted on 2006-06-26
11
356 Views
Last Modified: 2010-04-05
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 :(
0
Comment
Question by:ginsonic
[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
11 Comments
 
LVL 17

Accepted Solution

by:
geobul earned 50 total points
ID: 16986712
Hi Nick,

Have you considered using frames instead? They are exactly what you're asking for.

Best regards, Geo
0
 
LVL 9

Author Comment

by:ginsonic
ID: 16986753
I wish to add an alphablending to my vcl. so I intend to embedd a form and toplay with her alphablending values.
0
 
LVL 10

Expert Comment

by:atul_parmar
ID: 16990654
Change the parent of your sub form. e.g.
Windows.SetParent(MySubForm.Handle, MainForm.Handle);
0
Technology Partners: 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!

 
LVL 4

Expert Comment

by:Radler
ID: 16992065
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.
0
 
LVL 9

Author Comment

by:ginsonic
ID: 16993322
I found on net that Delphi can embbed forms but nowhere how can I do this.
0
 
LVL 4

Expert Comment

by:Radler
ID: 17002538
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.
0
 
LVL 9

Author Comment

by:ginsonic
ID: 17012379
Can I set an alphablending just for this frame?
0
 
LVL 4

Expert Comment

by:Radler
ID: 17018370
You rake a lot!


Copied from VCL, how provide a alpha blend.

procedure TCustomForm.SetLayeredAttribs;
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(SetLayeredWindowAttributes)) 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[FTransparentColor]);
    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.
0
 
LVL 9

Author Comment

by:ginsonic
ID: 17032375
I have try with TFrame but still can't make it alphablended. Just the frame and not the main form.
0
 
LVL 4

Expert Comment

by:Radler
ID: 17493835
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
0
 
LVL 9

Author Comment

by:ginsonic
ID: 17496048
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!
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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

734 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