Solved

Embedded form

Posted on 2006-06-26
11
357 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

726 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