473,395 Members | 1,452 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,395 software developers and data experts.

Please help,savefiledialog?

Hi guys. The below code saves the video into specific folder and specific name. I would like to replace
Expand|Select|Wrap|Line Numbers
  1. Dim destination As String = "C:\Users\Emily\Desktop\Video.mpg"
to
Expand|Select|Wrap|Line Numbers
  1. savefiledialog
method so that the user can save the video into any folder and any file name they want. Can anyone please guide me, I'm new to this. Your help is much appreciated.

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.         Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
  14.         Dim destination As String = "C:\Users\Emily\Desktop\Video.mpg"
  15.         Dim compression As Integer = CvInvoke.CV_FOURCC("D", "I", "V", "X")
  16.         Dim fps As Integer = 9.5
  17.         Dim width As Integer = 640
  18.         Dim height As Integer = 480
  19.         Dim color As Boolean = True
  20.         Videoz = New VideoWriter(destination, compression, fps, width, height, color)
  21.     End Sub
  22.  
  23.     Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
  24.         imagez = Capturez.QueryFrame().Flip(Emgu.CV.CvEnum.FLIP.HORIZONTAL)
  25.  
  26.         PictureBox1.Image = imagez.ToBitmap()
  27.     End Sub
  28.  
  29.     Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
  30.         Videoz.WriteFrame(imagez)
  31.     End Sub
  32.  
  33.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  34.         Timer1.Start()
  35.         Timer2.Start()
  36.     End Sub
  37.  
  38.     Private Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.Click
  39.         Timer2.Stop()
  40.     End Sub
  41. End Class
Jun 22 '15 #1
0 1174

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:
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.