Do you need to Monitor Devices in your Machine from your Delphi Application? Don’t know where to start with ? Don’t worry. MiTec’s System Information Management Suite’s component helps to monitor your USB, Bluetooth devices or TV/monitor connection/disconnection, volumes mount/unmount, CD/DVD insert/eject with less code and we will learn how to use MiTeC_DeviceMonitor in this blog post.
Platforms: Windows.
Installation Steps:
You can easily install this Component Suite from GetIt Package Manager. The steps are as follows.
- Navigate In RAD Studio IDE->Tools->GetIt Package Manager->select Components in Categories->Components->Trail -MiTec system Information Component Suite 14.3 and click Install Button.
- Read the license and Click Agree All. An Information dialog saying ‘Requires a restart of RAD studio at the end of the process. Do you want to proceed? click yes and continue.
- It will download the plugin and installs it. Once installed Click Restart now.
How to run the Demo app:
- Navigate to the System Information Management Suite trails setup, Demos folder which is installed during Get It installation e.g) C:UsersDocumentsEmbarcaderoStudio21.0CatalogRepositoryMiTeC-14.3DemosDelphi8
- Open the DeviceMonitor project in RAD studio 10.4.1 compile and Run the application.
- This Demo App shows how to monitor the USB Devices, Storage Devices upon connection and disconnection to your machine.
Components used in MSIC DeviceMonitor App:
- TMiTeC_DeviceMonitor: Catches USB, Bluetooth devices or TV/monitor connection/disconnection, volumes mount/unmount, CD/DVD insert/eject and other events from other devices. It has events such as OnDeviceConnect, OnDeviceDisconnect, OnMessage, OnVolumeConnect, OnVolumeDisconnect to monitor the devices.
- TListBox to list the event messages upon device gets connected and disconnected other message notifications.
- TMemo to highlight the line from the list box separately for easy reading.
- TButton to save/clear the messages in the list box and for closing.
Implementation Details:
- An instance DeviceMonitor of TMiTeC_DeviceMonitor is created. During DeviceMonitorDeviceConnect, it identifies the device desc class by matching the GUID and logs the message according to the device connected.
[crayon-673faa297e391841682388/]
- Upon disconnecting, it identifies the device desc class by matching the GUID and logs the message according to the device disconnected.
[crayon-673faa297e39d355402147/]
- To monitor device custom event messages,
[crayon-673faa297e3a2921698437/]
Developers can use this MiTeC Component suite and able to monitor the devices with writing less code.