Dim ds1 As DataSet
Dim myMessage As Message
Try
myMessage = msgQ.Receive()
myMessage.Formatter = New XmlMessageFormatter(New Type() {GetType(ds)})
Catch ex As MessageQueueException
MessageBox.Show("ERROR: " + ex.Message, "MessageQueue Receive", MessageBoxButtons.OK, MessageBoxIcon.Error)
Exit Sub
End Try
ds1 = CType(myMessage.Body, DataSet)
DataGrid1.DataSource = ds1
MsgBox("ok")
myMessage.Dispose()
ds1.Dispose()
------------------------------------
the above code using messaging (msmq) for reciever End.
i have keep in timer elapsed with interval of 1000
but the form hangs, i don't my application hang when i never recieve message.
Actually what i want is the application should popup me automatically when ever i recieve the message, how can i do it and my application should not crash...