Odinulf
Odinulf

Reputation: 581

Set Z-Index of Window comparatively to other windows

How can I, in VB.NET, set a window's z-index comparatively to other windows?

My program runs in the background of other programs, and when a specific event happens, my custom class pops up. However, sometimes, this window is in the background of other apps. How can I make it such that my window always comes to the front? I realize that there are questions like mine, but I cannot find any in Visual Basic.

I would really appreciate code in VB.NET, not C#.

Thanks,

Odinulf

Upvotes: 0

Views: 757

Answers (1)

SLaks
SLaks

Reputation: 887877

Set the TopMost property to True.

Upvotes: 1

Related Questions