private string GetCaption(int id) { if (this.user32 == IntPtr.Zero) { this.user32 = NativeMethods.LoadLibrary(Environment.SystemDirectory + "\\User32.dll"); } var sb = new StringBuilder(256); NativeMethods.LoadString(this.user32, (uint)id, sb, sb.Capacity); return(sb.ToString().Replace("&", "")); }