|
Sure, right click the ScrollBar and select 'Send to Back'.
|
|
|
|
|
hiho,
i think those properties are a nice new thing in c#. is there a way to have an array as a property? indexers are on a by-class-basis (so to say), so is there anything between?
imagine a table-class. i want something like
myTable.RowName[6]="Street";
myTyble.Cell[3,7] = 87;
so, how to define RowName or Cell
of course i can do it the old-fashioned way using member-functions a la
myTable.SetRowname(6,"Street")
or the other way around, make the array public, but then the user of my class is responsible for the range-checking.
ok, the question in short again: can i have an array as a property? if yes, how?
thx in advance.
:wq
|
|
|
|
|
You can define a property that returns a reference to an array.
Also, there is nothing stopping you from returning a reference to class that defines an indexer with multiple parameters.
Either way, it should work as you stated above...
Regards
|
|
|
|
|
Any idea on how to create a PropertySheet/PropertyPage equivalent in C#. Is there a inbuilt control for this purpose.
Thanks
Kannan
|
|
|
|
|
So far I haven't seen one. But with the way that the IDE handles the TabControl, it isn't as hard as it used to be.
|
|
|
|
|
I want to make a memory finder using By Process. how can I find memory address and their value, make a search through the process, WriteMemoryByte and ReadMemory all things like that ???
Thanks
|
|
|
|
|
I'm an fairly experienced Java programmer who's just started on the road leading to C# & .NET.
I would like to know whether there's someobody who's had experience with the same. Is it an easy port? Does it take time or can you manage it fairly quickly? How does C# and especially .NET compare with Java? If you've programmed in Java before, or still are, what do you prefer?
Just curious...
Thanks
|
|
|
|
|
I never did any Java. But I can tell you this. The similarity ends with language syntax. As a Java guy you won't find C# mysterious. Just like how VB guys find VB.NET easy. And C++ guys find Managed C++ easy. But that's only 1/4 th the battle. The main challenge is understanding the .NET framework. The great thing about .NET is that the language or compiler does not really matter. That's just a matter of personal choice. Almost like the color of a motor car. The peformance does not depend on the car's color huh?
Nish
If I am awake and my eyes are closed, it does not necessarily mean that I am thinking of naked women.
|
|
|
|
|
|
Huh?
Nish
If I am awake and my eyes are closed, it does not necessarily mean that I am thinking of naked women.
|
|
|
|
|
Try the JUMP tool from microsofts MSDN site. It's a free to for Java User Migration Path (JUMP) and it is suppose to convert your code pretty well.
|
|
|
|
|
Who knows if it's possible to include some inline assembler code into C# code ?
|
|
|
|
|
Nope, it isn't possible. You could write a component in MC++ which contains the code then call it from C#, I believe the QuickStart samples have an example of how to do this [Edit: "this" refers to using MC++ to wrap some C/C++ code, the code you will wrap with MC++ is the ASM code].
James
Sonork: Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971
|
|
|
|
|
Just a few more posts and this forum will pass the ASP/ASP.NET forum
Yes, its a saturday night and i'm that bored.
James
Sonork: Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971
|
|
|
|
|
Do a little dance
Give a little love
Get down tonight
Next we conquer the VC++ forum!
James
Sonork: Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971
|
|
|
|
|
James T. Johnson wrote:
Next we conquer the VC++ forum!
[gives a quick look over shoulder as the metallic voices echo down the corridor]
Assimilate!
Assimilate!
Assimilate!
It's Saturday night & i'm amusing myself by cleaning whilst waiting for South Park to be on... I'd wager cash i'm more bored than you.
Sometimes i only remember, The days when i was young Nowadays no one remembers when they were young and stupid... ADEMA, The Way You Like It
|
|
|
|
|
Shog9 wrote:
i'm amusing myself by cleaning whilst waiting for South Park to be on... I'd wager cash i'm more bored than you.
I bet you are! I did the cleaning thing last Monday at 4am :-P
Now I'm rewriting/refactoring code for a directory splitter, hopefully the bug will be come more apparent now that I know what exactly will be needed in it
James
Sonork: Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971
|
|
|
|
|
James T. Johnson wrote:
Next we conquer the VC++ forum!
Wake up , wake up James.Your are just dreaming.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Nah, we just need to somehow break the VC++ forum and leave this one working
James
Sonork: Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971
|
|
|
|
|
When I ping certain servers, my lowest ping is like 25, the highest about 40. But, I got a package loss of 1.5%.
A package normally times out in about 2 seconds. But when I ping those servers, I KNOW that I won't recieve the package if I didn't get it in 40 ms.
I'm thinking about making a program that checks the data stream, calculates the average ping. The program 'knows' when a package will be lost, so it will send a new package after say 50 ms already. Then instead of a normal package loss the client will recieve a package in 50+30=80ms, which is still a great pingtime.
For normal browsing a package loss of 2 percent doesn't matter, for online gaming it does.
Does a program like this exist already?
If not, is my idea seriously flawed, or do you think it will work?
Feedback please.
Cheers!
|
|
|
|
|
Griffith Sutherns wrote:
If not, is my idea seriously flawed, or do you think it will work?
The major problem is that ping times can fluctuate greatly, even without dropping packets.
For an example, here at home we connect via cable modem to the internet. We have a D-Link 707 internet sharing router which serves as our gateway to the internet. Normally my ping times are about like yours, but if my dad starts uploading files they can quickly change from 25-40 to 500 to 700 for moderate uploading all the way up to 1500 to 2500 for extreme uploading.
Your scheme only works well in the case that i get a constant average ping. In my environment my ping can fluctuate wildly depending on what my dad is doing at the other end of the house.
In a game situation it would be a serious flaw to wait 2 seconds for a packet to be received. Most games factor in a little packet loss into the network design, either in passing redundant data across packets or in assuming that what is happening will continue to happen without that 1-2 packets of data. I believe Q3 uses the second method, which would explain why if you are really lagged you can continue to move, but you'll bounce around as the game gets the correct data.
My $.02 anyway,
James
Sonork: Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971
|
|
|
|
|
Of course, your connection has to be stable. I pinged some random servers, and with 30000 or so pings, the lowest and highest are less than 20 ms apart.
And if the program is a little smart, it will notice when the ping changes (upstream in other PC on LAN), so it will adjust the timeout settings.
I believe nothing like this is made so far, and I think it might work real well.
The program mainly avoids package loss on otherwise stable connections.
Thanks for you feedback, let's hope some more CPers will give their opinion.
|
|
|
|
|
While drawing in a double buffered control, how would one get a hold of the actual Bitmap that .NET is holding for the buffering? So you could set individual pixels for example. Aside from using yet another bitmap to do all of the drawing, which is what double buffering is doing in the first place.
Thanks
|
|
|
|
|
This is a double buffering code: (Its from Beginnning C# books by wrox publisher).Maybe it helps you:
Graphics displayGraphics = e.Graphics;
Random r = new Random();
Image i = new Bitmap(ClientRectangle.Width, ClientRectangle.Height);
Graphics g = Graphics.FromImage(i);
g.FillRectangle(Brushes.White, ClientRectangle);
for (int x = 0; x < ClientRectangle.Width; x++)
{
for (int y = 0; y < ClientRectangle.Height; y += 10)
{
Color c = Color.FromArgb (r.Next(255), r.Next(255),
r.Next(255));
Pen p = new Pen(c, 1);
g.DrawLine(p, new Point(0, 0), new Point(x, y));
p.Dispose();
}
}
displayGraphics.DrawImage(i, ClientRectangle);
i.Dispose();
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
While I appreciate the answer, please read the question before answering it…
The .NET Control already has the ControlStyles.UserPaint | ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint styles set, which provides double buffering for the control.
As a mater a fact, I am already doing something like what you posted (on top of double buffering) to get to any kind of SetPixel method.
What I would like to know is if I can get a hold of the bitmap .NET already has, for the double buffering I told it to do?
Thanks
|
|
|
|