View Single Post
Old April 25th, 2016, 12:10 PM
Rod Stephens's Avatar
Rod Stephens Rod Stephens is offline
Wrox Author
Points: 3,166, Level: 23
Points: 3,166, Level: 23 Points: 3,166, Level: 23 Points: 3,166, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jan 2006
Location: , , .
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts

Hi Maximillian,

It looks like you're on the right track. There are a few things I can see off hand. For example, you're big If Then statement you check that the input contains at least one of I, X, V, etc. But it doesn't ensure that it doesn't contain anything else like Q. Not a huge deal.

The way the program is structured now, you need an infinite loop in Form_Load. It's easier if you use a TextBox instead of an InputBox. Then you can run the code in a Button instead of Form_Load.

The long If Then ElseIf series is a good way to examine the input letters. You could add an Else at the very end to display an error if the input contains a Q or % or something.

If you attach your program, I'll take a look. To do that:
  1. Close Visual Studio and then delete the bin, obj, and .vs directories
  2. Move up a directory level so you're above the project's main directory. Right-click it and select "Send To > Compressed (zipped) folder"
  3. On this page, click "Send Reply"
  4. Look below in the Additional Options section, click Manage Attachments, and attach the zip file.
I should be able to figure out what's going on. (Also let me know what version of Visual Studio you're using so I can use the right version for you.)

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)