CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2017
    Posts
    3

    Resolved String Formatting

    Welcome,

    I have a program that allocates a timer in the entry point of the application. However, its timer is set to a 1 millisecond interval and then an integer is incremented by 1 every time the tick event is called. I want to format a string with the newly created integer inside of the timers function i.e. "BitmapFile.Format("Bitmap" + BitmapCount.ToString()));" I have tried this but it does not work, and tried other examples.

    Please can anybody give me an idea how to format a string with the integer that has incremeted with a specific file name before hand.

    I am also looking to record audio directly from the sound card, is waveInStart a good place for this, what about WSAPI sound capturing.

    Would like to make a game recording application and a video for windows library to append bitmap images into a stream and create an avi file with it with uncompressed bitmaps.

    C#.NET is different to what I work with, I normally do Delphi/C++ and Pascal.

    Privatex86

  2. #2
    Join Date
    Jun 2017
    Posts
    3

    C#.NET String Format

    Visual Studio: 2008 Express Edition

    Welcome,

    I am using Visual Studio 2008 Express Edition to write a simple console application to capture Format24bppRgb bitmap images inside of a timer set to 1 millisecond when the Program is executed from the selected process id. However, I have an integer that increments by 1 every time the timers function gets invoked from the Program. I want to format a specific string with the integer that has been incremented to set the filename for each screen shot i.e.

    Code:
    string BitmapFilename;
    BitmapFilename.Format("BitmapImage" + BitmapCount.ToString());
    I also want to write a library that captures a live stream of the audio directly from the users sound card, is that waveInStart and WSAPI capturing because I don't know of anything else. I want it to work frrom platforms from Windows 98 until Windows 10. I have tried the Stereo Mix and Voice Recording application but the sound is echoe and quiet, and it wasn't good quality.

    Forum members are welcome so provide and submit ideas.

    Privatex86


  3. #3
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,824

    Re: C#.NET String Format

    [Threads merged]
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  4. #4
    Join Date
    Jun 2017
    Posts
    3

    Re: C#.NET String Format

    2kaud,

    I have figured out how to do it how, I forgot to keep adding the @ symbol before the variables its working now. Would you know anything about audio recording?

    Cheers,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured