Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to alter settings from windows configuration using VFP?

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
NL
Hi!
At home I am having a PC connected to my TV-set as well as to my Music amplifier.
That PC is for playing films music etc. Films and music are on a network server.
In normal the PC is connected using HDMI to the TV-set.
That's OK for both audio and vido playing using the TV.
Audio from PC-out goes through Amplifier-in. This gives good result but....
The PC can only serve one output a time HDMI OR audio-out.

I have to do the change using the windows-configuration > Sound.
Now I want to make life more easy for others using this equipment by doing changes with more user-friendly interface like e.g. VFP.

This must be possible (imho) using API's. But where to find those and how will the syntax be for using those?

Any idea where to find docu about that?

TIA

-Bart
 
This script is not meant for general use, it's just a sample working for Hastarin (a contributor there).

Check out it enables you to automate a PC in a way simulating keyboard and mouse events. The generated scripts often only work with a certain screen resolution, therefore not very elegant, but would be a solution to so to say "auto-interactively" change the output device.

Bye, Olaf.
 
Bart,

You might also want to take a look at AutoIT ( which should let you do what you want.

Normally, I would agree with Olaf's point about not overriding the user's choice for this setting. But since this is something you are doing for your own convenience on your own system, I don't see that being a problem.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Both Olaf and Mike,

Thanks for your feedback.I'm sure I can make my very small app using this basic info.
And yes, I fully agree not to change windows-setting from within an app.
But this is a more easy way for users to control one specific sound-setting (being kind of replacement for the config screen for this specific setting).

-Bart
 
Hallo Olaf, Mike,
I got this question too. I've found the 'waveOutSetVolume' function in de Win32 functions. But I do not know how this can be used in Foxpro.
(Link to the function: Can this function be used? Maybe you guys have any idea. Thanks in advance.
John Vermeulen (Holland)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top