• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1136
  • Last Modified:

VB form with no icon?

How the heck do you remove the icon from the upper-left corner of a form? I have a program that pops up warning boxes, and I dont want an icon in the upper-left, like the MsgBox window pops up without the icon.

In the form, if I switch the icon to (none) the damn windows default icon appears instead. How the heck do I just remove it altogether?
0
edskee
Asked:
edskee
1 Solution
 
appariCommented:
set controlbox property to  false then it wont display icon
0
 
Ryan ChongCommented:
Or in your Form_Load Event:

add this line of code: Me.Icon = Nothing
0
 
RimvisCommented:
Just set Icon property to "(none)" and BorderStyle property to "Fixed Dialog".
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
rspahitzCommented:
ryancys, that's pretty good.  You get the windows flag (in Win2K) but that looks better than the form image.

If you really want to "get rid of" the icon but leave everything else intact, you'll have to create a new icon with all pixels transparent, then set the icon to THAT.
0
 
edskeeAuthor Commented:
No, because then you still have the space where the icon would be. Load up a form, then have it call a MsgBox... the msgbox has the 'title' all the way to the left, no icon, no space where an icon would be.

Havent tried appari's or rimvis's suggestions yet. Gonna give it a shot tonight.
0
 
rspahitzCommented:
I see...you wanted "warning boxes".  Then I think that appari's comment should work for you if you want to allow the form to be resized, or  Rimvis' will work if you don't.
0
 
HelixDaKatCommented:
Set the forms settings as follows:

BORDERSTYLE = 3 - FIXED DIALOG
ICON = (NONE)

HelixDaKat
0
 
marperCommented:
Private Sub Form_Load()
Form1.Picture = LoadPicture()   'Clear the picture.
end sub
0
 
edskeeAuthor Commented:
Thanks... sorry for the delay in grading the question.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now