Form with groupboxes is behaving diffrently randomly

G

Guest

I have made a form with a tab that containts groupboxes and those contain
checkboxes.

When I run the application sometimes the outlining for some groupboxes are
not shown, if I switch tabs and back sometimes all outlining is shown and
sometimes are not shown. I have no idea what is going wrong.

What also is weird is that when I open the form from my main application I
can resize the form, even though it is locked, and that when I cut and paste
the forms code in a new Windows Application project in VS.NET 2003 and I run
the form I cannot resize it (without changing any settings).

I am totally confused why all this happening.

I have pasted the code for the form below.


Public Class frmSettings
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
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.
Friend WithEvents gbxXml As System.Windows.Forms.GroupBox
Friend WithEvents gbxLogging As System.Windows.Forms.GroupBox
Friend WithEvents gbxError As System.Windows.Forms.GroupBox
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents tbxTimer As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents gbxServer As System.Windows.Forms.GroupBox
Friend WithEvents tbxPort As System.Windows.Forms.TextBox
Friend WithEvents tbxServer As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents btnOk As System.Windows.Forms.Button
Friend WithEvents btnCancel As System.Windows.Forms.Button
Friend WithEvents btnTest As System.Windows.Forms.Button
Friend WithEvents rbtParallel As System.Windows.Forms.RadioButton
Friend WithEvents rbtSerial As System.Windows.Forms.RadioButton
Friend WithEvents cbxDate As System.Windows.Forms.CheckBox
Friend WithEvents cbxData As System.Windows.Forms.CheckBox
Friend WithEvents cbxLogOutXml As System.Windows.Forms.CheckBox
Friend WithEvents cbxLogParsedXml As System.Windows.Forms.CheckBox
Friend WithEvents cbxLogOrgXml As System.Windows.Forms.CheckBox
Friend WithEvents cbxLogEasy As System.Windows.Forms.CheckBox
Friend WithEvents cbxLogConnector As System.Windows.Forms.CheckBox
Friend WithEvents cbxLogFolder As System.Windows.Forms.CheckBox
Friend WithEvents cbxErrData As System.Windows.Forms.CheckBox
Friend WithEvents cbxErrOutXml As System.Windows.Forms.CheckBox
Friend WithEvents cbxErrParsedXml As System.Windows.Forms.CheckBox
Friend WithEvents cbxErrOrgXml As System.Windows.Forms.CheckBox
Friend WithEvents gbxProcessing As System.Windows.Forms.GroupBox
Friend WithEvents gbxFolder As System.Windows.Forms.GroupBox
Friend WithEvents tbxFolder As System.Windows.Forms.TextBox
Friend WithEvents btnFolder As System.Windows.Forms.Button
Friend WithEvents FolderBrowserDialog1 As
System.Windows.Forms.FolderBrowserDialog
Friend WithEvents TabControl1 As System.Windows.Forms.TabControl
Friend WithEvents tbpGeneral As System.Windows.Forms.TabPage
Friend WithEvents tbpExport As System.Windows.Forms.TabPage
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.gbxXml = New System.Windows.Forms.GroupBox
Me.cbxDate = New System.Windows.Forms.CheckBox
Me.cbxData = New System.Windows.Forms.CheckBox
Me.gbxLogging = New System.Windows.Forms.GroupBox
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.cbxLogOutXml = New System.Windows.Forms.CheckBox
Me.cbxLogParsedXml = New System.Windows.Forms.CheckBox
Me.cbxLogOrgXml = New System.Windows.Forms.CheckBox
Me.cbxLogEasy = New System.Windows.Forms.CheckBox
Me.cbxLogConnector = New System.Windows.Forms.CheckBox
Me.cbxLogFolder = New System.Windows.Forms.CheckBox
Me.gbxError = New System.Windows.Forms.GroupBox
Me.cbxErrData = New System.Windows.Forms.CheckBox
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.cbxErrOutXml = New System.Windows.Forms.CheckBox
Me.cbxErrParsedXml = New System.Windows.Forms.CheckBox
Me.cbxErrOrgXml = New System.Windows.Forms.CheckBox
Me.btnOk = New System.Windows.Forms.Button
Me.btnCancel = New System.Windows.Forms.Button
Me.gbxProcessing = New System.Windows.Forms.GroupBox
Me.Label1 = New System.Windows.Forms.Label
Me.tbxTimer = New System.Windows.Forms.TextBox
Me.rbtParallel = New System.Windows.Forms.RadioButton
Me.rbtSerial = New System.Windows.Forms.RadioButton
Me.gbxServer = New System.Windows.Forms.GroupBox
Me.btnTest = New System.Windows.Forms.Button
Me.Label3 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.tbxServer = New System.Windows.Forms.TextBox
Me.tbxPort = New System.Windows.Forms.TextBox
Me.gbxFolder = New System.Windows.Forms.GroupBox
Me.btnFolder = New System.Windows.Forms.Button
Me.tbxFolder = New System.Windows.Forms.TextBox
Me.FolderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog
Me.TabControl1 = New System.Windows.Forms.TabControl
Me.tbpGeneral = New System.Windows.Forms.TabPage
Me.tbpExport = New System.Windows.Forms.TabPage
Me.gbxXml.SuspendLayout()
Me.gbxLogging.SuspendLayout()
Me.gbxError.SuspendLayout()
Me.gbxProcessing.SuspendLayout()
Me.gbxServer.SuspendLayout()
Me.gbxFolder.SuspendLayout()
Me.TabControl1.SuspendLayout()
Me.tbpGeneral.SuspendLayout()
Me.SuspendLayout()
'
'gbxXml
'
Me.gbxXml.Controls.Add(Me.cbxDate)
Me.gbxXml.Controls.Add(Me.cbxData)
Me.gbxXml.Location = New System.Drawing.Point(64, 312)
Me.gbxXml.Name = "gbxXml"
Me.gbxXml.Size = New System.Drawing.Size(512, 72)
Me.gbxXml.TabIndex = 0
Me.gbxXml.TabStop = False
Me.gbxXml.Text = "XML Parsing"
'
'cbxDate
'
Me.cbxDate.Location = New System.Drawing.Point(8, 40)
Me.cbxDate.Name = "cbxDate"
Me.cbxDate.Size = New System.Drawing.Size(272, 24)
Me.cbxDate.TabIndex = 7
Me.cbxDate.Text = "Convert date in <DATETIME> to Unix notation"
'
'cbxData
'
Me.cbxData.Location = New System.Drawing.Point(8, 16)
Me.cbxData.Name = "cbxData"
Me.cbxData.Size = New System.Drawing.Size(288, 24)
Me.cbxData.TabIndex = 6
Me.cbxData.Text = "Convert filename in <DATA> to Mime encoded data"
'
'gbxLogging
'
Me.gbxLogging.Controls.Add(Me.TextBox1)
Me.gbxLogging.Controls.Add(Me.cbxLogOutXml)
Me.gbxLogging.Controls.Add(Me.cbxLogParsedXml)
Me.gbxLogging.Controls.Add(Me.cbxLogOrgXml)
Me.gbxLogging.Controls.Add(Me.cbxLogEasy)
Me.gbxLogging.Controls.Add(Me.cbxLogConnector)
Me.gbxLogging.Controls.Add(Me.cbxLogFolder)
Me.gbxLogging.Location = New System.Drawing.Point(64, 400)
Me.gbxLogging.Name = "gbxLogging"
Me.gbxLogging.Size = New System.Drawing.Size(512, 100)
Me.gbxLogging.TabIndex = 1
Me.gbxLogging.TabStop = False
Me.gbxLogging.Text = "Logging"
'
'TextBox1
'
Me.TextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.TextBox1.Location = New System.Drawing.Point(384, 16)
Me.TextBox1.Multiline = True
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.ReadOnly = True
Me.TextBox1.Size = New System.Drawing.Size(120, 72)
Me.TextBox1.TabIndex = 6
Me.TextBox1.Text = "All log files will be created in the LOGGING
subfolder under the corresponding XM" & _
"L request ID"
'
'cbxLogOutXml
'
Me.cbxLogOutXml.Location = New System.Drawing.Point(200, 64)
Me.cbxLogOutXml.Name = "cbxLogOutXml"
Me.cbxLogOutXml.Size = New System.Drawing.Size(120, 24)
Me.cbxLogOutXml.TabIndex = 13
Me.cbxLogOutXml.Text = "Keep output XML"
'
'cbxLogParsedXml
'
Me.cbxLogParsedXml.Location = New System.Drawing.Point(200, 40)
Me.cbxLogParsedXml.Name = "cbxLogParsedXml"
Me.cbxLogParsedXml.Size = New System.Drawing.Size(152, 24)
Me.cbxLogParsedXml.TabIndex = 12
Me.cbxLogParsedXml.Text = "Keep parsed parsed XML"
'
'cbxLogOrgXml
'
Me.cbxLogOrgXml.Location = New System.Drawing.Point(200, 16)
Me.cbxLogOrgXml.Name = "cbxLogOrgXml"
Me.cbxLogOrgXml.Size = New System.Drawing.Size(120, 24)
Me.cbxLogOrgXml.TabIndex = 11
Me.cbxLogOrgXml.Text = "Keep original XML"
'
'cbxLogEasy
'
Me.cbxLogEasy.Location = New System.Drawing.Point(8, 64)
Me.cbxLogEasy.Name = "cbxLogEasy"
Me.cbxLogEasy.Size = New System.Drawing.Size(168, 24)
Me.cbxLogEasy.TabIndex = 10
Me.cbxLogEasy.Text = "Log Easy XML activity to file"
'
'cbxLogConnector
'
Me.cbxLogConnector.Location = New System.Drawing.Point(8, 40)
Me.cbxLogConnector.Name = "cbxLogConnector"
Me.cbxLogConnector.Size = New System.Drawing.Size(168, 24)
Me.cbxLogConnector.TabIndex = 9
Me.cbxLogConnector.Text = "Log connector activity to file"
'
'cbxLogFolder
'
Me.cbxLogFolder.Location = New System.Drawing.Point(8, 16)
Me.cbxLogFolder.Name = "cbxLogFolder"
Me.cbxLogFolder.Size = New System.Drawing.Size(144, 24)
Me.cbxLogFolder.TabIndex = 8
Me.cbxLogFolder.Text = "Log folder activity to file"
'
'gbxError
'
Me.gbxError.Controls.Add(Me.cbxErrData)
Me.gbxError.Controls.Add(Me.TextBox2)
Me.gbxError.Controls.Add(Me.cbxErrOutXml)
Me.gbxError.Controls.Add(Me.cbxErrParsedXml)
Me.gbxError.Controls.Add(Me.cbxErrOrgXml)
Me.gbxError.Location = New System.Drawing.Point(64, 520)
Me.gbxError.Name = "gbxError"
Me.gbxError.Size = New System.Drawing.Size(512, 104)
Me.gbxError.TabIndex = 2
Me.gbxError.TabStop = False
Me.gbxError.Text = "On error"
'
'cbxErrData
'
Me.cbxErrData.Location = New System.Drawing.Point(200, 16)
Me.cbxErrData.Name = "cbxErrData"
Me.cbxErrData.TabIndex = 17
Me.cbxErrData.Text = "Keep data files"
'
'TextBox2
'
Me.TextBox2.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.TextBox2.Location = New System.Drawing.Point(384, 24)
Me.TextBox2.Multiline = True
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.ReadOnly = True
Me.TextBox2.Size = New System.Drawing.Size(120, 72)
Me.TextBox2.TabIndex = 9
Me.TextBox2.Text = "All error files will be created in the ERROR
subfolder under the corresponding XM" & _
"L request ID"
'
'cbxErrOutXml
'
Me.cbxErrOutXml.Location = New System.Drawing.Point(8, 64)
Me.cbxErrOutXml.Name = "cbxErrOutXml"
Me.cbxErrOutXml.Size = New System.Drawing.Size(120, 24)
Me.cbxErrOutXml.TabIndex = 16
Me.cbxErrOutXml.Text = "Keep output XML"
'
'cbxErrParsedXml
'
Me.cbxErrParsedXml.Location = New System.Drawing.Point(8, 40)
Me.cbxErrParsedXml.Name = "cbxErrParsedXml"
Me.cbxErrParsedXml.Size = New System.Drawing.Size(152, 24)
Me.cbxErrParsedXml.TabIndex = 15
Me.cbxErrParsedXml.Text = "Keep parsed parsed XML"
'
'cbxErrOrgXml
'
Me.cbxErrOrgXml.Location = New System.Drawing.Point(8, 16)
Me.cbxErrOrgXml.Name = "cbxErrOrgXml"
Me.cbxErrOrgXml.Size = New System.Drawing.Size(120, 24)
Me.cbxErrOrgXml.TabIndex = 14
Me.cbxErrOrgXml.Text = "Keep original XML"
'
'btnOk
'
Me.btnOk.Location = New System.Drawing.Point(256, 720)
Me.btnOk.Name = "btnOk"
Me.btnOk.TabIndex = 3
Me.btnOk.Text = "Ok"
'
'btnCancel
'
Me.btnCancel.Location = New System.Drawing.Point(376, 720)
Me.btnCancel.Name = "btnCancel"
Me.btnCancel.TabIndex = 4
Me.btnCancel.Text = "Cancel"
'
'gbxProcessing
'
Me.gbxProcessing.Controls.Add(Me.Label1)
Me.gbxProcessing.Controls.Add(Me.tbxTimer)
Me.gbxProcessing.Controls.Add(Me.rbtParallel)
Me.gbxProcessing.Controls.Add(Me.rbtSerial)
Me.gbxProcessing.Location = New System.Drawing.Point(64, 216)
Me.gbxProcessing.Name = "gbxProcessing"
Me.gbxProcessing.Size = New System.Drawing.Size(512, 80)
Me.gbxProcessing.TabIndex = 5
Me.gbxProcessing.TabStop = False
Me.gbxProcessing.Text = "Processing"
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(224, 32)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(160, 23)
Me.Label1.TabIndex = 3
Me.Label1.Text = "Milliseconds between requests"
'
'tbxTimer
'
Me.tbxTimer.Location = New System.Drawing.Point(384, 32)
Me.tbxTimer.Name = "tbxTimer"
Me.tbxTimer.Size = New System.Drawing.Size(72, 20)
Me.tbxTimer.TabIndex = 5
Me.tbxTimer.Text = ""
'
'rbtParallel
'
Me.rbtParallel.Location = New System.Drawing.Point(8, 40)
Me.rbtParallel.Name = "rbtParallel"
Me.rbtParallel.TabIndex = 4
Me.rbtParallel.Text = "Parallel"
'
'rbtSerial
'
Me.rbtSerial.Location = New System.Drawing.Point(8, 16)
Me.rbtSerial.Name = "rbtSerial"
Me.rbtSerial.TabIndex = 3
Me.rbtSerial.Text = "Serial"
'
'gbxServer
'
Me.gbxServer.Controls.Add(Me.btnTest)
Me.gbxServer.Controls.Add(Me.Label3)
Me.gbxServer.Controls.Add(Me.Label2)
Me.gbxServer.Controls.Add(Me.tbxServer)
Me.gbxServer.Controls.Add(Me.tbxPort)
Me.gbxServer.Location = New System.Drawing.Point(64, 120)
Me.gbxServer.Name = "gbxServer"
Me.gbxServer.Size = New System.Drawing.Size(512, 80)
Me.gbxServer.TabIndex = 6
Me.gbxServer.TabStop = False
Me.gbxServer.Text = "Server"
'
'btnTest
'
Me.btnTest.Location = New System.Drawing.Point(288, 32)
Me.btnTest.Name = "btnTest"
Me.btnTest.TabIndex = 2
Me.btnTest.Text = "Test"
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(176, 32)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(32, 23)
Me.Label3.TabIndex = 3
Me.Label3.Text = "Port"
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(32, 32)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(40, 23)
Me.Label2.TabIndex = 2
Me.Label2.Text = "Server"
'
'tbxServer
'
Me.tbxServer.Location = New System.Drawing.Point(72, 32)
Me.tbxServer.Name = "tbxServer"
Me.tbxServer.TabIndex = 0
Me.tbxServer.Text = ""
'
'tbxPort
'
Me.tbxPort.Location = New System.Drawing.Point(208, 32)
Me.tbxPort.Name = "tbxPort"
Me.tbxPort.Size = New System.Drawing.Size(64, 20)
Me.tbxPort.TabIndex = 1
Me.tbxPort.Text = ""
'
'gbxFolder
'
Me.gbxFolder.Controls.Add(Me.btnFolder)
Me.gbxFolder.Controls.Add(Me.tbxFolder)
Me.gbxFolder.Location = New System.Drawing.Point(64, 24)
Me.gbxFolder.Name = "gbxFolder"
Me.gbxFolder.Size = New System.Drawing.Size(512, 80)
Me.gbxFolder.TabIndex = 7
Me.gbxFolder.TabStop = False
Me.gbxFolder.Text = "Folder to monitor"
'
'btnFolder
'
Me.btnFolder.Location = New System.Drawing.Point(384, 48)
Me.btnFolder.Name = "btnFolder"
Me.btnFolder.TabIndex = 1
Me.btnFolder.Text = "Select"
'
'tbxFolder
'
Me.tbxFolder.Location = New System.Drawing.Point(80, 24)
Me.tbxFolder.Name = "tbxFolder"
Me.tbxFolder.Size = New System.Drawing.Size(376, 20)
Me.tbxFolder.TabIndex = 0
Me.tbxFolder.Text = ""
'
'TabControl1
'
Me.TabControl1.Controls.Add(Me.tbpGeneral)
Me.TabControl1.Controls.Add(Me.tbpExport)
Me.TabControl1.Location = New System.Drawing.Point(16, 16)
Me.TabControl1.Name = "TabControl1"
Me.TabControl1.SelectedIndex = 0
Me.TabControl1.Size = New System.Drawing.Size(680, 688)
Me.TabControl1.TabIndex = 9
'
'tbpGeneral
'
Me.tbpGeneral.Controls.Add(Me.gbxError)
Me.tbpGeneral.Controls.Add(Me.gbxLogging)
Me.tbpGeneral.Controls.Add(Me.gbxXml)
Me.tbpGeneral.Controls.Add(Me.gbxProcessing)
Me.tbpGeneral.Controls.Add(Me.gbxServer)
Me.tbpGeneral.Controls.Add(Me.gbxFolder)
Me.tbpGeneral.Location = New System.Drawing.Point(4, 22)
Me.tbpGeneral.Name = "tbpGeneral"
Me.tbpGeneral.Size = New System.Drawing.Size(672, 662)
Me.tbpGeneral.TabIndex = 0
Me.tbpGeneral.Text = "General"
'
'tbpExport
'
Me.tbpExport.Location = New System.Drawing.Point(4, 22)
Me.tbpExport.Name = "tbpExport"
Me.tbpExport.Size = New System.Drawing.Size(672, 662)
Me.tbpExport.TabIndex = 1
Me.tbpExport.Text = "Export"
'
'frmSettings
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(720, 765)
Me.Controls.Add(Me.TabControl1)
Me.Controls.Add(Me.btnOk)
Me.Controls.Add(Me.btnCancel)
Me.Name = "frmSettings"
Me.Text = "Settings"
Me.gbxXml.ResumeLayout(False)
Me.gbxLogging.ResumeLayout(False)
Me.gbxError.ResumeLayout(False)
Me.gbxProcessing.ResumeLayout(False)
Me.gbxServer.ResumeLayout(False)
Me.gbxFolder.ResumeLayout(False)
Me.TabControl1.ResumeLayout(False)
Me.tbpGeneral.ResumeLayout(False)
Me.ResumeLayout(False)

End Sub

#End Region

End Class
 
G

Guest

Ok I just found the problem. I have a Dell Latitude D600 laptop with a DELL
TFT monitor connected. I have rotated the screen from landscape to portrait.
When I change back to landscape the problem is gone. When I rotate my screen
(and ofcourse change this in the screen settings) to portrait again I have
the problem again! This is cool! But looks like a bug.
 
P

Peter Huang [MSFT]

Hi Philip,

Based on my test on a LG TFT+865G Display Adapter, I can not reproduce the
problem.
I test two approach,
1. show the form first and then rotate between landscape and portrait
2. rotate from landscape to portrait, and then show the form

In both test, the groupbox's outlines can be shown fine and we can resize
the form.

So I think you may try to test on another machine with different display
adapter/Display suite.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

Guest

But I just updated my display driver from support.dell.com and now the
problem with the outlining of the groupboxes is gone. So I guess it wat a bug
in the ATI driver?
 
W

Wei-Dong XU [MSFT]

Hi

So far it is hard to guess what had happened.
But I think you may try to make a test.
1. Try to reproduce it on another machine(e.g. A, and confirm it will work)
2. Try to exchange the two monitors, if the problem occurred on the problem
machine or the machine A

So that we can know preparatorily what may be the cause.
In the next steps, if the Machine A, is OK, the displayer card maybe the
cause, then you can exchange the Displayer card, to see if the Machine A
will works OK.
If NO, then it is the displayer card, you may try update the driver.
If YES, I think the problem maybe your machine.

You may perform the test and let me know the result.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top