public static void EnableAutoComplete(IntPtr handle, bool autoCompleteUrls, bool autoCompleteFiles) { if (autoCompleteUrls || autoCompleteFiles) { Application.OleRequired(); SHAutoCompleteFlags flags = SHAutoCompleteFlags.AutoSuggestForceOn | SHAutoCompleteFlags.AutoAppendForceOn; if (autoCompleteUrls) { flags |= SHAutoCompleteFlags.UrlAll; } if (autoCompleteFiles) { flags |= SHAutoCompleteFlags.FileSystem; } SHAutoComplete(handle, flags); } }
public static extern int SHAutoCompleteHRESULT(IntPtr hwndEdit, SHAutoCompleteFlags dwFlags);
public static extern void SHAutoComplete(IntPtr hwndEdit, SHAutoCompleteFlags dwFlags);
static extern int SHAutoComplete(IntPtr hwndEdit, SHAutoCompleteFlags dwFlags);