$TYPECHECK ON
$OPTION icon "logo_kamerka.ico"
application.title = "KAMERKA"
$INCLUDE "QCOM_PORT.INC"
$INCLUDE "QLVALIGNMENT.INC"
$RESOURCE bmp_ok AS "bmp_ok.bmp"
TYPE BITMAPINFOHEADER
biSize AS LONG
biWidth AS LONG
biHeight AS LONG
biPlanes AS INTEGER
biBitCount AS INTEGER
biCompression AS LONG
biSizeImage AS LONG
biXPelsPerMeter AS LONG
biYPelsPerMeter AS LONG
biClrUsed AS LONG
biClrImportant AS LONG
END TYPE
CONST crlf = CHR$(13)
CONST WS_VISIBLE = &H10000000
CONST WS_CHILD = &H40000000
CONST WS_MAXIMIZE = &H1000000
CONST WM_USER = &H400
CONST WM_CAP_START = WM_USER
CONST WM_CAP_SET_CALLBACK_ERROR = WM_CAP_START + 2
CONST WM_CAP_DRIVER_CONNECT = WM_CAP_START + 10
CONST WM_CAP_DRIVER_DISCONNECT = WM_CAP_START + 11
CONST WM_CAP_FILE_SET_CAPTURE_FILE =WM_CAP_START + 20
CONST WM_CAP_FILE_SAVEAS = WM_CAP_START + 23
CONST WM_CAP_FILE_SAVEDIB = WM_CAP_START + 25
CONST WM_CAP_EDIT_COPY = WM_CAP_START + 30
CONST WM_CAP_DLG_VIDEOFORMAT = WM_CAP_START + 41
CONST WM_CAP_DLG_VIDEOSOURCE = WM_CAP_START + 42
CONST WM_CAP_DLG_VIDEODISPLAY = WM_CAP_START + 43
CONST WM_CAP_GET_VIDEOFORMAT = WM_CAP_START + 44
CONST WM_CAP_DLG_VIDEOCOMPRESSION = WM_CAP_START + 46
CONST WM_CAP_SET_PREVIEW = WM_CAP_START + 50
CONST WM_CAP_SET_PREVIEWRATE = WM_CAP_START + 52
CONST WM_CAP_SET_SCALE = WM_CAP_START + 53
CONST WM_CAP_GRAB_FRAME = WM_CAP_START + 60
CONST WM_CAP_SEQUENCE = WM_CAP_START + 62
DIM hCamWnd AS INTEGER
DIM MyPort AS QComport
DIM TimerPort AS QTIMER
DIM fntScreen AS QFONT
fntScreen.Name = "Arial"
fntScreen.COLOR = RGB(&H00, &H00, &H99)
DIM frmKamerka AS QFORM
DIM pnlScreen AS QPANEL
DIM mnuKamerka AS QMAINMENU
DIM mnuFile AS QMENUITEM
DIM mnuOptions AS QMENUITEM
DIM mnuPause1a AS QMENUITEM
DIM mnuHelp AS QMENUITEM
DIM mnuAbout AS QMENUITEM
DIM mnuPause1b AS QMENUITEM
DIM mnuExit AS QMENUITEM
DIM mnuVideo AS QMENUITEM
DIM mnuRecord AS QMENUITEM
DIM mnuStop AS QMENUITEM
DIM mnuPause2a AS QMENUITEM
DIM mnuFormat AS QMENUITEM
DIM mnuSource AS QMENUITEM
DIM mnuCompression AS QMENUITEM
DIM mnuDisplay AS QMENUITEM
DIM mnuImage AS QMENUITEM
DIM mnuSave AS QMENUITEM
DIM mnuCopy AS QMENUITEM
DIM mnuCompare AS QMENUITEM
DIM frmSet AS QFORM
DIM btnSetOK AS QBUTTON
DIM btnSetCancel AS QBUTTON
DIM tabSet AS QTABCONTROL
DIM pnlSet0 AS QPANEL
DIM lblLang AS QLABEL
DIM cbxLang AS QCOMBOBOX
DIM lblPort AS QLABEL
DIM cbxPort AS QCOMBOBOX
DIM lblFormatSize1 AS QLABEL
DIM lblFormatSize2 AS QLABEL
DIM pnlSet1 AS QPANEL
DIM pnlSet2 AS QPANEL
DIM lblSetSaveAs AS QLABEL
DIM cbxSetSaveAs AS QCOMBOBOX
DIM lblSetQuality AS QLABEL
DIM cbxSetQuality AS QCOMBOBOX
DIM chbConfirmDelete AS QCHECKBOX
DIM lblSetPath AS QLABEL
DIM btnSetPath AS QCOOLBTN
DIM ediSetPath AS QEDIT
DIM frmCompare AS QFORM
DIM btnCancel AS QBUTTON
DIM gbxCompare1 AS QGROUPBOX, gbxCompare2 AS QGROUPBOX
DIM lviCompare1 AS QLISTVIEW, lviCompare2 AS QLISTVIEW
DIM pnlCompare1 AS QPANEL, pnlCompare2 AS QPANEL
DIM pnlCompare1a AS QPANEL, pnlCompare2a AS QPANEL
DIM dtrCompare1 AS QDIRTREE, dtrCompare2 AS QDIRTREE
DIM pnlCompare1b AS QPANEL, pnlCompare2b AS QPANEL
DIM imgCompare1 AS QIMAGE, imgCompare2 AS QIMAGE
DIM popCompare AS QPOPUPMENU
DIM popDelete AS QMENUITEM
DIM popRename AS QMENUITEM
DIM frmDirectory AS QFORM
DIM dirTree AS QDIRTREE
DIM pnlDirectory AS QPANEL
DIM btnDirectoryOK AS QBUTTON
DIM btnDirectoryCancel AS QBUTTON
DIM frmRename AS QFORM
DIM lblRename AS QLABEL
DIM ediRename AS QEDIT
DIM btnRenameOK AS QBUTTON
DIM btnRenameCancel AS QBUTTON
DECLARE FUNCTION SetWindowLong LIB "User32" ALIAS "SetWindowLongA" (hwnd AS _
LONG, nIndex AS LONG, dwNewLong AS LONG) AS LONG
DECLARE FUNCTION SetFocus LIB "user32" ALIAS "SetFocus" (hwnd AS LONG) AS LONG
DECLARE SUB GetVideoSize
DECLARE SUB frmKamerka_OnShow
DECLARE SUB frmKamerka_OnClose (Action AS INTEGER)
DECLARE SUB frmKamerka_OnResize
DECLARE SUB mnuHelp_OnClick
DECLARE SUB mnuAbout_OnClick
DECLARE SUB mnuExit_OnClick
DECLARE SUB mnuRecord_onClick
DECLARE SUB mnuStop_OnClick
DECLARE SUB mnuSource_OnClick
DECLARE SUB mnuFormat_OnClick
DECLARE SUB mnuCompression_OnClick
DECLARE SUB mnuDisplay_OnClick
DECLARE SUB mnuSetup_OnClick
DECLARE SUB mnuOptions_OnClick
DECLARE SUB mnuSave_OnClick
DECLARE SUB mnuCopy_OnClick
DECLARE SUB mnuCompare_onClick
DECLARE SUB btnSetOK_onClick
DECLARE SUB tabSet_OnChange
DECLARE SUB TimerPort_OnTimer
DECLARE SUB cbxLang_OnChange
DECLARE SUB cbxPort_OnChange
DECLARE SUB cbxSetSaveAs_onchange
DECLARE SUB frmSet_OnShow
DECLARE SUB btnSetPath_OnClick
DECLARE SUB frmCompare_onShow
DECLARE SUB dtrCompare1_OnChange
DECLARE SUB dtrCompare2_OnChange
DECLARE SUB lviCompare1_OnChange
DECLARE SUB lviCompare2_OnChange
DECLARE SUB popDelete_OnClick
DECLARE SUB popRename_OnClick
DECLARE SUB ediRename_onKeyUp (Key AS WORD)
DECLARE SUB btnRenameOK_OnClick
IF FILEEXISTS (pnlScreen.Hint + "\NViewLib.dll") = 0 THEN
DECLARE FUNCTION NViewSaveAsJPG LIB "NViewLib.dll" ALIAS "NViewLibSaveAsJPG" _
(Quality AS INTEGER, FileName AS STRING) AS INTEGER
DECLARE FUNCTION NViewLoad LIB "NViewLib.dll" ALIAS "NViewLibLoad" _
(FileName AS STRING, Progress AS INTEGER) AS LONG
END IF
IF FILEEXISTS (pnlScreen.Hint + "\jpeg.dll") = 0 THEN
DECLARE FUNCTION LoadImageFile LIB "jpeg.dll" ALIAS "LoadImageFile" _
(hWnd AS LONG, file$ AS STRING) AS INTEGER
END IF
DECLARE FUNCTION DeleteObject LIB "gdi32" ALIAS "DeleteObject" (hObject AS LONG) AS LONG
DECLARE FUNCTION sendmessagex LIB "user32" ALIAS "SendMessageA" (BYVAL _
hwnd AS LONG, BYVAL wmsg AS LONG, BYVAL wparam AS LONG, BYVAL lparam _
AS LONG) AS LONG
DECLARE FUNCTION capCreateCaptureWindow LIB "avicap32.dll" ALIAS "capCreateCaptureWindowA" _
(BYVAL lpszwindowname AS STRING, _
BYVAL dwstyle AS LONG, _
BYVAL left AS LONG, _
BYVAL top AS LONG, _
BYVAL nwidth AS LONG, _
BYVAL nheight AS LONG, _
BYVAL hwndparent AS LONG, _
BYVAL nid AS LONG) AS LONG
DECLARE SUB MyPort_OnOpen
DECLARE SUB MyPort_OnReadString
$INCLUDE "frm_kam.bas"
$INCLUDE "mnu_kam.bas"
$INCLUDE "frm_set.bas"
$INCLUDE "frm_com.bas"
$INCLUDE "frm_dir.bas"
$INCLUDE "frm_ren.bas"
frmKamerka.SHOWMODAL
|