15,917,454 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Mr.Kim2050 (Top 61 by date)
Mr.Kim2050
21-Jul-23 9:51am
View
Deleted
it seem not works well, can you propose other solution ?
Mr.Kim2050
21-Jul-23 9:51am
View
it seem not works well, can you propose other solution ?
Mr.Kim2050
7-Jul-23 12:27pm
View
I try to create code VB.net to auto detect the URL from chaturbate.com live streaming to know model online or offline
Mr.Kim2050
16-May-21 11:46am
View
thanks i will try to do it, hope it really works
Mr.Kim2050
16-May-21 11:18am
View
an example like this, if I dont want to connect the datasource again to refresh to table of datagrideview but i want use the information which ready store in datagrideview to refresh by select any column i need, isn't possiblem ? that because inside the program i just need only one column refresh is enough to know which website is online or offline
Mr.Kim2050
16-May-21 11:16am
View
hi OriginalGriff
do you have sample in vb.net ?
Mr.Kim2050
14-May-21 23:19pm
View
so for example if you using Binary reader to read text file line by line and you want to search each string contain in text you being read is match with any string like Dim str() As String = {"chat.com", "ABC.com", "stripABC.com"} , how can you do the code ?
Mr.Kim2050
14-May-21 23:19pm
View
yes it read successful to read line but when i try to take the LoadLine.contains , it has the problem appear
Mr.Kim2050
14-May-21 23:11pm
View
so for example if you using Binary reader to read text file line by line and you want to search each string contain in text you being read is match with any string like Dim str() As String = {"chat.com", "ABC.com", "stripABC.com"} , how can you do the code ?
Mr.Kim2050
14-May-21 21:39pm
View
so, how could i using binary reader file text line by line in formload and using string.contain to check if text file really contain the value i need or not ?
Mr.Kim2050
14-May-21 8:58am
View
thanks with your answer , hope i could find any solution other to solve it.
Mr.Kim2050
14-May-21 8:11am
View
I try to use String.Contains() like this but when i start to compile the program it show the message error
System.NullReferenceException: Object reference not set to an instance of an object.
at WindowsApp1.Form1.Form1_Load(Object sender, EventArgs e) in C:\Users\USER\source\repos\WindowsApp1\WindowsApp1\Form1.vb:line 20
Imports System.IO
Imports System.Text
Public Class Form1
Dim TextBinaryWrite As BinaryWriter
Dim MyFileName As String = "MyFavorith.txt"
Dim str() As String = {"chat.com", "ABC.com", "stripABC.com"}
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If My.Computer.FileSystem.FileExists(MyFileName) Then
Dim Loadline As String
Dim readFile As System.IO.TextReader = New StreamReader(MyFileName)
Dim MName As String
Dim WebType As String = ""
Try
While True
Loadline = readFile.ReadLine()
If Loadline.Contains("stripABC.com") = True Then
WebType = "stripABC.com"
End If
If Loadline Is Nothing Then
Exit While
End If
Dim Row As String() = New String() {MName, Loadline}
'Dim Row As String() = New String() {MName, WebType, "", Loadline}
DataGridView1.Rows.Add(Row)
End While
readFile.Close()
readFile = Nothing
LbStatuse.Text = "State : File is load completed."
Catch ex As Exception
TextBox1.Text = ex.ToString
LbStatuse.Text = "Error Try when load file" & ex.ToString
End Try
Else
'Create new file if no have
Try
TextBinaryWrite = New BinaryWriter(New FileStream(MyFileName, FileMode.Create))
LbStatuse.Text = "Statuse : " & MyFileName & " is created."
TextBinaryWrite.Close()
Catch ex As Exception
LbStatuse.Text = ex.Message + "Cannot create file."
Return
End Try
End If
End Sub
I dont know why can't use this code ??
If Loadline.Contains("stripABC.com") = True Then
WebType = "stripABC.com"
End If
Mr.Kim2050
13-May-21 11:19am
View
yes i know this code below is not work , that why i try to find other solution, do you have any example code for me beside Microsoft Docs , because i am not good with it .
Mr.Kim2050
13-May-21 10:53am
View
I used to search inside the internet, i found this code is work with richtextbox search , i want to edit inside this code below by change from using richtexbox.find to using value "Line" which get from loading textfile "www.live.com" ,
Dim str() As String = {"ABA.com", "live.com", "chat.com"}
Dim WebType as string
If FindMyText(str(0)) = True Then 'chaturbate.com
WebType = str(0)
TextAppend(MName, WebType, WebURL, MyFileName)
ElseIf FindMyText(str(1)) Then
WebType = str(1)
End if
Public Function FindMyText(text As String) As Boolean
Dim returnValue As Boolean = False ' Initialize the return value to false by default.
If text.Length > 0 Then ' Ensure a search string has been specified.
Dim indexToText As Integer = RichTextBox1.Find(text) ' Obtain the location of the search string in richTextBox1.
If indexToText >= 0 Then ' Determine whether the text was found in richTextBox1.
returnValue = True
End If
End If
Return returnValue
End Function
Mr.Kim2050
13-May-21 10:47am
View
hi bro, my problem is when i try to read data "www.live.com " in text file load into datagridview when formload by using function FindMyText to compare "www.live.com" from text file isn't have any values match with Str() array or not? if it has value match, just return the index. but i have problem can't compare text , i dont know how to do with it , pls help me if you know how to compare string like this
Dim indexToText As Integer = text
Mr.Kim2050
13-May-21 8:10am
View
Error code 3:
Try
Br = New BinaryReader(New FileStream(MyFileName, FileMode.Open))
AcceptValue = Br.ReadString()
Dim Row As String() = New String() {"Pos1", AcceptValue, "Online"}
DataGridView1.Rows.Add(Row)
Catch ex As Exception
txtStatuse.Text = ex.Message & "Error Load File"
Return
End Try
Br.Close()
Else
Try
TextBinaryWrite = New BinaryWriter(New FileStream(MyFileName, FileMode.Create))
txtStatuse.Text = "Statuse : " & MyFileName & " is created."
TextBinaryWrite.Close()
Catch ex As Exception
txtStatuse.Text = ex.Message + "Cannot create file."
Return
End Try
Mr.Kim2050
13-May-21 8:10am
View
Error code 2:
If My.Computer.FileSystem.FileExists(MyFileName) Then
Dim Br As BinaryReader
Dim AcceptValue As String
Try
Using BinReader As New BinaryReader(File.Open(MyFileName, FileMode.Open))
Dim Pos As Integer = 0
Dim Length As Integer = BinReader.BaseStream.Length
While Pos < Length
Dim AcceptValue As String = BinReader.ReadString
Dim Row As String() = New String() {Pos, AcceptValue, "Online"}
DataGridView1.Rows.Add(Row)
Pos += 1
End While
End Using
Else
Try
TextBinaryWrite = New BinaryWriter(New FileStream(MyFileName, FileMode.Create))
txtStatuse.Text = "Statuse : " & MyFileName & " is created."
TextBinaryWrite.Close()
Catch ex As Exception
txtStatuse.Text = ex.Message + "Cannot create file."
Return
End Try
End If
Mr.Kim2050
13-May-21 8:09am
View
hi OriginalGriff
thanks, with your reply I will try the code you send to me soon but i have some more question relate to this code below which i have search from internet how to read binary text file into DataGridview, i got 3 kinds of code which i dont know why or where error with logic, please help to edit or correct the mistake for me if you know the answer why? thanks in advance
Code1:
If My.Computer.FileSystem.FileExists(MyFileName) Then
' Need to write load text file
Dim ReadStream As FileStream
Dim AcceptValue As String
Try
' Here is the error part
ReadStream = New FileStream(MyFileName, FileMode.Open)
Dim ReadBinaryVal As New BinaryReader(ReadStream)
AcceptValue = ReadBinaryVal.ReadString()
Dim Row As String() = New String() {"Model 1", AcceptValue, "Online"}
DataGridView1.Rows.Add(Row)
ReadStream.Close()
Else
Try
TextBinaryWrite = New BinaryWriter(New FileStream(MyFileName, FileMode.Create))
txtStatuse.Text = "Statuse : " & MyFileName & " is created."
TextBinaryWrite.Close()
Catch ex As Exception
txtStatuse.Text = ex.Message + "Cannot create file."
Return
End Try
End If
Mr.Kim2050
4-May-21 0:10am
View
ooh yes, it working right now, thanks you so much for your help, finally i could finish it as what i dream.
Mr.Kim2050
4-May-21 0:10am
View
ooh yes, it working right now, thanks you so much for your help, finally i could finish it as what i dream
Mr.Kim2050
3-May-21 13:26pm
View
what i expected with this code do is like this, when i click the button convert it will go to call cmd.exe and FFEMG.exe start to process covert the .TS to .MP4 by using timer to count the how many minutes will spend to finish these jobs and after cmd.exe and FFEMG.exe finish the jobs, it will go to close windows and timer also stop to count period too. i try to find this solution but i dont know how to do.
Mr.Kim2050
3-May-21 13:26pm
View
what i expected with this code do is like this, when i click the button convert it will go to call cmd.exe and FFEMG.exe start to process covert the .TS to .MP4 by using timer to count the how many minutes will spend to finish these jobs and after cmd.exe and FFEMG.exe finish the jobs, it will go to close windows and timer also stop to count period too. i try to find this solution but i dont know how to do.
Mr.Kim2050
3-May-21 13:22pm
View
i am not sure how to build this code , could you help to build this could out ?
Mr.Kim2050
3-May-21 1:10am
View
i try to follow using while loop but it still meet problem that timer is not running , i dont know why.
Mr.Kim2050
3-May-21 1:08am
View
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btnCovert.Click
btnCovert.Enabled = False
Dim FileName1 As String = System.IO.Path.GetFileNameWithoutExtension(OpenFileDialog1.FileName) 'Get only Flie name without extension
Dim FileName2 As String = OpenFileDialog1.FileName
Dim programName As String = "ffmpeg.exe"
System.Diagnostics.Process.Start(Application.StartupPath & "\" & programName)
'Process.Start("cmd.exe", "/c ffmpeg.exe -i " & FileName2 & " -c:v libx264 " & "Down\" & FileName1 & ".mp4")
'============================================================================
Dim p As System.Diagnostics.Process
Dim active As Boolean = True
AMins = 0
ASecond = 0
'p = Process.Start("cmd.exe", "/c ffmpeg.exe -i " & FileName2 & " -c:v libx264 " & "Down\" & FileName1 & ".mp4")
p = System.Diagnostics.Process.Start("cmd.exe", "/c ffmpeg.exe -i " & FileName2 & " -c:v libx264 " & "Down\" & FileName1 & ".mp4")
Timer1.Start()
While p.HasExited = False
btnFileOutInfor.PerformClick()
Timer1.Stop()
End While
'============================================================================
End Sub
Mr.Kim2050
3-May-21 0:58am
View
i want to create one program which able to convert .TS file to .MP4 file, by using one button click to make process convert with cmd.exe and FFMEG commend. when click button convert i want to know how many minutes will spend to convert this process finish and when cmd.exe is done, the timer also stop.
Mr.Kim2050
2-May-21 11:45am
View
it still meet the problem to call timer.stop() , i dont know why, i have change from IF to WHILE.
Mr.Kim2050
2-May-21 8:03am
View
thanks let me try it after this.
Mr.Kim2050
2-May-21 7:25am
View
because i dont know when FFEMG is finish to convert the .MP4 ready. so how can we do ?
Mr.Kim2050
2-May-21 7:24am
View
if i dont need System.Threading.Thread.Sleep(500) , to delay isn't ok ???
Mr.Kim2050
2-May-21 4:29am
View
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btnCovert.Click
Dim p As Process
Dim active As Boolean = True
Timer1.Start()
p = Process.Start("cmd.exe", "/c ffmpeg.exe -i " & FileName2 & " -c:v libx264 " & "Down\" & FileName1 & ".mp4")
if p.HasExited then
Timer1.Stop()
msgbox("Close")
end if
end sub
Mr.Kim2050
2-May-21 4:28am
View
i have try to using *.hasExited as you say but not working well, could you help check why ?
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btnCovert.Click
Dim p As Process
Dim active As Boolean = True
Timer1.Start()
p = Process.Start("cmd.exe", "/c ffmpeg.exe -i " & FileName2 & " -c:v libx264 " & "Down\" & FileName1 & ".mp4")
if p.HasExited then
Timer1.Stop()
msgbox("Close")
end if
end sub
Mr.Kim2050
2-May-21 4:00am
View
i have follow what your code but not working well as what i need.
Mr.Kim2050
2-May-21 1:38am
View
hi , could you have told me, seem that not working well, i dont know why. do you have any solution more ?
Mr.Kim2050
1-May-21 13:55pm
View
@Richard , can you advice me how to correct this code? i try to detect the cmd.exe when it finish job and close the main windows then timer will stop. but i can't set the right condition on it. could you help me how to do ?
Dim p As System.Diagnostics.Process
p = Process.Start("cmd.exe", "/c ffmpeg.exe -i " & FileName2 & " -c:v libx264 " & "Down\" & FileName1 & ".mp4")
Timer1.Start()
While p Is Nothing = True
Timer1.Stop()
MsgBox("Hello")
End While
Mr.Kim2050
1-May-21 13:53pm
View
@Dave Kreskowiak, can you advice me how to correct this code? i try to detect the cmd.exe when it finish job and close the main windows then timer will stop. but i can't set the right condition on it. could you help me how to do ?
Dim p As System.Diagnostics.Process
p = Process.Start("cmd.exe", "/c ffmpeg.exe -i " & FileName2 & " -c:v libx264 " & "Down\" & FileName1 & ".mp4")
Timer1.Start()
While p Is Nothing = True
Timer1.Stop()
MsgBox("Hello")
End While
Mr.Kim2050
1-May-21 13:01pm
View
i have long time never touch with vb.net, since i finished from school and i just try to use with FFMEG first time. so i meet lot of confuse with logic and syntax sometime . thanks with your share
Mr.Kim2050
1-May-21 13:00pm
View
^^ , Oh Yes, it really work. thanks you
Mr.Kim2050
1-May-21 12:18pm
View
Richard, could you give me example of it ?
Mr.Kim2050
30-Apr-21 10:05am
View
i try to create one code which can download website source code, then after i got the web source code, i want to search and select from which first keyword until end keyword. but i dont know how to do. if you know how to do , pls help show me.
Mr.Kim2050
29-Apr-21 22:37pm
View
thanks let me check.
Mr.Kim2050
29-Apr-21 9:00am
View
the problem is this vb6 code is not my own code build up, is someone post in google, and i try to rewrite this code again. i really hope someone will know how to do it
Mr.Kim2050
29-Apr-21 8:59am
View
the problem is this vb6 code is not my own code build up, is someone post in google, and i try to rewrite this code again. i really hope someone will know how to do it
Mr.Kim2050
28-Apr-21 11:42am
View
ok thanks you
Mr.Kim2050
28-Apr-21 11:20am
View
hi, Richard, may i ask more question relate to code in cmd.exe? I want to write more code inside the code you provide me yesterday like this:
Process.Start("cmd.exe", "/k ffmpeg -i " & FileName2 & " -c:v libx264 " & "Down\\" & FileName1 & ".mp4")
1. when the cmd.exe is finish to covert the file from .TS to .MP4, i want to add code to make cmd.exe to exit or i want to make cmd.exe to continues remove the source file .TS before exit.
how can i do that? i try to think using if condition but not working because i dont know how to write the code continue to control cmd.exe to make it execute. please help me if you can. thanks in advance
Mr.Kim2050
27-Apr-21 12:59pm
View
Richard, have you ever try to create any live streaming recorder before with Newtonsoft.Json.dll , i being looking to create this program with vb.net, if you have know , pls share with me
Mr.Kim2050
27-Apr-21 12:45pm
View
oh thanks you with your help.
Mr.Kim2050
27-Apr-21 12:31pm
View
how to do in batch script ?
Mr.Kim2050
27-Apr-21 12:26pm
View
oh yes , it really works , thanks you so much for your help, i have try to find the answer while google around 1 week ready but no one used to show the code in public before. now i got my answer from you help.
Mr.Kim2050
27-Apr-21 12:23pm
View
oh thank you , let me try this code i hope it work
Mr.Kim2050
27-Apr-21 11:54am
View
when i try to add more commend inside cmd.exe like this
Process.Start("cmd.exe", "/k cd Down & ffmpeg -i " & FileName2 & " -c:v libx264 " & FileName1 & ".mp4")
it go to show the message below
'ffmpeg' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\USER\source\convertTS\convertTS\bin\Debug\Down>
Mr.Kim2050
27-Apr-21 11:46am
View
the problem inside this code like this, i try to create one convertor program which can convert .TS to .MP4 by using with FFMEG.exe file compeller, this FFEMG.exe need to using with cmd.exe.
I try to write code to commend cmd.exe to process convert file and put finish file .MP4 in one folder "Down" but i could do only ask cmd.exe to covert outside the folder "Down". i dont know how to edit the code to make it process as what i need in using cmd commend. pls help me if you know
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim FileName1 As String = System.IO.Path.GetFileNameWithoutExtension(OpenFileDialog1.FileName) 'Get only Flie name without extension
Dim FileName2 As String = OpenFileDialog1.FileName
Dim programName As String = "ffmpeg.exe"
System.Diagnostics.Process.Start(Application.StartupPath & "\" & programName)
Process.Start("cmd.exe", "/k ffmpeg -i " & FileName2 & " -c:v libx264 " & FileName1 & ".mp4")
End Sub
Mr.Kim2050
27-Apr-21 11:16am
View
Richard, i still wonder with one code below, i try to write code to control cmd.exe by give code to make of file into folder "DOWN" and continues to give one more commend to make file convert from .TS to .MP4 ? do you know how to do ?
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim FileName1 As String = System.IO.Path.GetFileNameWithoutExtension(OpenFileDialog1.FileName) 'Get only Flie name without extension
Dim FileName2 As String = OpenFileDialog1.FileName
Dim programName As String = "ffmpeg.exe"
System.Diagnostics.Process.Start(Application.StartupPath & "\" & programName)
Process.Start("cmd.exe", "/k ffmpeg -i " & FileName2 & " -c:v libx264 " & FileName1 & ".mp4")
End Sub
Mr.Kim2050
27-Apr-21 11:10am
View
oh yes, it works now , thanks you so much with your help , ^_^
Mr.Kim2050
27-Apr-21 10:31am
View
may i know how to write the code which i can click to browse into application which i being running in Bin\Debug folder ? i have try this code but it show only main folder or root folder only which is not point into Bin\Debug folder i need. pls help me if you know
Private Sub bFolder_Click(sender As Object, e As EventArgs) Handles bFolder.Click
Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.MyComputer))
End Sub
Mr.Kim2050
27-Apr-21 10:31am
View
may i know how to write the code which i can click to browse into application which i being running in Bin\Debug folder ? i have try this code but it show only main folder or root folder only which is not point into Bin\Debug folder i need. pls help me if you know
Private Sub bFolder_Click(sender As Object, e As EventArgs) Handles bFolder.Click
Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.MyComputer))
End Sub
Mr.Kim2050
27-Apr-21 7:14am
View
what is difference between /K and /C ?
Mr.Kim2050
27-Apr-21 6:57am
View
how can i edit this code to receive what i need ?
Process.Start("cmd.exe", "/k ffmpeg -i " & FileName2 & " -c:v libx264 " & FileName1 & ".mp4")
Mr.Kim2050
27-Apr-21 6:56am
View
could you help me to full statement to control the cmd.exe , when it start to process to convert .TS to .MP4, let it create into any specific folder we need, example i want to create mp4 into folder name "Down" and when it finish create file, it auto close the cmd.exe
Process.Start("cmd.exe", "/k ffmpeg -i " & FileName2 & " -c:v libx264 " & FileName1 & ".mp4")
Mr.Kim2050
27-Apr-21 6:26am
View
for this FFMPEG Video Converter with Progressbar VB.NET can convert .TS to .MP4 ?
Mr.Kim2050
27-Apr-21 6:17am
View
can you help to write the full statement for me to see ?
Show More