c# - How to resize the windows form dynamically in mobile application? -
i developing mobile application in c#. using keyboard launch functionality launch keyboard on mobile device when 1 of textbox gets focused. using following code.
private void inputpanel1_enabledchanged(object sender, eventargs e) { inputenabled(); } private void inputenabled() { int y; if (inputpanel1.enabled) // sip visible - position label above area covered input panel y = height - inputpanel1.bounds.height; else // sip not visible - position label above bottom of form y = height; // calculate position of top of label //y = y - mainpanel.height; //this.dock = dockstyle.top; //mainpanel.location = new point(0, y); this.size = new size(this.size.width, y); this.autoscroll = true; //this.autoscrollposition = new point(this.autoscrollposition.x, descriptiontextbox.location.y); }
in above code trying change height of windows form dynamically. have added breakpoint in application. in following statement
this.size = new size(this.size.width, y);
i can see value of y gets changed 180 in right side. in left side value of this.size remains unchanged. totally unaware why happening. can please tell me wrong in code or can provide me solution value of height in this.size statement on left side gets changed ?
modifying form size in winmobile application tricky , rather avoid if not absolutely necessary.
in case, instead of resizing form can place controls panel , resize panel. can use approach using soft input panel here: http://www.christec.co.nz/blog/archives/42
resize panel docked bottom of form same height sip. moves other controls docked bottom of form above area covered sip.
Comments
Post a Comment