0

What I'm trying to do (create a dialog box type popup which returns text as well as a yes or no response) has already been asked here:

Messagebox with input field

however VS doesn't seem to recognise the answer given of using:

Microsoft.VisualBasic.Interaction.InputBox("Question?","Title","Default Text");

Has this been removed? is there something else I can do that will give the same effect?

Andrew Neate
  • 109
  • 1
  • 9

1 Answers1

0

You would need to have added the reference Microsoft.VisualBasic

Your code should read something like

String answer = Micsoft.VisualBasic.Interaction.InputBox("Question?","Title","Default Text");

If you have both these, then it should work

BugFinder
  • 17,474
  • 4
  • 36
  • 51
  • copied what you have written and reference is there and still having error "type or namespace name 'Interaction' does not exist in the namespace 'Microsoft.VisualBasic' " – Andrew Neate Nov 27 '17 at 10:25
  • then you've somehow used the wrong "micrisoft.visualbasic" reference - open a new winform app, repeat this, see if it works – BugFinder Nov 27 '17 at 10:27
  • I think I've been adding the reference incorrectly, sorry for the trouble thanks for the help. – Andrew Neate Nov 27 '17 at 10:29