Does NET have frames ?

  • Thread starter Thread starter genc ymeri
  • Start date Start date
G

genc ymeri

Hi,
I'm coming from Delphi and I'm lookin for frames but I'm not finding them.
Do we have something similiar overhere in NET ???? If yes, is it going to be
the same logic ?

//*** I'm writing the Delphi logic in C# syntax
Frame MyFrame = new FrameClass(AOwner);
MyFrame.Parent = MyMainForm;
MyFrame.show();


Anyhelp very much will be appreciated,
Thank you.

Genc.
 
Genc,

You might be looking for the Panel class, or the GroupBox class. They
should do something similar (from what I can tell).

Hope this helps.
 
I assumed that I can use UserControl like that but not sure how to show
it....



Nicholas Paldino said:
Genc,

You might be looking for the Panel class, or the GroupBox class. They
should do something similar (from what I can tell).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

genc ymeri said:
Hi,
I'm coming from Delphi and I'm lookin for frames but I'm not finding them.
Do we have something similiar overhere in NET ???? If yes, is it going
to
be
the same logic ?

//*** I'm writing the Delphi logic in C# syntax
Frame MyFrame = new FrameClass(AOwner);
MyFrame.Parent = MyMainForm;
MyFrame.show();


Anyhelp very much will be appreciated,
Thank you.

Genc.
 
I assume you want to show a form inside a frame which is contained inside
another form.

private void btnOptTwo_Click(object sender, System.EventArgs e)
{
frmMaintenanceBase f;
f = new frmMaintenanceBase();
f.MdiParent = this;
f.Parent = panelBody;
f.Show();

}

The above code should be in a form that has its IsMDI property set to true
and contains a panel control named panelBody.

Hope this helps.

Raj

genc ymeri said:
I assumed that I can use UserControl like that but not sure how to show
it....



message news:[email protected]...
Genc,

You might be looking for the Panel class, or the GroupBox class. They
should do something similar (from what I can tell).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

genc ymeri said:
Hi,
I'm coming from Delphi and I'm lookin for frames but I'm not finding them.
Do we have something similiar overhere in NET ???? If yes, is it going
to
be
the same logic ?

//*** I'm writing the Delphi logic in C# syntax
Frame MyFrame = new FrameClass(AOwner);
MyFrame.Parent = MyMainForm;
MyFrame.show();


Anyhelp very much will be appreciated,
Thank you.

Genc.
 
Not really. I want to use "frame-s" in the same way they are used in
Java/Delphi. As Nicholas mentioned one way of "doing" it is to use panel
and/or groupboxes. The problem with them is that they can't be used as
frames excactly b/c in design time they need a parent class where they need
to be shown while the form ones won't need one.

Thanks.




Hemraj Julha said:
I assume you want to show a form inside a frame which is contained inside
another form.

private void btnOptTwo_Click(object sender, System.EventArgs e)
{
frmMaintenanceBase f;
f = new frmMaintenanceBase();
f.MdiParent = this;
f.Parent = panelBody;
f.Show();

}

The above code should be in a form that has its IsMDI property set to true
and contains a panel control named panelBody.

Hope this helps.

Raj

genc ymeri said:
I assumed that I can use UserControl like that but not sure how to show
it....



message news:[email protected]...
Genc,

You might be looking for the Panel class, or the GroupBox class. They
should do something similar (from what I can tell).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hi,
I'm coming from Delphi and I'm lookin for frames but I'm not finding them.
Do we have something similiar overhere in NET ???? If yes, is it
going
to
be
the same logic ?

//*** I'm writing the Delphi logic in C# syntax
Frame MyFrame = new FrameClass(AOwner);
MyFrame.Parent = MyMainForm;
MyFrame.show();


Anyhelp very much will be appreciated,
Thank you.

Genc.
 
genc said:
Not really. I want to use "frame-s" in the same way they are used in
Java/Delphi. As Nicholas mentioned one way of "doing" it is to use panel
and/or groupboxes. The problem with them is that they can't be used as
frames excactly b/c in design time they need a parent class where they need
to be shown while the form ones won't need one.

Thanks.




I assume you want to show a form inside a frame which is contained inside
another form.

private void btnOptTwo_Click(object sender, System.EventArgs e)
{
frmMaintenanceBase f;
f = new frmMaintenanceBase();
f.MdiParent = this;
f.Parent = panelBody;
f.Show();

}

The above code should be in a form that has its IsMDI property set to true
and contains a panel control named panelBody.

Hope this helps.

Raj

I assumed that I can use UserControl like that but not sure how to show
it....



in

message
Genc,

You might be looking for the Panel class, or the GroupBox class.
They

should do something similar (from what I can tell).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


Hi,
I'm coming from Delphi and I'm lookin for frames but I'm not finding

them.

Do we have something similiar overhere in NET ???? If yes, is it
going
to

be

the same logic ?

//*** I'm writing the Delphi logic in C# syntax
Frame MyFrame = new FrameClass(AOwner);
MyFrame.Parent = MyMainForm;
MyFrame.show();


Anyhelp very much will be appreciated,
Thank you.

Genc.
Genc,

the closest you wil get to a frame is a UserControl,
you can use it just like a frame: design it, and at runtime,
instantiate it and add it to the controls collection of the control
in which you want it to be contained.

ie:
MyUserControl myControl = new MyUserControl();
myContainerControl.Controls.Add(myControl);
 
Genc,
the closest you wil get to a frame is a UserControl,
you can use it just like a frame: design it, and at runtime,
instantiate it and add it to the controls collection of the control
in which you want it to be contained.

ie:
MyUserControl myControl = new MyUserControl();
myContainerControl.Controls.Add(myControl);


I really appreciate. It did work as I wanted to :) :)
Thanks a lot.

PS:
fyi: it's funnny but I had tried with UserControl like we do in Delphi
(assigning the parent and show it) and it did "not work". I had tried yours
it did "not" work. Then I said should be something "wrong" with me,,, and
really instead of instatiating "myControl" from "MyUserControl" I was
intatiating from "UserControl" itself showing nothing but default
undistiguitable "frame" . After I corrected I noticed that it works in both
ways....

A
MyUserControl myControl = new MyUserControl();
myContainerControl.Controls.Add(myControl);

B
MyUserControl myControl = new MyUserControl();
myControl.Parent = myContainerControl;
myControl.Show // <- This line is optional, I just added to make "sure" ti
shows
 
Glad to be of help =)

genc said:
I really appreciate. It did work as I wanted to :) :)
Thanks a lot.

PS:
fyi: it's funnny but I had tried with UserControl like we do in Delphi
(assigning the parent and show it) and it did "not work". I had tried yours
it did "not" work. Then I said should be something "wrong" with me,,, and
really instead of instatiating "myControl" from "MyUserControl" I was
intatiating from "UserControl" itself showing nothing but default
undistiguitable "frame" . After I corrected I noticed that it works in both
ways....

A
MyUserControl myControl = new MyUserControl();
myContainerControl.Controls.Add(myControl);

B
MyUserControl myControl = new MyUserControl();
myControl.Parent = myContainerControl;
myControl.Show // <- This line is optional, I just added to make "sure" ti
shows
 
Back
Top