473,397 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Error in Winforms App

First off, I'd like to apologize if this is in the wrong place, if it is let
me know and I will move it.

I am experiencing a weird error with a winforms app that I have built. In a
nutshell, two dates are entered and then a button is clicked which performs
some actions. In pseudocode, it looks like this:

private void btnQueryReport_Click(object sender, EventArgs e)
{
LogSomeInfo();
ConnectToWebService();
GetDataFromWebService();
BindDataToDataGrid();
}

The logging is done with log4Net.
Each method has some debug logging placed in it for tracing when problems
occur.
The app is running with the highest level of logging, so all messages should
be logged.

When run on my machine, the application behaves as expected. If you click on
the button, it logs the information, gets the data and displays the data, all
while logging debug statements as it goes. Normally this process takes about
15-20 seconds during which time the form 'freezes' while it processes the
data.

One of our users has just had a new computer built by our IT dept and upon
placing this application on his computer, it loads up fine, looks good and
appears to work. However, if you enter the dates and then click the button,
nothing happens. You can click the button as many times as you want and it
does nothing. It behaves as if:

private void btnQueryReport_Click(object sender, EventArgs e)
{
return;
}

This is being compiled as a .Net 2.0 application. There are no exceptions
being thrown. Nothing is caught, and no applicationexceptions are thrown
either.

Any ideas of where to look next?

Thanks in advance.

Jun 27 '08 #1
1 1087
Something like ConnectToWebServce() and GetDataFromWebService() will be
variable in the amount of time they block the UI thread. On some computers
and depending on network load these methods may take a noticeable amount of
time, as you're seeing. While these methods are blocked the UI will be
unresponsive and on XP+ the user may see "(Not Responding)" while the UI is
unresponsive, which they don't like.

I would recommend doing them on a background thread, (e.g with
BackgroundWorker), provide some sort of notice to the user that the action is
"processing..." and update the form when the data has been downloaded.

--
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"mendicant" wrote:
First off, I'd like to apologize if this is in the wrong place, if it is let
me know and I will move it.

I am experiencing a weird error with a winforms app that I have built. In a
nutshell, two dates are entered and then a button is clicked which performs
some actions. In pseudocode, it looks like this:

private void btnQueryReport_Click(object sender, EventArgs e)
{
LogSomeInfo();
ConnectToWebService();
GetDataFromWebService();
BindDataToDataGrid();
}

The logging is done with log4Net.
Each method has some debug logging placed in it for tracing when problems
occur.
The app is running with the highest level of logging, so all messages should
be logged.

When run on my machine, the application behaves as expected. If you click on
the button, it logs the information, gets the data and displays the data, all
while logging debug statements as it goes. Normally this process takes about
15-20 seconds during which time the form 'freezes' while it processes the
data.

One of our users has just had a new computer built by our IT dept and upon
placing this application on his computer, it loads up fine, looks good and
appears to work. However, if you enter the dates and then click the button,
nothing happens. You can click the button as many times as you want and it
does nothing. It behaves as if:

private void btnQueryReport_Click(object sender, EventArgs e)
{
return;
}

This is being compiled as a .Net 2.0 application. There are no exceptions
being thrown. Nothing is caught, and no applicationexceptions are thrown
either.

Any ideas of where to look next?

Thanks in advance.
Jun 27 '08 #2

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

Similar topics

0
by: Lucas Tam | last post by:
Hello, Sorry for the cross posts - I'm need of help... I am trying to deploy a very simple webform with the following features: -DataGrid (not yet bound) -Textboxes -Labels -Combo Box -Tab...
4
by: Charles Fineblum | last post by:
Hi: I'm getting subject error when loading Form into WinForms designer. Application complies and runs fine, but can not load form into designer. This has happened twice and forced me to restart...
4
by: Elhanan | last post by:
hi.. all a client of ours is considering to move from a dos application to windows desktop application. the application is for traveling agency, the database is rather large. their current...
1
by: SQLJunkie | last post by:
Hi, I have installed SQL 2005 RTM on a new server and I keep getting this error (described below) quite frequently. Was wondering if anyone has a clue on what's happening here. I tried googling...
5
by: Segfahlt | last post by:
I need a little help here please. I have 2 win forms user controls in 2 different projects that I'm hosting in 2 different virtual directories. The controls have been test and operate okay in...
1
by: Pieter | last post by:
Hi, In my application VB.NET 2005 application I placed a ReportViewer, and link it to a server-report: Me.ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote...
4
by: 3Cooks | last post by:
I have a windows application written in Visual Basic 6.0 that is going to be redeveloped in dotNET. We are trying to decide if we should deploy using Webforms or Winforms and I need advice from...
3
by: steve | last post by:
Hi All I have a VB.net 2005 app which uses MS Report Viewer to create reports Occassionally I get the following error when changing to a different report User code running on thread 196 has...
0
by: biswajitkundu2007 | last post by:
How to implement subreport in vb.net RDLC report?? I have the following code but it gives the error :-error subreport could not be shown Private orderDetailsData As DataTable = Nothing ...
23
by: raylopez99 | last post by:
Here I am learning WinForms and two months into it I learn there's a WPF API that is coming out. Is this WPF out yet, and is it a threat to WinForms, in the sense that all the library routines I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have 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...
0
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...
0
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...

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.