Error Cannot Change Visible Onshow Onhide
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Cannot change Visible in OnShow or OnHide [closed] up vote -1 down vote favorite i am using Delphi 7. When the system times out, or if your computer goes to sleep and then comes back up the system gives an error: " Cannot change Visible in OnShow or OnHide." Can you please say general reasons for this error delphi delphi-7 share|improve this question edited Jul 19 '12 at 14:33 RRUZ 114k11253398 asked Jul 19 '12 at 11:49 Sym 2624 closed as not a real question by Ken White, mj2008, TLama, forsvarir, Jason Sturges Jul 20 '12 at 21:31 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question. You're not providing enough information. Is the error in the IDE itself? If so, this is a duplicate of Error Cannot change Visible in OnShow or OnHide in Delphi IDE. There are a couple of suggestions there. Is it in your app? In either case, what was the app doing when the "system times out" (I'm guessing that means when the screensaver activates) or "computer goes to sleep"? Was it minimized, and you're trying to restore it? Was it already m
Forums Show Threads Show Posts Tag Search Advanced Search Go to Page... Thread Tools Display Modes #1 07-19-2012, 12:53 PM Syamala Junior Member Join Date: Jul 2012 Posts: 8 Error "Cannot change Visible in OnShow or OnHide" in Delphi i am using Delphi 7. When the system times out, or if your computer goes to sleep and then comes back up the system gives an error: " Cannot change Visible in OnShow or OnHide." Can you please say reason of the error and Solutions Syamala View Public Profile Send a private message to Syamala Find all posts by Syamala #2 07-19-2012, 01:14 PM http://stackoverflow.com/questions/11560244/cannot-change-visible-in-onshow-or-onhide Norrit Moderator Join Date: Aug 2001 Location: Landgraaf Posts: 7,130 http://www.delphipages.com/forum/sho...d.php?t=212106 As for your question, it refers to some error in OnShow/OnHide code. Placing a breakpoint there (OnShow is the first candidate) and debug further I would say is my best guess for the moment... Norrit View Public Profile Send a private message to Norrit Visit Norrit's homepage! Find all posts by Norrit #3 07-19-2012, 01:30 PM Syamala Junior Member http://www.delphipages.com/forum/showthread.php?t=212107 Join Date: Jul 2012 Posts: 8 I am not getting that error , I faced that error at client place. I couldn't recreate that error in my system. Can you please tell me the reason of the error and how to rectify it. Its important for me. Thank you Syamala View Public Profile Send a private message to Syamala Find all posts by Syamala #4 07-19-2012, 01:36 PM Syamala Junior Member Join Date: Jul 2012 Posts: 8 I am not getting that error , I faced that error at client place. I couldn't recreate that error in my system. Can you please tell me the reason of the error and how to rectify it. Its important for me. Thank you Syamala View Public Profile Send a private message to Syamala Find all posts by Syamala #5 07-19-2012, 01:38 PM Norrit Moderator Join Date: Aug 2001 Location: Landgraaf Posts: 7,130 There's no solution for this, you've written some code (most likely in an OnShow event) that gives you the AV "Cannot change Visible in OnShow or OnHide." (which is exactly the same error that is given in the other thread, even almost the same structure in the question) But back to your problem: Only way to solve is to reproduce and
while bringing up my application (This all occurs prior to Application.run) Usually, there are no issues, but sometimes, I get an exception: Einvalid Operation - 'Cannot change visible in OnShow http://www.delphigroups.info/2/fe/408402.html or OnHide' I have no event handlers set for either of these events. I get http://www.tek-tips.com/viewthread.cfm?qid=1010588 this error in this code (again, only sometimes - have not been able to determine the scenario): Procedure ShowMsg( s : string); begin if not assigned(fMsgWnd) then fMsgWnd := tfMsgWnd.create(application); fMsgWnd.memoStatus.lines.add(s); fMsgWnd.Show; <= exception is generated here. Application.ProcessMessages; end; For a test I called .show twice to ensure it was error cannot safe to do so while it was showing and it worked so why would it be raising an exception occasionally? What can I check to see if it is already showing before calling show? (Or do I need to keep track of it myself?) Thanks, -Eric Team Delphi Developer Tue, 11 Mar 2008 03:04:44 GMT Re:'Cannot change visible in OnShow or OnHide' error QuoteIn article <4332ae2...@newsgroups.borland.com>, Eric wrote: > I error cannot change have a simple form with a memo that I update with while > bringing up my application (This all occurs prior to > Application.run) > Usually, there are no issues, but sometimes, I get an exception: > Einvalid Operation - 'Cannot change visible in OnShow or OnHide' > I have no event handlers set for either of these events. I get > this error in this code (again, only sometimes - have not been > able to determine the scenario): > Procedure ShowMsg( s : string); > begin > if not assigned(fMsgWnd) then > fMsgWnd := tfMsgWnd.create(application); > fMsgWnd.memoStatus.lines.add(s); > fMsgWnd.Show; <= exception is generated here. > Application.ProcessMessages; > end; > For a test I called .show twice to ensure it was safe to do so > while it was showing and it worked so why would it be raising an > exception occasionally? No idea. The exception is created if some code executing in response to a CM_SHOWINGCHANGED message tries to show or hide the form. You Application.ProcessMessages call opens the doors for such madness
Join INTELLIGENT WORK FORUMSFOR COMPUTER PROFESSIONALS Log In Come Join Us! Are you aComputer / IT professional?Join Tek-Tips Forums! Talk With Other Members Be Notified Of ResponsesTo Your Posts Keyword Search One-Click Access To YourFavorite Forums Automated SignaturesOn Your Posts Best Of All, It's Free! Join Us! *Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines Promoting, selling, recruiting, coursework and thesis posting is forbidden.Tek-Tips Posting Policies Jobs Jobs from Indeed What: Where: jobs by Link To This Forum! Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.Just copy and paste the BBCode HTML Markdown MediaWiki reStructuredText code below into your site. Embarcadero: Delphi Forum at Tek-Tips HomeForumsProgrammersDevelopment ToolsEmbarcadero: Delphi Forum cannot change visible in onshow or onhide thread102-1010588 Forum Search FAQs Links MVPs cannot change visible in onshow or onhide cannot change visible in onshow or onhide geoclock (Programmer) (OP) 22 Feb 05 07:53 My large delphi 1 program occasionally gets the fatal error "cannot change visible in onshow or onhide" soon after startup.I do not directly manipulate the visible property, nor do I override the onshow or onhide event handlers.I have eliminated this problem on my own HW (just by rearranging code) but others still report the problem.I do not have a clue as to what causes this or what I am doing wrong!Any suggestions (based on knowledge, please)? RE: cannot change visible in onshow or onhide Nordlund (Programmer) 22 Feb 05 08:21 How soon after startup?One thing you can do is to override the OnAppException Code, and add a breakpoint in this procedure.Then you can check, by using Call Stack, the procedure who led you there.See my answer in this thread: http