You can place the ListBox in a different form and invoke/show the form whenever you need the completion list. This will save you having to worry about the ListBox being topmost or not.
The catch with this method is that you'll have to code your AutoComplete form so that it does not steal focus from the main form.
Here's code to help you just in case you're wondering how to make the form show without activation (stealing focus).
private const int SW_SHOWNOACTIVATE = 4;
private const int HWND_TOPMOST = -1;
private const uint SWP_NOACTIVATE = 0x0010;
[DllImport("user32.dll", EntryPoint = "SetWindowPos")]
static extern bool SetWindowPos(
int hWnd, // window handle
int hWndInsertAfter, // placement-order handle
int X, // horizontal position
int Y, // vertical position
int cx, // width
int cy, // height
uint uFlags); // window positioning flags
[DllImport("user32.dll")]
static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
static void ShowInactiveTopmost(Form frm)
{
ShowWindow(frm.Handle, SW_SHOWNOACTIVATE);
SetWindowPos(frm.Handle.ToInt32(), HWND_TOPMOST,
frm.Left, frm.Top, frm.Width, frm.Height,
SWP_NOACTIVATE);
}
You could also try overriding the ShowWithoutActivation property.
protected override bool ShowWithoutActivation
{
get { return true; }
}
NB: Both code snippets come from this question: Show a Form without stealing focus?.