When the execute dialog box is opened and saved, the memory read error is inexplicably reported. Which of the following heroes can solve this problem? Thank you very much.

Source: Internet
Author: User
When the execute dialog box is opened and saved, the memory read error is inexplicably reported. Which of the following heroes can solve this problem? Thanks very much for the development and application of the VCL component.
Http://www.delphi2007.net/DelphiVCL/html/delphi_20061225115259132.html
When the execute dialog box is opened and saved, a memory read error is inexplicably reported. After the dialog box is opened, an error is reported when no operation is performed. Which of the following heroes can solve this problem? Thank you very much.
Error message:
Access violation at address 00404170 in module 'sysmanager.exe '. Read of address limit 34f6
Program In the development process, the built-in control of Delphi is used, no third-party control is used, and vclskin is not installed on the machine. The operating system used is XP.

Post source code

Is there a conflict with your other programs? You can create a separate project and try it...

With topendialog. Create (NiL) Do
Begin
Try
If execute then
Begin
Showmessage (filename );
End;
Finally
Free;
End;
End;
This sentenceCode

There is no error in this Code. It is obvious that the error was generated before that.

Debugging tracking

This is what appears here. After the dialog box is displayed, it is too dizzy to trace and debug the Assembly. It seems like I have heard of this problem. Which of the following heroes will solve it?

It must not be because of this Code.

Has no one ever met?

Do not include invalid characters in the filename name, for example :/.

You do not need to use the dynamic mode. Instead, use static components for a try.

If you write
Procedure tform1.button4click (Sender: tobject );
Begin
With topendialog. Create (NiL) Do
Begin
Try
If execute then
Showmessage (filename );
Finally
Free;
End;
End;
End;

So no problem,

If there is a problem, it may be with. Check if there is a method call with the same name. For example, your code is not written in a function or process as I did ..


You can define a variable.
Procedure tform1.button3click (Sender: tobject );
VaR
Dialog: topendialog;
Begin
Dialog: = topendialog. Create (NiL );
Try
If dialog. Execute then
Showmessage (dialog. filename );
Finally
Dialog. Free;
End;
End;

I have encountered a similar problem. Does the LZ check whether showmodal will make an error?

Currently, I do not know how to solve this problem.

We recommend that you use a tfiledialog variable. It may be that your uses unit contains other units of the Execute function. When you call this variable, you run it to another function with the same name.

Harryfin (Harry), hi, I have no error with showmodal
In addition, I tried to drag the control directly and dialog. Execute the two methods, the same error still occurs, extremely depressed, ha ha, never met before

With topendialog. Create (NiL) Do // avoid using nil, change it to application or another component name...
Begin
Try
If execute then
Showmessage (filename );
Finally
Free;
End;
End;

The problem persists. Give up. Haha, score

GS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.