Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 04-24-2014, 03:29 PM
delphimpd delphimpd is offline
Senior Member
 
Join Date: Oct 2006
Posts: 701
Default Window Corners

Hi and thanks for the Help in advanced

Does anyone have any idea how can I can get this accomplish

I have two windows Form1 and Form2 (Form2 Smaller than Form1).

Form1 Opens, then if I click on a button to open Form2, I would like Form2 to position itself on the right-lower corner on top of Form1, right-lower corner.

On another words.

Form2 lower-right corner, on top of Form1 lower-right corner.

Thanks

Regards
Reply With Quote
  #2  
Old 04-24-2014, 03:37 PM
kolbasz kolbasz is offline
Senior Member
 
Join Date: Nov 2013
Posts: 841
Default

Code:
procedure TForm1.Button1Click(Sender: TObject);
var
  X, Y: Integer;
begin
  X := Form1.Left + Form1.Width;
  Y := Form1.Top + Form1.Height;
  Form2.Left := X - Form2.Width;
  Form2.Top  := Y - Form2.Height;
  Form2.Show;
end;
Reply With Quote
  #3  
Old 04-24-2014, 08:10 PM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,060
Default

I was planning to give some answers, but it looks we have more expertise which I like.

More ever, I am very happy to see you around my friend.

Best Regards,
__________________
Regards,
Abdulaziz Jasser
Reply With Quote
  #4  
Old 04-25-2014, 01:09 PM
delphimpd delphimpd is offline
Senior Member
 
Join Date: Oct 2006
Posts: 701
Default

Hi and thanks both for the help and the intent.

Is so always good to see you around here too Jasser.

kolbasz, you and others, are the great spirit of this marvelous web site, some people say that Delphi is dead, I think that those people are blind, and people like you and kolbasz are proving wrong.

Thank you both

Regards,
Reply With Quote
  #5  
Old 04-25-2014, 04:06 PM
kolbasz kolbasz is offline
Senior Member
 
Join Date: Nov 2013
Posts: 841
Default

Quote:
kolbasz, you and others, are the great spirit of this marvelous web site, some people say that Delphi is dead, I think that those people are blind, and people like you and kolbasz are proving wrong.
Thank you for your kind words, but unfortunately I have to disagree with you about delphi. Embarcadero is milking a dead cow.
Reply With Quote
  #6  
Old 04-25-2014, 05:45 PM
delphimpd delphimpd is offline
Senior Member
 
Join Date: Oct 2006
Posts: 701
Default

That's the beauty of democracy we can disagree on something and still be friends. Lol

I don't think so, the out coming product looks robust and I am aware of lots of companies in which are switching from Microsoft Visual Studio and now going with Delphi, because of its use simplicity and rapid development to almost all platforms.

Object Pascal will still object Pascal, no matter what, a robust, efficient and super fast language. Although Embarcadero, says that their main objective is to deliver to single programmers out there, I am more inclined to believe that Delphi is more for bigger companies because of its outrageous price increase which makes a great percent of single developers almost impossible to afford the product, making single developers to look at other options, mean while Big Companies to save tons of moneys and fast delivery by switching to Geico, I mean switching to Embarcadero.


Regards
Reply With Quote
  #7  
Old 04-27-2014, 01:22 AM
delphimpd delphimpd is offline
Senior Member
 
Join Date: Oct 2006
Posts: 701
Default

Hi Kolbasz

Thanks for your help. This is what I was looking for.

Thanks,

Regards

Quote:
Originally Posted by kolbasz View Post
Code:
procedure TForm1.Button1Click(Sender: TObject);
var
  X, Y: Integer;
begin
  X := Form1.Left + Form1.Width;
  Y := Form1.Top + Form1.Height;
  Form2.Left := X - Form2.Width;
  Form2.Top  := Y - Form2.Height;
  Form2.Show;
end;
Reply With Quote
  #8  
Old 04-27-2014, 05:21 AM
kolbasz kolbasz is offline
Senior Member
 
Join Date: Nov 2013
Posts: 841
Default

You're welcome delphimpd! I'm glad I could help!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 04:56 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.