Click here to Skip to main content
16,005,697 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralLoad a file from a list to a text box Pin
Anonymous10-Nov-03 2:28
Anonymous10-Nov-03 2:28 
GeneralRe: Load a file from a list to a text box Pin
rahul_apte8110-Nov-03 7:36
rahul_apte8110-Nov-03 7:36 
GeneralDB location string + SQL qweries Pin
xelk9-Nov-03 16:59
xelk9-Nov-03 16:59 
GeneralRe: DB location string + SQL qweries Pin
Vasudevan Deepak Kumar9-Nov-03 20:40
Vasudevan Deepak Kumar9-Nov-03 20:40 
GeneralRe: DB location string + SQL qweries Pin
xelk10-Nov-03 5:06
xelk10-Nov-03 5:06 
GeneralRe: DB location string + SQL qweries Pin
Vasudevan Deepak Kumar10-Nov-03 17:03
Vasudevan Deepak Kumar10-Nov-03 17:03 
GeneralRe: DB location string + SQL qweries Pin
xelk11-Nov-03 3:22
xelk11-Nov-03 3:22 
QuestionHow to close video capture ..... Pin
Mohan G8-Nov-03 21:00
Mohan G8-Nov-03 21:00 
hello

i have written this application to capture video and to save the picture
into database.its working fine ... but when i try to close my application
its NOT CLOSING PERFECTLY . some times it hangs.

here is my code ....

(note : here i might have missed some code and variable ... but the application is running ...)

' in the main form module
Private Sub Form_Load()
Dim lpszName As String * 100
Dim lpszVer As String * 100
Dim Caps As CAPDRIVERCAPS ' CAPDRIVERCAPS declared in a
module
' Capture Window creation
' driver info
capGetDriverDescriptionA 0, lpszName, 100, lpszVer, 100
mywdc = capCreateCaptureWindowA(lpszName, WS_CAPTION Or WS_THICKFRAME
Or WS_VISIBLE Or WS_CHILD, 0, 0, 160, 120, Me.hwnd, 0)

' Setting the title of window
SetWindowText mywdc, lpszName
' Setting the video callback function
capSetCallbackOnStatus mywdc, AddressOf MyStatusCallback
capSetCallbackOnError mywdc, AddressOf MyErrorCallback

' Connect to the driver
If capDriverConnect(mywdc, 0) Then
' getting the capture driver capabilities
capDriverGetCaps mywdc, VarPtr(Caps), Len(Caps)

' Start previewing the image
capPreview mywdc, True

' resizing the widow to the whole image
ResizeCaptureWindow mywdc
End If

End Sub

private sub EndAppln
' code to end the application - called in form's queryunlocad and when close menu is selected in main form
'the below given are functions declared a module and called from the main form

capSetCallbackOnError = SendMessage(lwnd,CAP_SET_CALLBACK_ERROR,0,lpProc)
capSetCallbackOnStatus = SendMessage( lwnd,CAP_SET_CALLBACK_STATUS,0,lpProc)
capSetCallbackOnYield = SendMessage(lwnd,CAP_SET_CALLBACK_YIELD,
0,lpProc)
capSetCallbackOnFrame = SendMessage(lwnd,CAP_SET_CALLBACK_FRAME,0,lpProc)
capSetCallbackOnVideoStream = SendMessage(lwnd,CAP_SET_CALLBACK_VIDEOSTREAM, 0,lpProc)
capSetCallbackOnWaveStream = SendMessage(lwnd,CAP_SET_CALLBACK_WAVESTREAM, 0,lpProc)
capSetCallbackOnCapControl = SendMessage(lwnd,CAP_SET_CALLBACK_CAPCONTROL, 0,lpProc)

capCaptureStop (mywdc)
capDriverDisconnect (mywdc)
DestroyWindow (mywdc) ' here the API declared in the module,
called
UnLoad Me
End
End Sub

any one please suggest any changes to be made to my application
TO SAFELY CLOSE MY APPLICATION AND PLESE SUGGEST HOW TO OPTIMIZE MY APPLICATION (AS IT TAKES MUCH MEMORY AND PROCESOR TIME) TO MAKE SURE THE APPLICATION RUN SMOOTHLY ... doh:

Thanks in advance:

Mohan G
Questionadvise if UML design patterns should be considered? Pin
bnathvbdotnet8-Nov-03 14:36
bnathvbdotnet8-Nov-03 14:36 
AnswerRe: advise if UML design patterns should be considered? Pin
Dave Kreskowiak9-Nov-03 20:16
mveDave Kreskowiak9-Nov-03 20:16 
GeneralCompare & Analyze Pixels Pin
ariez8-Nov-03 1:55
ariez8-Nov-03 1:55 
GeneralConnecting through OleDbConnection Pin
Tasnim8-Nov-03 1:53
Tasnim8-Nov-03 1:53 
GeneralRe: Connecting through OleDbConnection Pin
percyvimal9-Nov-03 16:45
percyvimal9-Nov-03 16:45 
GeneralCapturing Events in Netscape (BeforeNavigate) Pin
Iyad Marzouka7-Nov-03 22:00
Iyad Marzouka7-Nov-03 22:00 
GeneralRe: Capturing Events in Netscape (BeforeNavigate) Pin
Dave Kreskowiak9-Nov-03 20:34
mveDave Kreskowiak9-Nov-03 20:34 
GeneralHide an inherited property Pin
rochester_tw7-Nov-03 10:12
rochester_tw7-Nov-03 10:12 
GeneralRe: Hide an inherited property Pin
Dave Kreskowiak9-Nov-03 20:21
mveDave Kreskowiak9-Nov-03 20:21 
GeneralRe: Hide an inherited property Pin
Anonymous11-Nov-03 3:50
Anonymous11-Nov-03 3:50 
GeneralRe: Hide an inherited property Pin
Dave Kreskowiak11-Nov-03 5:25
mveDave Kreskowiak11-Nov-03 5:25 
GeneralRe: Hide an inherited property Pin
Anonymous13-Nov-03 3:07
Anonymous13-Nov-03 3:07 
GeneralConnect from DataGrid to Detail Pin
wvjim7-Nov-03 6:13
wvjim7-Nov-03 6:13 
GeneralRe: Connect from DataGrid to Detail Pin
Mike Ellison7-Nov-03 9:58
Mike Ellison7-Nov-03 9:58 
GeneralGetting a Form from a window Handle Pin
koatto7-Nov-03 3:32
koatto7-Nov-03 3:32 
GeneralRe: Getting a Form from a window Handle Pin
Dave Kreskowiak10-Nov-03 4:38
mveDave Kreskowiak10-Nov-03 4:38 
GeneralRe: Getting a Form from a window Handle Pin
koatto10-Nov-03 4:52
koatto10-Nov-03 4:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.