AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Problem with opening .res file

Ein Thema von delphi_goldy · begonnen am 7. Mär 2005 · letzter Beitrag vom 7. Mär 2005
Antwort Antwort
delphi_goldy

Registriert seit: 28. Feb 2005
Ort: Celje
8 Beiträge
 
Delphi 7 Professional
 
#1

Problem with opening .res file

  Alt 7. Mär 2005, 06:52
Since I'm writing this in English, I'll keep it (hopefully) short!

#1.
I have 2 forms. I try to open .res file in Form2. Delphi stops and
reports "Project XXXX.exe raised exception class EAccess Violation with message 'Access violation at address 00408895 in module XXXX.exe. Write of address 004037C7' Process stopped."

Then it points toward Form1 where it's written ShowModal!
I try to write in file with strPCopy(Something.One, edit1.text);

where
type TNk=record
OneAnsiChar;
var Something:TNk;

What is the problem?

#2.
Another question, but not connected to previous: When I press button, it reads from edit. This works (of course). Then I try to set focus again to edit. (with Edit1.SetFocus). It should
work with Delphi v5 (I rewritten from book). It doesn't work. It reports missing semicolon or something like that!

Goldy
  Mit Zitat antworten Zitat
rantanplan99
(Gast)

n/a Beiträge
 
#2

Re: Problem with opening .res file

  Alt 7. Mär 2005, 10:09
Hi,

some rules first: open up a new thread for every problem you have. don't put 2 different problems in the same thread.
second: please use the "Delphi-Code" Tags for sourcecode.

for problem #2: you have to put a semicolon ; at the end of the line, like this
Edit1.SetFocus; you can omit the semicolon if its the last command in your code-block wich is terminated by an end; like this

Delphi-Quellcode:
procedure a;
begin
  Edit1.SetFocus
end;

or

procedure b;
var
  i: integer;
begin
  i := 0;
  if (i = 5) then begin
    Edit1.SetFocus
  end;
  i := 1;
end;

the following gives you an error:

procedure c;
begin
  Edit1.SetFocus
  ShowMessage('MessageBox')
end;
maybe in your delphi book, the Edit1.SetFocus Command was followed by an end;

rantanplan
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:30 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz