Solved

Windowless VB Forms

Posted on 1998-06-02
15
259 Views
Last Modified: 2008-02-01
Does anyone know how to make a vb form transparent still showing just say an image.
0
Comment
Question by:FGrist
  • 3
  • 2
  • 2
  • +5
15 Comments
 
LVL 4

Expert Comment

by:martinag
ID: 1462324
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
 

Expert Comment

by:topol
ID: 1462325
You can make your form custom size, not a rectangle, but let's say a circle.
0
 
LVL 3

Expert Comment

by:schworak
ID: 1462326
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
 

Expert Comment

by:topol
ID: 1462327
shworak, I can send you the sample application showing how to make the form any shape you want.
0
 
LVL 1

Expert Comment

by:Edithf
ID: 1462328
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
 
LVL 3

Expert Comment

by:schworak
ID: 1462329
To Topol,

Yes! I would love that sample code too please.

glenn@g-world.com
0
 

Author Comment

by:FGrist
ID: 1462330
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 2

Expert Comment

by:ndnet
ID: 1462331
Topol, could you send me the code too.
sgmcnaughton@hotmail.com
0
 
LVL 2

Accepted Solution

by:
ndnet earned 100 total points
ID: 1462332
ActiveX to the rescue:
http://www.cariblife.com/pub/FSActiveX/index.html
is the address to a control that does just that.
0
 
LVL 4

Expert Comment

by:martinag
ID: 1462333
Topol, I'd like to have that code too.
martin.agren@home.se
0
 
LVL 9

Expert Comment

by:Dalin
ID: 1462334
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
 
LVL 1

Expert Comment

by:sirigere
ID: 1462335
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
 
LVL 1

Expert Comment

by:sirigere
ID: 1462336
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
 

Expert Comment

by:topol
ID: 1462337
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
 

Author Comment

by:FGrist
ID: 1462338
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now