locked
MessageBox and System.Windows no longer valid RRS feed

  • Question

  • I am developing a DLL in VS2008 VB.NET on Vista Home Premium. Everything has been updated with all the latest releases and service packs.

    After creating a new project, I added several existing .vb files (from an existing VB.NET2008 DLL) via Add Existing... . Now, I am getting errors for MessageBox.Show (not declared) and System.Windows.Forms.Application.DoEvents() ('Windows' is not a member of 'System'). Intellisense shows Microsoft.VisualBasic.MsgBox but not the newer MessageBox. Also, Intellisense does not recognize System.Windows.

    I checked the project from which the .vb files came and there are no errors.

    Does anybody know what would causing this?
    Wednesday, October 1, 2008 1:19 PM

Answers

  •   Try adding Reference to System.Windows.Forms Assembly from Project->Add Reference
    Gaurav Khanna
    • Marked as answer by rwbta2 Wednesday, October 1, 2008 2:21 PM
    Wednesday, October 1, 2008 1:39 PM

All replies

  •   Try adding Reference to System.Windows.Forms Assembly from Project->Add Reference
    Gaurav Khanna
    • Marked as answer by rwbta2 Wednesday, October 1, 2008 2:21 PM
    Wednesday, October 1, 2008 1:39 PM
  • That worked for System.Windows.Forms.Application.DoEvents() but MessageBox was still unavailable. By also adding
    Imports System.Windows.Forms, it's all working properly again. Thanks for your help!
    Wednesday, October 1, 2008 2:21 PM