Solved

Embedded form

Posted on 2006-06-26
11
350 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
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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

867 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now