Jump to content
GSForum - Segélyvonal

Programok Vista alá


mizsi

Recommended Posts

mizsi

Sziasztok!

Adott egy program, amiben különbözõ Windows alkalmazásokat hívok meg, pl. hangerõszabályzó. Ez a progam Windows XP alatt kiválóan mûködött. A gondom ott kezdõdik, hogy Vista alatt a funkciók nem mûködnek, mert más néven futnak, mint az XP-n. Kérdésem: hogy tudom elérni, hogy a program felismerje az oprendszert, és annak megfelõen cselekedjen. A kód most így néz ki:

ShellExecute(Form1.Handle,'open','sndvol32.exe'

Na, ugyebár Vista alatt a hangerõszabályzó sndvol.exe név alatt fut.

Link to comment
Share on other sites

  • 1 month later...
DonTomika

if LO(GetVersion) <= 5 then
begin
  ShellExecute(Form1.Handle, 'open', 'sndvol32.exe', nil, nil, SW_SHOWDEFAULT);
end
else if LO(GetVersion) = 6 then
begin
  ShellExecute(Form1.Handle, 'open', 'sndvol.exe', nil, nil, SW_SHOWDEFAULT);
end
else
begin
  MessageBox(Form1.Handle, 'Ismeretlen operációs rendszer', 'Hiba', MB_ICONERROR or MB_OK);
end;

 

:)

Link to comment
Share on other sites

  • 2 weeks later...
mizsi

Köszönöm! :istenvagy:

Link to comment
Share on other sites

DonTomika

Szívesen :)

Link to comment
Share on other sites

  • 3 years later...
mizsi

Sziasztok!

Felhozom egy kicsit a topikot. Elővettem újra a programot 3 év után, és szomorúan tapasztaltam, hogy a funkció Windows 7 alatt nem működik

if LO(GetVersion) >= 6

esetén sem (az utolsó else ágat elhagytam).

Mi lehet a gond?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...