Transparant error

Status
Niet open voor verdere reacties.

Visman4

Nieuwe gebruiker
Lid geworden
16 dec 2009
Berichten
1
Hallo forumleden,

Om de achtergrond van een aantal labels in mijn applicatie transparant te maken, heb ik de functie Parent gebruikt. Hierin geef ik dan het achtergrond object aan. Dit werkt goed, echter bij een herhaling van die code (onder bijna gelijke omstandigheden) werkt het plotseling niet meer. Het volledige label is dan niet meer zichtbaar.

Code:

Code:
        private void LoadWindow(object sender, EventArgs e)
        {

            ResizeWindowMain(); ResizeExhaustForm(); ResizeBrowserForm();
            LblExhaustForm.Parent = PicWinBarExh;
            LblExhaustForm.BackColor = Color.Transparent;

            LblBrowser.Parent = PicWinbarBwrs;
            LblBrowser.BackColor = Color.Transparent;

            LblBore.Parent = PicTextBore;
            LblBore.BackColor = Color.Transparent;

            LblBoreMM.Parent = PicTextBore;
            LblBoreMM.BackColor = Color.Transparent;

            LblStroke.Parent = PicTextStroke;                  // Fout
            LblStroke.BackColor = Color.Transparent;       // Fout
            LblStrokeMM.Parent = PicTextStroke;            // Fout
            LblStrokeMM.BackColor = Color.Transparent; // Fout

            LblVolume.Parent = PicTextVolume;              // Fout
            LblVolume.BackColor = Color.Transparent;     // Fout

            LblDialog.Parent = PicWinBarDialog;
            LblDialog.BackColor = Color.Transparent;
            LblBrowser.Parent = PicWinBarBrws;

            
            LblMain.Parent = PicWindowBar;
            LblMain.BackColor = Color.Transparent;

            LblMain.Left = (Width / 2) - (LblMain.Width / 2);

        }

De code waar "fout" achter is vermeld is werkt niet. Ik sta voor een raatsel, weet iemand een oplossing?

Alvast bedankt,

Mvg,

Marcel
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan