I needed a control with Run, Stop and Step buttons and thought I would put a TMediaPlayer to work. It has the buttons I need and I can control the enables and use of colour.
If I drop one onto a form and compile and run - the buttons are all disabled. I unchecked the AutoEnable property and now the buttons are enabled when I run, but as soon as I click any of them I get an error No MCI Device Open.
I get that it's a media player and I haven't told it anything about any media, but is there a way of getting it to run in a media-free environment?
If your question is whether you can use TMediaPleyer buttons to control other things then I'm afraid the answer is NO.
The mentioned buttons are part of TMediaPlayer component itself and are only designed to control the Media Control Interface (MCI) driver.
Their purpose is to make working with MCI driver much easer as you don't need to link bunch of your buttons to the TMediaPleyer component as you would have to do otherwise.
So I'm afraid you will have to make your own set of buttons to do your thing.
You might want to learn about TRadioButton to see how to group multiple buttons together in a way so that only one of them can be pressed down at one time to mimic some functionality of TMediaPlayer buttons.
I want to automate login to a website.
The application is cross-platform, therefore I use Firemonkey.
The solutions for the old TWebbrowser unfortunately, don't work anymore.
And I don't know how to click buttons, fill in forms, read data with FMX.TVWebbrowser.
How to do it?
I want to show a video from youtube in my form, so I put a TWebBrowser and linked to a youtube video, the video shows fine but the user can scroll the webBrowser. How can I block this function? I found nothing on the Object Inspector.
edit: I found this code: WebBrowser1.OleObject.document.body.Scroll := 'no'; but looks like this is for desktop projects, not mobile... or I'm missing some Units on uses?
I'm trying to activate Hint from control of different application created from delphi upon focus, I'm using hook to identify the focused control, and then use WM_MOUSEMOVE, which I think will activate the Hint of that control, the handle would be the Control itself and the lParam is the Left and Top of the Control. The Control activate the OnMouseMove Event, but the Hint never shows. but when I use SetCursorPos, Hint show, but I need to show the Hint with out the cursor move on that Control. Can you please help me with this? Thank you in advance... by the way I'm using Delphi XE4
Among the really asked question is how to show the hint of a control that resides on another application (i am afraid without hook that application can not be done), the title is "Delphi - Activating the Hint from another control of Application".
First is first: That can be done without knowing what language the other app was done, but it is very complex to put it here (and i am not an expert on such way of coding, also i hate apps that work that way).
Second: The main idea is to hook the other application, search on Google some code of that apps, that can show you a rectangular hole square of the object the mouse is passing over, that application while doing it is iconized (i do not remember the name of it).
Waht such app does: As you move the mouse over the screen it overlays a rectangular over the control that mouse is over, then if you press the key to print screen, that small region is the only thing that goes to clipboard; on of such apps i saw had an extra funcion, they can move such controls if you press cursors on keyboard, also can hide/enable/disable such control... more, it can also make controls that are invisible to be visible, etc... i saw it working on my computer, and hey, for fun it is pretty and to DeBug or get extra things on some apps is also great (make some menĂºs to be visible and enabled and then can use such funtions).
Please, please, understand i am agaist piracy and also against using such apps to let code to be run... some apps need pay for letting some menus enabled, but they have the code there, no need to change EXE to have/use that menus; just using this kind of apps makes that limited apps to be unlimited (just enable or show hidden menus and voila).
Note: To unhide menus, mouse point is not needed to be over the app, can be anywhere and is not moved.
The idea i want to say is: Any app can move, alter any control on any other app (at least on Windows) that is running, so maybe there can be a way to show such hint.
In the past i had use such app (sorry i do not remember the name) for DeBug my own apps, so i do not need to recompile in such cases where something was wrongly hidden, also work with buttons, labels, texts, combos, memos, etc.
Now my small problem is: I just need exactly what title say, but i can not make it to work.
Must be:
Mouse position must be irrelevant (it also must be able to be outside the application)
Just when a button that has focus is pressed with keyboard (Space or Enter) or just after some code somewhere on my application, i want to show the Hint of a specific TEdit for a short period of time.
I did not get Hint to be shown; not unless mouse point is over such TEdit but i want/need mouse pointer to not be over it, neither it to jump to the TEdit.
Idea Conept for that Hint to be shown: After doing some code that changes something, show extra info associated.
Example:
A button with that loads a file using an open dialog, filename is put on a ReadOnly TEdit (so it let user copy the text, but not change it); i want extra info that i punt on .Hint of such TEdit to be shown inmediatly.
That hint use is for not overload window with a lot of fields (TLabels) for showing such file data.
Simple idea: such Hint shows TimeStamp and size of the selected file.
P.D.: Not much related (since i am trying with a normal plain text hint), but hints can also store a full HTML page and with 3rd party tools be shown as an HTMLhint, so they can show a lot info of that file (also its content, etc) in a web based format; as i say i first try with standard plain text hints.
In order to show hint programatically you need to call TApplications ActivateHint method to which you specify the position parameter.
http://docwiki.embarcadero.com/Libraries/XE3/en/Vcl.Forms.TApplication.ActivateHint
Based on position parameter Application automatically finds which controll is at that position and shows its hint.
NOTE: Position parameter screen coordinates in pixels and not your controll coordinates. So you will have to use ClientToScreen method to change your coordinates apropriately.
You can see simple example of how to use this here: https://stackoverflow.com/a/15031208/3636228
Now if you need to do this from another application then you will have to add some comunication mechanizm to these two application so that one could send a proper message to tell the other to show the hint at specific position. But this does require you to be able to change both applications.
EDIT: This works with VCL applications but I'm not sure if it would work with FireMonkey applications.
I have a Windows Phone 8.1 app. I have a webview and a TextBox in same grid on a page. TextBox is for copying text to clipboard so the user has to interact with it to copy the text. I am using the visibility.collapsed to Show the webview or to collapse it and Show the TextBox.
The Problem occurs when I use the webview and then collaps it and Show the TextBox, I can't interact with the TextBox any more. I can tap on it and it Looks like focused but I can't interact with it. I can't copy the text or mark it for copy. I must also say that a messagebox appears when switching from webview to TextBox (I did this). maybe this is impoortant for you.
How can I bring the TextBox's functionality back? And the funny Thing is that sometimes (rarely) it works. But when it is not working any more than it doesn't work until you Close the app completely and open it again.