Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am new to Delphi 2010. I am using Tmediaplayer to play wma files in a loop. I want to change the volume of tmediaplayer. I googled ways to do so but they al seem difficult. Are there an easy ways to change the volume using a trackbar. Any suggestions on where to start ?
The VCL version of TMediaPlayer does not provide any kind of volume control. You would have to resort to direct MCI commands, such as the setaudio command with the (left|right) volume set to <factor> flag. The DeviceID property will tell you the device identifier that you can send commands to while the player is active.
The FMX version of TMediaPlayer has a Volume property. FireMonkey was introduced in XE2 though, so your D2010 does not have it.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I wanna modern view of my application on old systems like windows XP. How I can do it, without use FMX?
you can use VCL components with XE10, that provide you to use Native Extended Styles.
you can check this :
http://docwiki.embarcadero.com/RADStudio/Seattle/en/VCL_Styles_Overview
or
Delphi XE2 VCL styles tutorial - how to change the style at runtime
however be carefull of which version of Delphi you are using, because embarcadero change a little bit about how the TStyleManager apply styles (pre-load, at run time, ressource... there is few way to apply it).
example :
var
StyleResource : string; // filename of the style
begin
TStyleManager.LoadFromResource(HInstance, StyleResource);
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I am developing a program in Delphi. I want this program to detect if another program X is running and close it. I've seen that you can change the name of any program with the WM_SETTEXT message and give it another
name.
Is there any way to see the real name of the program even though its name has been changed with WM_SETTEXT?
If you know the .exe filename of the desired program, you can use EnumWindows() to enumerate the available running windows. In its callback function for each HWND detected, use GetWindowThreadProcessId() and OpenProcess() to open a HANDLE to the process that owns the window, and then use GetModuleFileName/Ex(), GetProcessImageFileName(), or QueryFullProcessImageName() to retrieve its filename. Once you find the filename you are interested in, you will know which HWND(s) belong to that process, and can then close it/them as needed.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I was wondering if it is possible to interact with your computer through Lua (Through SciTE or Sublime Text, I suppose...)? For instance, can you play a .mp3, or open a file with Lua?
Yes, through the use of the operating system library os.
You can use os.execute([command]) to run any command from the host operating system's shell (think terminal or command prompt).
There's more information on using this library in the Lua online reference manual.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am trying to write a program which will listen to the serial input from Arduino board connected via usb, and sending output to serial port (COM4). But I don't know how to get input from serial port in Delphi. I need program to listen to the port, and whenever the input comes, it should react to it. Any suggestions?
http://sourceforge.net/projects/tpapro/ is a freeware tool we've used with great success for many years.
The already suggested tpapro will probably also do it, but I myself use TComport, which I consider slightly easier to use. It will has an event property onrxchar that triggers whenever a character arrives (and several options for other kinds of packets, including ASCII linediscipline).
I use it pretty much for the same kind of stuff, albeit with microchips mcus.
I've used the Comport library of WinSoft for many... years. It´s excellent (0 bugs) and works with any version of windows.
The link is: http://www.winsoft.sk/comport.htm
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I just finish reading delphi-skinning-libraries and sptbxtoolbar-skin-change but this is not what I wanted. I'm interested in how to apply a skin on a form, just like the classic WinAmp windows :)
Any aricle or code or ideea is welcomed.
I just found Windows XP Theme Manager, i'm at work now, so i'll study it at home (I hope this is wahat I need)
Actually the former question (with a nudge at VCLSkin) is exactly what you need -- don't get suggested too much by the fact that all the examples look like MSWindows -- the skinning behind them allows for any image-based GUI.
The only alternative is ditching the Forms altogether and building your skin from ground up using WinAPI. An example can be seen on flipcode (C++, but WinAPI's the same).