Re: Creating a Message Box with Column Headings and Columns?
The attached is a form that looks like a MsgBox. Just add a litview control to it and you'll have what you want. If you don't need the "don't show this again" code then remove it.
Re: Creating a Message Box with Column Headings and Columns?
I don't think were allowed to use another form though, and I can't open those files, I'm using microsoft visual studio 2008?
The whole assignment is to calculate interest over 10 years, and have it display the totals for all 10 years in a message box. With one column with years 1-10, and the other column with the totals for each corresponding year. Is there anyway to do this with a list box? I'm using for next loop.
Re: Creating a Message Box with Column Headings and Columns?
Do I have to use some sort of array? But the message box has to have "Years" and "Amount on deposit" as the column headings, followed by the 1-10 under "Years', and a Decimal Amount under "Amount on deposit". I'm so clueless
Re: Creating a Message Box with Column Headings and Columns?
you can create columns in a msgbox, you need to use a system font (one where the letter W will take the same space as a letter I) and you need to fill each field with spaces to a fixed amount then you can do something like
Code:
Year | Amount
2000 |$1234.56
2001 |$5643.21
2002 |$2222.22
so you create an array with 2 dimensions and 10 elements
[code]
Dim Deposits(10,1) As String
[code]
then you need to fill the values for the array( not forgetting the header in (0,0) and (0,1), then use a loop and add spaces to make the columns the size (in chars) you need. once you have done this you create a string using a loop like this
Code:
Dim FinalString as String = ""
for a = 0 to 10
FinalString &= deposits(a,0) & "|" & Deposits(a,1) & VbCrLf
Next a
Finally you display this string in the msgbox
Code:
MsgBox(FinalString)
Hope this helps
If debugging is the process of removing bugs, then programming must be the process of putting them in.
Re: Creating a Message Box with Column Headings and Columns?
Ok now I have some seriously wierd problem. No matter what I change on the program, when I run it, it appears and runs as if I did nothing. I can delete all of the lines of code for the each year button press, and save it and run it, and it still works perfectly...
Like I can literally delete all of the code, save it, and run it and it will still run perfectly fine....*** -_-
Which is making it impossible for me to create the code for the every three years button, considering no matter what the changes I make in the code don't seem to reflect anything when I run it...
InformationString = "Year" & ControlChars.Tab & "Amount on deposit" & Environment.NewLine
for a as integer = 1 to 10
informationString &= YearsInteger(a).ToString("N0") & ControlChars.Tab & AmountDecimal(a).ToString("C") & Environment.NewLine
next
If debugging is the process of removing bugs, then programming must be the process of putting them in.
Re: Creating a Message Box with Column Headings and Columns?
Draw up a Dialog Box using the Form drawing box, and then use the Label controls or the TextBoxes to draw up a table. Or even use something like an Access table control or even an Excel table worksheet conrtrol, even...
I have been able to make a table control, using only Label controls. This means that you can fill up the data that is to be filled into them, using the max length and the position of the control. That coninsided with the position on the Form. This was then adapted to my Warhammer 40,000 wargame. That I was making for me, and my friends on my community network on the Internet, but never got around to finishing it, really!!
I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...
|Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |
Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...
Re: Creating a Message Box with Column Headings and Columns?
Well as long as we are teaching her. And not doing it for her. But she will only be able to do it, if we are able to show her, how to do it. Because she will never learn in the short term.
I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...
|Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |
Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...
Re: Creating a Message Box with Column Headings and Columns?
And if some of the posts here (at VBF in general, not specifically this thread) are any indication, whether what the schools call teaching is debatable.
Re: Creating a Message Box with Column Headings and Columns?
yes, that is true!!
I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...
|Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |
Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...