C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Form resize in windows


Posted Date: 01 Sep 2008      Total Responses: 2

Posted By: Ambika       Member Level: Silver     Points: 1



Hi friends,

I have to make may form to fit the screen ,even if i run my project in monitors of diffrent sizes .

And all the controls in the from should be cener aligned based on the size of the form even if i minimize or maximize the size of the form.

Please tel me how can i do this.

Thanks in advance





Responses

Author: Newman Joseph    01 Sep 2008Member Level: SilverRating:     Points: 3

Do like this....

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<form>
<table width="400px">
<tr>
<td>
<table>
<tr>
<td>
Write ur Code Here </td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>

Regards,
Joseph



Author: Kundan Kumar Sinha    01 Sep 2008Member Level: GoldRating:     Points: 3

Hi,

Suppose your page have one form element named form1, and w,h,x,y are four text boxes. you can use this javascript function to change the size and move to different location by passing the value to those text boxes and call this function on some botton click event.

It will give you some idea how to solve your problem. Place your controls in table and specify the width of table after getting the width of your page.

function ChangeSize()
{ if (document.form1.w.value && document.form1.h.value)
self.resizeTo(document.form1.w.value, document.form1.h.value);
if (document.form1.x.value && document.form1.y.value)
self.moveTo(document.form1.x.value, document.form1.y.value); }


Regards,
Kundan



Post Reply
You must Sign In to post a response.
Next : Money value in sqlserver
Previous : Urgent PLZZZZ.....
Return to Discussion Forum
Post New Message
Category: Windows

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use