473,394 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

PLEASE HELP....savefiledialog????

I'm trying to save my video using savefiledialog but i have no idea how to modify the code -> Dim destination As String = "C:\Users\Emily\Desktop\Video.mpg" into savefiledialog method where the user can choose to save in any folder and name the video to any name they want.

Can anyone please help me out? :(



------------------------------------------------------------

Expand|Select|Wrap|Line Numbers
  1. Imports Emgu.CV
  2. Imports Emgu.Util
  3. Imports Emgu.CV.Structure
  4. Imports System.IO
  5. Imports System.IO.Ports
  6.  
  7. Public Class Form2
  8.     Dim Capturez As Capture = New Capture(0)
  9.     Dim Videoz As VideoWriter
  10.     Dim imagez As Image(Of Bgr, Byte)
  11.  
  12.     Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  13.  
  14.  Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
  15.         Dim destination As String = "C:\Users\Emily\Desktop\Video.mpg"
  16.         Dim compression As Integer = CvInvoke.CV_FOURCC("D", "I", "V", "X")
  17.         Dim fps As Integer = 9.5
  18.         Dim width As Integer = 640
  19.         Dim height As Integer = 480
  20.         Dim color As Boolean = True
  21.         Videoz = New VideoWriter(destination, compression, fps, width, height, color)
  22.  
  23.  End Sub
  24.  
  25.     Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
  26.  
  27.      imagez = Capturez.QueryFrame().Flip(Emgu.CV.CvEnum.FLIP.HORIZONTAL)
  28.  
  29.         PictureBox1.Image = imagez.ToBitmap()
  30.  
  31.  End Sub
  32.  
  33.     Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
  34.  
  35.      Videoz.WriteFrame(imagez)
  36.  
  37.   End Sub
  38.  
  39.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  40.  
  41.         Timer1.Start()
  42.         Timer2.Start()
  43.  
  44.     End Sub
  45.  
  46.     Private Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.Click
  47.  
  48.         Timer2.Stop()
  49.  
  50. End Sub
  51.  
  52. End Class
Jun 22 '15 #1
0 954

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: m3ckon | last post by:
Hi there, had to rush some sql and am now going back to it due to a slow db performance. I have a db for sales leads and have created 3 views based on the data I need to produce. However one...
6
by: James Walker | last post by:
Can some one help I get an error of 'checkIndate' is null or not an object can someone please help. I can't work out why Thanks in advance James <form> <td height="24" colspan="7"...
0
by: Kurt Watson | last post by:
I’m having a different kind of problem with Hotmail when I sign in it says, "Web Browser Software Limitations Your Current Software Will Limit Your Ability to Use Hotmail You are using a web...
1
by: David Goodyear | last post by:
At the moment im experimenting with ideas in C++ and would really like to solve the following, please please help. Sorry i dont even know what the subject is this would come under? :( Sorry if...
7
by: Alan Bashy | last post by:
Please, guys, In need help with this. It is due in the next week. Please, help me to implement the functions in this programm especially the first three constructor. I need them guys. Please, help...
6
by: Rik | last post by:
Hello Experts, I have a communication server in VB.NET. It was working fine from last 6 months, but now start giving error message like that. 21-03-2005 07:58:27...
1
by: Steve | last post by:
Hi, I've asked this question a couple of times before on this forum but no one seems to be nice enough to point me to the right direction or help me out with any information, if possible. Please...
6
by: jenipriya | last post by:
Hi all... its very urgent.. please........i m a beginner in oracle.... Anyone please help me wit dese codes i hv tried... and correct the errors... The table structures i hav Employee (EmpID,...
0
by: serefina | last post by:
Hi guys. The below code saves the video into specific folder and specific name. I would like to replace Dim destination As String = "C:\Users\Emily\Desktop\Video.mpg" to savefiledialog method so that...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.