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. Form Events

Form Events

Scheduled Pinned Locked Moved C#
databasequestion
2 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.
  • U Offline
    U Offline
    User 3678645
    wrote on last edited by
    #1

    Hi All, I'm having some problems finding the correct Forms event from which to fire my code. I want to run a sequence of code automatically once a form is displayed on the screen. Form_load isn't correct as my code finished before the form is displayed. Form_Shown doesn't seem to trigger consistently. Form_Activated triggers multiple times Form_Validated doesn't seem to trigger consistently. What event should i use? I basically want the code to fire as if the form was displayed on the screen and I hit a "Start Button". Thanks in advance. Daniel.

    L 1 Reply Last reply
    0
    • U User 3678645

      Hi All, I'm having some problems finding the correct Forms event from which to fire my code. I want to run a sequence of code automatically once a form is displayed on the screen. Form_load isn't correct as my code finished before the form is displayed. Form_Shown doesn't seem to trigger consistently. Form_Activated triggers multiple times Form_Validated doesn't seem to trigger consistently. What event should i use? I basically want the code to fire as if the form was displayed on the screen and I hit a "Start Button". Thanks in advance. Daniel.

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

      Shown should fire exactly once, the first time the form has become visible. MSDN: "Occurs whenever the form is first displayed." :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


      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