2006. december 25., hétfő

Display the multimedia properties from the control panel


Problem/Question/Abstract:

Display the multimedia properties from the control panel

Answer:

Displaying the multimedia properties dialog from the control panel is very easy with the following code; the secret is to know to call rundll32.


begin
  // Audio
  WinExec('rundll32 shell32.dll,Control_RunDLL MMSys.cpl,,0', SW_SHOW);
  // Video
  WinExec('rundll32 shell32.dll,Control_RunDLL MMSys.cpl,,1', SW_SHOW);
  // Midi
  WinExec('rundll32 shell32.dll,Control_RunDLL MMSys.cpl,,2', SW_SHOW);
  // CD Music
  WinExec('rundll32 shell32.dll,Control_RunDLL MMSys.cpl,,3', SW_SHOW);
end

Nincsenek megjegyzések:

Megjegyzés küldése