private void textBox1_GotFocus(object sender, System.EventArgs e)
{
// Display the SIP.
// Note that the EnabledChanged event occurs
// whenever the SIP is enabled or disabled.
inputPanel1.Enabled = true;
}
//ตรงนี้ครับ
private void inputPanel1_EnabledChanged(object sender, EventArgs e)
{
if (inputPanel1.Enabled == false)
{
// The SIP is disabled, so set the height of the tab control
// to its original height with a variable (TabOriginalHeight),
// which is determined during initialization of the form.
VisibleRect = inputPanel1.VisibleDesktop;
tabControl1.Height = TabOriginalHeight;
}
else
{
// The SIP is enabled, so the height of the tab control
// is set to the height of the visible desktop area.
VisibleRect = inputPanel1.VisibleDesktop;
tabControl1.Height = VisibleRect.Height;
}
// The Bounds property always returns a width of 240 and a height of 80
// pixels for Pocket PCs, regardless of whether or not the SIP is enabled.
BoundsRect = inputPanel1.Bounds;
// Show the VisibleDestkop and Bounds values
// on the second tab for demonstration purposes.
VisibleInfo.Text = String.Format("VisibleDesktop: X = {0}, " +
"Y = {1}, Width = {2}, Height = {3}", VisibleRect.X,
VisibleRect.Y, VisibleRect.Width, VisibleRect.Height);
BoundsInfo.Text = String.Format("Bounds: X = {0}, Y = {1}, " +
"Width = {2}, Height = {3}", BoundsRect.X, BoundsRect.Y,
BoundsRect.Width, BoundsRect.Height);
}