Hi,
I'm using the "-topmost" option on my window to make it start out always on
top. However, I'd like to provide a check box (labeled "Always on top" and
checked by default) that allows the user to toggle whether the window stays
on top or doesn't. Unfortunately, I can't get the change to take effect.
Below is the code I'm trying. What am I doing wrong (or is this even
possible)?
sub AlwaysOnTop_Click
{
$aot_state = $aot_check_box->GetCheck();
if ($aot_state == 0)
{
Win32::GUI::Change($main, -topmost => 0);
}
else
{
Win32::GUI::Change($main, -topmost => 1);
}
}
Thanks,
Rob