venp

Hi,

I 've multiple projects wtih forms . In a particular project if i try to open a form my appln. hangs and i need to stop the appln. ,come out and get in again. Can somebody help me. It was working before.

thanks

venp---




Re: Visual C# General Appln. Hangs--

timvw

You could start with sending a bit of information/code that could hint us to help you solve the problem..





Re: Visual C# General Appln. Hangs--

venp

HI previously somebody else were working on this. I've started working on this now. I've no idea why it hangs. But i dont know what the below code is for. If there can be any other reason other than the below code please let me know.

I have something likethis in resx file.

<metadata name="ColChecked.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

<value>True</value>

</metadata>

<metadata name="ColType.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

<value>True</value>

</metadata>

<metadata name="ColDesc.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

<value>True</value>

</metadata>

<metadata name="ColAmt.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

<value>True</value>

</metadata>

something related with this, in designer.cs

a datagridview ctrl is there and some col are created and then i dont know why col are created in this way

this.dgvChangeTool.AllowUserToAddRows = false;

this.dgvChangeTool.AllowUserToDeleteRows = false;

this.dgvChangeTool.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;

this.dgvChangeTool.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {

this.ColChecked,

this.ColType,

this.ColDesc,

this.ColAmt,

this.ColChangeOrderAmt,

this.ColStatus,

this.ColChangeID});

this.dgvChangeTool.Location = new System.Drawing.Point(21, 137);

this.dgvChangeTool.Name = "dgvChangeTool";

this.dgvChangeTool.RowHeadersWidth = 21;

this.dgvChangeTool.Size = new System.Drawing.Size(578, 101);

this.dgvChangeTool.TabIndex = 42;

this.dgvChangeTool.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvChangeTool_CellValueChanged);

this.dgvChangeTool.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvChangeTool_CellContentClick);

//

// ColChecked

//

this.ColChecked.HeaderText = "";

this.ColChecked.Name = "ColChecked";

this.ColChecked.Width = 21;

//

// ColType

//

this.ColType.DataPropertyName = "typeLong";

this.ColType.HeaderText = "Type";

this.ColType.Name = "ColType";

this.ColType.ReadOnly = true;

this.ColType.Width = 70;

//

// ColDesc

//

this.ColDesc.DataPropertyName = "description";

this.ColDesc.HeaderText = "Description";

this.ColDesc.Name = "ColDesc";

this.ColDesc.ReadOnly = true;

this.ColDesc.Width = 150;

//

// ColAmt

//

this.ColAmt.DataPropertyName = "finalAmt";

dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;

dataGridViewCellStyle3.Format = "C2";

dataGridViewCellStyle3.NullValue = null;

this.ColAmt.DefaultCellStyle = dataGridViewCellStyle3;

this.ColAmt.HeaderText = "Final Amount";

this.ColAmt.Name = "ColAmt";

this.ColAmt.ReadOnly = true;

//

// ColChangeOrderAmt

//

thanks

venp---






Re: Visual C# General Appln. Hangs--

Mark Dawson

Hi,

do you know where in the code the app is hanging, if you wait until the app hangs then puase all of the threads can you see the line where the app is hung

Mark.






Re: Visual C# General Appln. Hangs--

venp

Hi,

I've some 3rd party ctrls on it. is it because of it.

venp






Re: Visual C# General Appln. Hangs--

Mark Dawson

Hi,

if I had your problem I would first try to track down the line of code that was last executed before the hang, put some breakpoints in the code until you find the right place. Also as I mentioned before when the app has hung, you can click on the break button in visual studio and then look to see on what line the code is waiting, that would give you more of an idea of where to look.

Mark.