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. [Message Deleted]

[Message Deleted]

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

    [Message Deleted]

    N W M 3 Replies Last reply
    0
    • M Mads115

      [Message Deleted]

      N Offline
      N Offline
      Noctris
      wrote on last edited by
      #2

      I would actually use a checkbox for this. Change the appearence property from "normal" to "Button" then just say that "checked" = "A" unchecked = "a"

      Do Or Don't, there is no "try catch ex as exception end try"

      1 Reply Last reply
      0
      • M Mads115

        [Message Deleted]

        W Offline
        W Offline
        WinSolution
        wrote on last edited by
        #3

        here is the logic . convert it to C# code. Button Button1; // by default button text will be On bool btn_status = true; public void Button1_Click() if(btn_status) { //put query here to write A Button1.Text = "Off"; btn_status = !btn_status; //! Operator will alter boolean value of btn_status } else { //put query here to write a Button1.Text = "On"; btn_status = !btn_status; }

        1 Reply Last reply
        0
        • M Mads115

          [Message Deleted]

          M Offline
          M Offline
          musefan
          wrote on last edited by
          #4

          Hi, And its not evening here yet/anymore... you have been trying to do this for over a week now and all you CP posts have been related to this. I strongly suggest you start from the basics and get yourself a good beginners book on C#.Net, as this is a fairly straight forward task and you don't seem to be able to do it, despite the help given in your previous posts. But I'll give you another go... Do you have any database code at the moment? If so, does it work? When are you wanting to write to the database? On a button click? Have you actually got your button to work? i.e. changes when clicked, and you are able to retrieve a value to state if it is On or Off when needed? Answer these and then we can progress.... Hopefully

          Life goes very fast. Tomorrow, today is already yesterday.

          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