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. What's different between OnLoad and [FormName]_Load?

What's different between OnLoad and [FormName]_Load?

Scheduled Pinned Locked Moved C#
game-devquestion
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.
  • L Offline
    L Offline
    Libra
    wrote on last edited by
    #1

    When an load event occur, you can call the function [FormName]_Load(object sender, System.EventArgs e) to deal, also or call the function On_Load(System.EventArgs e). What's diffrent between them?:confused: === Game is power! ===

    D 1 Reply Last reply
    0
    • L Libra

      When an load event occur, you can call the function [FormName]_Load(object sender, System.EventArgs e) to deal, also or call the function On_Load(System.EventArgs e). What's diffrent between them?:confused: === Game is power! ===

      D Offline
      D Offline
      Derek Lakin
      wrote on last edited by
      #2

      YourForm.OnLoad is an override of Form.OnLoad, which actually raises the event. Using this override would, for example, allow you to prevent the event from being fired, by not calling base.OnLoad. YourForm_Load is an event handler for the Load event and allows you to perfrom some action when the Load event occurs. To follow the previous example, you would not be able to prevent the event from being fired as it already has been. Derek Lakin. The great thing about being a slayer: is kicking ass is comfort food. Buffy Salamander Software Ltd. blog: Digital Thoughts

      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