well, it works great with your images in the ImageListControl, but when ever I put mine it it just doesn't work at all(just no icon in systray), I'm not sure what image format to use...
I've tried GIF, JPG, BMP, and it won't let me put ICO format in there, says: "invalid format"
EDIT: I fixed that... it was umm the wrong FORMAT of ICO, I was using Icon Forge, and told it to make a "32 bit 16.7 million" instead of just a normal 16.7 million color ICON, and apparenlty that 32bit version doesn't work
-SpeedyDog
Last edited by SpeedyDog; Oct 10th, 2004 at 11:43 PM.
yeah, well I changed the format and things work....
Ya know, I did a test, and the animation runs fine when ever I do say umm a loop and have a doevents in there.. but somethings that the applicaiton does, like API calls or "MESSING WITH EXCEL" and having excel calculate will cause the animation not to move... Is there an easy way to get around this?... like I was actually thinking :-P I mean I know this is silly, but have a 2nd EXE, that just looks at a text file ever 2 seconds to see if it has a value of 1 and if it does, (start animated icon)... and if it doesn't then don't and the MAIN APP would set this text file every time it wanted to turn on/off the sys tray animated... Is there a more effecient way than this?...
I mean, It's not 100% important to have it animated, but I spent 3 hours on:
woka, how easy would it be to use this app to access a text file on form load, using inet control. if the app version is higher in the text file, to show the popup notification, if not, then to not show it. similar to the way msn informs of new "updates available" for their software.
Well if you look in my sig the code for MSN popups is already written, again just some dlls you can add to your app.
Then in your form load event, or where ever do something like:
Code:
Dim intAppVersion As Integer
Dim intNewVersion As Integer
'Get app and new version numbers
If intNewVersion > intAppVersion Then
'code to show popup
End If
This will have nothing to do with the systray component what so ever and must be coded seperatly using my popup message component.
First rule when deploying to another PC is use an installer.
You cannot simply copy files to another PC and expect them to work.
You need to register all DLLs and OCXs with windows.
You can do this manually by running the following from a cmd prompt:
To register a DLL:
RegSvr32 C:\MyPath\DllName.dll
To unregister a DLL:
Regsvr32 -u c:\MyPath\DLLName.dll
Alternatively you can learn how to use the Package and Deployment Wizard supplied with VB6. This will create an installer setup package that will install all requied files onto the target PC and register the DLLs and OCXs.
Do a search on VBF for Package and Deployment, loads of posts on how to do it.
Ok, I've manage to create package and I have some trouble with it.
One of error that i get when i try to install that package is that everytime i want to install package on other computer i get message that some files are old and need to be updated and restart computer. When i did that and i confirm the update and restart, it updates and restarts computer and after that, the same message apears and I canot get it to work or complete instalation.
Second error is on same computer that Im testing the program . I tried to install package here and I get error message that i have invalid line in setup information file ... c:\windows\setup.lst
Last edited by alessy; Jan 26th, 2009 at 06:04 AM.
The project reference to the vbSysTray project is referenced by project compatibility and not Binary compatibility.
So...for this to work you need to do the following.
1) Build the vbSysTray assembly
2) Remove the reference to the vbSysTray project from the UI project references and then add a new reference to the new vbSysTray.dll DLL assembly.
3) rebuild the UI EXE project.
4) Copy both the UI EXE and the vbSysTray DLL Assembly to the target machine
5) RegSvr32 "C:\MyFolder\vbSysTray.dll"
6) Run the UI EXE
Like Merri said, I don't think it's possible to place XP icons in the systray using VB6
Woka
Maybe not via an Image list, but you can put XP icons on the system tray for XP & above. All you need is a valid icon handle which can be created from APIs (LoadIcon, CreateIconFromResourceEx, & others for example). A valid 32bpp icon can even be made into a stdPic via the often used PictureFromHandle function posted below if you can't lay your hands on a ready copy. Anyway, anything less than XP will attempt to display it, but obviously it won't display correctly.
Code:
Private Function PictureFromHandle(Handle As Long, picType As PictureTypeConstants) As IPicture
' Purpose: Create a standard picture object from a valid image handle
Dim lpPictDesc As PICTDESC
Dim aGUID(0 To 3) As Long
' convert memory icon to stdPicture
With lpPictDesc
.Size = Len(lpPictDesc)
.Type = picType
.hHandle = Handle
.hPal = 0
End With
'--- fill in magic IPicture GUID {7BF80980-BF32-101A-8BBB-00AA00300CAB}
aGUID(0) = &H7BF80980
aGUID(1) = &H101ABF32
aGUID(2) = &HAA00BB8B
aGUID(3) = &HAB0C3000
'--- create picture from bitmap handle
Call OleCreatePictureIndirect(lpPictDesc, aGUID(0), True, PictureFromHandle)
End Function
Example. The Heart is a 32x32 XP, alphablended icon
Last edited by LaVolpe; Jan 27th, 2009 at 08:46 PM.
Insomnia is just a byproduct of, "It can't be done"