Autor Beitrag
matze.de
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 576

Win95, Win98 SE, WinXp Prof SP2
D7P, D8P, FPC2.0
BeitragVerfasst: Fr 03.12.04 18:40 
Moin Mädelz,

hab da ma nen Problemchen *grml*

Ich habe
ausblenden Delphi-Quelltext
1:
2:
3:
4:
var
  Form1: TForm1;
  Ini: TIniFile;
  StayOT: Boolean;


dann eine prozedur
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
procedure ReadIniFile;
begin
  Ini := TIniFile.Create(IncludeTrailingPathDelimiter(
    ExtractFilePath(Application.ExeName)) + 'db.ini');

  if Ini.SectionExists('Settings') then
  begin
    try
      try
        StayOT := Ini.ReadBool('Settings', 'StayOnTop', True);
        HotkeyStr := Ini.ReadString('Settings', 'Hotkey', 'ALT+Q');
      except
        MessageDlg('Can´t read Settings from Ini-File.',
          mtError, [mbOK], 0);
      end;
    finally
      Ini.Free;
    end;
  end
  else
    Ini.Free;

  Form1.CBStayOnTop.Checked := StayOT;
  if StayOT then
    Form1.FormStyle := fsStayOnTop
  else
    Form1.FormStyle := fsNormal;


Die geHiglighteten Sachen lassen das Programm abstürzen wenn ich das Programm starte und mit der Maus über das TrayIcon gehe.(Mit Debugger getestet) Jetzt frage ich mich - warum? Ich sehe da keinen Fehler.

mfg matze

_________________
si tacuisses, philosophus mansisses.
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Fr 03.12.04 18:47 
habs mal banalstens ausprobiert:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.Button1Click(Sender: TObject);
begin
Form1.Formstyle:=fsStayOnTop;
end;

: Klappt; ich konnte das problemlos ändern.
ach, du hast das gewinnspiel gewonnen.. gä? herzlichen glückwunsch! xD

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
matze.de Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 576

Win95, Win98 SE, WinXp Prof SP2
D7P, D8P, FPC2.0
BeitragVerfasst: Fr 03.12.04 18:51 
so gehts bei mir auch, das muss irgendeinen anderen hintergrund haben *grml*

ja hab ich ^^ danke. Jetze kennt man mich überall *muahaha* :D

mfg matze

_________________
si tacuisses, philosophus mansisses.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Fr 03.12.04 18:51 
Dass die Delphi Hilfe dazu sagt:
Zitat:

Note: It is not advisable to change FormStyle at runtime.

Wird schon seinen Sinn haben.
Nimm dazu lieber Suche im MSDN SETWINDOWPOS.