如何让一个程序活动状态只在任务栏上闪烁,而正在使用的别的程序不受影响!
以前的XP就是这样的,后来升过级后的XP就不行了!
在线急等了!

解决方案 »

  1.   

    比如我正在聊QQ,而我又要给另一个程序发送按键消息。接受按键消息的程序正常接受,程序窗口并不激活,还处于后台,不影响我聊QQ打字!
      

  2.   

    声明:Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long, ByVal bInvert As Long) As Long
      在form中加一个Timer,设好Interval属性
      在Timer1_Timer中写道:
      Private Sub Timer1_Timer()
      Call FlashWindow(Me.hwnd, True)
      End Sub
      

  3.   

    做一个控件吧,以下是源程序保存为FlashTitle.ctl
    VERSION 5.00
    Begin VB.UserControl FlashTitle 
       BackStyle       =   0  '透明
       ClientHeight    =   510
       ClientLeft      =   0
       ClientTop       =   0
       ClientWidth     =   1095
       InvisibleAtRuntime=   -1  'True
       MaskPicture     =   "FlashTitle.ctx":0000
       Picture         =   "FlashTitle.ctx":0CA2
       ScaleHeight     =   510
       ScaleWidth      =   1095
       ToolboxBitmap   =   "FlashTitle.ctx":1944
       Begin VB.Timer Timer1 
          Enabled         =   0   'False
          Left            =   570
          Top             =   30
       End
    End
    Attribute VB_Name = "FlashTitle"
    Attribute VB_GlobalNameSpace = False
    Attribute VB_Creatable = True
    Attribute VB_PredeclaredId = False
    Attribute VB_Exposed = True
    Option Explicit
    Private Declare Function FlashWindow Lib "user32" (ByVal hWnd As Long, ByVal bInvert As Long) As Long
    '闪烁显示指定窗口。
    '这意味着窗口的标题和说明文字会发生变化,
    '似乎从活动切换到非活动状态、或反向切换。
    '通常对不活动的窗口应用这个函数,
    '引起用户的注意
    Dim chWnd As LongPublic Sub ShowAbout()
    Attribute ShowAbout.VB_Description = "显示关于对话框。"
    Attribute ShowAbout.VB_UserMemId = -552
      FrmAbout.Show vbModal
      Unload FrmAbout
      Set FrmAbout = Nothing
    End Sub
    Private Sub Timer1_Timer()
    FlashWindow chWnd, True
    End SubPrivate Sub UserControl_Resize()
    UserControl.Width = 500
    UserControl.Height = 450
    End Sub
    '注意!不要删除或修改下列被注释的行!
    'MappingInfo=Timer1,Timer1,-1,Interval
    Public Property Get Interval() As Long
    Attribute Interval.VB_Description = "返回/设置闪烁 事件间隔的毫秒数。"
        Interval = Timer1.Interval
    End PropertyPublic Property Let Interval(ByVal New_Interval As Long)
        Timer1.Interval() = New_Interval
        PropertyChanged "Interval"
    End Property'注意!不要删除或修改下列被注释的行!
    'MemberInfo=0
    Public Function Flashing(ByVal hWnd As Long, ByVal OnOff As Boolean) As Boolean
    Attribute Flashing.VB_Description = "窗口闪烁显示开关。"
    chWnd = hWnd
    If OnOff = False Then
      Timer1.Enabled = False
      FlashWindow chWnd, False
    Else
      Timer1.Enabled = True
      Flashing = True
    End If
    End Function'从存贮器中加载属性值
    Private Sub UserControl_ReadProperties(PropBag As PropertyBag)    Timer1.Interval = PropBag.ReadProperty("Interval", 0)
    End Sub'将属性值写到存储器
    Private Sub UserControl_WriteProperties(PropBag As PropertyBag)    Call PropBag.WriteProperty("Interval", Timer1.Interval, 0)
    End Sub
      

  4.   

    把以下代码去掉
    Public Sub ShowAbout()
      FrmAbout.Show vbModal
      Unload FrmAbout
      Set FrmAbout = Nothing
    End Sub
      

  5.   

    用FlashWindow就能实现吗???
      

  6.   

    把那个程序的showwindow方法hook掉……