#1
  1. No Profile Picture
    Contributing User
    ASP Explorer (0 - 99 posts)

    Join Date
    Dec 2003
    Posts
    78
    Rep Power
    11

    How to declare Messagebox.Show


    Messagebox.Show("Hello.")


    When i compile the program for VB.net, it gave me the messaga that Messagebox is not declared? May i know how to declared it?
  2. #2
  3. Senior Fire Wizard
    ASP Mastermind (5000+ posts)

    Join Date
    Feb 2005
    Location
    Ashford, Kent. England
    Posts
    5,651
    Rep Power
    314
    In C# its MessageBox

    However, can you post your code?
    And he picked it all up... in his pick-up.





    Friends of Shemzilla
  4. #3
  5. Moderator From Beyond
    ASP Mastermind (5000+ posts)

    Join Date
    Sep 2004
    Location
    Israel
    Posts
    31,126
    Rep Power
    2921
    you need to add reference to System.Windows.Forms
    then you can have Imports System.Windows.Forms line
    and it would recognize the MessageBox class.
  6. #4
  7. Senior Fire Wizard
    ASP Mastermind (5000+ posts)

    Join Date
    Feb 2005
    Location
    Ashford, Kent. England
    Posts
    5,651
    Rep Power
    314
    Ah. I was assuming this was a windows app.
  8. #5
  9. Moderator From Beyond
    ASP Mastermind (5000+ posts)

    Join Date
    Sep 2004
    Location
    Israel
    Posts
    31,126
    Rep Power
    2921
    maybe it's Class Library - in such case the references are not
    automatically added.
  10. #6
  11. Senior Fire Wizard
    ASP Mastermind (5000+ posts)

    Join Date
    Feb 2005
    Location
    Ashford, Kent. England
    Posts
    5,651
    Rep Power
    314
    Yeah - I've made the connection now

Similar Threads

  1. Sum of Time in SQL Server 2000 - Very Urgent
    By firdouseqasim in forum Microsoft SQL Server
    Replies: 11
    Last Post: July 24th, 2008, 09:22 AM
  2. Incorrect Syntax Near!!!!!
    By elenton in forum SQL Development
    Replies: 4
    Last Post: March 8th, 2007, 11:00 AM
  3. Declare string variable in asp
    By hithere in forum ASP Development
    Replies: 2
    Last Post: February 28th, 2006, 03:30 AM
  4. its urgent,plz rply as early as possible
    By sushmita in forum Microsoft SQL Server
    Replies: 1
    Last Post: February 7th, 2005, 03:01 PM
  5. Use variable to declare an array
    By MindWeaver in forum ASP Development
    Replies: 2
    Last Post: April 22nd, 2004, 09:06 AM

IMN logo majestic logo threadwatch logo seochat tools logo