Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. GUI using C#

GUI using C#

Scheduled Pinned Locked Moved C#
csharphelp
7 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    celllllllll
    wrote on last edited by
    #1

    Hi all, I was wondering if anyone could help me out in writing a gui in C#. I just want to pop up a "Hello world" with a button and when I click on that button, there should come another pop up window "You are welcome to Csharp". PLease help. I appreciate that. Thanks Preeti9

    C 1 Reply Last reply
    0
    • C celllllllll

      Hi all, I was wondering if anyone could help me out in writing a gui in C#. I just want to pop up a "Hello world" with a button and when I click on that button, there should come another pop up window "You are welcome to Csharp". PLease help. I appreciate that. Thanks Preeti9

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      MessageBox.Show("Hello world"); MessageBox.Show("Welcome to C#"); Of course, you need to import the System.Windows dll and be using System.Windows.Forms. Christian Graus - Microsoft MVP - C++

      C 1 Reply Last reply
      0
      • C Christian Graus

        MessageBox.Show("Hello world"); MessageBox.Show("Welcome to C#"); Of course, you need to import the System.Windows dll and be using System.Windows.Forms. Christian Graus - Microsoft MVP - C++

        C Offline
        C Offline
        celllllllll
        wrote on last edited by
        #3

        Many Many Thanks, I really appreciate that. So, its the same syntax that we use in C++. Thanks Preeti9

        C 1 Reply Last reply
        0
        • C celllllllll

          Many Many Thanks, I really appreciate that. So, its the same syntax that we use in C++. Thanks Preeti9

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          No, in C++, they are global API calls, MessageBox or AfxMessageBox. Here, there is nothing global, so everything that would be global is now a static method on a class. MessageBox is a class, and it has one static method, called Show. But yeah, the net result is the same :-) Christian Graus - Microsoft MVP - C++

          C 1 Reply Last reply
          0
          • C Christian Graus

            No, in C++, they are global API calls, MessageBox or AfxMessageBox. Here, there is nothing global, so everything that would be global is now a static method on a class. MessageBox is a class, and it has one static method, called Show. But yeah, the net result is the same :-) Christian Graus - Microsoft MVP - C++

            C Offline
            C Offline
            celllllllll
            wrote on last edited by
            #5

            ok....I got it.Thanks So, we don't declare anything globally but we use a static method on a class.... Thanks again Preeti9

            C 1 Reply Last reply
            0
            • C celllllllll

              ok....I got it.Thanks So, we don't declare anything globally but we use a static method on a class.... Thanks again Preeti9

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              Preeti9 wrote:

              So, we don't declare anything globally but we use a static method on a class....

              Yes, we CAN'T declare true globals, because C++ allows OO, C# enforces it. So, a static member is the obvious way around that. Christian Graus - Microsoft MVP - C++

              C 1 Reply Last reply
              0
              • C Christian Graus

                Preeti9 wrote:

                So, we don't declare anything globally but we use a static method on a class....

                Yes, we CAN'T declare true globals, because C++ allows OO, C# enforces it. So, a static member is the obvious way around that. Christian Graus - Microsoft MVP - C++

                C Offline
                C Offline
                celllllllll
                wrote on last edited by
                #7

                Thanks..Appreciate your help Preeti9

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups