Notices

Great community. Great ideas.

Welcome to ASP/Free, a community dedicated to helping beginners and professionals alike in improving their knowledge of Microsoft's development and administration technologies. Sign up today to gain access to the combined insight of tens of thousands of members.

Thread: How to declare Messagebox.Show

Results 1 to 6 of 6
Share This Thread →
  1. #1
    sweehin18 is offline Contributing User
    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
    elijathegold's Avatar
    elijathegold is offline Senior Fire Wizard
    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

  3. #3
    Shadow Wizard's Avatar
    Shadow Wizard is offline Moderator From Beyond
    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.

  4. #4
    elijathegold's Avatar
    elijathegold is offline Senior Fire Wizard
    Join Date
    Feb 2005
    Location
    Ashford, Kent. England
    Posts
    5,651
    Rep Power
    314
    Ah. I was assuming this was a windows app.

  5. #5
    Shadow Wizard's Avatar
    Shadow Wizard is offline Moderator From Beyond
    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.

  6. #6
    elijathegold's Avatar
    elijathegold is offline Senior Fire Wizard
    Join Date
    Feb 2005
    Location
    Ashford, Kent. England
    Posts
    5,651
    Rep Power
    314
    Yeah - I've made the connection now

Share This Thread →

Become Part of This Conversation

Join NowFor Free!

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

ASP Free Advertisers and Affiliates