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. Windows Forms
  4. Button click event

Button click event

Scheduled Pinned Locked Moved Windows Forms
questionc++
4 Posts 2 Posters 5 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.
  • D Offline
    D Offline
    dodoxor
    wrote on last edited by
    #1

    Hi, I've my windows form application with Form1.h where i've implemented the graphic interface. Then i've Myclass.h where i declare a class #include "form1.h" .... class Myclass{ public: Myclass(); ~MyClass(); void func(); void func2(); private: ... } and the myclass.cpp file where i implement the class. Two problems: 1-Where must i have to put "Form1^ fr=gcnew Form1" declaration so that any method of myclass can see fr variable? 2-I want to put a condition in func() body that when button1(in the graphic interface of Form1.h) is clicked i do something. How can i write this condition? Thank in advance for answers, regards.

    P 1 Reply Last reply
    0
    • D dodoxor

      Hi, I've my windows form application with Form1.h where i've implemented the graphic interface. Then i've Myclass.h where i declare a class #include "form1.h" .... class Myclass{ public: Myclass(); ~MyClass(); void func(); void func2(); private: ... } and the myclass.cpp file where i implement the class. Two problems: 1-Where must i have to put "Form1^ fr=gcnew Form1" declaration so that any method of myclass can see fr variable? 2-I want to put a condition in func() body that when button1(in the graphic interface of Form1.h) is clicked i do something. How can i write this condition? Thank in advance for answers, regards.

      P Offline
      P Offline
      Paul Conrad
      wrote on last edited by
      #2

      Have you figured this out or still working on it?

      "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

      D 1 Reply Last reply
      0
      • P Paul Conrad

        Have you figured this out or still working on it?

        "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

        D Offline
        D Offline
        dodoxor
        wrote on last edited by
        #3

        1- For the first problem i don't find a solution so i change my code. 2- For the second problem i declare a flag variable that change its value then the button is clicked. Bye.

        P 1 Reply Last reply
        0
        • D dodoxor

          1- For the first problem i don't find a solution so i change my code. 2- For the second problem i declare a flag variable that change its value then the button is clicked. Bye.

          P Offline
          P Offline
          Paul Conrad
          wrote on last edited by
          #4

          Sounds like you got it taken care of. I was just running through some of the unanswered questions and just seeing if they were still an issue with the poster and if so, I could maybe help out.

          "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

          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