Shoutbox

Making a control visible - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Making a control visible (/showthread.php?tid=66025)

Making a control visible by johnnygoodface on 09-10-2006 at 03:33 AM

I'm sure it's easy but I just can't figure out how to programmatically set the .visible property of a control...

I've tried (assuming it's a StaticControl control called "LblTop"):

var ControlHandle = null;
ControlHandle = Wnd.GetControlHandle("LblTop");
ControlHandle.Visible = false;


or

Wnd.LblTop.Visible = true;

or

Wnd.LblTop.Visible(true);


or

Wnd.Control("LblTop").Visible = true;


But none work,


Thx


RE: Making a control visible by Volv on 09-10-2006 at 03:49 AM

To make invisible;
Interop.Call("User32", "ShowWindow", Wnd.GetControlHandle("LblTop"), 0);

To make visible;
Interop.Call("User32", "ShowWindow", Wnd.GetControlHandle("LblTop"), 1);


RE: Making a control visible by johnnygoodface on 09-10-2006 at 03:54 AM

You're my savior!!!!
Thx a lot Volv!

Where can I get more info on Interop.Call calls?

Bye


RE: Making a control visible by ShawnZ on 09-10-2006 at 03:59 AM

www.pinvoke.net