Jump to content
  • Advertisement

AlsoPenCover

Member
  • Content count

    9
  • Joined

  • Last visited

Community Reputation

104 Neutral

About AlsoPenCover

  • Rank
    Newbie
  1. AlsoPenCover

    Automatic redrawing of background - C#

    Hah, once again, thank you. I got it now.
  2. Is there a way to make it so that my Form doesn't automatically redraw the background? I just started game programming in C#, and it's annoying to see the black background appear whenever the screen is automatically refreshed, usually by dragging another window on then off of it.
  3. Quote:Original post by Mike.Popoloski Quote:ClientRectangle.Location always gives me (0, 0), it says so in the description in the MSDN. The only thing I can use that for is the width and height of the window not including the border, which I already know. Calling myForm.PointToScreen(Point.Empty) will give you the upper left location of the client area of the window, relative to the upper left corner of the screen. Wow, thank you so much. I'm surprised I missed that method, I must have gone through every method in the Form class half a dozen times, and I guess I just kept ignoring that one. On a side note, I wonder why that's the only way to do it. That method seems like something they just threw in there (just based on the fact that there are no overloads for it - something like that usually has at least one additional overload with 2 ints as the parameters), thinking that they didn't really need it. You'd think it would be important, because when you draw to the window, it automatically adjusts itself for the offsets.
  4. ClientRectangle.Location always gives me (0, 0), it says so in the description in the MSDN. The only thing I can use that for is the width and height of the window not including the border, which I already know. EDIT: I think I'll just rephrase it, because I'm probably just saying too much without actually saying what I want to: Is there anyway to find out how big the border is around any given window, WITHOUT actually counting out the pixels? Is there any built-in function in C# that gives me those values?
  5. The reason I want to do this is because I want to find the position of the mouse relative to the window. The only way I've been able to do it is using Form.Location.X, but that gives me the upper-left corner of the screen, underneath whatever border is there (usually the Windows default). It seems strange that if I draw to the coordinates (0, 0) I draw to the first pixel in the upper-left corner that is visible, which is not the same as Form.Location.X. Is there anyway to get that pixel, the first one visible in the upper-left corner, regardless of whatever border is there? I've tried so many different ways, yet I can't figure it out. I'm almost certain that it's possible though, because I don't see why they would let you. I can do this in Java fairly easily: I just use JFrame.getInsets().left, and that gives me the left margin of the border that Windows put on the window for you. If that helps at all, for those of you who know both Java and C#.
  6. AlsoPenCover

    A*, so close to getting it working.

    To the OP: Try making a completely empty grid and try a bunch of different start and end places. You should get an error that will probably explain to you what is happening.
  7. AlsoPenCover

    A*, so close to getting it working.

    Quote:Original post by ToohrVyk From the original source code: //Set the parent of node_successor to node_current; //--> already set while we were getting successors This is scary, because it means parents get changed even when the considered edge isn't optimal... if that's indeed the case, the algorithm itself is flawed, and correcting this will require at least a partial rewrite. Quote:Original post by AlsoPenCover Ugh, you guys are pathetic. I hate it when people try so hard to seem smart by throwing around "advanced" words when they are completely inappropriate. I made this in a grand total of 30 minutes, and the only thing I used was a matrix, a queue and an array. We are very happy for your achievements. Less so for your answer. A wise guy, huh? Look, don't pretend that just because I responded in a way that doesn't stroke your ego, my answer isn't any good. It's better than everything you guys have right now.
  8. AlsoPenCover

    A*, so close to getting it working.

    Ugh, you guys are pathetic. I hate it when people try so hard to seem smart by making things more complicated than they need to be, and throwing around "advanced" words when they are completely inappropriate. I made this in a grand total of 30 minutes, and the only thing I used was a matrix, a queue and an array. It's really a lot simpler than you guys are making it. http://www.mediafire.com/?dmmed912tt2 Controls are specified in the file. If you want, I'll be glad to explain what I did. [Edited by - AlsoPenCover on December 23, 2007 12:37:22 PM]
  9. AlsoPenCover

    data from input devices

    hey guys how do you get data from input devices????? thanks
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!