helloworld in VB.NET

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael Sgier

    #1

    helloworld in VB.NET

    Hi
    is this c#? How would this look in VB.NET?
    Thanks
    Michael



    using XPlane;

    public class plugin_HelloWor ld {

    public static void Main() {

    XPlane.Widgets. Windows.Window newWin = new
    XPlane.Widgets. Windows.Window( );
    newWin.setSize( 200, 500, //left, top
    320, 240 //width, height
    );
    newWin.setDescr iptor( "Hello World" );
    newWin.Create() ;

    }

    }
  • Michael Sgier

    #2
    Re: helloworld in VB.NET

    I've also two *.dll.
    How shall i integrate them with my first mono project?
    Thanks

    Comment

    • =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?=

      #3
      RE: helloworld in VB.NET

      This is from memory but it would be something like:

      Public Class plugin_HelloWor ld

      Public Shared Sub Main()

      Dim newWin as new XPlane.Widgets. Windows.Window( )
      newWin.setSize( 200, 500, 320, 240)
      newWin.setDescr iptor( "Hello World" )
      newWin.Create()

      End Sub

      End Class


      --
      Ciaran O''Donnell



      "Michael Sgier" wrote:
      Hi
      is this c#? How would this look in VB.NET?
      Thanks
      Michael
      >
      >
      >
      using XPlane;
      >
      public class plugin_HelloWor ld {
      >
      public static void Main() {
      >
      XPlane.Widgets. Windows.Window newWin = new
      XPlane.Widgets. Windows.Window( );
      newWin.setSize( 200, 500, //left, top
      320, 240 //width, height
      );
      newWin.setDescr iptor( "Hello World" );
      newWin.Create() ;
      >
      }
      >
      }
      >

      Comment

      • Michael Sgier

        #4
        Re: helloworld in VB.NET

        Thanks Ciaran
        what about this in VB.NET?

        using XPlane;

        and what about the 2 dlls?
        Thanks again
        Michael

        Comment

        • Peter Duniho

          #5
          Re: helloworld in VB.NET

          On Wed, 24 Sep 2008 08:25:38 -0700, Michael Sgier <sgier@nospam.c omwrote:
          Thanks Ciaran
          what about this in VB.NET?
          >
          using XPlane;
          I think VB.NET has an "Imports" statement that you should use.
          and what about the 2 dlls?
          That's an assembly-level thing, and should work the same (i.e. just add
          them as references to your project).

          All that said, there's a VB.NET newsgroup where you can ask about writing
          VB.NET questions.

          Pete

          Comment

          • Teme64

            #6
            Re: helloworld in VB.NET

            Michael Sgier wrote:
            Thanks Ciaran
            what about this in VB.NET?
            >
            using XPlane;
            >
            and what about the 2 dlls?
            Thanks again
            Michael
            >
            Using XPlane

            End Using

            --

            Teme64 @ http://windevblog.blogspot.com

            Comment

            • Jon Skeet [C# MVP]

              #7
              Re: helloworld in VB.NET

              Teme64 <teemuhh@gmail. comwrote:
              Michael Sgier wrote:
              Thanks Ciaran
              what about this in VB.NET?

              using XPlane;

              and what about the 2 dlls?
              Thanks again
              Michael
              >
              Using XPlane
              >
              End Using
              No, that's the VB equivalent of the using *statement* instead of the
              using *directive*. Peter's answer (the Imports statement) is the
              correct translation here.

              --
              Jon Skeet - <skeet@pobox.co m>
              Web site: http://www.pobox.com/~skeet
              Blog: http://www.msmvps.com/jon.skeet
              C# in Depth: http://csharpindepth.com

              Comment

              Working...