How to access camera on a Windows tablet with Firemonkey? - delphi

Like I wrote in the title, I want to take pictures from a Windows tablet, but do not found how do it.
Firemonkey is supposed to allow the multi-platform development, but everything I found to take pictures is working only on Android and iOS.
The sample given by Embarcadero here does not works on Windows, it appears that Windows do not recognize the event TakePhotoFromCameraAction1 because any button with this action does not appears on the form.
I also tried this one, and 2 others called CameraComponent and WebcamExample, I do not remember where I found them, but nothing works.
I thought to try to access directly to the Windows' Camera application, like as the first answer here for the touch keyboard, but I do not found the .exe.
I am using Delphi XE8, and the target platform is Win32. Can someone help me on it ?
The device is the Fieldbook K80 : logic-instrument.com/en/fieldbook-k80.php

I found a way to use the Windows Camera, perhaps someone else may be interested. I execute a Windows command to launch the camera app thanks to the library Winapi.ShellAPI :
ShellExecute(0, 'OPEN', PChar('microsoft.windows.camera:'), '', '', 1);
Thanks to this post in C# : Run Camera App of Windows 10 from Desktop Application

Related

Delphi OpenPictureDialog behave different on different app

I'm using Delphi 10.1 on Windows 10
When I run the OpenPictureDialog.Execute command
on some app it's open File Explorer with a preview area and on others without.
I have exactly the same properties on both cases.
What can cause the difference?
Thanks Sorin
function GetOpenFileName; external commdlg32 name 'GetOpenFileNameA';
function GetOpenFileNameA; external commdlg32 name 'GetOpenFileNameA';
function GetOpenFileNameW; external commdlg32 name 'GetOpenFileNameW';
In older versions on Delphi it used a Windows API function in comdlg32.dll to open a file. I would think it is the same in newer versions. What you see in terms of preview etc. is down to Windows settings.
The dialog shows to the user will be consistent with other file open dialogs they see on their system.

How to Update Look and Feel of Older Windows User Interface?

I have a really solid computer program that was written for Windows XP. The program still works great and I would like to update the look and feel of the user interface.
At this time, I would like to give the buttons etc. a more sleek, contemporary look. Much better would be to allow functionality of touch and swipe etc. for tablets and such.
Can anyone tell me what tools in Delphi are used to accomplish this? For instance, do I need to change every button and object manually through object inspector or can I update/modify all objects objects within a project using a single set of commands?
You can start by enabling Windows themes, using Project->Options->Appearance from the IDE's main menu. It's on by default since D2007, but won't be on because your app is coming from Delphi 5. (New projects have it turned on by default, but the IDE can't know if you want it enabled or not when importing older projects.)
You can then start looking at adding gesture support by looking into the documentation for TGestureManager and TGesture. There's a TGestureManager for both VCL and FireMonkey (FMX) applications.
Note that for cross-platform support (Android, iOS, and OS X) you'll need to port your application from the VCL to FMX.

Integrate with camera on Windows 8 Tablet

We would like to integrate the device camera into an application written in Delphi. The device is a Dell Windows 8 tablet. What we need is quite simple. A button would launch the camera, passing a file name for the stored image. Once the picture is taken, and stored in the specified file name, control would pass back to our application. Having control go back to the Delphi app is not as important; we could write a loop to look for it and have it come to front once it is found.
What would be the simplest way to accomplish this?
Can the camera be called passing a filename parameter?
Windows comes with WIA, Window Image Acquisition which can be used for this.
Here are some Delphi specific links:
Delphi: WIA to take image from digital Camera connected to USB
How to control a camera with Delphi
http://www.neunbeere.de/UseNet/WIA.html

Tray icon can't be clicked when running Delphi program as Citrix seamless application

I use the Jedi library and the component JvTrayIcon. It works fine. But when the program is run as a Citrix seamless application, the program doesn't receive any click events.
I have search a lot but found only something about task bar icons and Delphi (Borland). I use Delphi 2010.
Has anyone experience with this problem?
--Martin
Instead of using the jvcl tray icon, I suggest using the built in Delphi TTrayIcon.

delphi webcam capture : why does it not work on laptop?

I have tried many webcam components for delphi XE (Tcamera, TJVAviCapture, sources codes I found...) Mostly of them work on my desktop computers, but does not work on my maptop (tested with 2 laptops).
They open this source video window, and then webcam panel.
Some of them work in DELPHI IDE but not in .exe generated by delphi !
Does someone know a reliable component (or a snippet) that simply display the webcam on any laptop or dektop without showing that video source window ?
Regards
I've been using the Mitov Video Library for several years to do this sort of thing and am very happy with it. It's run my webcam application on many hundreds laptops and desktops all over the world without any problems. Free for non-commercial use. Regularly updated. Good support. Source code available.
http://www.mitov.com/screenshots/videolab

Resources