|
I have written an application in VB.NET that downloads FLV videos from a website. I can download and save the videos just fine and all works well. Now I would like to have the option to convert the videos to an AVI format and save them that way. Does anyone know how to accomplish this. I was thinking something along the lines of FFMpeg but I don't want to run a seperate process from my application. If I could import a DLL or something and do it that way it would be great. Any help is greatly appreciated!
|
|
|
|
|
I haven't used any libraries like this, but you may want to take at look through this[^] list.
|
|
|
|
|
i tried the below code but need some more specefic..........
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.ofd1.Filter = "Text Files|*.txt|All Files|*.*"
Me.ofd1.Title = "Select the Text File to Open"
Me.ofd1.FileName = ""
'OpenFileDialog1.InitialDirectory = Application.ExecutablePath
If Me.ofd1.ShowDialog = Windows.Forms.DialogResult.OK Then
Me.txt1.Text = ofd1.FileName
Me.ReadTextFile(txt1.Text)
End If
End Sub
Private Sub ReadTextFile(ByVal sFileName As String)
Dim oSR As System.IO.StreamReader
oSR = System.IO.File.OpenText(sFileName)
Me.RichTextBox1.Text = oSR.ReadToEnd()
End Sub
|
|
|
|
|
You gotta say what it is you are trying to do, and what's stopping you.
|
|
|
|
|
So far, all you've got is a little code that reads an entire file into a Textbox. There's nothing that parses the file up into fields and mvoes it into a DataTable that you can use to bind a grid to.
You might want to take a look at this[^] to parse the CSV up into usable data.
|
|
|
|
|
sanddepnamburi wrote: need some more specefic.....
How about you be more specific about what problem you are having?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Hello all...
I am getting problem while checking date..
Code is :
dim txtdate as string
dim mydataset as new dataset
txtdate=datetimepicker1.text & now.tolongtimestring
I hv filled datagridview at loading time of form.
Now whn searching a record,my code is :
with mydataset(0).tables
.defaultview.rowfilter="[Date] like '" & txtdate & "%'"
datagridview1.defaultsource=.defaultview
end with
but it is showing an syntax error that cannot use like operator between system.datetime and system.string
Now trying this :
with mydataset(0).tables
.defaultview.rowfilter="[Date] = '" & txtdate & "'"
datagridview1.defaultsource=.defaultview
end with
but it is showing an syntax error that cannot use = operator between system.datetime and system.string
what should i do?
Help Me.
I am using VS2005 and database is in MS Access2003
"Date" field in table is of Date/Time Object.
Gagan
|
|
|
|
|
The date delimiter in Access is #, IIRC...
Maybe you can try:
with mydataset(0).tables
.defaultview.rowfilter="[Date] = #" & txtdate & "#"
datagridview1.defaultsource=.defaultview
end with
HTH
|
|
|
|
|
Gagan.20 wrote: txtdate=datetimepicker1.text & now.tolongtimestring
Look at the result of this string operation. I don't think that is what you're looking for nor is it in a format that is usable by the Filter property.
|
|
|
|
|
how to import a tab delimited text to data grid using vb.net
|
|
|
|
|
Try OLEDB - google will show loads of examples.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I need an example or code for the following:-
Anyone can help, please?
A data record to represent Car details in Shop
Purpose: To capture data as rows - in 2dimensional array of strings
Ex:
ID Model Colour Horepower
1. Make use of datagridview control without any connection to a database source
2. The data held in the datagridview should be a representation of a small file - then the data would be transfer to a text File on disk
3. Edit the file by reading it back to the datagridview.. the edits must be performed via the control and file recreate on disk
Each row in DGV will be record for the text file - concatenate all string as one before committed to disk
Therefore the single string records is decoded into the fields that match requirement of the original data record design
Thank a lot for help
|
|
|
|
|
Sorry, I don't do homework assignments.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Vinke2008 wrote: I need an example or code for the following:-
The code you're going to get is the code you write yourself. Noone is going to do youe homework for you. We'll help you, but you have to demonstrate that you actually made an attempt at the project.
|
|
|
|
|
As the others have said, do your own homework!
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Vinke2008 wrote: ID Model Colour Horepower
Yeah, I really like it when a car has a lot of horepower...
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
dancing girls, yeah dancing girls.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hai!!!
Here I am doing a object oriented program.In that we create various classes in class library.And, we add reference of the dll to the project.My doubt is I have created a new class class Maze.Which will create a maze shape in UserInterface.The content of the maze class is read from a text in the path specified.And, i have created maze using inheriting the cube class.With select the maze file content is read and if it is 'X' it creates cube and it is '0' it end the if statement.And, the File is reading correctly Character by charater.And, Finally I am getting an Exception thrown by Target of an invocation.The code I wriiten are,
Private Sub Maze()
'READING CHARACTER BY CHARACTER
'============================================
Dim intSingleChar As Integer
Dim charSingleChar As String
Dim OpenFL As FileStream = New FileStream("C:\Users\admin\Desktop\MinMini.vb\MinMini.vb\bin\Debug\Botlets\Maze.txt", FileMode.Open, FileAccess.Read, FileShare.None)
Dim ReadFL As StreamReader = New StreamReader(OpenFL)
ReadFL.Read()
CharNo = 0
While ReadFL.Peek <> -1
Do Until CharNo = OpenFL.Length
intSingleChar = ReadFL.Read
charSingleChar = Chr(intSingleChar)
Select Case CharNo
Case 0 To 16
If charSingleChar = "X" Then
bt = New Templates.Botlet.MyCube()
bt.Frame.Location = New Point3d(bt.CWidth * i, 0, 0)
Me.SubBotlets.Add(bt)
i = i + 1
End If
Case 17 To 32
If charSingleChar = "X" Then
bt = New Templates.Botlet.MyCube()
bt.Y = bt.CHeight / 2
bt.Frame.Location = New Point3d(bt.CWidth * i, 0, 0)
Me.SubBotlets.Add(bt)
i = i + 1
End If
Case 33 To 48
If charSingleChar = "X" Then
bt = New Templates.Botlet.MyCube()
bt.Y = bt.CHeight / 2
bt.Frame.Location = New Point3d(bt.CWidth * i, 0, 0)
Me.SubBotlets.Add(bt)
i = i + 1
End If
Case 49 To 64
If charSingleChar = "X" Then
bt = New Templates.Botlet.MyCube()
bt.Y = bt.CHeight / 2
bt.Frame.Location = New Point3d(bt.CWidth * i, 0, 0)
Me.SubBotlets.Add(bt)
i = i + 1
End If
Case 55 To 80
If charSingleChar = "X" Then
bt = New Templates.Botlet.MyCube()
bt.Y = bt.CHeight / 2
bt.Frame.Location = New Point3d(bt.CWidth * i, 0, 0)
Me.SubBotlets.Add(bt)
i = i + 1
End If
Case 81 To 96
If charSingleChar = "X" Then
bt = New Templates.Botlet.MyCube()
bt.Y = bt.CHeight / 2
bt.Frame.Location = New Point3d(bt.CWidth * i, 0, 0)
Me.SubBotlets.Add(bt)
i = i + 1
End If
Case 97 To 112
If charSingleChar = "X" Then
bt = New Templates.Botlet.MyCube()
bt.Y = bt.CHeight / 2
bt.Frame.Location = New Point3d(bt.CWidth * i, 0, 0)
Me.SubBotlets.Add(bt)
i = i + 1
End If
Case 113 To 128
If charSingleChar = "X" Then
bt = New Templates.Botlet.MyCube()
bt.Y = bt.CHeight / 2
bt.Frame.Location = New Point3d(bt.CWidth * i, 0, 0)
Me.SubBotlets.Add(bt)
i = i + 1
End If
Case 129 To 144
If charSingleChar = "X" Then
bt = New Templates.Botlet.MyCube()
bt.Y = bt.CHeight / 2
bt.Frame.Location = New Point3d(bt.CWidth * i, 0, 0)
Me.SubBotlets.Add(bt)
i = i + 1
End If
Case 145 To 160
If charSingleChar = "X" Then
bt = New Templates.Botlet.MyCube()
bt.Y = bt.CHeight / 2
bt.Frame.Location = New Point3d(bt.CWidth * i, 0, 0)
Me.SubBotlets.Add(bt)
i = i + 1
End If
Case 161 To 176
If charSingleChar = "X" Then
bt = New Templates.Botlet.MyCube()
bt.Y = bt.CHeight / 2
bt.Frame.Location = New Point3d(bt.CWidth * i, 0, 0)
Me.SubBotlets.Add(bt)
i = i + 1
End If
Case 177 To 192
If charSingleChar = "X" Then
bt = New Templates.Botlet.MyCube()
bt.Y = bt.CHeight / 2
bt.Frame.Location = New Point3d(bt.CWidth * i, 0, 0)
Me.SubBotlets.Add(bt)
i = i + 1
End If
Case 193 To 208
If charSingleChar = "X" Then
bt = New Templates.Botlet.MyCube()
bt.Y = bt.CHeight / 2
bt.Frame.Location = New Point3d(bt.CWidth * i, 0, 0)
Me.SubBotlets.Add(bt)
i = i + 1
End If
Case 209 To 224
If charSingleChar = "X" Then
bt = New Templates.Botlet.MyCube()
bt.Y = bt.CHeight / 2
bt.Frame.Location = New Point3d(bt.CWidth * i, 0, 0)
Me.SubBotlets.Add(bt)
i = i + 1
End If
Case 225 To 240
If charSingleChar = "X" Then
bt = New Templates.Botlet.MyCube()
bt.Y = bt.CHeight / 2
bt.Frame.Location = New Point3d(bt.CWidth * i, 0, 0)
Me.SubBotlets.Add(bt)
i = i + 1
End If
Case 241 To 256
If charSingleChar = "X" Then
bt = New Templates.Botlet.MyCube()
bt.Y = bt.CHeight / 2
bt.Frame.Location = New Point3d(bt.CWidth * i, 0, 0)
Me.SubBotlets.Add(bt)
i = i + 1
End If
Case 257 To 272
If charSingleChar = "X" Then
bt = New Templates.Botlet.MyCube()
bt.Y = bt.CHeight / 2
bt.Frame.Location = New Point3d(bt.CWidth * i, 0, 0)
Me.SubBotlets.Add(bt)
i = i + 1
End If
Case 273 To 286
If charSingleChar = "X" Then
bt = New Templates.Botlet.MyCube()
bt.Y = bt.CHeight / 2
bt.Frame.Location = New Point3d(bt.CWidth * i, 0, 0)
Me.SubBotlets.Add(bt)
i = i + 1
End If
End Select
CharNo = CharNo + 1
Loop
MsgBox("Peek" & CharNo)
End While
End Sub
Please give me some suggesions to clear the exception.
|
|
|
|
|
You never said what the exception was, so it's kind of hard to pin anything down.
But, glancing through the code, it would appear that you're reading one character past the end of the file. In your Do loop, check for the EndOfFile, not the character count you've read against the length of the file.
|
|
|
|
|
I have a main form with a contextmenustrip. I have the contextmenustrip being displayed immediately when the form is loaded. The problem is that the contextmenu is being displayed about a half second before the form is visible. I've tried launching the menu from load, activate, focus, enter, etc. Also tried using suspendlayout. Same result.
Any ideas on how to sync the menu to be displayed when the form is done loading and already visible?
|
|
|
|
|
Hello,
I will give you suggestion.See wheater it works...The Contextmenustrip must be visible by MyMouseDown Event only.so, put an If statement in MymouseDown, that has the code this:
If e.Button = Windows.Forms.MouseButtons.Right Then
ContextMenuStrip1.Show()
End If
so, i think your contextmenustrip will be visible only when you click the right button of the mouse.
|
|
|
|
|
try the form 'Shown' event
|
|
|
|
|
I had high hopes about this since I missed this method last night, but the result is the same. The menu is displaying about half a second prior to the form being loaded.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
modified on Tuesday, October 14, 2008 8:57 PM
|
|
|
|
|
well if all else fails you could use a timer to display the menu a second after the shown event has been triggerd (start the timer in the shown event)
but I'm shure this isn't the best solution, at the moment I can't think of an other way
|
|
|
|
|
I am currently working on a app that loads a TAB delimeted text file
into a listbox then runs through the listbox and breaks each line into
four different listboxes. The file loads fine, but when I try to break
the string appart and add them to different listboxes I get an error.
Here is the code I'm using that is returning the error:
For theList = 0 To lstMain.Items.Count - 1
theListText = lstMain.Items(theList)
Dim Break() As String = theListText.Split(" ")
lstSymbol.Items.Add(Break(0))
lstScience.Items.Add(Break(1))
lstCommon.Items.Add(Break(2))
Next
The error message I get says: 'Index was outside the bounds of the array.'
Does anyone know how I would fix this? Any help would be appreciated.
Jeff
|
|
|
|