Skip to main content
A newer version of this page is available. .

Camera Preview Dialog

  • 2 minutes to read

The Camera Preview dialog allows end-users to preview the output from any camera available to the camera manager and capture an image of the currently rendered frame.

Camera Preview Dialog

The dialog includes the following UI elements:

  • The preview area which hosts a camera control;

  • The optional Gear button, which appears when the mouse pointer hovers over the camera control. The button click invokes the Settings popup menu (described below);

  • Buttons which provide image capturing and dialog management capabilities.

The Settings Popup Menu

Both the embedded into the Camera Preview dialog and standalone camera controls provide the popup menu that enables end-users to customize output settings – switch between the available cameras and select the desired camera resolution.

Settings Pop-up Menu

You can call the camera control’s ShowSettingsToolbar method to invoke this popup menu at runtime. Alternatively, you can opt to display the Gear button, which appears on hovering over the camera control, and when clicked, invokes the Settings popup menu.

Gear Button

The popup menu includes the following items:

  • The caption (labeled ‘Settings‘). Clicking it or outside the popup menu closes the menu.

  • The name of the currently accessed camera (imaging device) prefixed with ‘Device‘. Clicking this item displays the Devices submenu populated with the names of cameras (imaging devices) accessible by the camera control. Clicking a name switches to the corresponding camera, making the camera control render its output. The currently accessed camera’s name is painted on the dark gray background.

Devices Pop-up Menu

  • The currently used camera resolution prefixed with ‘Resolution‘. Clicking this item displays the Resolutions submenu populated with the resolutions supported by the selected camera. Clicking the desired resolution in this list applies it to this camera. The currently used camera resolution is painted on the dark gray background.

Resolution Pop-up Menu

The table below lists members and resource strings that affect the characteristics of the Camera Preview dialog:

Visibility

The dxShowCameraDialog overloaded function declared in the dxCameraDialog unit.

Image editors (TcxImage, TcxDBImage, TcxBlobEdit, and TcxDBBlobEdit customized to display images) provide the capability to invoke the Camera Preview dialog by clicking the “Assign From Camera…” item in their context menu. An image captured with this dialog can then be assigned to the editor.

Localization

The sdxCameraDialogAssign, sdxCameraDialogCancel, sdxCameraDialogCaption, sdxCameraDialogPause, and sdxCameraDialogPlay resource strings.

To localize the Settings popup menu, use the sdxCameraControlSettingsFormSettings, sdxCameraControlSettingsFormDevice, sdxCameraControlSettingsFormDevices, sdxCameraControlSettingsFormResolution, and sdxCameraControlSettingsFormResolutions resource strings.