protected override void WndProc(ref System.Windows.Forms.Message m) { switch (m.Msg) { case WM_COPYDATA: // do something break; } base.WndProc(ref m); }This method is automatically called when the VFP application sends data. You don't need an infinite loop if you call Application.Run(form).