|
Amar Chaudhary wrote: i dont have c# ide this time
It's the logic that counts
|
|
|
|
|
I can't seem to figure out a way to loop over all cells in a DataGridViewColumn from within the column itself.
I have a class which extends the DataGridViewColumn class, and from within it I need to check all cell values in a way similar to:
foreach(DataGridViewCell cell in this.Cells){
// evaluate cell contents
}
Is there any property of the column I can use to achieve this? This functionality seems to be lacking from the column classes, though implemented in the row classes.
|
|
|
|
|
Hi all !
How can i access a specified field in 'Crystal Report'
eg: like how can i increase a value of a specified field of
'Crysatl Report'
Thanks bye
SalehMahmoud
|
|
|
|
|
Can anyone tell me where I can download OpenSource application that has been developed with modules?
Or a book to download with that topic - how to develop module oriented applications?
Thanks.
|
|
|
|
|
Just break your app into DLLs, surely ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
And this is it? Just break into dlls?
Then, this is something like plugins?
But, what if I want to store in Xml file which module have to be placed in panel control?
I want to have a module oriented application, but I want to enable to place a modules on forms by specifying its position in Xml file, like:
<root>
<Module Name="UsersList" Position="LeftPane" />
<Module Name="Diagram" Position="LeftPane" />
<Module Name="ManageUsers" Position="MiddlePane" />
</root>
So when program loads, he (program) decides where to place a module (in which pane) based on informations in Xml file.
I know that I have to create a new instance of UserControl and then to place it in Panel, but how can I do this in a loop when I specify the name of the module (from xml)?
In ASP.NET I will do this like so:
Control c = this.LoadControl("control path");
c.ID = "blah, blah";
PlaceHolder.Controls.Add(c);
I want the same functionalaty in Win Forms.
Thats why I've asked about OpenSource program or a book with this topic, to see how can I achieve this.
I hope you understand what I want.
Thanks.
|
|
|
|
|
You are trying to dynamically load assemblies and instantiate types. This[^] article should give you a start. You'll primarily be using reflection to instantiate types from strings in the XML file.
|
|
|
|
|
Thank you. This article will help.
So module oriented application is done like plugins or this is another way to achieve a module oriented application?
|
|
|
|
|
My apologies if this has been covered earlier or elsewhere - I did look but couldn't find anything.
I'm coding an app in C# using VS 2005 and I'm looking to make the interface as Vista-like as possible. Clearly, things like the control boxes on forms will be handled by the the OS - but what about buttons and the green-glow progress bar (to name a few)?
Are there libs I can download from MS to build into my app to get these "Vista effects"?
Is there something simple that I'm overlooking?
Any help is much appreciated.
Kind regards,
John.
|
|
|
|
|
Glowing buttons are progress bar are also handled by the OS. If your controls use XP style on XP, they should also look fine on Vista.
|
|
|
|
|
|
Please help me to create this frame message on ASP.NET and window application
thank you.
Message type....
Subject.....
Text
..............
...............
...............
Please reply me ASAP to my email: saigonxuanay@yahoo.com.sg
ngh
|
|
|
|
|
I am loading a form from an XML. I store the location and size info as follows:
<window number="1" x="110" y="145" width="700" height="722">
But each time I load the form, it's height is exactly 20 pixels smaller than what is in the file.
Not to mention the form I launch from shows a 20 point shrinkage as well even though visually it does not chage size.
The code I use to launch the window is:
Window win = new Window(this, name, nextCollWinXMLNode);
win.Show();
Has ayone experienced this behavior before?
Thanks,
RABB17
RABB17
"Nothing fancy needed, please just solve all our problems as quickly as possible."
|
|
|
|
|
it is dependent on the height of the title bar which in default xp theme is 20 pixels
size of title bar may variate with change in os and / or theme
toget rid of this experiment with position and size variable
i did that few weeks ago but i didnt remember what actualy was the solution
|
|
|
|
|
Is there a way to make it universal across OS/Theme? In other words, is there a way to get the size of the title bar and or border?
RABB17
"Nothing fancy needed, please just solve all our problems as quickly as possible."
|
|
|
|
|
sorry for late responding
<br />
int diff = 0;<br />
diff = this.Height - this .ClientRectangle.Height;<br />
diff = this.Height - this.DisplayRectangle.Height;<br />
<br />
|
|
|
|
|
Is there a way to make it universal across OS/Theme? In other words, is there a way to get the size of the title bar and or border?
Thanks,
RABB17
RABB17
"Nothing fancy needed, please just solve all our problems as quickly as possible."
|
|
|
|
|
Thanks,
I figured this out. I was passing my form and initialized the sizer after it had already been initialized once. Now I just set a global variable and set it on the passed form.
RABB17
RABB17
"Nothing fancy needed, please just solve all our problems as quickly as possible."
|
|
|
|
|
I am reading UDP packets that a router is sending to me. In this example i am reading the "system uptime" field which starts at bit position 64 from the begining of the packet and is a 32 bit field. So the end of the field is calculated to end at 95.
I know that the first byte of this two bit field prints to the console 69 when i Console.WriteLine(buffer[8]). When I do a Convert.ToString(buffer[8],2) I get 101000101 printed on the console. I converted this byte to a decimal number. unfortunatly this is revered! and is being counted LEFT to RIGHT!
When the binary numbers should start from Right to left. the real binary number of 69 is 01000101. which is the mirror opposite of what the console printed. Do you have any idea why this is?
Here is the code that I am looking at.
public static uint Parse(byte[] datagram, int offset, int length)
{
uint total = 0;
int byte_index;
int bit_offset;
int bit;
byte b;
for ( int i = 0; i < length; i++ )
{
bit_offset = (offset+i) % 8;
byte_index = (offset+i-bit_offset) / 8;
b = datagram[byte_index];
//Writing the datagram to the console and performing the Convert.ToString is where i notice this.
bit = (int)(b >> (7 - bit_offset));
bit = bit & 0x0001;
if ( bit > 0 )
{
total += (uint)Math.Pow(2,length-i-1);
}
}
return total;
}
Is this why there is the shift right and then the AND to somehow fix this issue?
|
|
|
|
|
See endianness for information and see IPAddress.NetworkToHostOrder() for conversion methods.
|
|
|
|
|
what is the type of the distrbution of Computer Generated Random Numbers?
|
|
|
|
|
shabonaa wrote: what is the type of the distrbution of Computer Generated Random Numbers?
No one knows, it's random.
led mike
|
|
|
|
|
That depends on what algorithm is used.
The numbers produced by the Random class is suitable for most regular uses. To create secure keys for encryption it's too predictable, so the encryption classes have their own random generator.
---
b { font-weight: normal; }
|
|
|
|
|
what is type of distribution the default random function in .net use?
|
|
|
|
|
Is this a question on a test, or something?
The distribution is supposed to be uniform. I don't know the exact algorithm, so I can't say how close to uniform they are.
---
b { font-weight: normal; }
|
|
|
|