private void FormMaster_Load(object sender, EventArgs e) { try { HisCom = new HisComponent(); StringBuilder sb = new StringBuilder(256); int hr = NhLocalWrap.InitDLL(sb); if (hr < 0) { throw new Exception(sb.ToString()); } } catch (System.Exception ex) { MessageBox.Show(ex.Message); } }