|
hi brother i need information in competer language..
thanks 2 all..
|
|
|
|
|
Rajeshwar Developer wrote: hi brother i need information in competer language..
If you can't spell computer, you're going to struggle in a career in IT.
The 2 words are unrelated. You can see this from the definitions.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Rajeshwar Developer wrote: overwrite
what is this ?
|
|
|
|
|
hi navaneeth from india know ...brother sorry i was mistaken .actually wht is the different b/w override and overrides
thanks 2 all..
|
|
|
|
|
Rajeshwar Developer wrote: overrides
This is not a valid C# keyword
|
|
|
|
|
In programming, to override is to redefine a virtual or abstract method in a derived class.
Overwrite has no meaning in programming.
|
|
|
|
|
sorry brother i mistaken wht is the different b/w override & overrides..
thanks 2 all..
|
|
|
|
|
override is a c# keyword, and overrides is VB.NET. I believe they do the same thing, although there may be subtle differences of which I am not aware.
"You're very clever, young man, very clever," said the old lady. "But it's turtles all the way down!"
|
|
|
|
|
one is plural one is singular?
|
|
|
|
|
Hello, I'm rather new to C#, but chose this language since I found the graphical user interface design to be rather nice to use. I'm just coming off of a Java programming GUI design course and am sick of it.
I'm building a "Battle Grid" with a few friends in a project that we expect to take a long time. We want to build an RPG playing program that'll handle what we need.
The basic run down of the grid is that it needs to be squares that will designate 1 foot of space. I want to be able to show trajectories of projectiles from the characters. Each character will take up one square. Also, I wish to be able to have the characters use cones and spheres for area of effect spells or other effects they may cause. I need to be able to click the character and have their information (not sure how I want to handle character data) display on the side too.
I'm not asking for source code, I'm looking for implementation ideas. I have a few ideas of my own, and I want to hear some feedback from the community since you guys are a wealth of knowledge I wish to consult!
1. Battle Grid.
- Manipulating a DataGrid in some creative ways to make it do what I want.
- Creating a grid of 2-d boxes for the grid, and use different drawing methods to get my aoe/cone/trajectory objects I need.
- Creating a grid of buttons that will let me do silly thing (not a feasible thought, I just chuckled when it crossed my mind)
- Creating a 3-d grid projected onto a 2-d plane.
2. Character files
- Highly organized text files, using regexs' to get all the characters data loaded into the program upon startup
- Parse MS Excel files with their data sets
- Create a new file standard (this would be an interesting project in itself)
I'm open to any advice/suggestions/criticisms that anyone would have to offer.
while(fork()){
fork();
}
|
|
|
|
|
I couldn't get the grid control to do anything useful. I tend to use sourcegrid instead. It is completely customizable, because you have the source
http://www.codeproject.com/cs/miscctrl/csharpgridcontrol.asp
|
|
|
|
|
Thank you, I will be trying to use that grid to the best of my knowledge. Also, do you happen to know of any good information storage systems built into C# that don't require databases. I want the information to be stored in some kind of a file, and I don't know if I have to create my own file type or not. I've done some preliminary looking, and haven't found an obvious answer. If you don't know of anything off hand, that's alright.
I appreciate any help thrown my way, so thank you in advance!
- Per
while(fork()){
fork();
}
|
|
|
|
|
Hi,
I'm trying to load a text file using the a RichTextBox's LoadFile(...) method. i.e.
richTextCtrl.LoadFile(textFile, RichTextBoxStreamType.PlainText);
My problem is that I need to load the text file using UTF-8 encoding and it seems like richTextBox defaults to using ANSI coding. What can I do?
Thanks,
Rafferty
|
|
|
|
|
|
Hi Vasudevan,
The link only said that RichTextBox supports unicode. Does it mean that it ONLY support unicode characters? Any work-around so I can load a text file using utf-8 encoding?
Thanks,
Rafferty
|
|
|
|
|
hehe I just realized that unicode is what U in UTF stands for. But I think it still loads the characters in ANSI encoding by default. Do you know how to make it load a text file in UTF-8 programmatically? (I can't use the copy paste method)
Thanks again
|
|
|
|
|
Could someone explain how to use 2 keys at once (arrow keys; up / right) without stopping each other. Say you have pictureBox1 . You want to move it to the right with the right arrow. Up, move it up. What is the code that allows the user to hold the right key down and move to the right without stopping that motion if the up key is pressed. If you have an answer thanks, anything else, I don't care to hear, after all the crap I get (no comments on the crap I get or why).
- "Achieving all knowledge does not mean achieving all wisdom." some wise dude
- I love D-flat!
|
|
|
|
|
You could keep track of keys currently pressed by catching the keydown and keyup events (not recomended because your form could lose focus while the key is down, so it keeps scrolling although not focused), or you can get keydown events, add that key to some list, and have a timer that polls the list of keys anytime you want to move in that direction. Once you see a key is no longer down (or a keyup event occurs), you can remove that key from the list. Hope this helps,
Jeff
|
|
|
|
|
For the keydown, how would you know which keys are down and when released? Switch, if?
- "Achieving all knowledge does not mean achieving all wisdom." some wise dude
- I love D-flat!
|
|
|
|
|
I think I just got it. I think I did the opposite of what you said, but I think it did what I wanted! In the keydown event, I set 2 bools to false (right above keydown). Then, in Keydown, i set if (e.KeyCode == Keys.Right)
{
movingR = true;
}
ditto for up and I think it worked!
- "Achieving all knowledge does not mean achieving all wisdom." some wise dude
- I love D-flat!
|
|
|
|
|
Just be careful doing that, because if another window pops up (like an internet add, or an instant message window), then you will NOT get the keyup message, so your application will continue to scroll even though it doesn't have focus (depending on how you implemented it), which can be really annoying for the user. In addition, after regaining the focus, it will still try to scroll down even if the key is not depressed. You will have to repress the down button to get it to stop (again, depending on how it is implemented).
Jeff
|
|
|
|
|
Actually I didn't get it. It's all glitchy. Jeff, your code has one error, with the "Contructor" part. Isn't there some simple code with a switch or anything that allows more than 1 button to be pressed simultaneously? If there are any more suggestions, think Mario-ish. Thanks for anyone who tried to help, though, I mean that.
- "Achieving all knowledge does not mean achieving all wisdom." some wise dude
- I love D-flat!
|
|
|
|
|
Do the following...
IList<Keys> m_keys = new List<Keys>();
object m_lock = new object();
Timer m_timer = new Timer(1000); // Move once per second
public Constructor() {
m_timer.Elapsed += new ElapsedEventHandler(m_Elapsed);
}
private void m_KeyDown(object sender, KeyEventArgs e) {
e.SuppressKeyPress = true;
e.Handled = true;
lock(m_lock) {
if (!keys.Contains(e.Key))
keys.Add(e.Key);
if (!m_timer.Enabled)
m_timer.Start();
}
}
private void m_KeyUp(object sender, KeyEventArgs e) {
e.Handled = true;
lock(m_lock) {
keys.Remove(e.Key);
if (keys.Count == 0)
m_timer.Stop();
}
}
private void m_Elapsed(object sender, ElapsedEventArgs e) {
lock(m_lock) {
for (int i = m_keys.Count - 1; i >= 0; --i) {
if (m_keys[i] is depressed) // this is pseudocode.
perform action based on key being pressed
else
m_keys.RemoveAt(i);
}
}
}
Hope this helps!
Jeff
|
|
|
|
|
Hi Jeff,
I believe the basic idea is fine, but there probably is one problem, the single timer can not
possibly sync with multiple keys, so the second key pressed might autorepeat immediately;
IMO one really needs a timer for each entry in the keys collection.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Do you have any ideas, Luc? I'm sorry I bug you and the other vets, but... I just need this to make the game polished. I've got (actually, REALLY) good collision checking, 5 levels so far, menus, and I plan more things. I just want the controls to not suck. Thanks for any ideas.
- "Achieving all knowledge does not mean achieving all wisdom."
- I love D-flat!
|
|
|
|