now if a new record is added to the db then my application will pop up a messagebox !
MyCode : This application will continuously check the database to see weather a new row is added if added then it will display a message box
my Question is; is this a good method ? or are there any other way to accomplish this ? please advice

PHP Code:
//start thread
private void Form1_Load(object sender, EventArgs e)
{
th1 = new Thread(new ThreadStart(tm_Tick));
th1.Start();
}
thread dunction
private void tm_Tick()
{
clsFetch db = new clsFetch();
int x = db.maxPKID(); // get maximum primary key
int y = 0;
try
{
while (_stopThreads == false)
{
lock (this)
{
y = db.maxPKID();
if (y > x)
{
MessageBox.Show(db.getMessage(db.maxPKID));
x = y;
}
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}