Results 1 to 3 of 3

Thread: [Resolved]Global Try...Catch with dynamic controls...

Threaded View

  1. #1

    Thread Starter
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091

    [Resolved]Global Try...Catch with dynamic controls...

    Currently, to trap untrapped exceptions, I have this...
    VB Code:
    1. Public Shared Sub Main()
    2.  
    3.             Try
    4.                 Application.Run(New frmMain)
    5.             Catch ex As Exception
    6.                 MsgBox(ex.Message)
    7.             End Try
    8.  
    9.         End Sub

    It works fine for the most part, except that a many controls that I have in my app will be loaded dynamically via the Activator.CreateInstanceFrom() method. I put in a couple of Throw's in one of my dynamic controls, just to test it out, but the exceptions don't even seem to be getting thrown, let alone caught by my Try Catch block. What have I missed?

    Last edited by crptcblade; Apr 14th, 2004 at 09:36 AM.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width