Hi everyone. Please could anyone tell me where I am going wrong in this code. I have a webcam connected that captures the a pic through this code. When I execute the code it does not save it to the file and folder path I have set. It comes up with the c:\my Documents Save dialog box.
(Code)
Private Sub mnuSaveFrame_Click()
Dim FileName As String
Dim retVal As Boolean
retVal = VBGetSaveFileName(FileName = "c:\Program files\Sg\Pic Men\Men1.bmp", _
filter:="DIB Bitmap Files (*.bmp)|*.bmp", _
DlgTitle:="Save Picture", _
DefaultExt:="bmp", _
Owner:=Me.hWnd)
If False <> retVal Then
retVal = capFileSaveDIB(hCapWnd, FileName)
If True <> retVal Then
MsgBox "Problem saving frame", vbInformation, App.Title
End If
End If
End Sub
Thanks
12 7309
I don't know if that's for VB6 (haven't used a save dialog like that before), but shouldn't the Get be Set in VBGetSaveFilename?
EDIT: Are you saying that' you're controlling a cam through VB? If so, could you please let me know how you're managing to do so? ><
I have been able to sort it out. My new code is this :
(code)VB
Private Sub mnuSaveFrame_Click()
Dim FileName As String
Dim retVal As Boolean
retVal = VBGetSaveFileName(FileName, _
filter:="DIB Bitmap Files (*.bmp)|*.bmp", _
DlgTitle:="Save Picture", _
InitDir:="c:\program files\sg\pic men", _
DefaultExt:="bmp", _
Owner:=Me.hWnd)
If False <> retVal Then
retVal = capFileSaveDIB(hCapWnd, FileName)
If True <> retVal Then
MsgBox "Problem saving frame", vbInformation, App.Title
End If
End If
End Sub
I have vb Initialise the cam and then use this script to save the image to a dir. Was that your question?
I have been able to sort it out. My new code is this :
(code)VB
Private Sub mnuSaveFrame_Click()
Dim FileName As String
Dim retVal As Boolean
retVal = VBGetSaveFileName(FileName, _
filter:="DIB Bitmap Files (*.bmp)|*.bmp", _
DlgTitle:="Save Picture", _
InitDir:="c:\program files\sg\pic men", _
DefaultExt:="bmp", _
Owner:=Me.hWnd)
If False <> retVal Then
retVal = capFileSaveDIB(hCapWnd, FileName)
If True <> retVal Then
MsgBox "Problem saving frame", vbInformation, App.Title
End If
End If
End Sub
I have vb Initialise the cam and then use this script to save the image to a dir. Was that your question?
It does not use the default cam software, it is completely standalone operational vb application. Can also create AVI etc.
Well done with getting it to work. :)
It does not use the default cam software, it is completely standalone operational vb application. Can also create AVI etc.
That's what I was wondering how you did. I mean, what the code for initializing it is, and getting a current image from it.
I've been trying to do this, but I've only managed a measly 5 FPS or so, because it copies it to the clipboard, then loads that in a PictureBox, then you can save it.
So if you could show me what code you use, I would be very grateful! ^^;;
I would have to email you the sample application to do show you, can you send me your email address?
I would have to email you the sample application to do show you, can you send me your email address?
Thanks! Well, you should be able to on my profile, but I just tested that, and it says that I've chosen not to share my email address, even though that's not true.
So you can use this link to upload it directly to my server if you like
(Link will only work for a few hours, for safety reasons ^-') http://robbi-985.homeip.net:8000/tempupload.html
Thanks! Well, you should be able to on my profile, but I just tested that, and it says that I've chosen not to share my email address, even though that's not true.
So you can use this link to upload it directly to my server if you like
(Link will only work for a few hours, for safety reasons ^-') http://robbi-985.homeip.net:8000/tempupload.html
Hi,
Did it for you and also a txt file called wernerh for you to read.
Cheers
Hi,
Did it for you and also a txt file called wernerh for you to read.
Cheers
Thanks very much! =D
Now all I've gotta do is filter through all the code to find what I need, and try to understand it. --;
By the way, I'm using it to control a robotic arm using a camera. If I manage, I'll upload a video of it to YouTube or somewhere like that. ;)
Hi,
I'm also interested in this thread. Can you also please send me the code?!
If you'd like to send, here is my email, gbayhan@bayhanmuhendislik.com
Thank you so much...
Hi, have mailed you the source code
gbayhan your mail address comes back with error
Wernerh, i got your mail... i dont know why you get an error mail.
Thank you for your help... :)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: FlashMerlot |
last post by:
We have an ASPX (C#) webform which hosts dropdownlists, textboxes, grids,
checkboxes, etc.
The users want to:
#1 - "FREEZE" the entire webpage contents (and state)
#2 - move IE browser to...
|
by: Colleyville Alan |
last post by:
I have been working on an Access app that takes info from a file and writes
it to a spreadsheet on a form, simultaneously saving the spreadsheet to
Excel. I got the idea that the same concept...
|
by: Chris Ward |
last post by:
Capture a client window and save as a file (bmp), WindowsXP platform.
Does anyone know how to go about doing this with Managed C++ v7.1?
Maybe GDI+? DirectX?
IdeasVacuum
|
by: SWu |
last post by:
Hi all
Could someone please tell me how to receive and save the PDF that gets
submitted from an FDF form?
DETAILS
======
The server has PDF forms (i.e. FDFs) which the user can browse to and...
|
by: vbaDev |
last post by:
Hi. I am using Access 2000 and in my code I'm exporting a table into an Excel file (creating it), then the code needs to export another query into the same file (a new worksheet). So I needed both a...
|
by: Joseph I. Ceasar |
last post by:
In an earlier post, someone asked about how to save a page on the client
programmatically. I also had to solve this problem and did use Steven's
approach. It worked
great!
Now here is an...
|
by: Joseph I. Ceasar |
last post by:
In an earlier post, someone asked about how to save a page on the client
programmatically. I also had to solve this problem and did use Steven's
approach. It worked
great!
Now here is an...
|
by: keyesarone |
last post by:
Hi,
I am using VC++ 6.0 with directshow 9.0 to capture video from the
camera. Using GDI+ Bitmap class and i am saving the buffer image into
JPEG format file. When i use GDI+, i can save the...
|
by: vipergt023 |
last post by:
Hello,
Does anyone know if there is a faster way to save BMPs in C#?
Currently, I'm using this:
MemoryStream ms = new MemoryStream();
picture.Save(ms,...
|
by: ekasII |
last post by:
I'm trying to capture text input by user to file,
password = wx.TextCtrl(self.panel_1,wx.ID_ANY,pos=(230,150),size=(200,20),style= wx.TE_PASSWORD)
l__password_file = <path\file.txt>...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |