![]() |
Webcam in Delphi anzeigen lassen
Ultimator hat
![]()
Delphi-Quellcode:
//Zuerst brauchst du folgende Konstanten
const WM_CAP_DRIVER_CONNECT = WM_USER + 10; WM_CAP_EDIT_COPY = WM_USER + 30; WM_CAP_SET_PREVIEW = WM_USER + 50; WM_CAP_SET_OVERLAY = WM_USER + 51; WM_CAP_SET_PREVIEWRATE = WM_USER + 52; implementation {$R *.dfm} //Dann brauchst du noch das hier function capCreateCaptureWindow(lpszWindowName: LPCSTR; dwStyle: DWORD; x, y, nWidth, nHeight: integer; hwndParent: HWND; nID: integer): HWND; stdcall; external 'AVICAP32.DLL' name 'capCreateCaptureWindowA'; procedure TForm1.LaberLaber; //halt irgendne Prozedur, ich habs im Formcreate, damit ich gleich was seh ^^ var handle:THandle; begin handle := capCreateCaptureWindow('Video',ws_child+ws_visible, 0, 0, 320, 240, Panel1.Handle, 1); //Wie du siehst, brauchst du ein Panel in diesem Beispiel ;-) SendMessage(handle, WM_CAP_DRIVER_CONNECT, 0, 0); SendMessage(handle, WM_CAP_SET_PREVIEWRATE, 30, 0); sendMessage(handle, WM_CAP_SET_OVERLAY, 1, 0); SendMessage(handle, wm_cap_set_preview, 1, 0); end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 21:50 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz