raV Posted February 11, 2006 Report Share Posted February 11, 2006 Cześć!Czy można za pomocą Delphi otworzyć plik, jednak w jego domyślnym programie? Dajmy na to, żeby *.jpg otworzyło się np. w Photoshopie (zakładając ze ten jest domyslny dla *.jpg)? Jeżeli ktoś z Was wie, jak to zaimplementować, bardzo proszę o odpowiedź. Będę naprawdę wdzięczny.Pozdrawiam, cześć i czołem Link to comment Share on other sites More sharing options...
sazian Posted February 11, 2006 Report Share Posted February 11, 2006 http://www.unit1.pl/151,2,podglad.html Link to comment Share on other sites More sharing options...
raV Posted February 11, 2006 Author Report Share Posted February 11, 2006 Nie o to mi chodziło. Chciałbym zeby mój program kazał programowi zajmującegp się jpg otworzyć jakiś plik. Link to comment Share on other sites More sharing options...
sazian Posted February 11, 2006 Report Share Posted February 11, 2006 [code=Delphi] WinExec(PChar(adres),sw_normal); [/code]takie coś?? Link to comment Share on other sites More sharing options...
raV Posted February 11, 2006 Author Report Share Posted February 11, 2006 tyle że nie wiem jakim programem dana osoba dajmy na to jakim odtwarza filmy. Chciałbym, aby moj program otworzyl domyslny program ustawiony u danej osoby do odtwarzania plikow *.coś Link to comment Share on other sites More sharing options...
sazian Posted February 11, 2006 Report Share Posted February 11, 2006 jeśli napiszesz [code=Delphi] WinExec('film.avi',sw_normal); [/code]twój program otwoży Link to comment Share on other sites More sharing options...
raV Posted February 11, 2006 Author Report Share Posted February 11, 2006 ee, u mnie to jak nie działało tak nie działa.. :? Link to comment Share on other sites More sharing options...
ktoś Posted February 11, 2006 Report Share Posted February 11, 2006 Pewnie Sazian zapomniał napisać, że w uses musisz mie dopisany odpowiedni moduł.Jak się pomyliłem, to nie bijcie, ale chyba o to chodzi(np. żeby [b]skożystać z funkcji ShellExecute trzeba do uses dopisać ShellApi) Link to comment Share on other sites More sharing options...
raV Posted February 11, 2006 Author Report Share Posted February 11, 2006 kompiluje się. ale nie uruchamia nic. Link to comment Share on other sites More sharing options...
sazian Posted February 11, 2006 Report Share Posted February 11, 2006 to zamiast film.avi napisz notepad [b]poprostu nie ma takiego pliku Link to comment Share on other sites More sharing options...
raV Posted February 11, 2006 Author Report Share Posted February 11, 2006 [quote] to zamiast film.avi napisz notepad poprostu nie ma takiego pliku [/quote]Ze niby ja [b]poprostu przekopiowałem bez myślenia kod? ... I sprawa wygląda tak, że np mogę uruchomić swoj programik (wiecej nie sprawdzalem, bo dlugich adresow nie znam/nie chcialo mi sie pisac), natomiast dla 'plik.mp3', zakładając ze takowy istenieje w katalogu programu, nic sie nie dzieje. Link to comment Share on other sites More sharing options...
sazian Posted February 11, 2006 Report Share Posted February 11, 2006 [code=Delphi] uses ShellApi; ShellExecute(Handle,'open','adres',nil,nil,SÓPS N [/code]to działa [b]napewno, bo przy testowani piosenke sobie w środku wyłączyłem(włączyła się inna)// popraw błędy, tu i w poprzednich postach - [strz] Link to comment Share on other sites More sharing options...
raV Posted February 11, 2006 Author Report Share Posted February 11, 2006 Super. Wszystko śmiga. Zaraz klikam w "pomógł" PS. A czy wiesz może, jak zamknąć potem tą (otworzoną przed chwilą) aplikację? Link to comment Share on other sites More sharing options...
Morrow Posted February 12, 2006 Report Share Posted February 12, 2006 http://student.pb.bielsko.pl/~arydzewski/f...aq/faq2.html#58http://delphi.cartall.com.pl/Pytania/pyt86.htmWystarczy trochę poszukać... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.