Click here to Skip to main content
16,014,748 members
Home / Discussions / C#
   

C#

 
GeneralRe: Beginner Question: Where's my window?? Pin
Stephane Rodriguez.26-Feb-03 5:18
Stephane Rodriguez.26-Feb-03 5:18 
AnswerRe: Beginner Question: Where's my window?? Pin
Mauritsius26-Feb-03 7:27
Mauritsius26-Feb-03 7:27 
Questionsyntax highlight with richtextbox, possible? Pin
Q&A26-Feb-03 2:12
Q&A26-Feb-03 2:12 
AnswerRe: syntax highlight with richtextbox, possible? Pin
se99ts26-Feb-03 2:40
se99ts26-Feb-03 2:40 
GeneralRe: syntax highlight with richtextbox, possible? Pin
Anonymous26-Feb-03 5:17
Anonymous26-Feb-03 5:17 
GeneralRe: syntax highlight with richtextbox, possible? Pin
Q&A26-Feb-03 7:26
Q&A26-Feb-03 7:26 
GeneralRe: syntax highlight with richtextbox, possible? Pin
se99ts26-Feb-03 9:33
se99ts26-Feb-03 9:33 
GeneralException Handling thru WinForm events Pin
Domster26-Feb-03 1:58
Domster26-Feb-03 1:58 
Hi all,

The simple test-case below shows a trivial WinForm with an exception in one of its event handlers.
Before the form is created and run, an exception handler is declared. Note that when the app. is run without the debugger (i.e. Ctrl+F5 as opposed to F5), the exception IS NOT CAUGHT...

Any body have any explanations / workarounds?

many thanks,
dm.


using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace WindowsApplication7
{
///
/// Summary description for Form1.
///
public class Form1 : System.Windows.Forms.Form
{
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;

public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();


//
// TODO: Add any constructor code after InitializeComponent call
//
}

///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(290, 260);
this.Name = "Form1";
this.Text = "Form1";
this.VisibleChanged += new System.EventHandler(this.Form1_VisibleChanged);

}
#endregion

///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
try
{
Application.Run(new Form1());
}
catch
{
MessageBox.Show("caught");
}
}

private void Form1_VisibleChanged(object sender, System.EventArgs e)
{

object i = null;
i.ToString();
}
}
}


GeneralRe: Exception Handling thru WinForm events Pin
leppie26-Feb-03 6:13
leppie26-Feb-03 6:13 
GeneralOwnerDraw TextBox Pin
Furty26-Feb-03 1:44
Furty26-Feb-03 1:44 
GeneralRe: OwnerDraw TextBox Pin
Stephane Rodriguez.26-Feb-03 4:59
Stephane Rodriguez.26-Feb-03 4:59 
GeneralRe: OwnerDraw TextBox Pin
Furty26-Feb-03 16:02
Furty26-Feb-03 16:02 
GeneralRe: OwnerDraw TextBox Pin
Jeff J26-Feb-03 17:52
Jeff J26-Feb-03 17:52 
GeneralRe: OwnerDraw TextBox Pin
Furty27-Feb-03 0:35
Furty27-Feb-03 0:35 
GeneralRe: OwnerDraw TextBox Pin
Jeff J28-Feb-03 22:34
Jeff J28-Feb-03 22:34 
GeneralUserControl: How to use baseclass properties in the Designer Pin
STW26-Feb-03 0:41
STW26-Feb-03 0:41 
GeneralRe: UserControl: How to use baseclass properties in the Designer Pin
leppie26-Feb-03 6:20
leppie26-Feb-03 6:20 
GeneralNameValueCollection Pin
Peter Kiss26-Feb-03 0:40
Peter Kiss26-Feb-03 0:40 
GeneralRe: NameValueCollection ???? Pin
Peter Kiss26-Feb-03 0:42
Peter Kiss26-Feb-03 0:42 
GeneralBeginner Q - long strings Pin
Alexandru Savescu25-Feb-03 22:18
Alexandru Savescu25-Feb-03 22:18 
GeneralRe: Beginner Q - long strings Pin
leppie26-Feb-03 0:11
leppie26-Feb-03 0:11 
GeneralRe: Beginner Q - long strings Pin
Alexandru Savescu26-Feb-03 1:16
Alexandru Savescu26-Feb-03 1:16 
GeneralRe: Beginner Q - long strings Pin
Alexandru Savescu26-Feb-03 20:38
Alexandru Savescu26-Feb-03 20:38 
GeneralRe: Beginner Q - long strings Pin
leppie27-Feb-03 6:26
leppie27-Feb-03 6:26 
GeneralHRESULT in C# Pin
Nicholas Naddaf25-Feb-03 15:26
Nicholas Naddaf25-Feb-03 15:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.