CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Inigo Montoya

Search: Search took 0.03 seconds.

  1. Replies
    3
    Views
    1,730

    Re: Formatting a percentage

    I did get this working, thanks for your advice. Here's how I did it in the end:



    decimal interestConversion = interestRateMonthly * 12;
    txtInterestRate.Text = string.Format("{0:P2}",...
  2. Replies
    3
    Views
    1,730

    Re: Formatting a percentage

    Tried this:

    string txtInterestRate.Text = String.Format ("{0:P2}.00%", txtInterestRate.Text

    It works if I enter something like 12, but if someone enters 12.5 it will display 12.5.00%
    Still...
  3. Replies
    3
    Views
    1,730

    Formatting a percentage

    I have a form that I am working on, and have a quick question:

    The form has the user enter a value for Interest Rate, like 12 for 12%. I need it to format anything entered in that box so that it...
  4. Replies
    3
    Views
    6,836

    Re: English to Pig Latin translator

    Ok, so I have gotten further in this, but now it is just translating the last word I enter in the English box. Any general ideas of why this isn't working? I'm guessing I am not loading the...
  5. Replies
    3
    Views
    6,836

    English to Pig Latin translator

    Working on an English to Pig Latin translator. When I click Translate I am getting:

    System.Windows.Forms.TextBox.Text: System.Windows.Forms.TextBox.Text:Syst..using System;

    Here's the code I...
  6. Re: Load user input into 10x4 rectangular array

    Ok, so I have it mostly figured out now, thanks to everyone's help. I declared the array and am using the variable "r" to designate the rows. You can see in the code where I am loading each field...
  7. Re: Load user input into 10x4 rectangular array

    I get an error that < cannot be applied to operands of type int



    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using...
  8. Re: Load user input into 10x4 rectangular array

    Still not really getting this, I just need someone to explain how it's supposed to work and help me integrate it into my code above.
  9. Re: Load user input into 10x4 rectangular array

    This is how I loaded input from a form with a basic 5 element array, how would I modify this to enter into a 10x4 array?



    for (int i = totals.Length - 1; i > 0; i--)
    { ...
  10. Load user input into 10x4 rectangular array

    Ok, I am working on a form that calculates the future value of an investment. I need to add a 10x4 rectangular array (required) and then display the results when the user clicks exit. I am having...
  11. Replies
    5
    Views
    4,868

    Re: Loading user input into an array

    Thanks again BioPhysEngr, I was able to get it to load correctly now. In addition, I added a sort so it shows the totals in ascending order. I was also required to duplicate the array as a list and...
  12. Replies
    5
    Views
    4,868

    Re: Loading user input into an array

    Thanks a lot BioPhysEngr, that did help a lot. The only problem I am running into now is that the message box shows the last entered total in the first spot and whatever the last total was in the...
  13. Replies
    5
    Views
    4,868

    Re: Loading user input into an array

    Been trying some different things and I have this so far, which includes the box to display all the results loaded into the array:



    using System;
    using System.Collections.Generic;
    using...
  14. Replies
    5
    Views
    4,868

    Loading user input into an array

    I am learning about arrays, and I need to figure out how to enter data from a form into the array. The user enters a subtotal, then the form calculates a discount percentage and amount, and give a...
  15. Replies
    20
    Views
    10,162

    Re: Find Minimum and Maximum values

    You were right Ace, declaring maxInvoice and minInvoice preserved the invoice data from one input to the next. Once I declared them outside the calculate button event, it started keeping track...
  16. Replies
    20
    Views
    10,162

    Re: Find Minimum and Maximum values

    Doesn't help I'm trying to do this with a head cold...brain is a little fuzzy.
  17. Replies
    20
    Views
    10,162

    Re: Find Minimum and Maximum values

    I don't expect anyone to write code for me, just looking for outside opinions as well. My classmates in this online course aren't posting any suggestions either, and neither is my instructor. I thank...
  18. Replies
    20
    Views
    10,162

    Re: Find Minimum and Maximum values

    I haven't gotten as far as loops yet. Here's what I am supposed to do:

    Use the Math.Min method to compare each invoice total to a variable that contains the smallest invoice total to that point....
  19. Replies
    20
    Views
    10,162

    Re: Find Minimum and Maximum values

    I see what you mean Ace. It was suggested I use MaxValue so the correct value is returned the first time. If I had declared it as 0, then the first time an invoice is entered it would always display...
  20. Replies
    20
    Views
    10,162

    Re: Find Minimum and Maximum values

    The min and max invoice boxes are just displaying whatever the current invoice total is. Still working on what the problem could be.
  21. Replies
    20
    Views
    10,162

    Re: Find Minimum and Maximum values

    So, with your help I was able to get much further. I declared the variables for minInvoice and maxInvoice. I added the lines of code using the math.min and math.max syntax. I then attached the 2...
  22. Replies
    20
    Views
    10,162

    Re: Find Minimum and Maximum values

    Thanks for your help. Sorry for not formatting the code as preferred, as I said I'm still quite new to programming. I appreciate your time.
  23. Replies
    20
    Views
    10,162

    Find Minimum and Maximum values

    I have a form that has people enter an amount, and it calculates a discount for the invoice and displays it, as well as total of all invoices, number of invoices, and average invoice amount. I need...
Results 1 to 23 of 23





Click Here to Expand Forum to Full Width

Featured