Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Form Icon Disappears


I have a form that has an icon in the upper left corner. When in design view, the icon shows normally. When I run the program in VB6 the icon changes to a little black box. I'm not sure how I got it to do this, but I can't figure out how to make it show the icon normally and I need my icon! Has anyone any clues?

Attached is the form code. It is probably something silly that I am overlooking. Thanks for looking.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Form Icon Disappears
I have a form with a flag icon for the form ico. When I run the program the place where the icon is supposed to be is a black square in the upper left corner. I havent seen this before and it has me puzzled. In design view the icon appears just fine. Anybody have any ideas?
Thanx in advance, Anthony

Program Disappears When Tray Icon Is Clicked?
I have a program that when executed, it puts an Icon with a submenu in the Systray. However, when I right click the icon the submenu pops up. When I click a menu option...my program loses focus and disappears. This program contains only 1 form and that form is what comes up when executed. How can I prevent it from disappearing?

Thanks,

VB Service Icon In Systray Disappears When Mouse Moved Over It
I created an NT Service app in VB. I used the standard posted code on VBForum to put the icon in the SysTray. That works fine. Now as soon as I move the mouse over the SysTray Icon for my program it disappears.

Note: I have no MouseMove Event code in my code yet. and I removed the DeleteIcon routine.

What just happened? How do I correct it? Mind you the app is still running as planned, just the icon disappears and no Event in the program happens (ie Form_MouseMove or Picture1_MouseMove).



VB Code:
Private Sub StartInSysTray()    SysTray.cbSize = Len(SysTray)    SysTray.hWnd = Picture1.hWnd    SysTray.uId = 1&    SysTray.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE    SysTray.ucallbackMessage = WM_MOUSEMOVE    SysTray.hIcon = Me.Icon    SysTray.szTip = Me.Caption & vbNullChar    Shell_NotifyIcon NIM_ADD, SysTray    Me.Visible = False    App.TaskVisible = FalseEnd Sub

NT Service Works But Task Tray Icon Disappears?
I have created a VB program that works great as a service. I starts automatically and stays running when a user logs off and back on again, and restarts when the system is rebooted.

The only problem that I am having is making sure that the tray icon returns after a reboot or if one user logs off and another logs on. When I log on (as administrator) and start the service the tray icon appears like it should. When I log off and another user logs on (or I log back on) the tray icon doens't come back. The service remains running but no tray icon??? I want the tray icon to be there for all users?

Any ideas?

Thanks!

Form Disappears
I am having a problem with one of my forms. Once I show it in a modal way, it disappears from my tab menu and from the task bar. The program is runnig and the form is loaded and once visible.. but if you change to another program... you cant find it anymore. Can anybody help me?

MDI Form, Menu Disappears
I have a MDI form with a menu bar, the form will load with no MDI child forms. The menu options will open particular MDI child forms. Whenever I open a form the menu bar from the Main MDI form disappears until the current MDI child form is closed. How can I keep the menu bar visible and active while using child form is open?

Thanks in advance.

Form Content Disappears??
I have a VB6 program that works with the AS/400. You tell it to load the database files and it send a command to the AS/400 to create some files to be imported.

My question is that while the AS/400 is creating these files (multiple files and many records), the VB program sits and waits. If the screen saver comes on or you start something else over top the VB program, it removes the contents of the forms. The contents will not return until the control is returned to the VB program.

Is there a way to periodically refresh this screen while it is waiting?

Thank you for any help.

Form Disappears On Min Button
Hi Everybody,

I have forms placed inside an MDI form. When I use the "minimize button on any of the child forms the form will disappear from the MDI form space. (The form will be apparant only from the windows xp task bar)

How do I fix that so that the Minimize event will still show the icon within the MDI workspace?

Many thanks,
Paul

Menu Disappears In MDI Form
Hi Group
I have an MDI app with a number of child forms. One child form is loaded at
startup. When this happens the File Menu disappears in the MDI Form. If
the form does not load the File Menu remains. Can anyone explein why the
File Menu would disappear under these circumstances.
Regards
Phil Jones
The Logical Interface
02 9541 0367
www.logint.com.au
email@removed

Form Disappears When Message Box Pops Up
Help?!

I have a main form that loads other forms on top of it.
If I set the other forms border style to "0 -None", when a message box pops up for that form, the form disappears until I select an option in my message box. After that it will display as normal.

Form Disappears But Program Still Running!?
here's code to a button that tests to see if the COM port has a functioning modem on it:

Private Sub cmdTest_Click()
On Error GoTo Eline:
'test modem
'close port 1st
If MSComm1.PortOpen Then
MSComm1.PortOpen = False
End If
MSComm1.CommPort = cboPort.ListIndex + 1
MSComm1.PortOpen = True
MSComm1.Output = "ATDT 1-800-330-0428" + vbCr
x = MsgBox("You should be able to hear the modem dialing the phone line. Can you?", vbInformation + vbYesNo, "Modem Test")
MSComm1.PortOpen = False
If x = 7 Then
MsgBox "Select another COM Port and test it.", vbInformation, "Modem Test"
Else
Call cmdApply2_Click 'write to cfg
sbrStatus.Panels("Msgs").Text = "New Settings written! "
sbrStatus.Panels("Msgs").Picture = LoadPicture("c:ThorpeFormsEfiledataexc.ico")
Timer1.Enabled = True
End If
Exit Sub
Eline:
MsgBox "This is not a modem! Select another COM Port and test it.", vbExclamation, "Modem Test"
End Sub

When i test the program from within the VB project, all is well. However, when i compile it and then use this button, the code executes but the form disappears!! And if i hit ctrl+alt+del for a list of running programs, it is listed as still running!? can ANYONE tell me why this is happening and how i can fix it!?!?!

InProcess DLL Modal Form Disappears
Hi

I am writing a DLL that gets called by an application. This is a third party application, for which I have no code. This application for the most part runs as ActiveX (I think ) inside explorer browser

The DLL is developed as an activeX "InProcess" DLL in VB 6.0 (win32 unmanaged code)

My DLL throws some MODAL VB forms at users to capture some data and process it

What I observe is, that some times (it is reproducible, but not exactly sure how)when one of my forms is under display and an external event happens (such as an IM ping or email coming etc.), My form disappears and the app browser hangs.

My hypothesis is:
The external event causes App browser to assume control (for refresh and/or painting) and then it has no way to return control to my DLL (or even know that My DLL had control)

Questions:
1. IS the above hypothesis correct?
2. Is there any way of circumventing this problem (I have tried to play with keeping my window in top of other windows - but that does not solve this problem)

Please help

Matt

Toolbar Disappears After Form Activate
I added a toolbar to my app at the very end of development. Here's what happens: when the form is activated and while the form loads a listbox the toolbar and all buttons are visible, but as soon as the listbox is fully populated the buttons go invisible. I can click on where the buttons are on the form then they become visible, OR when I step through the program at the end of stepping the buttons remain visible, but when the program runs normally they turn invisible. I have checked all properties on the toolbar and buttons and they are all enabled and visible. The toolbar iteslf does not turn invisble, only the buttons.
I have tried forcing the buttons visible as the last line of code but it still doesn't work.

Can anyone point me in the right direction to solve this?

InProcess DLL Modal Form Disappears
Hi

I am writing a DLL that gets called by an application. This is a third party application, for which I have no code. This application for the most part runs as ActiveX (I think ) inside explorer browser

The DLL is developed as an activeX "InProcess" DLL in VB 6.0 (win32 unmanaged code)

My DLL throws some MODAL VB forms at users to capture some data and process it

What I observe is, that some times (it is reproducible, but not exactly sure how)when one of my forms is under display and an external event happens (such as an IM ping or email coming etc.), My form disappears and the app browser hangs.

My hypothesis is:
The external event causes App browser to assume control (for refresh and/or painting) and then it has no way to return control to my DLL (or even know that My DLL had control)

Questions:
1. IS the above hypothesis correct?
2. Is there any way of circumventing this problem (I have tried to play with keeping my window in top of other windows - but that does not solve this problem)

Please help

Matt

MDI Form Menu Disappears When Child Loads
When my MDI child loads within the parent, the menu items disappear on the parent and become otherwise disabled, and the child's frm menu takes over.

Is there a way I can fix this?

Highlight Disappears When Form Loses Focus
I have two forms, each with a text box. When I highlight text in one textbox, the highlight effect disappears when the other form gets focus. Is it possible to prevent this?

Webbrowser Control - Form Reloads/Disappears
Ok here's the problem. I've added a webbrowser control to a VB6 form. I load up a page post some data and wait for the user to push a command button. Everything works fine when I step through the code or set a breakpoint. However if I run the code w/o a breakpoint the entire form just disappears. It still shows up in the task manager. This is driving me crazy! Anyone have any idea?

Here's the code. If I set a breakpoint anywhere after the webbrowser.navigate everthing is fine.

Private Sub cmdApprove_Click()
    'Update
    bolSuccess = Approve()
    If bolSuccess = True Then
        'Ok to goto next record
        bolNext = True
        'Reload VT Page 1
        frmMain.WebBrowser.Navigate ("\Testcommonapps172130VT172130.htm")
        'Wait for page to load
        Do
            frmMain.MousePointer = 13
            DoEvents
        Loop While frmMain.WebBrowser.Busy
        frmMain.MousePointer = 0
    End If
End Sub




Edited by - argono on 9/26/2003 9:08:34 AM

Changed Form Icon(top Left Of Form). How Do I Get Back My VB6 Default Icon?
Hello


I have changed my form Icon in the top left corner of the form.
How do I get back the original VB6 default Icon?
(It seems to be built into VB6. Cannot access Icon)


Thanks

Gary.

2nd Form Disappears After 1st Form &".show&"s It...
The Process: A user enters a search string on Form1 and hits "SEARCH". A "Searching..." image is displayed on Form1. Form1 gathers the results of the query and fills a FlexGrid on Form2 with the results. Then the code looks like this (code is in Form1)...

Form1.imgSearching.Visible = False
Form1.Hide
Form2.Show


The $*&($*& Problem: This problem only occurs when another program is running (such as an open PDF file...) Sometimes after Form2.Show is called, Form2 will appear for a split second and then "disappear". When I say Disappear, I mean it is not visible on the screen and the "PDF File" is displayed. The icon is still in the taskbar, and most of the time Form2 still has the focus, because I can scroll down the FlexGrid with the down arrow when the Form2 is still "invisible". I reiterate that this problem is only sometimes, and it's not predictable.

I'm wondering if it's (theoretically) possible that between the small amount of time that Form1 is hidden and Form2 is shown, can the "PDF File" become the new "Foreground Window" and therefore hide my application? I've tried to show Form2 first and then hide Form1, it's seems to help a little but I still get the problem occasionally....

Any thoughts/ideas?

Thanks!
Jason

Change Form's Icon To Extracted Icon
I am extracting an icon from an application, how would I change my Form's icon to the extracted icon. I've tried using


VB Code:
me.icon = loadpicture(EXTRACTED ICON)AND Me.icon = EXTRACTED ICON


Here is my code:


VB Code:
Option ExplicitPrivate Declare Function ExtractIcon Lib "shell32.dll" Alias "ExtractIconA" (ByVal hInst As Long, ByVal lpszExeFileName As String, ByVal nIconIndex As Long) As Long Private Sub Form_Load()Dim hIcon As Long hIcon& = ExtractIcon(App.hInstance, "C:WINDOWSNotepad.exe", 0)End Sub


Thanks,
Sir Loin

No Form Icon With Taskbar Icon
My form has no visible icon, but when it is shown in the taskbar it has the default Visual Basic icon. How can I change the Visual Basic icon in the taskbar without adding an icon to my form?

Disable Resizing Of MDI Child Form & Creating Form Icon
I have two things that I want to do: -

1) How do i disable the resizing of a MDI Child/Parent form when my application is run. For example when the program is being run I want the size of the forms to remain the same size all the time, in order to do this the user should not be able to resize the forms.

2) What is the best way to create my own customized icon to put on a form? and how do i change the colour of the Forms caption bar (the bar where the icon resides on the form).

Any help will be much appreciated
Ebrahim

Disabling The X Icon In A User Form To Prevent Closing A Form From There
Hi,

How do I disable the X icon on the right top of a form, so that the user cannot close the form in this way ?

Can I Show Form Icon When Form With No Border Is Minimized?
Hi,
I am trying to find a way to display form's icon when a form without title bar is minimized. Or, if that can't be done, then change form border property when minimized and restored back.
Can somebody help me?
Any idea appreciated
Thanks,
akrep

Display A Resizable Form, With NO Icon, That Isn't A Tool Form...
Just like the subject sez...how?
I can remove the icon from the Title bar, but my form has to be set to fixed dialog and I can't resize it

Woka

Extracting An Icon Form The Form Window
Hey there,

I'm not too sure if this is possible, is it possible if i extract an icon from the window for example the flower from the icq window and so on and store it into a database... If so how do i go about doing this... what do i use,,,

Thanks once again!!
Have a nice day!

Form & Exe Icon
How do I change the icon for the executable from the plain VB form icon to something else? I've tried changing the 'icon' property on the form but I keep getting an error that says 'Invalid property value'. What am I doing wrong? Is this the correct way?

Thanks
Joni

8^)

No Icon On Form?
I do not want any icons on some of my forms. How do I do that? I tried making an empty 16*16 icon but that causes a space before my form caption. Any advice?

EXE Icon W/o A Form
Is it possible to specify an icon for my program when it is compiled into an EXE *WITHOUT* having a form in my project?

I have a sub main in a module that runs, and thats it.

Form Icon
There is a default icon on the upper left corner of any BV application indicating it's a BV program, Can we change this icon to our own customed one?

Form Name And Icon
How can i let the name of my Form show letter by letter
like if its aws then you first see A then W then S and over again.
And how can i change that icon next to it.

MDI Form Icon
I have an MDI form with my own icon in the title bar.
The MDI form has the min, max and close icons removed.
When I change the caption in the MDI form:
The min, max buttons and close icons appearThe original app icon dissapears

ANybody know why this might happen?

Add Icon To Form
hi..is there an easy way of adding an icon to the top of a form? thanks.

Set Exe Icon If Exe Has No Form?
how can I set the icon for an VB6 exe if the app has no form?

Form Icon In XP
Hey Guys! How are you all?
Guys, I am new to XP, and I need some help.

Whever I assign an icon to a form, it is displayed with poor colour graphcis, maybe 16 colours. Does anybody know why or how to fix it ?

Icon On The Form
hi
how should i get an icon on the left corner of the form.
the icon which i have created.
help please

Getting Icon Of The Form
Hey guys!
I want to retrieve the 16x16 icon of Form1's icon (for example) into a picturebox or an "image" control?

Does anybody know how to do this?

A Form Without An Icon...
How do I have a form that has no icon? I still want the buttons on the top right of the form though. Thanks in advance.

Form's Icon
How do you set the icon for a borderless form?

Form Icon
Hi.

I opened up a VB project that was contained on my Visual Studio CD and I noticed that the project's Form contained a little icon that looked like a black lock in the Project Explorer Window.

Does anyone know what the purpose of this "black lock" is?

Thanks.

Icon With No Form
Hi.

Is there any way to make
a project with no form
and still have it have
a different icon?

Form Icon????
Hi,

I've set my Form's icon property to None, but I get the windows icon as the form's icon. Is there any other property to be set to make the form have no icon???

Thanx.

Icon For An Exe With No Form
Probably something really simple that I'm missing, but how do I assign an icon to my project if it hasn't any Forms (ie. only Basic modules)?

Icon For A Form
The icon editor that I use is Icon Edit Pro 6.0. I believe you can download it at www.tucows.com or www.zdnet.com

------------------
Ryan

Form Icon
Hi everyone,

How can i change the stardard icon on the top left conner of the VB6 form.

Thanks in advance

How To Put An Icon In Form
hi,

i've tried to put an icon in a form but it gives me an error of "INVALID PROPERTY VALUE".....even if my extension is already a (*.ico).

what should i do???

tnx!!!



Edited by - summers30803 on 7/20/2005 9:07:36 PM

How Can I Set The Form Icon In EVB?
I have used VB3 - 6 and know how to set the project property for an icon that shows up in the form title and as the program's icon, but i can't find the same thing in EVB3. Is there some other method for doing this?

TIA

Mike

Form Without An Icon
Hey guys,

How can I create a vb6 form without an Icon?

Thanks,

Mike

Icon In MDI Form
How can I make an MDI form with NO icon ?
I tried putting (none) in Icon properties. But it is coming with the default windows icon . any ideas ?

Copyright © 2005-08 www.BigResource.com, All rights reserved