TForm is a Delphi VCL class encapsulating a standard application window.
Questions tagged [tform]
66 questions
8
votes
3 answers
How to reset a delphi TForm to original appearance after use of ScaleBy()
I want to allow a form to be sized by the user with its controls proportionaly resized. ScaleBy( N,M ) works fine for me but there are of course cumulative rounding errors if it is repeated. To counter this I simply wish to precede ScaleBy() with a…
![](../../users/profiles/47012.webp)
Brian Frost
- 12,964
- 10
- 72
- 146
7
votes
5 answers
How do I catch certain events of a form from outside the form?
I'm working on something which will require monitoring of many forms. From outside the form, and without putting any code inside the form, I need to somehow capture events from these forms, most likely in the form of windows messages. But how would…
![](../../users/profiles/988445.webp)
Jerry Dodge
- 25,720
- 28
- 139
- 301
7
votes
1 answer
Why does TForm.SetBounds only work correctly when TForm.Position is set to poDefault at design time
I have noticed something very strange. I am persisting the top, left, width, and height properties of a form when it is closing, and using this information to restore the form's last position when it is once again opened by calling SetBounds using…
![](../../users/profiles/84904.webp)
Cary Jensen
- 3,554
- 2
- 29
- 49
7
votes
2 answers
Unwanted form size growing on TSplitter move when Panel1.Constraints.MinHeight is set
I have this type of situation (see image), now when I move Splitter1 up in run-time, Panel2 height grows and also Form1 height grows.
But I need to know and block this type of event, when Splitter1 can't be moved up because of…
![](../../users/profiles/2111514.webp)
NevTon
- 213
- 2
- 12
7
votes
1 answer
Screenshot of form whose dimensions are greater than screen dimensions
I have a TForm object whose height is greater than the required vertical resolution of my screen.
For some reason, Windows doesn't allow the visible (client?) area of the form to exceed the screen resolution, so vertical scrollbars appear on my…
![](../../users/profiles/1054397.webp)
ardnew
- 1,780
- 16
- 26
6
votes
2 answers
Is it possible to dynamically create form without having *.dfm and *.pas files?
is it possible to create and show TForm without having source files for it ?
I want to create my forms at runtime and having the empty *.dfm and *.pas files seems to me useless.
Thank you
![](../../users/profiles/1096812.webp)
Martin Reiner
- 2,037
- 1
- 17
- 32
6
votes
1 answer
Delphi 7 - Handling MouseWheel events for Embedded Frames in Forms?
Hi I have a form with several frames inside.
For some of the frames, i wish to scroll the contents (or at least handle the mousewheel event).
I have tried the following:
Simply assigning a OnMouseWheel event handler for each frame
Overriding the…
![](../../users/profiles/355657.webp)
Simon
- 8,517
- 13
- 64
- 107
6
votes
1 answer
Operator IS with a TFormClass
I've a follow situation:
TMyFormClass = class of TMyForm
function IsMyClass(AClass: TFormClass);
begin
Result := AClass is TMyForm // Operator not applicable to this operand type
Result := AClass is TMyFormClass // Operator not applicable…
![](../../users/profiles/9485617.webp)
Eduardo Stefanello
- 85
- 5
6
votes
2 answers
Will an interface-implementing form free itself when there are no more references to it?
If I implement an interface on a form such as TMyForm = class(TForm, IMyInterface), will the object free itself when there are no more interface references to it? It seems not to, although I couldn't work out how TForm is reference counted (if at…
![](../../users/profiles/48445.webp)
Alister
- 6,137
- 4
- 37
- 63
6
votes
5 answers
Delphi disable form while loading
In my application, I have a main form, with the ability to load some images in database.
While images is loading, I want to show a form, with the progress indicator (with bsNone border style).
But, if I show with form with ShowModal, execution of…
![](../../users/profiles/1331598.webp)
Andrey
- 2,419
- 3
- 25
- 51
5
votes
1 answer
Delphi - overriding hide behaviour of TForm.showModal
I am currently writing a windowing system for an existing Delphi application.
Currently, the program consists of a number of full-sized forms which are shown modally in the order they are required and none of which can be moved by the user. My aim…
![](../../users/profiles/933979.webp)
jmc
- 600
- 12
- 24
5
votes
2 answers
Make 2 forms able to overlap each other?
I would like to have a seperate form that shows "along" with my main form, so it does not overlap the main form.
Here's an example:
Notice how the main program, overlaps the log? I can't figure out how to do that in Delphi.
Thanks!
![](../../users/profiles/561545.webp)
Jeff
- 11,384
- 12
- 77
- 145
4
votes
1 answer
Is there an event fired in a form when application closes
My application spawns several independent forms. Once when created the application forgets about them. All action is handled in that form itself. When the application closes the form closes also, by the RTS i suppose. This is fine except that…
![](../../users/profiles/622097.webp)
Arnold
- 4,016
- 5
- 42
- 82
4
votes
1 answer
Delphi: frame properties do not update when I expect them to (they get stuck)
I have a frame on a form. When I change the frame (add/delete buttons, labels) no changes appear on the form or controls have other positions in the form that in the frame. If to delete the frame from the form and add it again -> Ok.
Why? As I…
![](../../users/profiles/791316.webp)
maxfax
- 4,121
- 10
- 66
- 117
4
votes
1 answer
Delphi Non Blocking ShowModal
I was wondering if theres a method to show a TForm without waiting for it (kinda like TForm.Show). But what I would like is to BLOCK all other forms (just like in ShowModal)
Example:
I have Form1 and Form2.
Form1 has a button that should open Form2…
![](../../users/profiles/1176008.webp)
Benjamin Weiss
- 3,206
- 2
- 37
- 87