473,472 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Upgrading app from 2003 to 2005

Hello,
I am VERY new to .Net and C#. But I have an app that I bought from a vendor
with the source. This was written in C#2003. I have VS2005. I went through
the upgrade process.. I have a problem, I am not sure what it is or what to
do. But I think it has something to do with a dialog box. The app had a
toolbar with buttons on it, on some of the button a dialog box is suppose to
popup and give the user a selection of items to view. The error I am getting
with e.Message is
"Cannot evaluate expression because a native frame is on top of the call
stack." Can anyone tell me why I am getting this and I can fix it. Also, if
anyone else has seen problems with going from 2003 to 2005, I would love to
hear about them.
Thanks,
Brian
Jan 12 '06 #1
6 1265
Brian,

Without seeing the code, it is nearly impossible to tell.

I don't suppose there is a way that you can post the code, or the
section that is causing the problem, is there?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Brian Shafer" <Br*********@discussions.microsoft.com> wrote in message
news:77**********************************@microsof t.com...
Hello,
I am VERY new to .Net and C#. But I have an app that I bought from a
vendor
with the source. This was written in C#2003. I have VS2005. I went
through
the upgrade process.. I have a problem, I am not sure what it is or what
to
do. But I think it has something to do with a dialog box. The app had a
toolbar with buttons on it, on some of the button a dialog box is suppose
to
popup and give the user a selection of items to view. The error I am
getting
with e.Message is
"Cannot evaluate expression because a native frame is on top of the call
stack." Can anyone tell me why I am getting this and I can fix it. Also,
if
anyone else has seen problems with going from 2003 to 2005, I would love
to
hear about them.
Thanks,
Brian

Jan 12 '06 #2
I am trying to find that now, I get to the section where the error message
is displayed, but trying to figured who called this bit of code.

"Nicholas Paldino [.NET/C# MVP]" wrote:
Brian,

Without seeing the code, it is nearly impossible to tell.

I don't suppose there is a way that you can post the code, or the
section that is causing the problem, is there?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Brian Shafer" <Br*********@discussions.microsoft.com> wrote in message
news:77**********************************@microsof t.com...
Hello,
I am VERY new to .Net and C#. But I have an app that I bought from a
vendor
with the source. This was written in C#2003. I have VS2005. I went
through
the upgrade process.. I have a problem, I am not sure what it is or what
to
do. But I think it has something to do with a dialog box. The app had a
toolbar with buttons on it, on some of the button a dialog box is suppose
to
popup and give the user a selection of items to view. The error I am
getting
with e.Message is
"Cannot evaluate expression because a native frame is on top of the call
stack." Can anyone tell me why I am getting this and I can fix it. Also,
if
anyone else has seen problems with going from 2003 to 2005, I would love
to
hear about them.
Thanks,
Brian


Jan 12 '06 #3
private Form Thresholds_Click()
{

string []ListboxItems;

if (GloData.Appconfig.IS_AVESTASW())
ListboxItems= new string []
{TM("CHOCKS").ToUpper(),TM("BEARINGS").ToUpper()};
else
ListboxItems= new string []
{TM("CHOCKS").ToUpper(),TM("BEARINGS").ToUpper(),T M("ROLLS
STANDS").ToUpper()};
Color []ColorsItems={Color.White,Color.Red,Color.Yellow};
FrmItems frm= new
FrmItems(this.toolBarThrsh.Rectangle,ListboxItems, ColorsItems);
Form NewForm=null;
if (frm.ShowDialog() == DialogResult.OK)
{
NewForm= new FrmThresholds(this,frm.selectedIndex);
ActiveMdichild.Close();
ActiveMdichild=null;
}
return NewForm;

}

"Nicholas Paldino [.NET/C# MVP]" wrote:
Brian,

Without seeing the code, it is nearly impossible to tell.

I don't suppose there is a way that you can post the code, or the
section that is causing the problem, is there?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Brian Shafer" <Br*********@discussions.microsoft.com> wrote in message
news:77**********************************@microsof t.com...
Hello,
I am VERY new to .Net and C#. But I have an app that I bought from a
vendor
with the source. This was written in C#2003. I have VS2005. I went
through
the upgrade process.. I have a problem, I am not sure what it is or what
to
do. But I think it has something to do with a dialog box. The app had a
toolbar with buttons on it, on some of the button a dialog box is suppose
to
popup and give the user a selection of items to view. The error I am
getting
with e.Message is
"Cannot evaluate expression because a native frame is on top of the call
stack." Can anyone tell me why I am getting this and I can fix it. Also,
if
anyone else has seen problems with going from 2003 to 2005, I would love
to
hear about them.
Thanks,
Brian


Jan 12 '06 #4
Brian,

Ok, knowing which line the error occurs on would help as well...
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Brian Shafer" <Br*********@discussions.microsoft.com> wrote in message
news:88**********************************@microsof t.com...
private Form Thresholds_Click()
{

string []ListboxItems;

if (GloData.Appconfig.IS_AVESTASW())
ListboxItems= new string []
{TM("CHOCKS").ToUpper(),TM("BEARINGS").ToUpper()};
else
ListboxItems= new string []
{TM("CHOCKS").ToUpper(),TM("BEARINGS").ToUpper(),T M("ROLLS
STANDS").ToUpper()};
Color []ColorsItems={Color.White,Color.Red,Color.Yellow};
FrmItems frm= new
FrmItems(this.toolBarThrsh.Rectangle,ListboxItems, ColorsItems);
Form NewForm=null;
if (frm.ShowDialog() == DialogResult.OK)
{
NewForm= new FrmThresholds(this,frm.selectedIndex);
ActiveMdichild.Close();
ActiveMdichild=null;
}
return NewForm;

}

"Nicholas Paldino [.NET/C# MVP]" wrote:
Brian,

Without seeing the code, it is nearly impossible to tell.

I don't suppose there is a way that you can post the code, or the
section that is causing the problem, is there?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Brian Shafer" <Br*********@discussions.microsoft.com> wrote in message
news:77**********************************@microsof t.com...
> Hello,
> I am VERY new to .Net and C#. But I have an app that I bought from a
> vendor
> with the source. This was written in C#2003. I have VS2005. I went
> through
> the upgrade process.. I have a problem, I am not sure what it is or
> what
> to
> do. But I think it has something to do with a dialog box. The app had
> a
> toolbar with buttons on it, on some of the button a dialog box is
> suppose
> to
> popup and give the user a selection of items to view. The error I am
> getting
> with e.Message is
> "Cannot evaluate expression because a native frame is on top of the
> call
> stack." Can anyone tell me why I am getting this and I can fix it.
> Also,
> if
> anyone else has seen problems with going from 2003 to 2005, I would
> love
> to
> hear about them.
> Thanks,
> Brian


Jan 12 '06 #5
LOL.. sorry about that.. thats what happens when I get in a hurry....
if (frm.ShowDialog() == DialogResult.OK)

the message here is
"A first chance exception of type 'System.ObjectDisposedException' occurred
in System.Windows.Forms.dll" this is printed to the immediate window

then it goes to
public void Application_ThreadException(object sender,
System.Threading.ThreadExceptionEventArgs t)
{
DialogResult result = DialogResult.Cancel;

try
{
result = ShowThreadExceptionDialog(t.Exception);
}
catch
{

try
{
MessageBox.Show("Fatal Error", "Fatal Error",
MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Stop);
}
finally
{
Application.Exit();
}
}

// Exits the program when the user clicks Abort.
if (result == DialogResult.Abort)
Application.Exit();
}

// Creates the error message and displays it.
private DialogResult ShowThreadExceptionDialog(Exception e)
{
string errorMsg = "An error has occurred: ";
errorMsg = errorMsg + e.Message;// + "\n\nStack Trace:\n" + e.StackTrace;
if (frm!=null)
{
string err=errorMsg + "\rStack Trace:\r\n" + e.StackTrace;
frm.WriteErrorOnFile(err,System.Drawing.Color.Red) ;
}
LastError=errorMsg;
return MessageBox.Show(errorMsg, "Application Error",
MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Stop);
}
"Nicholas Paldino [.NET/C# MVP]" wrote:
Brian,

Ok, knowing which line the error occurs on would help as well...
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Brian Shafer" <Br*********@discussions.microsoft.com> wrote in message
news:88**********************************@microsof t.com...
private Form Thresholds_Click()
{

string []ListboxItems;

if (GloData.Appconfig.IS_AVESTASW())
ListboxItems= new string []
{TM("CHOCKS").ToUpper(),TM("BEARINGS").ToUpper()};
else
ListboxItems= new string []
{TM("CHOCKS").ToUpper(),TM("BEARINGS").ToUpper(),T M("ROLLS
STANDS").ToUpper()};
Color []ColorsItems={Color.White,Color.Red,Color.Yellow};
FrmItems frm= new
FrmItems(this.toolBarThrsh.Rectangle,ListboxItems, ColorsItems);
Form NewForm=null;
if (frm.ShowDialog() == DialogResult.OK)
{
NewForm= new FrmThresholds(this,frm.selectedIndex);
ActiveMdichild.Close();
ActiveMdichild=null;
}
return NewForm;

}

"Nicholas Paldino [.NET/C# MVP]" wrote:
Brian,

Without seeing the code, it is nearly impossible to tell.

I don't suppose there is a way that you can post the code, or the
section that is causing the problem, is there?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Brian Shafer" <Br*********@discussions.microsoft.com> wrote in message
news:77**********************************@microsof t.com...
> Hello,
> I am VERY new to .Net and C#. But I have an app that I bought from a
> vendor
> with the source. This was written in C#2003. I have VS2005. I went
> through
> the upgrade process.. I have a problem, I am not sure what it is or
> what
> to
> do. But I think it has something to do with a dialog box. The app had
> a
> toolbar with buttons on it, on some of the button a dialog box is
> suppose
> to
> popup and give the user a selection of items to view. The error I am
> getting
> with e.Message is
> "Cannot evaluate expression because a native frame is on top of the
> call
> stack." Can anyone tell me why I am getting this and I can fix it.
> Also,
> if
> anyone else has seen problems with going from 2003 to 2005, I would
> love
> to
> hear about them.
> Thanks,
> Brian


Jan 12 '06 #6
Brian,

I think that the error is occuring within the form itself, and not the
line of code that you are actually showing. You have to dig into the form,
and see what the exception is in there. Just calling ShowDialog shouldn't
throw an exception, unless you are doing something in the dialog.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Brian Shafer" <Br*********@discussions.microsoft.com> wrote in message
news:01**********************************@microsof t.com...
LOL.. sorry about that.. thats what happens when I get in a hurry....
if (frm.ShowDialog() == DialogResult.OK)

the message here is
"A first chance exception of type 'System.ObjectDisposedException'
occurred
in System.Windows.Forms.dll" this is printed to the immediate window

then it goes to
public void Application_ThreadException(object sender,
System.Threading.ThreadExceptionEventArgs t)
{
DialogResult result = DialogResult.Cancel;

try
{
result = ShowThreadExceptionDialog(t.Exception);
}
catch
{

try
{
MessageBox.Show("Fatal Error", "Fatal Error",
MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Stop);
}
finally
{
Application.Exit();
}
}

// Exits the program when the user clicks Abort.
if (result == DialogResult.Abort)
Application.Exit();
}

// Creates the error message and displays it.
private DialogResult ShowThreadExceptionDialog(Exception e)
{
string errorMsg = "An error has occurred: ";
errorMsg = errorMsg + e.Message;// + "\n\nStack Trace:\n" + e.StackTrace;
if (frm!=null)
{
string err=errorMsg + "\rStack Trace:\r\n" + e.StackTrace;
frm.WriteErrorOnFile(err,System.Drawing.Color.Red) ;
}
LastError=errorMsg;
return MessageBox.Show(errorMsg, "Application Error",
MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Stop);
}
"Nicholas Paldino [.NET/C# MVP]" wrote:
Brian,

Ok, knowing which line the error occurs on would help as well...
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Brian Shafer" <Br*********@discussions.microsoft.com> wrote in message
news:88**********************************@microsof t.com...
> private Form Thresholds_Click()
> {
>
> string []ListboxItems;
>
> if (GloData.Appconfig.IS_AVESTASW())
> ListboxItems= new string []
> {TM("CHOCKS").ToUpper(),TM("BEARINGS").ToUpper()};
> else
> ListboxItems= new string []
> {TM("CHOCKS").ToUpper(),TM("BEARINGS").ToUpper(),T M("ROLLS
> STANDS").ToUpper()};
> Color []ColorsItems={Color.White,Color.Red,Color.Yellow};
> FrmItems frm= new
> FrmItems(this.toolBarThrsh.Rectangle,ListboxItems, ColorsItems);
> Form NewForm=null;
> if (frm.ShowDialog() == DialogResult.OK)
> {
> NewForm= new FrmThresholds(this,frm.selectedIndex);
> ActiveMdichild.Close();
> ActiveMdichild=null;
> }
> return NewForm;
>
> }
>
> "Nicholas Paldino [.NET/C# MVP]" wrote:
>
>> Brian,
>>
>> Without seeing the code, it is nearly impossible to tell.
>>
>> I don't suppose there is a way that you can post the code, or the
>> section that is causing the problem, is there?
>>
>>
>> --
>> - Nicholas Paldino [.NET/C# MVP]
>> - mv*@spam.guard.caspershouse.com
>>
>> "Brian Shafer" <Br*********@discussions.microsoft.com> wrote in
>> message
>> news:77**********************************@microsof t.com...
>> > Hello,
>> > I am VERY new to .Net and C#. But I have an app that I bought from
>> > a
>> > vendor
>> > with the source. This was written in C#2003. I have VS2005. I
>> > went
>> > through
>> > the upgrade process.. I have a problem, I am not sure what it is or
>> > what
>> > to
>> > do. But I think it has something to do with a dialog box. The app
>> > had
>> > a
>> > toolbar with buttons on it, on some of the button a dialog box is
>> > suppose
>> > to
>> > popup and give the user a selection of items to view. The error I am
>> > getting
>> > with e.Message is
>> > "Cannot evaluate expression because a native frame is on top of the
>> > call
>> > stack." Can anyone tell me why I am getting this and I can fix it.
>> > Also,
>> > if
>> > anyone else has seen problems with going from 2003 to 2005, I would
>> > love
>> > to
>> > hear about them.
>> > Thanks,
>> > Brian
>>
>>
>>


Jan 12 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Mike Owen | last post by:
Hi, I have just used the import Wizard to import a VS 2003 app to VS 2005. I have a lot of work to do to enable it to compile successfully with all the errors and warnings it gave me, but as a...
13
by: Noesis Strategy | last post by:
When I ordered my new laptop, Sony didn't offer Access 2003 in its bundles. Recently, I have begun to design Access databases using an copy of Access 2002 from my previous laptop. It works fine,...
13
by: penguin732901 | last post by:
Checking back for discussions, there was a lot of talk about 2000 being slower than 97, but not so much lately. What is the latest opinion? Anyone care to set up a poll for how many NG members...
4
by: Spurry Moses | last post by:
I know it's in Beta 2, but I can't report any good experiences with upgrading a project form 2003 to 2005. I tried to upgrade a 2003 project to C# Express 2005. My application has hardly...
5
by: Brian Shannon | last post by:
I am having a hard time finding the benifits and added features of VS.NET 2003 Professional over VS.NET 2002 on microsofts site. Does anyone have any links they could share. Also, does anyone...
15
by: Asaf | last post by:
Hi, I have received a source code project written in C++ VS.NET 2003 on .NET 1.1 that compiles without a problem. I have opened this source code in VS.NET 2005 and the Log wizard says that...
3
by: BK | last post by:
If I upgrade a PC from VS 2003 to VS 2005, can I run either of them or will I only be able to use VS 2005? I have a project that was started in VS 2003 that is about to go into production. I am...
4
by: Anil Gupte | last post by:
I am planning to move from my Visual Studio .Net 2003 edition to the 2005 platform. I understand that 2005 uses the 2.0 framework. Will this affect my development in 2003 should I wish to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.