or...
You could tell me how do change the ShowInTaskbar property at runtime! :D
Printable View
or...
You could tell me how do change the ShowInTaskbar property at runtime! :D
me.showintasbar = trueQuote:
ShowInTaskbar
:)
module :
VB Code:
Public Declare Function GetWindowLong Lib "user32" Alias _ "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long Public Declare Function SetWindowLong Lib "user32" Alias _ "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, _ ByVal dwNewLong As Long) As Long Public Declare Function ShowWindow Lib "user32" (ByVal hwnd _ As Long, ByVal nCmdShow As Long) As Long Public Const SW_HIDE = 0 Public Const SW_SHOW = 5 Public Const GWL_EXSTYLE = (-20) Public Const WS_EX_TOOLWINDOW = &H80& Public Sub setShowInTaskbar(Visible As Boolean, hwnd As Long) Dim L As Long L = ShowWindow(hwnd, SW_HIDE) DoEvents L = SetWindowLong(hwnd, GWL_EXSTYLE, IIf(Visible, -WS_EX_TOOLWINDOW, WS_EX_TOOLWINDOW)) DoEvents L = ShowWindow(hwnd, SW_SHOW) End Sub
Form :
VB Code:
Private Sub Command1_Click() Call setShowInTaskbar(True, Me.hwnd) End Sub Private Sub Command2_Click() Call setShowInTaskbar(False, Me.hwnd) End Sub
Wow...:D
...that doesn't use subclassing, right?
Nope.
All it does is set the form to a toolbox.
I go sleep please guys give me a little thing to do this week :cool:
Anyone got other/better code for changing the ShowInTaskbar property at runtime???:confused: :confused:
I will search but can I know why it's so important and why me.showintasbar = true do not the job?
Well, first of all, I need it because in our IM, since it needs to have the ability to be in the system tray when it minimizes, it still shows an icon in the taskbar.
Secondly, the ShowInTaskbar property is read-only at runtime because Windows creates a "hook" on it (hmm....wrong term, but anyhow...) at the beginning of the loading process, before the form is shown.
By the way, when are we going to have our next meeting??
I already tryed systemtray and my program was show only in systemtray and no in the tasbar.Quote:
since it needs to have the ability to be in the system tray when it minimizes, it still shows an icon in the taskbar.
Little Turtle might know how to do it.Quote:
Secondly, the ShowInTaskbar property is read-only at runtime because Windows creates a "hook" on it (hmm....wrong term, but anyhow...) at the beginning of the loading process, before the form is shown.
And about the meeting, last time I never see someone online ( saterday at 8pm last weekend ).
...I already got the system tray working.Quote:
Originally posted by DaoK
I already tryed systemtray and my program was show only in systemtray and no in the tasbar.
Little Turtle might know how to do it.
I searched but I did not see anycode tonight for your thing. Maybe an api can do the job :)
GoodNight
just try setting the me.visible property to false if you want to hide it and set it back to true as soon as it is going to be shown.
To make the the form disapear from the taskbar automatically check me.windowstate ( you can do this in the Form_Resize procedure). Don't forget to set the Windowstate Property back to the normal value as soon as somebody clicks on the systray icon.
BTW: I hope we use API for the systray :eek:
BTW: School started over again this monday. So I'll have less time for being online :(
Andreas, that doesn't really work, since the windowstate just specifies if the window is normal, minimized, maximized, etc.
Eisecure don't bug on that detail for moment, maybe the Turtle will found the solution if he will log a day :D
Yeah, I'm not. I'm continuing with the preferences page. (You wouldn't believe how long it takes to make it look "right"). :D
By the way, check out http://www.eisecure.com/forums.htm
You have to CHECK the WindowState only.
This is only necessary to find out if the window should be hidden.
Set the Visible property to FALSE to make the window disappear from the taskbar and IT REALLY WORKS. Some time ago I wrote program for a firm which is loaded at windows startup and the hides itself from screen and taskbar, beeing shown in the Systray.
Now, DO WE USE API FOR THE SYSTRAY?
Sorry. :(
Yes, currently, we're using the API for the system tray.
Nice look your forum
Thanks.
I think that's where we'll have our Revolution Network development forum. If you register, then I can add your names to the list of people authorized to view it. (No more encrypting source code. :D)
excellentQuote:
(No more encrypting source code. )
You want me to register for your forum to have access to the project or the forum in of Revolution Network?
Yes, since the forum for the Project is available to specific users only.
Give me the Link, tommorow I will make an account, I am too much exausted, cya tommorow.
The link is in my signature. http://www.eisecure.com/forums.htm
Somebody wanna summarize what happened in my absense? I was:
1. Installing Windows XP (drool)
2. Having no Internet access since Saturday
3. Backing up GBs of data over a 10BaseT network (pain)
I signed up over two hours ago, still no email containing my password (yes I made sure my email address was correct and working) :rolleyes:Quote:
I am still waiting to do something. Eisecure want a code for something who I didnt find a solution. hummm we miss you :pQuote:
Somebody wanna summarize what happened in my absense?
DaoK, does Liquid2K support CGI?
no, they are cheap lol they don't accep Zip, Exe and all extension who are not jpg, gif, bmp, html ,htm :(
No.
Take your pick: speed and no ads with a million filters, or ads and less speed with no filters.Quote:
Originally posted by DaoK
no, they are cheap lol they don't accep Zip, Exe and all extension who are not jpg, gif, bmp, html ,htm :(
I just registered to Your forum sexy Ei but I can not post for a reason who are written in the error msg :
Quote:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
--------------------------------------------------------------------------------
Apache/1.3.19 Server at www.eisecure.f2s.com Port 80
YOU BROKE THE SERVER DAOK! YOU BASTARD! :D :D
Weeeeeeeeeeeeeeeeeeeeeeeeeeee Turtle I like the way you think :D
lol ahahahah:p oops sorry :rolleyes:
BTW, the server has been working fine for me (after running Apache I know the horror of the 500 Internal Server Error :(), so who knows what you did. :p
...heh...
Just give me a second to allow you access into the "restricted" Rev-Net forum. :D
Okay, DaoK, you're up and running. :D
*peeks head around door to that forum* Am I allowed in? :)
hmmm....for some reason, it doesn't seem to work.Quote:
Originally posted by Andreas@ALSoft
You have to CHECK the WindowState only.
This is only necessary to find out if the window should be hidden.
Set the Visible property to FALSE to make the window disappear from the taskbar and IT REALLY WORKS. Some time ago I wrote program for a firm which is loaded at windows startup and the hides itself from screen and taskbar, beeing shown in the Systray.
Now, DO WE USE API FOR THE SYSTRAY?
Yep, you sure are! :DQuote:
Originally posted by filburt1
*peeks head around door to that forum* Am I allowed in? :)
Hey Filburt, do you by any chance know how to change the ShowInTaskbar property at runtime?
You can't at runtime, but there is a way to do it with the API... *searches*
Couldn't find anything on here, MSKB, AllAPI, ANYWHERE! Oh yeah, PSC... *searches*
Nothing on PSC either.
Actually, Andreas' solution worked. :D
But there's one problem. When you double-click to show the window again, you have to do it TWICE. Even if I call the functions twice, you will have to double-click it two times. ...Weird.;)
AGH! DaoK did break it! :D
Code:Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
--------------------------------------------------------------------------------
Apache/1.3.19 Server at www.eisecure.f2s.com Port 80
The forum still down for me ;) I think Ei forum cant have more than 3-4 people registered on it :D
hmmm...works for me!:)
hows the app going?
anything i can do to help??
EiSecure, I signed up at your forum as ALSoft.
BTW: I gonna post the code I used for the systray in my program I wrote for that firm
The following code works with the code you can find at VBWorld to create a systray icon.
(I put all the icons in an image list 16x16 called "ImageList3"
and used Picture2 to trap the Mouse events)
'Put this into the definitions part of the window
Dim SysTrayIcon As NOTIFYICONDATA
'Create Icon
Public Sub CreateIcon()
SysTrayIcon.cbSize = Len(SysTrayIcon)
SysTrayIcon.hWnd = Picture2.hWnd
SysTrayIcon.uID = 1&
SysTrayIcon.uFlags = NIF_DOALL
SysTrayIcon.uCallbackMessage = WM_MOUSEMOVE
SysTrayIcon.hIcon = ImageList3.ListImages(1).Picture
SysTrayIcon.szTip = "Kalibri" & Chr$(0)
erg = Shell_NotifyIcon(NIM_ADD, SysTrayIcon)
End Sub
'Event handler
Private Sub Picture2_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
x = x / Screen.TwipsPerPixelX
Select Case x
Case WM_LBUTTONDOWN
If Me.WindowState = 1 Then
Me.Visible = True
temphwnd = Me.hWnd
ShowWindowAsync temphwnd, SW_RESTORE
SetWindowPos temphwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
On Local Error Resume Next
AppActivate Me.Caption
SetWindowPos temphwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZECase
End If
Case WM_RBUTTONDOWN 'Menu popup
'GetMousePos MX, MY
If UrgentDevs Then
Me.PopupMenu ctx1, , , , ctx1_NextCert
Else
Me.PopupMenu ctx1, , , , ctx1_Geräte
End If
'Caption = "Right Click"
'Screen.
Case WM_MOUSEMOVE
'Caption = "Move"
Case WM_LBUTTONDBLCLK
'Caption = "Double Click"
Me.Visible = True
Me.WindowState = 2
On Local Error Resume Next
AppActivate Me.Caption
End Select
End Sub
'Delete the icon
Public Sub DeleteIcon()
'Dim SysTrayIcon As NOTIFYICONDATA
SysTrayIcon.cbSize = Len(SysTrayIcon)
SysTrayIcon.hWnd = Picture2.hWnd
SysTrayIcon.uID = 1&
erg = Shell_NotifyIcon(NIM_DELETE, SysTrayIcon)
End Sub
'To Change the icon
Sub SetSysTrayIcon(ByVal Icon As Integer)
SysTrayIcon.uFlags = NIF_ICON
SysTrayIcon.hIcon = ImageList3.ListImages(Icon).Picture
erg = Shell_NotifyIcon(NIM_MODIFY, SysTrayIcon)
End Sub
'I hope this will work for you ;)
Have been following this project from the start - very interesting.
Is it possible I could see what the status is so far, If someone could compile the source and post the EXE I would be very greatful,
Cheers
Sorry, all compiled and non-compiled code are not available for the general public just yet. They are all top-secret ;) Check back later.
P.S. eiSecure - I don't have permission to enter MY forum!! Hmph! Also please can I be mod of my forum. Thanks :)
Actually, not all the code is classified:
VB Code:
Msgbox "You have a new message."
:D :D
I am offended!
"Member of Revolution Network" as Member Title on the eiSecure forum. Hmph! I'm "Leader of Revolution Network"! :D
Andreas: Currently, that's almost the exact same code that I'm using.
j2k: Okay, I'm going to change your status. :D You can be mod doo. ;)