Autor Beitrag
foxy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 814

Ubuntu, Gentoo
C++, PHP, Java, Ruby, Perl (Eclipse)
BeitragVerfasst: Di 14.01.03 13:59 
Hoi leute ... ma ne frage ich habe in meiner datenbank einmal .bmp gespeichert und .pdf gespeichert und will noch .htm oder .html datein speichern
nun wie kann ich es machen das wenn ich doppelklick auf mein DBGrid mache in der entsprechenden colum das sich dann acrobat reader, oder i-net explorer öffnet??
bisher habe ich es so gemacht
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
if opendialog1.Execute then
   begin
     pfad:=opendialog1.FileName;
     k:=copy((InttoStr(Pos(pfad,'.'))),1,3);
     if  k= '.bmp' then
       begin
        Table1.Edit;
        Table1File.AsString:=pfad;
        Table1BMP.LoadFromFile(pfad);
        DBlistbox1.Items.Add(pfad);
        Table1.Post;
        Pagecontrol1.ActivePageIndex:=2;
       end
     else
      begin
        Table1.Edit;
        Table1File.AsString:=pfad;
        Table1Datei.LoadFromFile(pfad);
        DbListbox1.Items.Add(Pfad);
        Table1.Post;
        Pagecontrol1.ActivePageIndex:=2;
      end;
     end;



ausblenden Quelltext
1:
2:
3:
4:
5:
procedure TForm1.DBGrid1DblClick(Sender: TObject);
begin
  if FileExists(Table1.FieldbyName('File').AsString) then
   begin
        Form4.Show;


zu code 1, da fragt er einfach ab ob es sich um eine .bmp datei handelt wenn ja macht er sie in ein graphic feld wenn nich eben in ein blob feld
die grafik kann ich per doppelklick öffnen aber wie öffne ich das andere alles??

_________________
"Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it." (Linus Torvalds)
OperatingSystem Laptop (Ubuntu Hardy)
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: Di 14.01.03 14:20 
Such mal hier im Forum oder im Win32.SDK nach ShellExecute. Damit startet man aus einer Windows-Anwendung andere Programme, bzw öffnet Dateien mit der dazugehörigen Verknüpfung (z.B. dem Standard-Browser und nicht dem IE).

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert
foxy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 814

Ubuntu, Gentoo
C++, PHP, Java, Ruby, Perl (Eclipse)
BeitragVerfasst: Di 14.01.03 14:22 
ahhh ok thx wusste nich nach was ich suchen sollte =)

_________________
"Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it." (Linus Torvalds)
OperatingSystem Laptop (Ubuntu Hardy)