|
im hiding the groupbox and i want to fill the empty space with datagrid that is still visible. how do resize the datagrid to feet the space, is there a easy way?
|
|
|
|
|
You can simply assign a new Location and Size property to any control to alter its appearance:
grpBox.Hide();
dataGrid.Location = grpBox.Location;
dataGrid.Size = grpBox.Size; Regards,
mav
|
|
|
|
|
i dont understand why
1.) dataGrid1.Size = groupBox3.Size + dataGrid1.Size;
work
and...
2.) dataGrid1.Size.Height = groupBox3.Size.Height + dataGrid1.Size.Height;
dont
i wanna change only dataGrid1 Height
|
|
|
|
|
|
can you help me please ...am learning
not workink code:
groupBox3.Hide();
dataGrid1.Location = groupBox3.Location;
dataGrid1.Size.Height = groupBox3.Size.Height + dataGrid1.Size.Height;
|
|
|
|
|
As I said already: The Size object is immutable. That means that once created it does not change. You cannot set the Height of a Size object because that would change the object, you have to create a new Size object and use that
In your code that means the line
dataGrid1.Size.Height = groupBox3.Size.Height + dataGrid1.Size.Height; cannot work because you are attempting to set the Height property on an immutable object. (If the property is on the left hand side [LHS] of the equals operator then that is a set operation, if the property is on the right hand side [RHS] of the equals operator then that is a get operation)
So, going back to what I said, you have to create a new Size object. Something like this would work
Size newSize = new Size(dataGrid1.Size.Width, groupBox3.Size.Height+dataGrid1.Size.Height);
dataGrid1.Size = newSize;
By the way, you should really attempt to name your controls (and all variables) with sensible names. groupBox3 and dataGrid1 are not self-explanatory. You will have difficulty in determining what you were trying to do if you come back to look at the code later.
Does this help?
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
it helps! thx!!
|
|
|
|
|
You could put the groupbox in a panel, and then when you hide the groupbox, set the Dock property of the datagrid to DockStyle.Fill
|
|
|
|
|
thx for tip!
|
|
|
|
|
And you may try :
dataGrid1.BringToFront();
|
|
|
|
|
Hi everyone,
This is a very stupid question...But...
What help systems does .net have built in features for?
Is it HtmlHelp or standard html files? does the framework
even have any built in features for help?
End of stupid question.
Si
|
|
|
|
|
|
Hi guys
I am trying to write an application, which can load test my ASP.NET Web Service.
Basic idea is:
I have lot of functions in my web service. I want to execute each function (Right now i am doing it using SOAP) and
then want to calculate processor time, cpu utilization, request-response time etc. Can you tell me some good
articles about that, from where i can get some relevent information? Also can you tell me some basic article about
calculating performance counters?
Thanks
Sumit
|
|
|
|
|
Hi all,
Salamander's .NET Protector makes a claim that it completely prevents decompile and disassembly of C# applications, which means that the source code cannot be seen in ILDASM and Reflector etc. They also claim that their product is better than an obfuscator. However, their product pricing being so exhorbitant (US$ 1899 or so per license, which is even much more than the pricing of MS Visual Studio Professional Ed.), I first wanted to confirm whether it is really a useful product? Is it a worthwhile product and is it worth its value? Secondly, do you think that their claims about the product are true claims?
Can anybody who has used that product share his experience?
Thanks in advance.
|
|
|
|
|
Anonymous wrote:
However, their product pricing being so exhorbitant (US$ 1899 or so per license, which is even much more than the pricing of MS Visual Studio Professional Ed.),
How many licenses will you need? If this was being bought for the company I work for, we'd probably only get one license because it won't be an everyday task by people. It will be a task done towards the end of the project (and maybe a few times during [for testing purposes]) so, unlike Visual Studio, it won't need to be on everyone's machine. Probably it would just be needed on one machine.
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
XenoCode is the best. Check it out!
|
|
|
|
|
Now,I have get needs of user, and try to start from system analysis ,then after that, code programs.
but I have not experiences ever.Can I get some suggestions ?(sample with explanation is expectd)
|
|
|
|
|
You might like to look at a book such as Head First Design Patterns. It explains design patterns in a very easy to understand way with examples. The examples are in Java, but they don't use much of any frameworks (because they are teaching you to create your own framework) so it is easy to see how to do the same thing in C#.
Also, don't be overwhelmed by the size of the book - its full of pictures and diagrams and it is very light reading.
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
I am building a setup using Visual Studio .NET 2003.
The requirement is, during installation process we need to ask user for License key. If key is valid, user should be allowed to go ahead with completion of setup. If user exits the key request form, setup should rollback.
The key application for key acceptance and validation is ready. It returns true if key is valid, else it returns false.
How can we check these values during installation and commit or rollback the installation accordingly?
Thanks in advance.
- ashish
|
|
|
|
|
It is a good question, i would help you but i don't know.
Have you solved this problem?
|
|
|
|
|
Hello,
Now, I develop communication tool using udp protocol.
When I send data, I use send() in C#'s Socket class.
If a recipient tool is exist, a sender send it.
If not, sendTo() waiting some seconds.
Maybe after 10 seconds, the error occured.
I'd like to send it no waiting whether recipients is exist or not.
I investigated Socket class( expecially, SetSocketOption ),
But I have no idea.
If you have some ideas, please tell me.
Thank you in advance for your kindness.
yu-yu
|
|
|
|
|
How can i use IMAP with admin account to read other accounts's mail? How the find a user path and change the current mailbox to another mailbox ? I amn't sure whethever IMAP can archieve this, if not what protocal i should use ?
Please help
|
|
|
|
|
Hi everybody.
Im am working in an application and i need save the information in an excel file into a dataset, or an array. Anybody can tell me how can i do that? If anybody can help me i will be gratefull.
|
|
|
|
|
1. You can use ODBC and read Excel data. That data you can store anywhere you want.
2. Using Excel.Application object, you can read information form Excel sheet and save it to array or where ever you want.
- ashish
|
|
|
|
|