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. Any bug in my Code?

Any bug in my Code?

Scheduled Pinned Locked Moved C#
helpquestion
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.
  • A Offline
    A Offline
    ASysSolvers
    wrote on last edited by
    #1

    Lets say i however fire the Close method.and close it is fine. but i want to confirmed it is actually close and dispose with that resources. Because i have a page and i have used a TVgrabber componenet and show TV card tuner, but when i going to another page closing that..it gets flicker with my page. I couldn't close that Grabber properly also i want to dispose all in. using System; using System.Data; using System.Data.SqlClient; using System.Collections; namespace ItvC { public partial class frmTVX : Form { public static frmTVX tv = null; public frmTVX() { InitializeComponent(); tv = this; } private void Close() { this.TopMost = false; this.Close(); frmMain.FormMain.Show(); } } }

    realJSOPR 1 Reply Last reply
    0
    • A ASysSolvers

      Lets say i however fire the Close method.and close it is fine. but i want to confirmed it is actually close and dispose with that resources. Because i have a page and i have used a TVgrabber componenet and show TV card tuner, but when i going to another page closing that..it gets flicker with my page. I couldn't close that Grabber properly also i want to dispose all in. using System; using System.Data; using System.Data.SqlClient; using System.Collections; namespace ItvC { public partial class frmTVX : Form { public static frmTVX tv = null; public frmTVX() { InitializeComponent(); tv = this; } private void Close() { this.TopMost = false; this.Close(); frmMain.FormMain.Show(); } } }

      realJSOPR Offline
      realJSOPR Offline
      realJSOP
      wrote on last edited by
      #2

      Well... First, you're calling Close() from within itself. Eventually, you're gonna run out of stack space. Second, the last line in Close() will never be executed because you're recursing back to the same function before it gets there. I'm surprised your system hasn't caught fire yet as a result.

      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
      -----
      "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

      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