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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. winform

winform

Scheduled Pinned Locked Moved C#
designsysadminhelp
4 Posts 3 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.
  • A Offline
    A Offline
    aurelcly
    wrote on last edited by
    #1

    Pleased I have small problem about controls and class. I have my new Winform class with a single label in my project and I want to write information in this label in another non GUI class I don't know how I can proceed Exemple: public partial class Form1:Form { privata Server serv = new Server(); //Form1 has-a Server .... } This is my non UI class public class Server { public Server(){} }

    L N 3 Replies Last reply
    0
    • A aurelcly

      Pleased I have small problem about controls and class. I have my new Winform class with a single label in my project and I want to write information in this label in another non GUI class I don't know how I can proceed Exemple: public partial class Form1:Form { privata Server serv = new Server(); //Form1 has-a Server .... } This is my non UI class public class Server { public Server(){} }

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, best is to use a delegate for this, and provide an event. this[^] explains it. :)

      Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


      I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that.
      [The QA section does it automatically now, I hope we soon get it on regular forums as well]


      1 Reply Last reply
      0
      • A aurelcly

        Pleased I have small problem about controls and class. I have my new Winform class with a single label in my project and I want to write information in this label in another non GUI class I don't know how I can proceed Exemple: public partial class Form1:Form { privata Server serv = new Server(); //Form1 has-a Server .... } This is my non UI class public class Server { public Server(){} }

        N Offline
        N Offline
        Not Active
        wrote on last edited by
        #3

        This is basic object oriented programming! :wtf: Expose a property or method in the Server class that allows you set the value from the label. :omg:


        I know the language. I've read a book. - _Madmatt

        1 Reply Last reply
        0
        • A aurelcly

          Pleased I have small problem about controls and class. I have my new Winform class with a single label in my project and I want to write information in this label in another non GUI class I don't know how I can proceed Exemple: public partial class Form1:Form { privata Server serv = new Server(); //Form1 has-a Server .... } This is my non UI class public class Server { public Server(){} }

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          Don't repost the same question :mad: Remove the second one before someone answers and you can't remove it.


          I know the language. I've read a book. - _Madmatt

          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