Results 1 to 10 of 10

Thread: A Bug? ShowDialog and Opacity and TaskBar

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474

    A Bug? ShowDialog and Opacity and TaskBar

    I Think I have found a bug. Here is the situation:

    In form1 add a button and add this code:
    VB Code:
    1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    2.      Dim frm As New Form2(Me)
    3.      frm.ShowDialog()
    4.      Me.Show()
    5. End Sub
    In Form2 add this code:
    VB Code:
    1. Public Class Form2
    2.     Inherits System.Windows.Forms.Form
    3.     Dim pform As Form
    4. #Region " Windows Form Designer generated code "
    5.  
    6.     Public Sub New(ByVal frm As Form)
    7.         MyBase.New()
    8.         pform = frm
    9.         'This call is required by the Windows Form Designer.
    10.         InitializeComponent()
    11.  
    12.         'Add any initialization after the InitializeComponent() call
    13.  
    14.    End Sub
    15. '
    16. '
    17. '
    18. Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    19.         Me.Opacity = 0.99 ' Any value less than 1
    20.         Me.Opacity = 1 ' Even if you dont change it to 1 it still happens
    21.      '   MessageBox.Show(Me.ShowInTaskbar)
    22.         pform.Hide()
    23.      '   MessageBox.Show(Me.ShowInTaskbar)
    24. End Sub

    You will note that when Form2 is shown its taksbar icon is hidden, despite ShowInTaskbar property of Form2 remains True. This situation happens if only
    1-you change the Opacity
    2- hide the parent form
    3-form be shown modally.

    This is tested only in VB.NET and Framework 1.1

    If its a bug, how can I report it to MS? any MVP around?

    Attached is the project if you want to test.
    Attached Files Attached Files
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width