|
-
Feb 1st, 2001, 12:28 AM
#1
Thread Starter
Lively Member
You know when something happens in an application thats not on the foreground, it flashes blue on the windows taskbar? Is there an API call to make that happen?
Also which property of the main form tells you if it is currently the top level application (screen-wise)
Thanks
-
Feb 1st, 2001, 01:46 AM
#2
Fanatic Member
There isn't really a property that tells you if the form is the top-level window you need to use the GetActiveWindow API call for this and the FlashWindow API call is what you need to use to have your window flash in the TaskBar....
You need a timer to test the following code
Code:
Option Explicit
Private Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long, ByVal bInvert As Long) As Long
Private Declare Function GetActiveWindow Lib "user32" () As Long
Private Sub Form_Load()
Timer1.Interval = 500
End Sub
Private Sub Timer1_Timer()
' if the current window is not the active window then flash the title bar
If Not Me.hwnd = GetActiveWindow Then
FlashWindow Me.hwnd, CLng(True)
End If
End Sub
{Insert random techno-babble here}
{Insert quote from some long gone mofo here}
-
Feb 1st, 2001, 07:36 PM
#3
Lively Member
Quick Question...
What does Option Explicit mean?
On Error Resume Screaming...

-
Feb 1st, 2001, 10:07 PM
#4
Option Explicit - Forces explicit declaration of all variables in a script.
Means you have to Dim everything or you will get an error.
-------
'No error
Option Explicit
Dim MyString As String
MyString = "Hello World"
--------
-------
'Error
Option Explicit
MyString = "Hello World"
--------
-------
'No error
Dim MyString As String
MyString = "Hello World"
--------
-------
'No error
MyString = "Hello World"
--------
-
Feb 9th, 2001, 07:52 PM
#5
Addicted Member
A Language Can Be Strongly Typed. Or Weakly Typed.
One Of The Features Of Strongly Typed Languages if That All Variables Needs To Be Declared As A Specific Data Type Before The Instance Of The Variable In That Program.
On The Other Hand In Weakly Typed Languages You Need Not Declare Variables Prior To The Use. The Type Of the Variables Will Be Determined With The Value You Provide For This.
Strong Typing Has A Lot Of Advantages Over Weak Typing.
VB Provides Strongly Typed As Well As Weakly Typed Language Features. If Option Explicit Is Not Included, The Variables Are Weakly Typed, Or Else It Is Strongly Typed.
-
Feb 9th, 2001, 09:21 PM
#6
Lively Member
woah, lay off on the capital letters, there.
On Error Resume Screaming...

-
Feb 10th, 2001, 09:43 AM
#7
Good Ol' Platypus
You can type faster if you only use capital letters some of the time. Therefore, more posts. 
So try to lay off the capital letters and u will improve your WPM and your post #.
Of course, that's only a thought.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|