I Think I have found a bug. Here is the situation:
In form1 add a button and add this code:
In Form2 add this code:VB Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim frm As New Form2(Me) frm.ShowDialog() Me.Show() End Sub
VB Code:
Public Class Form2 Inherits System.Windows.Forms.Form Dim pform As Form #Region " Windows Form Designer generated code " Public Sub New(ByVal frm As Form) MyBase.New() pform = frm 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub ' ' ' Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.Opacity = 0.99 ' Any value less than 1 Me.Opacity = 1 ' Even if you dont change it to 1 it still happens ' MessageBox.Show(Me.ShowInTaskbar) pform.Hide() ' MessageBox.Show(Me.ShowInTaskbar) 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.




Reply With Quote