Thank-you for your reply. Your understanding of the problem is correct. In
my situation computer B that was doing the remote desktop is running Windows
XP Professional 2002 Service Pack 2. Computer A is running Windows Server
2003 Standard Edition Service Pack 1.
I repeated the test this morning where both computers were running Windows
XP Professional 2002 Service Pack 2 -- with the same results. I logged into
computer A after disconnecting the network cable between them, the
application was now running, but the count was below what it should have been
(essentially it lost the counts between the network being disconnected until
I could get logged in).
I then repeated the test with computer A running Windows Vista Ultimate
Release Candidate 1 - Build 5600 and computer B running Windows XP
Professional 2002 Service Pack 2 -- with the same results (count was not
being updated while network was disconnected).
The VB application was built with Visual Studio 2005 as a Release version.
The code itself is:
File Form1.vb:
Public Class Form1
Dim m_counter As Integer = 0
Private Sub Button1_MouseClick(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles Button1.MouseClick
m_counter = 0
TextBox1.Text = m_counter
End Sub
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
m_counter = m_counter + 1
TextBox1.Text = m_counter
End Sub
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
Timer1.Enabled = True
End Sub
End Class
File Form1.Designer.vb:
<Global.Microsoft.VisualBasic.CompilerServices.Des ignerGenerated()_
Partial Class Form1
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()_
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()_
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.Button1 = New System.Windows.Forms.Button
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
Me.SuspendLayout()
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(68, 51)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(124, 22)
Me.TextBox1.TabIndex = 0
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(92, 111)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(75, 37)
Me.Button1.TabIndex = 1
Me.Button1.Text = "Reset"
Me.Button1.UseVisualStyleBackColor = True
'
'Timer1
'
Me.Timer1.Interval = 1000
'
'Form1
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(269, 194)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.TextBox1)
Me.Name = "Form1"
Me.RightToLeftLayout = True
Me.Text = "RDP Test Application"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Timer1 As System.Windows.Forms.Timer
End Class
If it would help for me to send the Visual Studio files and/or the
executable, let me know.
Your help is greatly appreciated.
"Linda Liu [MSFT]" wrote:
Hi,
Based on my understanding, you remote desktop B to a computer A and runs an
application on computer A. When the application is run, you disconnect the
network cable between the two computers. After some time, you reconnect the
network and find that the application has "hung" while the network has been
disconnected because the counter in the application has not been
incrementing. If I'm off base, please feel free to let me know.
I performed a test based on your description, but didn't reproduce the
problem on my part.
I create a WinForm application similar to yours and place it on a machine
installed Windows XP. I remote a desktop installed Vista to the machine
installed Windows XP and run the application.
The application starts up and displays the counter incrementing every
second. When the texbox on the form shows 10, I disconnect the network
cable. After 10 seconds, I reconnect the network cable. The Vista machine
tries to reconnect the remote desktop connection. After it finishes the
reconnection, I see the textbox on the form displayes 20.
I also have a test minimizing the form before I disconnect the network
cable. The result is that the application keep running when the network is
disconnected.
I think the problem may be related to the remote desktop connection. When
the network cable is disconnected, you may login the machine that was
remote connected to directly to see whether the application is really hung.
Could you tell me what the OS of your remote desktop and the machine that
is remote connected to are respectively? As I have mentioned above, in my
test, the remote desktop is intalled Windows XP and the the machine remote
connected to is intalled Windows Vista.
If you have anything unclear, please feel free to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.