f



Form Resize After Shutdown?

I have written a small app that worked fine but I got an exception on
shutting it down.

Having debugged ny way through it I discovered it sends a resize
message after 'FormCloseQuery' - and by that stage I have destroyed a
component which it then attempts to resize.

Is this normal behaviour?

For now I have set up a 'blnClosing' variable which I set in
'FormCloseQuery'  and which I check in the resize event. It's not a
problem now I am aware of it but it seemed odd to me.

-- 
Jeff Gaines Damerham Hampshire UK

0
Jeff
7/25/2003 9:59:29 AM
comp.lang.pascal.delphi.misc 5769 articles. 1 followers. miniFAQ (1) is leader. Post Follow

3 Replies
327 Views

Similar Articles

[PageSpeed] 33

"Jeff Gaines" <jeff@jgaines.co.uk> wrote in message
news:5kv1ivs0jqk9j2nkpmtok80e45vj5aalik@4ax.com...
>
> I have written a small app that worked fine but I got an exception on
> shutting it down.
>
> Having debugged ny way through it I discovered it sends a resize
> message after 'FormCloseQuery' - and by that stage I have destroyed a
> component which it then attempts to resize.
>
> Is this normal behaviour?
>

CloseQuery is for use with MDI. If you do not have MDI children, there would
seem no need to test CloseQuery. You seem to have overwritten the method.
But why?

You have destroyed a component. And apparently the form believes it is still
there (otherwise you wouldn't get the error). Either, also remove the
component from the form's component list or leave the destruction to the
component's owner.

Tom


0
Tom
7/25/2003 11:50:02 AM
Jeff Gaines wrote:

> I had a TStringList to dispose of in accordance with Delphi help.
> I guess I should dispose of it in the OnClose rather than the
> OnCloseQuery event.

You should destroy it in the FormDestroy event.

-- 
www.zenobits.com
0
KLinZ
7/25/2003 1:40:46 PM
"Jeff Gaines" <jeff@jgaines.co.uk> wrote in message
news:e1c2ivcigaoiirp7v7sp5icmop7sh068gh@4ax.com...
> On Fri, 25 Jul 2003 08:14:26 -0400, Duncan Murdoch <dmurdoch@pair.com>
> wrote:
>

> Tom / Duncan
>
> Thanks for your comments.
>
> I had a TStringList to dispose of in accordance with Delphi help.
> I guess I should dispose of it in the OnClose rather than the
> OnCloseQuery event.
>
> I use the OnCloseQuery event frequently for checking on data changes
> etc. as Tom said but apparently it's not the place to dispose of
> things :-))
>
> Regards.
> --
> Jeff Gaines Damerham Hampshire UK
>

I take Duncan's and your point about CloseQuery. Never too old to learn.
Aparently your TstringList was essential for the display of one of the
form's controls. In that case it would be wise to destroy (free) it in the
destructor for that control (or the form, as owner of the control).

Tom


0
Tom
7/25/2003 2:53:16 PM
Reply:

Similar Artilces:

Resizing Form Objects when a form is resized
I know this has probably been asked a million times and I have searched Google on and off -- what I need however is a dumbed down tutorial or a demo project I can play with. I have coded a multi threaded IRC client that can hit multiple servers at the same time and do all kindsa snazzy stuff however it looks crappy when forms are resized -- Cheers James Starritt wrote: > I know this has probably been asked a million times and I have searched > Google on and off -- what I need however is a dumbed down tutorial or a demo > project I can play with. I have coded a multi threaded I...

How to Automatically Resize Form Controls When Resizing a Form
Hello folks, I am an experienced developer with other languages and applications, but a neophyte when it comes to MS Access forms. Can someone please help get me with a solution for the following issue: On a form, I have an object (ImgEdit control from MS Imaging) that needs to automatically grow and shrink when a user resizes the form. The object *does not* need to grow and shrink based on the size of the image that is being displayed. Rather the object needs to grow and shrink so that it occupies the maximum possible screen real estate as the size of the form window is adjusted by the u...

Resize forms utility and forms with pictures as background
Anyone use the AHRESIZE utility to resize a form dynamically who is also using background images? I have an app that creates electronic versions of manual forms. I digitize the manual form and load it (at run time) as the form background. then, on top of it I place the fields. Seems to work well. Now I am trying to allow use of the resize utility to allow the form to be automatically resized to fit the screen resolution of each individual user. Unfortunately, I initially built the form I used "zoom" as the picture sizing method. I think that does not work with the resizi...

Resize Flexgrid to SSTab Width After Form Resize
Hi, I have tried multiple things, to no avail. This what I need your assitance on. Originaly posted at: http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Controls/Q_22777606.html VB6 With WinXP 1 Form, 1 Listbox on left of form, 1 SSTab with 7 Tabs in one Row, 1 MSHflxgd in each Tab (total seven). The list box cover the entire left of the form. On the right side of list box is where I have SSTab. And within each SSTab I have 1 flexgrid control. Requirement : 1. Maximize the form at startup. 2. Resize the SSTab to fill up the form. (List box doesnt get resized. Stays on ...

Portageging form Delphi 6 to Delphi 5
Hi I have got a programme made in Delphi 6, which should be updated. Though I have Delphi 5. There were some additional components with the project, they were easy to transfer to D5. But some components are from D6 itself, I think. What do they do, can I easily portage the programme to D5? The components are: THIGButton TClientDataSet TDataSerProvider property TCombobox.AutoDropDown WBR Sonnich On Feb 23, 11:03=A0am, jodleren <sonn...@hot.ee> wrote: > Hi > > I have got a programme made in Delphi 6, which should be updated. > Though I have Delphi...

VB6 Form resize diable user from manually resizing it?
have a VB6 project that on the form I have set the BorderStile to 2 - sizable and created a function to resize the form and its controls min or max. Although, I am trying to find a way to disable the user from dragging the bottom right hand corner from resizing. I only want min and max. Any ideas how I can do this in code. If so, can I get an example of this please? Thank you, JT JT wrote: > have a VB6 project that on the form I have set the BorderStile to 2 - > sizable and created a function to resize the form and its controls min or > max. > > Although, I am trying ...

VB6 Form resize diable user from manually resizing it?
I have a VB6 project that on the form I have set the BorderStile to 2 - sizable and created a function to resize the form and its controls min or max. Although, I am trying to find a way to disable the user from dragging the bottom right hand corner from resizing. I only want min and max. Any ideas how I can do this in code. If so, can I get an example of this please? Thank you, JT Try setting the BorderStyle to 1- Fixed Single and then set the properties for MaxButton = True and MinButton = True. Window size is no longer adjustable by the user.... Tom ...

form resizer
Does anyone know of an activeX form resizer that will work with Fujitsu PowerCobol? I've tried some of them that are designed for VB, and they don't seem to work, unless I'm doing something wrong. Thanks. "db" <db@db.com> wrote in message news:2A%Db.11500$lh6.4055@bignews4.bellsouth.net... > Does anyone know of an activeX form resizer that will work with Fujitsu > PowerCobol? I've tried some of them that are designed for VB, and they > don't seem to work, unless I'm doing something wrong. > Can you give us some specifics. What particu...

Delphi 5 modal form hides behind main form
Using a D5 application, there is an sporadic problem where a modal form gets hidden behind the application main form and subsequently the modal form cannot be seen. The program appears to hang. This normally happens when another process in the application takes too long to porecess. Is there a way to preven this problem? Any help would be greatly appreciated. Thank you Carla Op Fri, 28 Dec 2007 10:05:17 -0800 (PST) schreef carlach <carlach@bellsouth.net>: >Using a D5 application, there is an sporadic problem where a modal >form gets hidden behind the applicat...

Form resizing
I am using the Getz et al approach to form resizing, and have encountered a problem, which doesn't seem to have been mentioned here: If I "squeeze" the form that I want to resize, so that the edge of the form covers some of the objects in the form, the code seems to enter some sort of infinite loop (perhaps - I haven't waited long enough ;-), the cursor remains as hourglass, and the only solution is to break out of code. Is there some parameter that I should be setting in code in the OnOpen event, to prevent this behavior? Should I be setting the MinWidth, MaxWidth, MinHeight...

Form resize
Does anyone know how to resize an Access form. I'm looking for a way to make my access forms resolution �ndependent, so they look the same on all resolutions. Thanks Kim Skytte Google for ShrinkerStretcher (assuming it's still around). HTH, TC "Kim Skytte" <dsl9973@vip.cybercity.dk> wrote in message news:bptucu$2akd$1@news.cybercity.dk... > Does anyone know how to resize an Access form. > I'm looking for a way to make my access forms resolution > �ndependent, so they look the same on all resolutions. > > Thanks > Kim Skytte > &g...

Resizing a form
VB 6: frame1.width = form1.width - 200 VB .NET: ? Can someone please help with this simple line of code...thanks.. Almost everybody in this newsgroup is using VB6 or lower. While you may get a stray answer to VB.NET (including VB2003 and VB2005 which has dropped .NET from its name) questions here, you should ask them in newsgroups devoted exclusively to .NET programming. Look for newsgroups with either the word "dotnet" or "vsnet" in their name. For the microsoft news server, try these newsgroups... microsoft.public.dotnet.general microsoft.public.dotn...

Forms and Form
Hi everyone ! 1) An example from help: "Each Form object has a Controls collection, which contains all controls on the form. You can refer to a control on a form either by implicitly or explicitly referring to the Controls collection. Your code will be faster if you refer to the Controls collection implicitly. The following examples show two of the ways you might refer to a control named NewData on the form called OrderForm: ' Implicit reference. Forms!OrderForm!NewData ' Explicit reference. Forms!OrderForm.Controls!NewData The next two examples show how you might refer to a ...

Resizing a form.
This should be simple, but for some reason I can't resize my form at runtime. Here's my code: myForm.ScaleMode = 3 ' pixels myForm.ScaleHeight = 250 That's it. Why doesn't it work? > This should be simple, but for some reason I can't resize my form at > runtime. > > Here's my code: > > myForm.ScaleMode = 3 ' pixels > myForm.ScaleHeight = 250 > > That's it. Why doesn't it work? Because you used ScaleHeight (which is used for the client area)... change it to Height. Rick "noctufaber" <noctufaber@gmail.c...

Form resizing
Did you look at StartUpPosition and BorderStyle properties of your form? This should help. Max Kudrenko Brainbench MVP Program for Visual Basic www.brainbench.com "VB 6 Newbie" <myispnet@netzero.net> wrote in message news:<bm2p5p$h63tu$1@ID-76492.news.uni-berlin.de>... > How do you make a form resizable...and have it center in the owners screen? > it seems every time I set the form properties for centering, it reverts back > to > it former setting (which is to the left-most part). > then I can't seem to make the form resizable.......why is this? H...

Pascal and Delphi
Pascal, is the old SDK we use. Now, shall we move on to Delphi? "Boo K.M." <khanming@brinkster.net> schrieb im Newsbeitrag news:42e5bd1e_2@news.tm.net.my... > Pascal, is the old SDK we use. Now, shall we move on to Delphi? Why not? PASCAL is not a SDK, but a programming language. Delphi is not a language, but a SDK which uses the PASCAL language. Did you create windows apps in your former SDK using PASCAL? I regard Delphi to be a very straight forward SDK for creating windows apps. The promise in advertising "RAD" (rapid application development) is...

Form Resize
Hi I want to have a form resizeable but with a minimum width. Here's the essence of my code. Option Explicit Dim frmwidth As Long Private Sub Form_Load() frmwidth = Me.Width End Sub Private Sub Form_Resize() If Me.Width < frmwidth Then Me.Width = frmwidth End If End Sub That works but the form flashes badly when attempting to go below the original size. Is there a way to do that neatly? TIA. Martin On 31 Jan, 17:13, Martin Trump <mar...@wmeadow.demon.co.uk> wrote: > I want to have a form resizeable but with a minimum > ...

ANN: wxForms for Delphi
This is a multi-part message in MIME format. ------=_NextPart_000_0082_01C9B2B4.18414D40 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello, Today I just released my new product wxForms for Delphi. This includes a wxWidgets for Pascal and a Form Designer for Delphi. Please check http://twinforms.com/products/wxformsdelphi/index.php for details. -regards, Guru Kathiresan http://www.twinforms.com <http://www.twinforms.com/> ------=_NextPart_000_0082_01C9B2B4.18414D40 Content-Type: text/html; charset=&qu...

VB6 form "zooming" resize a form and all it's components
Hi, may I ask a VB6 question: How do I resize a form and it's components at run-time with the mouse in VB6. Example "digital clock" consisting of 1 form & 1 label field which displays time. Pull the lower right corner of the form and change the formsize, label size and (true type) fontsize while maintaining aspect ratio, making the "clock" larger �r smaller, like "zooming". As a follow-up question, when I get above example working, how do I program resizable forms, either for "zooming" or to be resolution independent. regards, h.w. -- to...

VB6 form "zooming" resize a form and all it's components #2
Hi, may I ask a VB6 question: How do I resize a form and it's components at run-time with the mouse in VB6. Example "digital clock" consisting of 1 form & 1 label field which displays time. Pull the lower right corner of the form and change the formsize, label size and (true type) fontsize while maintaining aspect ratio, making the "clock" larger �r smaller, like "zooming". regards, h.w. -- to email remove the Xes Helmut Wabnig <hxwabnig@xaxoxnx.at>'s wild thoughts were released on Fri, 22 Jul 2005 14:12:08 +0200 bearing the following frui...

why the pascal family of languages (Pascal, Ada, Modula-2,2,Oberon, Delphi, Algol,...) failed compared to the C family?
The first language I really liked was Pascal. But the Pascal family of languages (including Ada) have clearly failed to become popular, at least compared to the C-family (C, C++, C#, ....) The question is why did this happen? My theory: C was used to develop Unix/Linux and Windows, and this made it easier for applications to be written in C/C++ since the interface to the OS was easier. VMS did not choose C (considered a huge blunder by many. They choose Bliss http://en.wikipedia.org/wiki/BLISS instead! and we all know what happens to VMS. What is your theory on this? Was t...

Resizing a scrollable form
There are 2 examples of scrollable forms, one in Effective TCL programming which binds to a <Configure> event to set the scroll region of the view port when the widgets inside the viewport request a new geometry, and one in the Welch and Jones book which simply uses a `tkwait visibility' on one of the widgets in the form inside the viewport before actually setting up the scroll region. Both approaches work fine for the initial setup of the scroll region, but my problem is how to handle manual resize requests from the user. Neither of the above examples can do this. I assume this is ...

How to resize gui form ??
How to resize gui form ?? thanks In article <fpa66p$7c3$1@fred.mathworks.com>, jaifar Hassan <jaifar2006@gmail.com> wrote: >How to resize gui form ?? Change the Position property of the figure. However, if you want to reposition the various elements or use a bigger font size or something like that when the figure is resized, then you will need to either size everything in relative units (usually an utter pain) or else write a ResizeFcn callback for the figure. -- "The human mind is so strangely capricious, that, when freed from the pressure of real misery, i...

Form resizing problem
Hi, I have the following problem: I am drawing a complex content in a paintbox in a OnPaint event(what can take up to 10 seconds). So I need to make redraw only when the user has finished resizing the form. One possibility solve the problem is a method to recognize the user has finished resizing, or I can change window behaviour so that not the whole window can be resized, but a rubber-band appears like in the older days of Win95. Has anybody an idea? Greetings, Pete Peter Sprenger wrote: > I have the following problem: I am drawing a complex content in a >...

Web resources about - Form Resize After Shutdown? - comp.lang.pascal.delphi.misc

United States federal government shutdown of 1995 and 1996 - Wikipedia, the free encyclopedia
The United States federal government shutdown of 1995 and 1996 was the result of conflicts between Democratic President Bill Clinton and the ...

REPORT: Facebook Reader Is Not RSS-Based, Nor A Response To Google Reader Shutdown
The Reader project Facebook is reportedly working on is not based on RSS , and it is not a response to the impending shutdown of Google Reader ...

HOW TO PLAY PROJECT M AFTER WiFi SHUTDOWN
This works with your SD card, so no USB + USB loader is required. *TABLE OF CONTENTS* *Part 1: Homebrew *Part 2: New Server Patch *Part 3: ...

Advertiser Confusion Led to Shutdown of Facebook Conversion Tracking Tool
When Facebook closed a private beta of a conversion tracking tool earlier this month that would have allowed advertisers to see whether users ...

Idea of the Day: Shutdown Requires PIN
... idea by Cabel Sasser: When my phone was stolen in SF last year, they immediately powered it down to stop Find My iPhone. Settings idea: “Shutdown ...

Schmooze or Lose: How the Lost Art of Negotiation Led to a Shutdown
By Jack and Suzy WelchWith all the finger-pointing and name-calling going on in Washington these days, it’s hard to believe a delegation of kindergarten ...

National Mall sunset during the government shutdown - Flickr - Photo Sharing!
Also appears at Capital Weather Gang and Prince of Petworth.

YouTube - Governor Christie: A Shutdown Would Be A Failure Of Everyone
... "Soul of Hunger" Roundtable Discussion - September, 30, 2013. (Transcript Below) Willie Geist: Another topic, you mentioned the shutdown that's ...

Like ABC, The Snobs at NPR Laugh At Shutdown of Hostess, the Snack-Food 'Supervillains'
On Friday, Scott Whitlock reported ABC's Good Morning America reported the morning show milked the 18,000 jobs lost in the shutdown of Hostess ...

3am shutdown for pubs and clubs back on the table
Pubs and clubs may be forced to close at 3am under a late-night trading curfew being considered by the Queensland government.

Resources last updated: 2/16/2016 3:20:27 AM