ShowInTaskbar

Zexor

Well-known member
Joined
Nov 28, 2008
Messages
520
Programming Experience
3-5
I have a form that when minimized, it will set ShowInTaskbar=False, and when notifyicon is click, it will set it to true and windowstate to normal. I have notice, setting showintaskbar to true sometime will mess with my picturebox location. They will get shift down, sometime so far that it disappear all together.

In my form, i have a flowlayoutpanel, with GroupBoxes. Inside the groupbox, is a picturebox. the groupbox is just a bit bigger like a picture frame.

when i minimized and make it normal again, the showintaskbar seems to shift some picbox downward. I have notice, its only if i scroll down on the flowpanel. If i scroll down to 3rd pic, the 1st pic will be effected, scroll to 4th, 1 and 2 will be effected, and so on. Its really strange. I can repeat it everytime.

Its all fine if i take out both ShowInTaskbar lines. ShowInTaskbar redrawing the controls seems to mess with flowlayoutpanel? I know it mess with listview icon view too.
 
I switched to using me.show() me.hide() and that seem to work. Is that some kind of bug in flowlayoutpanel too like the listview?
 
I have a form that when minimized, it will set ShowInTaskbar=False, and when notifyicon is click, it will set it to true and windowstate to normal. I have notice, setting showintaskbar to true sometime will mess with my picturebox location. They will get shift down, sometime so far that it disappear all together.

In my form, i have a flowlayoutpanel, with GroupBoxes. Inside the groupbox, is a picturebox. the groupbox is just a bit bigger like a picture frame.

when i minimized and make it normal again, the showintaskbar seems to shift some picbox downward. I have notice, its only if i scroll down on the flowpanel. If i scroll down to 3rd pic, the 1st pic will be effected, scroll to 4th, 1 and 2 will be effected, and so on. Its really strange. I can repeat it everytime.

Its all fine if i take out both ShowInTaskbar lines. ShowInTaskbar redrawing the controls seems to mess with flowlayoutpanel? I know it mess with listview icon view too.
What's the code you have for seeing if the form is minimized or not.

Using Me.Show() and Me.Hide() shouldn't have anything to do with this as I use the form's Resize event and check the Me.WindowState property to determine things based on it's Maximized, Minimized, and Normal states.
 
Yes, ShowInTaskbar = False and ShowInTaskbar = True, are the ones that messing up. I switched to Show and Hide and everything works fine.
 
That really doesn't explain anything. You shouldn't need to use Me.Hide or Me.Show, as I'm able to do just that using this code:
    Private Sub Form1_Resize(sender As Object, e As System.EventArgs) Handles Me.Resize
        Me.ShowInTaskbar = Me.WindowState <> FormWindowState.Minimized
    End Sub
 

Attachments

  • WindowsApplication1.zip
    16.4 KB · Views: 25
i am telling you, ShowInTaskbar, messup the picturebox location inside a groupbox inside my flowlayoutpanel. It hides it and shows it well but messup the location of the picturebox. It also mess with listview iconview
 
Messes it up how? You still haven't explained what the problem is, nor have you posted any code so I cannot help you.

I tried adding a FlowLayoutPanel and put a GroupBox in it and a PictureBox inside that, I set the image property and cannot get any kind of difference with the displaying of the image when the ShowInTaskbar, I then added the code from the project I posted above and still, nothing wrong with the PictureBox or the image being displayed. There's something your code is doing that mine isn't that's causing a problem, but again, you haven't posted any code so I cannot help you.
 
Back
Top