Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. forrestcupp

    Simple For Loop

    Which for loop isn't working, the i loop or the q loop? For one thing, if the typo above is the only typo, you have the return statement at the end of the "for i" loop. That means it will only go through that code block the first time, then return from the function. Maybe you should put the...
  2. forrestcupp

    Window.h not found?

    If you are using Visual C++ Express (the free version), it doesn't come automatically ready to program win32 stuff. You have to install the Microsoft Platform SDK separately to even have the windows.h header file on your computer. The website cpjust posted will show you how to download it and...
  3. forrestcupp

    VS2005, C++ and native code

    Yeah, I just found that out. /MT includes everything the program needs to run within the exe so it doesn't depend on anything else. That makes the exe much bigger. But is it true that /MT includes only what the program needs and not everything that the dll contains? If that is true, then you...
  4. forrestcupp

    VS2005, C++ and native code

    so does that change make it to depend on the plain msvcrt.dll instead of the msvcr80.dll?
  5. forrestcupp

    Speeding up a background image

    Sorry about that. I guess maybe it wouldn't work on 64bit.
  6. forrestcupp

    VS2005, C++ and native code

    When you create a project, do you start off by choosing a CLR project, or by choosing a Win32 project?
  7. forrestcupp

    Experienced C++ developer wants to learn C#

    Public Joe's has a decent one that teaches a lot about GDI+. http://www.publicjoe.f9.co.uk/csharp/tut.html Another good one about C# basics, but not about window programming is: http://www.softsteel.co.uk/tutorials/cSharp/contents.html I would browse through the second one first. If he is...
  8. forrestcupp

    Speeding up a background image

    Oddball, You were right. I forgot to tell you when it was finished. I have been done for a while. I ended up sticking with the GDI and using a solid color background, but I think it turned out just as good. If you want to check it out, it is a free download on download.com. Just go there...
  9. forrestcupp

    Playing sounds simultaneously

    In case anyone cares, I found out that using the managed DirectX AudioVideoPlayback namespace is just as easy as using a SoundPlayer class, and with DirectX I can play multiple audio sources and multiple file formats. It works much better, and it's easy to use.
  10. forrestcupp

    Playing sounds simultaneously

    I know how to play an audio file using the SoundPlayer class, but I have only been able to play one sound at a time. If I am playing a sound, and I try to play another sound, it stops the first one to play the second one. And that is with two separately declared SoundPlayer objects. So, is...
  11. forrestcupp

    Speeding up a background image

    I kind of thought DirectX might be the way to go, but I don't know anything about it yet. I have the DX SDL, but I haven't gotten into it yet. As for using Graphics.DrawImage, I have already tried that, and it did speed things up, just not nearly enough. I am thinking about for this project...
  12. forrestcupp

    Speeding up a background image

    Well, it's a jumbled mess, but I'll try to pick out what I did that pertains to what you wrote. I made the DoubleBufferPictureBox class that you showed. Then in the main window class, in the class scope, I defined: DoubleBufferPictureBox myBackground = new DoubleBufferPictureBox(); then in...
  13. forrestcupp

    Speeding up a background image

    I was wondering if maybe you meant that I should have base.OnPaint(e); in the OnPaint handler? if so, I tried that and didn't get any errors, but it didn't display the image in my window. What am I leaving out?
  14. forrestcupp

    Speeding up a background image

    Well, I tried what you suggested and putting the base.Paint(e); didn't work. It said "The event System.Windows.Forms.Control.Paint can only appear on the left hand side of += or -=" I'm new at c#/.NET so maybe I'm overlooking something obvious here?
  15. forrestcupp

    Speeding up a background image

    I am using c#/.NET with GDI to program my version of the classic snake game where the snake moves around trying not to crash, and everytime it eats something it gets longer. I started off with just a solid background color: this.BackColor = Color.SomeColor; And I got pretty high speeds out of...
  16. forrestcupp

    Path separators

    Thank you alphanytz. That is what I was looking for. I assume that on Linux the Path.DirectorySeparatorChar would be '/', and that I wouldn't have to distinguish between this and Path.AltDirectoryChar?
  17. forrestcupp

    Path separators

    Thank you. Actually it was the DirectorySeparatorChar that I was looking for, but mine doesn't have it either. I wonder why.
  18. forrestcupp

    Path separators

    I know this is kind of a crazy question, but in Python when I make a string with a path to a file, I can use os.sep which means that if it is being used in Windows it's the "\" character and in Linux/unix it's the "/" character. Is there anything like this in c#? The reason I'm asking is...
  19. forrestcupp

    Can't disable a button

    I just found the solution thanks to a man named Kevin Delafield. It is as follows: button.Enabled = false; button.Update(); MySound.PlaySync(); Application.DoEvents(); button.Enabled = true; this worked perfectly.
  20. forrestcupp

    Can't disable a button

    I have a form where a certain button plays an audio file that is about 3 seconds long. I am using System.Media.SoundPlayer.PlaySync() because I don't want the user to do anything while the audio is playing. So my code is something like. button.Enabled = false; MySound.PlaySync()...

Part and Inventory Search

Back
Top