Results 1 to 4 of 4

Thread: Possible bug in transparent forms ?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2016
    Posts
    15

    Exclamation Possible bug in transparent forms ?

    Hello,

    I am new to VB.NET,
    how can I solve the problem with that edge ?
    Name:  bug.jpg
Views: 187
Size:  6.8 KB
    1 = Desktop BackGround
    2 = Image in PictureBox (picture has transparent background)
    PictureBox1 is in transparent Form
    Form.BackColor = White
    Form.TransparentKey = Transparent
    I tried different colors in BackColor / TransparentKey, fruitless
    +I can not put any picture DropShadow race that increases the pixels do not see any shadow
    is Bug in Visual Studio or ?
    There solving?
    Sorry for English .

  2. #2
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: Possible bug in transparent forms ?

    That's impossible to avoid in Windows Forms because it doesn't have partial transparency for individual pixels. But WPF does that brilliantly. I suggest you try the "shaped form" link in my signature below, because it gives you step by step instructions on how to use a WPF window with smoothed edges and a drop shadow. You don't need to know anything about WPF to follow it. The WPF window in the tutorial has a (WPF) button on it, but you could leave that out or add other WPF controls if you need them. If there's anything you don't understand, just ask here.

    BB

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2016
    Posts
    15

    Re: Possible bug in transparent forms ?

    Hi BB,

    this is result
    Name:  Capture.PNG
Views: 84
Size:  26.0 KB
    nice a? is not nice, is perfect for me
    and put your setup directly in cod
    Code:
    <Window x:Class="MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="993.87" Width="899.436" WindowStyle="None" AllowsTransparency="True" Background="Transparent" VerticalAlignment="Center" HorizontalAlignment="Center">
        <Window.Effect>
            <DropShadowEffect x:Name="PrimeForm" BlurRadius="15" ShadowDepth="0" Opacity="0.7" Color="red"></DropShadowEffect>
        </Window.Effect>
        <Image Margin="92,227,87,46" Source="bgc.png" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Center" HorizontalAlignment="Center" Width="720"/>
    </Window>
    but I still have a question,
    can do in WPF project, all you do in VB project?
    because I want to work only in WPF,
    I am still in the beginning and I could go instead,
    what advice you give me?
    thank you for advice .

  4. #4
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: Possible bug in transparent forms ?

    WPF is an alternative framework to Windows Forms. For practical tasks, it does everything Windows Forms does better. In particular, it supports animation and transparency in ways that Windows Forms does not, but that's barely scratching the surface. It's a big topic.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

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