I have developed a datagrid control dynamically with pre defined number of columns and rows and docked it to a new form form2. But the form2 comes in usual form size i.e small and all the cells of the datagrid are not visible as it has scrollbars. I want to see all the cells within the form so I need to increase the size of the form2. Please help me...
Eew, you do know we are already at .NET 3.0 and 3.5 is comming in a few months.
Oh well you should so something like:
StringBuilder sb = new StringBuilder(); // From System.Text namespaceusing (StreamReader re = File.OpenText("abc.txt")) // Using makes sure the reader gets disposed correctly
string input = null;
while ((input = re.ReadLine()) != null)
sb.AppendLine(input); // StringBuilder has easy method to add new line and is alot faster than string concat
string result = sb.ToString();
Oh StreamReader has a ReadToEnd() which does what I did here :P
string result = null;
using (StreamReader re = File.OpenText("abc.txt")) // Using makes sure the reader gets disposed correctly
result = re.ReadToEnd();
When I press F10 and then up or down arrow key there appear a box with options Restore, Move, Size, Minimize, Maximize and Close. I think that comes from system, because many windows has similar box (like properties on desktop).