string query = "SELECT count(*) from BlackList WHERE IP=ip";
SqlCommand cmd = new SqlCommand(query, con);
var rowCount = (int)cmd.ExecuteScalar();
con.Close();
if (rowCount>0)
MessageBox.Show("This IP is black Listed.Retry after few seconds.");
Notice the select count(*). This will return the number of rows that match your criteria. The the ExecuteScalar will return you the result of the query. You can safely cast this to an int as you are expecting a count back from your query.
Once this is done if the rowCount is greater than 0 you have a blacklisted ip.