Minimize To Systray Still Shows Title Bar
I followed the tutorial on min to systray and this now works fine. However, i have set showintaskbar to false and when i min to systray it still appears as a moveable title bar on my desktop (sorry i dont know what the correct title for this thing is - basically the head of my form). Any ideas how to remove this so when i min to systray i'm left with no trace of the program until I double click (on systray icon) to return it?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Minimize To SysTray!
I am minimizing a web browser application to the systray (near the clock). Clicking the systray icon (be it right-click or left-click) opens a menu with the Restore, Maximize & Exit items.
Assume that I am working with 4 applications - one of them being the browser & the rest being any application. I minimize the browser; an icon gets added to the systray. I click this icon (which opens the menu) to restore it or maximize it or to close it but then decide to leave it as it is in the minimized state. So without taking any action, I move to the rest of the open applications. Note that the icon menu also remains as it is.
Under such circumstances, what I find that leaving the icon menu open & moving to another application doesn't close the icon menu. Moreover when I click the other applications on the TaskBar to work with any of them, I find that they don't "come" forward; rather their icons on the TaskBar go on blinking till I either invoke the menu of the browser icon from the systray & do something with it or move from one application to another using Alt+Tab.
Now why is this happeniing & how do I prevent this from happening?
Minimize To SysTray
I notice there are(and have been) quite a few queries on this topic.
I think this would be a candidate for the CodeBank ?
I think something as simple(to use) as -
Icon loads into systray on Form_Load.
When user clicks the Icon it shows the Form, if not showing.
It hides the Form if it is showing.
It has no right click popup menu.
It does not require double click
The Form never shows in the Taskbar.
Just click to show Form, and click to hide Form.
No menus (although a hidden popup menu in design mode, may be required to get it working ?)
Is anyone aware of an example like that ?
Although I know there are many examples here how to do this I have a little twist on the problem... I need to minimize an external program ( i.e: Outlook) to the system tray.
Any examples or advice would be great!
Minimize To Systray
I use IDontKnow's systray code and it works perfect. But i havent got this to work.
I have a form, and when the user press the minimize button on the form i want the form to disappear from the taskbar. And when he doubleclick the systray icon it shows again.
So what i need to know is how i can trigger the form1.hide from the minimize button and how i can enable the minimize button even if the form is set to fixed size.
Thanks in advance, Anders
Minimize To SysTray
I've setup my program so that I can use a systray icon, and removed the taskbar icon. However, when I minimize my program, it minimizes to the corner of the screen (on top of the taskbar) instead of disappearing to the tray. Any idea what I can do to fix this?
Minimize MDI Form To Systray
right, this is driving me up the wall! i found some code to minimize my MDI form to the systray, and then allows the user to either double-click the icon to restore the window, or right-click it to get a menu that allows them to restore or exit.
this all works fine in the IDE, but when it's compiled, it doesn't react to any mouse clicks on the icon, so i can't restore the window.
the thing that's making me drive further up the wall is the fact that the sample program that i got the code from works fine in the IDE and when compiled (it's also an MDI project, and i just copy/pasted the code).
this is the code that it seems to have trouble with:
Private Sub MDIForm_MouseMove(Button As Integer, Shift As Integer, _x As Single, Y As Single) If (Me.ScaleWidth = vbPixels) Then lngMsg = x Else lngMsg = x / Screen.TwipsPerPixelX End If Select Case lngMsg Case WM_LBUTTONDBLCLK '515: Restore form window Me.WindowState = vbMaximized lngResult = SetForegroundWindow(Me.hwnd) Shell_NotifyIcon NIM_DELETE, nid Me.Show Case WM_RBUTTONUP '517: Display popup menu lngResult = SetForegroundWindow(Me.hwnd) Me.PopupMenu mnuSystray End SelectEnd Sub
any ideas why this isn't working? thanks.
Minimize To Systray Without Menu Editor
hi, I am trying to find a way to minimize an app to the systray without using the menueditor.
I am using vbshape form creator to make an odd shape form, when ever I use the menu editor it puts the title bart bacck on and wrecks my form shape?
Custom Title Bar (Minimize)
I'm trying to make a custom title bar, and was wondering how to make the form minimize by clicking on a label.
Minimize With Showintaskbar Off Still Leaves Title Bar?
If you do a form with showintaskbar set to false, when the form minimizes the title bar of the program is still there. I tried getting around this by
Private Sub Form_Resize()
If Me.WindowState = vbMinimized Then Me.Hide
If Me.WindowState = vbNormal Then Me.Show
The vbMinimized works perfectly, hiding the form as soon as it is minimized.
As I soon realised, the vbNormal doesn't fire until the form is fully restored, and that happens only if the form is visible. So a bit of a problem there - one requires the other, but the other requires the first to be true.
Is there an alternative way to show the form via subclassing the restore function, or catching the restore message as soon as it is fired instead of trying to code for an event that happens AFTER the code is meant to run? Thanks for any comments/suggestions.
Showing The Minimize And Maximize Button On The Title Bar?
Now now now.....I've a form whereby I set the border style property to Fixed Dialog. Now, after setting this style, there doesn't seem to be any Minimize or Maximize buttons on the form's title bar.
Is there a way to show this? Thanks a lot!
Systray Menu Appears At Random When Program Is Not In Systray
I have a menu that is only supposed to appear when the icon in the system tray is clicked. It works fine from the system tray. But when I have the program opened the menu will appear at random times and locations. Why?
I put the debug commands in to notifiy me when the event(s) fire. This problem also occurs in all of my other programs that have this code BUT ONLY if there is a right click menu associated with that icon. I have already run Windows Update and installed VB6 SP6.
The code I am using I got from msdn.microsoft.com.
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'intDebugCnt is located in the General Declarations section of the form
intDebugCnt = intDebugCnt + 1
Debug.Print MODULE_NAME & "Form_MouseMove" & intDebugCnt
Dim Result As Long
Dim msg As Long
If Me.ScaleMode = vbPixels Then
msg = X
msg = X / Screen.TwipsPerPixelX
Debug.Print "X = " & X
Select Case msg
'517 - Display popup menu
Result = SetForegroundWindow(Me.hwnd)
'515 - Restore frmMain
Me.WindowState = vbNormal
cmdReturnToTray.visible = True
Result = SetForegroundWindow(Me.hwnd)
How Can I Add A Systray Icon And A Systray Menu.
SupZ.... I got as pic that i want to be the systray icon. I dono how to addit. I also need to add clicking options to the icon. ex: If I right click it , a menu pups up and sais about , exit and so on. when left clicked, It restores the program.
How Can Minimize Button Act As Minimize To Tray ?
how can minimize button act as Minimize to tray ?
i have separate button for............ Minimize To Tray........ but i want that..... my minimize button of form must work as minimize to tray !! how can i do that !!
My Form Wasnt Showing Title Bar, But When I Added Menu Title Bar Reappeared....
I set the border to 0 and controlbox to false so that there is no title bar. Now I want to keep it that way but when I added the menus to the menu editor, the title bar reappeared although I set the menu visible to false. The menu is not showing on the top but the title bar reappeared which I dont want. I want to use the menu on right click on a treeview and therefore I cannot do without it.
Is there any way I can have the menu and no title bar? I dont want to show the menu but I will be using it on right click.
Help...Find First Title And Loop Its Own Lines Before Another Title In A Text File
Hello all VB Guru,
I've done as the following codes:
Open "C:Test.txt" as Input #iFile
Do While Not EOF(#iFile)
Line Input #iFile, MyString
Debug.Print My String
But it will only show all lines in immediate window.
'Text file Start from Here
Random-Price 0.80 1.00 1.50
Random-Weight 0.20 0.22 0.25
Random-Price 0.50 0.70 0.90
Random-Weight 0.30 0.42 0.56
Random-Price 0.70 0.90 1.00
Random-Weight 0.25 0.33 0.48
'Text File End at Here
I wonder it is possible to come out a loop that will detect the first title "Apple", get its own information from "Category" to "Random-Weight", then stop there and show in every textbox before continue to detect another title "Cucumber" with its own information that will show in every previous textbox (the loop will run over and over again until the last title)?
Thanks in advance,
Different Size For Big Title And Columns Title In DBGrid
Is't possible to put a different size for my general title and columns title in DBGRid
With HeadFont I can put a new size for my big title but the title for each columns take the same size.
How can I put size 12 for big title and size 8 for columns title.
Type "minimize" To Minimize Form1 ***SOLVED***
I have this code:
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)If KeyCode = vbKeyReturn Then If Text1.Text = "minimize" Then Form1.WindowState = 1 Text1.Text = "" Else Text2.Text = Text1.Text Text1.Text = "" End IfEnd IfEnd Sub
when i press Enter, it cleans Text1 but also create a new line...
then if I type something; press Enter; then try to minimize, it doesn't work
What can I do
Requesting <title></title> Text
I have a programme that has a browser window in it.
What I want to do is extact what is between the <title></title> tags and set it as the current Caption of the Parent Form. What I also want it to do, is to automatically update when ever the page is reloaded, or just when ever the title of the Browser page changes.
Add A Button In Front Of The Minimize-button Kind Of 'minimize-to-system-tray-button'
At the moment I'm trying to add an icon in the system tray for my app - maybe i'll make it.
When I have made it I'd like to add a button in front of the min-button on the title bar of the apps form (like the one on All-API's API-Guide ), in order to empower the user to minimize the app even further, i.e. to the system tray - how can this be achieved?
Grid Shows B-A Instead Of A-B
My grid is showing the last item in the array first instead of the first item. Tried looking for a Sort property for the grid (MSHFlexGrid), but there isn't one. Don't know where else to look.
Below is the code.
Any help would be appreciated!
Thanks in advance,
'ReDimming the array
'As names and etc., are added to the Little Black Book
RecCount = totalRecs
Grid1.Col = 1
Grid1.Row = 1
'This fills up the array with Type - udtItemRec/itemStruc
For X = 1 To RecCount
Get #1, X, udtItemRec
BlackBook_RecArray(I) = udtItemRec.strLName & Chr(9) & udtItemRec.strFName & Chr(9) & udtItemRec.strPhone & Chr(9) & udtItemRec.strEmail
I = I + 1
Debug.Print BlackBook_RecArray(I) 'x = x + 1
I = 0
For I = 0 To RecCount - 1
If I <> RecCount Then
Grid1.AddItem (BlackBook_RecArray(I)), 1
BitBlt (nothing Shows Up)
Hi, I want my pic1 picturebox to show up somewhere on top of the screen (which displays over EVERYTHING). My project file is attached. I have been trying to figure this one out for some time now.
Thanks in advance.
Vb Shows 2 Forms Instead One
i made something like de MDI sample from the VB help.when i reference the first element of the array(an array of forms),Vb loads 2 forms.And the UBound() of the array shows that is only one element in the array.
That'is when i reference array(0),Vb shows 2 forms and UBound(array)=0.any idea?
Err.Number Shows 0
I have the following code that, on an error, writes to a DB.
The problem is, when I get the first error in the select case,
run-time error 76 - Path not found
my error reporting doesn't show Err.Number as 76 but 0
Also Err.Description is empty as well.
Am I missing something obvious here?
Private Sub mnuHelpBackup_Click()On Error GoTo ErrTrap Dim BackupDestination As String 'get backup destination from registry (Options form)BackupDestination = GetRegistryStr(hkeyCurrent_User, strSubKey, "BackUpPath") 'copyfile actual fileFileCopy App.Path & "CLDB.mdb", BackupDestination & "CLDB.mdb" Exit Sub ErrTrap: Select Case Err.Number Case Is = 76 'path not found - possible folder deleted or moved MsgBox "The selected path does not exist. It may have been " & vbCrLf & _ "moved or deleted. Please select a new path.", vbOKOnly + vbInformation, _ "Path does not exist" Case Is = 4004 'Backup failed MsgBox Err.Description & vbCrLf & "Error number " & Err.Number, _ vbOKOnly + vbInformation, "Backup Error" Case Else MsgBox "Database cannot be copied." & vbCrLf & "Error Number = " & Err.Number & vbCrLf & _ "Error Description = " & Err.Description, vbOKOnly + vbInformation, "Backup Error"End Select ProcedureName = "frmCodeLib mnuHelpBackup"Call ErrorControl(strUser, Err.Number, Err.Description, ProcedureName, _ Format(Now, "dd/mm/yyyy"), Format(Now, "hh:mm:ss"))
When run in the VB IDE this works, but when I compile the program, I get the problem explained above.
Listbox Shows Twice The Same Value
Hi, I was just wondering how do you do this:?
Add something to the listbox but if the value I added is already in there, then it does not come up again. For example, If I add the Name "George" to the listbox and try to add it again, the name "George" should not come up again since its already in there.
How can I do this with the IF....THEN statement?
Color Cursor Shows Up B/w
I loaded various color cursors into form/picture box properties but they only show up black on white. Any ideas why?
Unwanted Form Shows
I started programming with a normal form as the startupform. I have several forms now and replaced the initial startupform with an MDI as the startup object (and made all my other forms 'CHILD')...
Unfortunately when I run the program some of my forms are loaded when I'm not wanting them to. I had to add some useless 'Unload frmxx' code to my project to prevent this...
Before, when I didn't have an MDI, it never happened.
I'm almost sure I'm not loading these forms in my code...
How comes they appear anyway
You Slove One Problem And The Next Shows Up
ok i need to clear the form so that the bullets wont make a line but by clearing the form the "plane" blinks and it is very annoying. make it stop blinking or tell me how. sry if the dl doesnt work right this is my first time using it
PPT: Access Custom Shows
I've been looking for help with this for days and I'm just stuck. I want to select powerpoint slides defined in a custom show and copy them to a new presentation. The only thing google turned up was a 3rd party extension...and that won't work. Frustrating.
You'd think, I just change "delete" to "copy"...but no...that doesn't work either.
I got this far, but it shows the slide IDs in a message box; I need them to add themselves to a range Array and I can't figure out how to get them there instead of in a mesage box:
idArray = ActivePresentation.SlideShowSettings _
For I = 1 To UBound(idArray)
ActiveWindow.View.GotoSlide Index:=ActivePresentation.Slides.Add(Index:=1, Layout:=ppLayoutTitle).SlideIndex
I'm lost. Any help greatly appreciated.
Form Shows Up Late
I'm making a Form that shows a file copying progress. The copy procedure starts on FormLoad. What I'd like to do is to show the whole form and the label.captions... before it starts copying. 'Cause now it just copies the files and shows the form after that.
Flexgrid Shows No Rows
I've been away from VB stuff for a number of months.
Today I opened up my projects and none of the mshflexgrids shows any rows.
I've got them bound to ado controls. I've tried doing an adoctrl.recordset.recordcount to make sure that there should be rows to show, and I get the correct amount of rows, but the rows never show in flexgrid.
The same is true with all the flexgrids in all my projects.
Control That Shows Webcam
Where can I get a control that shows me my webcam's picture, and let me capture it and stuff? I'm sure that there's already one on my computer, but maybe not.
Flexgrid Shows Only One Line
I have a problem where a flexgrid will only display one line of data on one machine in the network - it works perfectly on the other machines in the network.
The data is being loaded from a text array.
Thanks for any hints on what may be causing this strange behaviour.
Nothing Shows After Maximizing The Window
Iím relatively new to vb. Iím using vb 6 and am having problems with a window not showing correctly. The application uploads a file via ftp to a server. If the window is minimized while the file is being uploaded and then is maximized again, nothing shows in the window until the file is through uploading. Iím not quite sure where to start to correct this. Any help would be appreciated.
Thanks in advance for the help.
Which Type Shows Decimal.
Hi, im doing a sub routine that calculates a number that is shown as a currency in an excel sheet.
When i had the variables set to Long's it was fine but seemed to round to the nearest number. I tried variant and that worked but then an adding formula i had wouldnt work because it took the values as strings. So im stuck kinda. Either i find a type that works or find out how to switch the variant into a long in the subroutine. Thanks.
Date Shows Up As Time
When updating a record in my table with a new date, the date shows up as a time when I query the record. Looking at the field inside the actual database it looks like there's a date with the year 1895 (not sure how that got there) and a time. Here's my code:
dteDate = Date
strSQL = "UPDATE Topics SET DocumentName = """ & strFileName & """, ChapterTitle = """ & strChapterTitle & """, TopicTitle = """ & strTopicText & """, Notes = """ & strNotes & """, DateModified = " & dteDate & ", IsAddenda = " & blnIsAddenda & ", ProjectName = """ & strProjectName & """ WHERE ID=" & intRecordID & ""
The column in my Access database if set to the ShortDate format. Any ideas? Thanks.
If Nothing Shows Up Have A Listbox Say Sometihng?
Hey guys i have a listbox called list11, and it has the results of a scan from a button. IS there a code to get it that if nothing shows up in the list11 listbox, that an item would show up saying "Nothing found"
Form That Shows Loading Bar
how would i go about making a preload form that displays a loading bar and then loads the main mdi form after its finished...? here is an example
Text Box Shows Number
hope you understand this i need some coding.......
If i type a number from 0-82 in text1 i want text2 to show the number 1
if i type a number between 83-174 i want text2 to show the number 2
if i type a number between 175-276 i want text2 to show number 3
this seems like really simple coding but i am a noob to vb i am just messing with it thats how i learn
Frame Shows Form
How can I make a frame(the one vb6 provides) show a form?
I tried this but it didn't work:
Private Sub Frame1_Load()
Frame1 = Form.show
Anyone knows how?
VbTab In String Shows A Bar??
I have a string as follows
str = "ABC" & vbTab & "DEF"
when I put str into a flexgrid cell the tab converts into a thick vertical bar.
What do I need to do for it to actually put in a tab?
Thanks as always!
ps. I am still bang my head against the wall regarding how to define a Band in an Hierarchal Flex Grid (so I can make different columns different background colors)