15,867,835 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 Michael Azzar (Top 30 by date)
Michael Azzar
27-May-15 10:34am
View
Thank you very much sir 😊 for. Your time ...
Michael Azzar
27-May-15 9:55am
View
Referring to router setting .I use cellular data( phone. ) to connect to the internet
Michael Azzar
27-May-15 8:15am
View
Hello Mr. Frankie
I hope you are fine
Wanted to tell you the outcome of the final test.
I've run my app on two PC connected to the internet.
But unfortunately l have encountered the same problem although I make an exception for the app in windows firewall
This is the. App code
You probably know the cause of the problem
Imports System.Net.Sockets
Imports System.Threading
Imports System.IO
Public Class Form1
Dim Listener As New TcpListener(65535)
Dim Client As New TcpClient
Dim Message As String = ""
Private Sub Form1_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
GC.Collect()
End Sub
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Timer1.Stop()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
txtmyIPAddress.Text = GetIPAddress()
Dim ListenerThread As New Thread(New ThreadStart(AddressOf Listening))
ListenerThread.Start()
Timer1.Start()
txtName.Focus()
End Sub
Private Sub Listening()
Listener.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If Listener.Pending = True Then
Message = ""
Client = Listener.AcceptTcpClient()
Dim Reader As New StreamReader(Client.GetStream())
While Reader.Peek > -1
Message = Message + Convert.ToChar(Reader.Read()).ToString
End While
RichTextBox1.ForeColor = Color.Black
RichTextBox1.Text += Message + vbCrLf
'Here you can enter anything you would like
'to happen when a message is received,
'For instance; Play a sound, Show a message Box, A Balloon Tip etc.
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If txtName.Text = "" Or cmbAddress.Text = "" Then
'Check to make sure that the user has entered
'a display name, and a client IP Address
'If Not, Show a Message Box
MessageBox.Show("UserName and IPAddress must be Filled", _
"Error Sending Message", _
MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
Try
Client = New TcpClient(cmbAddress.Text, 65535)
'Declare the Client as an IP Address.
'Must be in the Correct form. eg. 000.0.0.0
Dim Writer As New StreamWriter(Client.GetStream())
Writer.Write(txtName.Text & " Says: " & txtmessage.Text)
Writer.Flush()
'Write the Message in the stream
If Not txtmyIPAddress.Text.Trim = cmbAddress.Text.Trim Then
RichTextBox1.Text += (txtName.Text & " Says: " & txtmessage.Text) + vbCrLf
End If
txtmessage.Text = ""
Catch ex As Exception
Console.WriteLine(ex)
Dim Errorresult As String = ex.Message
MessageBox.Show(Errorresult & vbCrLf & vbCrLf & _
"Please Review Client Address", _
"Error Sending Message", _
MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End If
End Sub
Private Function GetIPAddress() As String
Dim oAddr As System.Net.IPAddress
Dim sAddr As String
With System.Net.Dns.GetHostByName(System.Net.Dns.GetHostName())
oAddr = New System.Net.IPAddress(.AddressList(0).Address)
sAddr = oAddr.ToString
End With
GetIPAddress = sAddr
End Function
End
Michael Azzar
25-May-15 1:29am
View
Thank you Mr.Sergey for your links
I think that it will help me more
Thank you 😊 very much...
Michael Azzar
25-May-15 1:26am
View
My vote is 5
Thank you very much Mr. Frankie-C for your clear answer.
I think that the solution included in it.
But unfortunately I can't try it now, because I am on a business trip for a week. But I'm going to try it and give you feedback
Michael Azzar
19-Nov-14 18:51pm
View
thank you sir for your links it's very useful .
Michael Azzar
24-Mar-14 10:20am
View
thank you very much sir .
Michael Azzar
24-Mar-14 9:22am
View
thank you very Much sir for Solution .
But db4free.net is a MySQL 5.6 Database type . is it support this Technique ????
Michael Azzar
20-Sep-13 14:15pm
View
This is my code can you tell me how to execute it each 1000 M Seconds
Private sub ex1()
Dim sql as string ="Select * From UpdatTable Where ID =' " & Textbox1.text &" ' "
If con.State() Then con.Close()
con.Open()
Try
Dim cmd As New OleDbCommand(sql, con)
Dim dr As OleDbDataReader
dr = cmd.ExecuteReader()
Dim s As String = ""
While dr.Read
str &= Convert.ToString(dr.Item("UserName")) & vbCrLf
End While
TextBox1.Text = str
Catch ex As Exception
MsgBox(ex.Message)
con.Close()
End Try
con.Close()
End sub
Michael Azzar
20-Sep-13 14:13pm
View
this is my code
Private sub ex1()
Dim sql as string ="Select * From UpdatTable Where ID =' " & Textbox1.text &" ' "
If con.State() Then con.Close()
con.Open()
Try
Dim cmd As New OleDbCommand(sql, con)
Dim dr As OleDbDataReader
dr = cmd.ExecuteReader()
Dim s As String = ""
While dr.Read
str &= Convert.ToString(dr.Item("UserName")) & vbCrLf
End While
TextBox1.Text = str
Catch ex As Exception
MsgBox(ex.Message)
con.Close()
End Try
con.Close()
End sub
Michael Azzar
20-Sep-13 13:37pm
View
Can you help me how to fulfill this code ??
Michael Azzar
20-Sep-13 13:33pm
View
sorry for my tag ,
it is vb.net
Michael Azzar
20-Sep-13 12:44pm
View
What is your suggestion for the code
Michael Azzar
20-Sep-13 12:10pm
View
It's very useful information for me, thank you Sir for the clarity of your answer
Michael Azzar
19-Sep-13 12:34pm
View
Thank you very much sir ,I'll convert my database to SQL
Michael Azzar
19-Sep-13 9:43am
View
Your answer is complete and very impressive and it has helped me a lot . THANK YOU MR: MIKE MEINZ
But I have one last question
If another application connect the same database during my application opens a connection to the database, Is this true or will happen errors ??
Michael Azzar
21-Jun-13 11:23am
View
Thank you ( ThePhantomUpvoter )
Michael Azzar
21-Jun-13 10:29am
View
Do you mean I shoud install SQL to any computer I want to ran my program on it ?? or what
Michael Azzar
13-May-13 12:56pm
View
Thank you very much it's very helpful
Michael Azzar
25-Apr-13 10:18am
View
Thank you for links .it's very useful ☺
Michael Azzar
25-Feb-13 6:49am
View
Thanks so much for your idea certainly will help me a lot.
Michael Azzar
25-Feb-13 6:48am
View
I got it thank you very very much MR:Tharaka for your code
Michael Azzar
23-Feb-13 16:24pm
View
First, thank you MR:Dave
my problem is how to read all lines in subtitle file to The appropriate columns ..
Michael Azzar
29-Feb-12 15:57pm
View
thank you
mr: GanesanSenthilvel
Michael Azzar
28-Feb-12 17:09pm
View
sorry some of code lost when i paste it
Michael Azzar
28-Feb-12 17:01pm
View
thanks for you...
this is my first form code
Imports System.Data
Imports System.Data.OleDb
Public Class Form1
Dim conStr As String = " Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\cunu.accdb"
Dim con As New OleDbConnection(conStr)
Sub Search() ' for searsh
Dim myQuery As String = ""
Dim sql As String = "select * from Table1 where ID=" & Val(TextBox7.Text) & ""
If con.State() Then con.Close()
con.Open()
Dim cmd As New OleDbCommand(sql, con)
Dim dr As OleDbDataReader
dr = cmd.ExecuteReader()
If dr.Read() = True Then
TextBox7.Text = dr.Item(0).ToString
ComboBox1.Text = dr.Item(1).ToString
TextBox1.Text = dr.Item(2).ToString
TextBox2.Text = dr.Item(3).ToString
TextBox3.Text = dr.Item(4).ToString
TextBox4.Text = dr.Item(5).ToString
TextBox5.Text = dr.Item(6).ToString
TextBox6.Text = dr.Item(7).ToString
con.Close()
Else
con.Close()
TextBox7.Text = ""
ComboBox1.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
MessageBox.Show(" Sorry there is no ")
End If
End Sub
Sub View() ' show
Dim sql As String = "select * from Table1 order by ID"
If con.State() Then con.Close()
con.Open()
Dim da = New OleDbDataAdapter(sql, con)
Dim dt As New DataTable
da.Fill(dt)
Me.DataGridView1.DataSource = dt
con.Close()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'CunuDataSet.Table1' table. You can move, or remove it, as needed.
Me.Table1TableAdapter.Fill(Me.CunuDataSet.Table1)
Me.View()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim sql As String = "select max(id) as q from Table1"
Dim f As String = ""
If con.State() Then con.Close()
con.Open()
Dim cmd As New OleDbCommand(sql, con)
Try
f = cmd.ExecuteScalar().ToString()
TextBox7.Text = f + 1
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
ComboBox1.Text = ""
TextBox1.Text = "0"
TextBox2.Text = "0"
TextBox3.Text = "0"
TextBox4.Text = "0"
TextBox5.Text = "0"
TextBox6.Text = "0"
End Sub
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
TextBox7.Text = DataGridView1.CurrentRow.Cells(0).Value.ToString()
ComboBox1.Text = DataGridView1.CurrentRow.Cells(1).Value.ToString()
TextBox1.Text = DataGridView1.CurrentRow.Cells(2).Value.ToString()
TextBox2.Text = DataGridView1.CurrentRow.Cells(3).Value.ToString()
TextBox3.Text = DataGridView1.CurrentRow.Cells(4).Value.ToString()
TextBox4.Text = DataGridView1.CurrentRow.Cells(5).Value.ToString()
TextBox5.Text = DataGridView1.CurrentRow.Cells(6).Value.ToString()
TextBox6.Text = DataGridView1.CurrentRow.Cells(7).Value.ToString()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim sql As String = "select * from Table1 where ID=" & Val(TextBox7.Text) & ""
If con.State() Then con.Close()
con.Open()
Dim cmd As New OleDbCommand(sql, con)
Dim dr As OleDbDataReader
dr = cmd.ExecuteReader()
If dr.Read() = True Then
Tex
Michael Azzar
23-Feb-12 10:45am
View
thanks for you .but this article by c# code and not contain (delet,edit,..)code.please can you help me to find article by vb.net contain those codes
Michael Azzar
20-Feb-12 14:34pm
View
thank you MR:Dave .I used InnoSetup .now my program is work in other computer without error message....!
Michael Azzar
20-Feb-12 10:18am
View
I'm sorry.I mean.after i finished my project .how i can convert it to setup to work in my friends computers
Michael Azzar
20-Feb-12 10:00am
View
thank you for your solution .I tried it . but I don't find visual studio installer in my visual studio 2010 express....how can i get it
Show More