Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 283
  • Last Modified:

Windowless VB Forms

Does anyone know how to make a vb form transparent still showing just say an image.
0
FGrist
Asked:
FGrist
  • 3
  • 2
  • 2
  • +5
1 Solution
 
martinagCommented:
Transparent forms may mess up the screen.

You could instead try setting BorderStyle to 0 and make the form just the size of the image.
0
 
topolCommented:
You can make your form custom size, not a rectangle, but let's say a circle.
0
 
schworakCommented:
It is also posible to do a screen grab and use that as the background of an "Always On Top" form that is maximized with no borders or menue items. That would fool the user into thinking the form is not visible and any controlls are floating over their desktop.

I don't konw how to make the form a circle, but that would be quite interesting to see!

This is an interesting idea and I would love to see the end answer that you come up with.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
topolCommented:
shworak, I can send you the sample application showing how to make the form any shape you want.
0
 
EdithfCommented:
To Topol,

Can you pls send me a copy of the smple application showing how to make the form different shape ? I am very interested in it :)

My email is : edith-f@usa.net
0
 
schworakCommented:
To Topol,

Yes! I would love that sample code too please.

glenn@g-world.com
0
 
FGristAuthor Commented:
From Fred to all: I am new to this group so I hope this is the right way to respond. Fist thankyou to all. The App I saw do this was a vb clock. There
was definetly no other background around the clock until you dblclk then the form shows up or dissappears depending on the toggle. Topol's idea sounds good. Topol I have used the SetwindowRect thing and it does'st form a really weired shape like a this clock.
I am not sure what you have in mind but I am very Intersted.
My E-Mail is zyron@rogers.wave.ca.
0
 
ndnetCommented:
Topol, could you send me the code too.
sgmcnaughton@hotmail.com
0
 
ndnetCommented:
ActiveX to the rescue:
http://www.cariblife.com/pub/FSActiveX/index.html
is the address to a control that does just that.
0
 
martinagCommented:
Topol, I'd like to have that code too.
martin.agren@home.se
0
 
DalinCommented:
Hi, everyone, this is the code for making the windows:
Regards
Dalin

                  ' This goes into the General Declarations section:
                             
                           Private Declare Function CreateEllipticRgn Lib "gdi32" _
                           (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, _
                           ByVal Y2 As Long) As Long
                             
                           Private Declare Function SetWindowRgn Lib "user32" _
                           (ByVal hWnd As Long, ByVal hRgn As Long, _
                           ByVal bRedraw As Boolean) As Long
                             

                           Private Sub Form_Load()
                             Show 'The form!
                             SetWindowRgn hWnd, _
                             CreateEllipticRgn(0, 0, 300, 200), _
                             True
                           End Sub
0
 
sirigereCommented:
To Topol,

     Can you pls send me a copy of the sample application showing how to make
     the form different shape ? I really appriciate that.
my email : sirigere@usa.net
0
 
sirigereCommented:
You can achive the transperancy just by fooling
Grab the screen and load it on the form. I assume that the form you crete will be with out any caption, min,max and control( i maen disable those properties). Then place a image control which ofcoures will be transparent and load the image into the image control. I think it meight solve your prob to some extent.
0
 
topolCommented:
Good news for all who want to see how to make a form different shape.
Go to URL http://www.mvps.org/vb/ and get WinRgn.zip there.
I tried it-- you should take a look at that sample too!!!
0
 
FGristAuthor Commented:
nDNet: This ocx is the answer it does the job. It is proof it can be done.

dalin: your code creates shapes however seems limited to geometric shapes

topol: Your code is an enhanced version of dalin's and works with a little mathematical improvisions.. thankyou good stuff

sirigere: the grab won't work fully because in the sample I saw the desktop is still active everwhere.

Thankyou to all

PS: If someone could e-mail at zyron@rogers.wave.ca to explain more details on this usergroup eg. how the points work how to get more and how to help others I would appreciate it
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
  • 2
  • +5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now