Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. FlashWindow API ?

FlashWindow API ?

Scheduled Pinned Locked Moved Visual Basic
helpjsonquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MickYL
    wrote on last edited by
    #1

    Ive got a button on a form and am trying to get the flashwindow api to work with the form , however it seems i don't understand it! As i have never done an api call im not too surprised.!! Declare Function FlashWindow Lib "user32" Alias "FlashWindow" (ByVal hwnd As Long, ByVal bInvert As Long) As Long Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click FlashWindow(1, True)'what are the arguments this call should use? End Sub no error when i click button, just nothing happens? Any help will be appreciated.:confused:

    J M 2 Replies Last reply
    0
    • M MickYL

      Ive got a button on a form and am trying to get the flashwindow api to work with the form , however it seems i don't understand it! As i have never done an api call im not too surprised.!! Declare Function FlashWindow Lib "user32" Alias "FlashWindow" (ByVal hwnd As Long, ByVal bInvert As Long) As Long Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click FlashWindow(1, True)'what are the arguments this call should use? End Sub no error when i click button, just nothing happens? Any help will be appreciated.:confused:

      J Offline
      J Offline
      J4amieC
      wrote on last edited by
      #2

      For all thinks DllImport, first place to look is http://www.pinvoke.net[^] This search[^] on that site brings up both FlashWindow and FlashWindowEx information, along with source code in C# (which works as ive tried both). However, in simple answer to your question, the first parameter is the Handle of the window you want to flash, and the second should be true to flash the window once. So assuming your Button1 is on a form:

      Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        FlashWindow(this.Handle, True)' these are the arguments you should use!
      End Sub
      

      Current blacklist svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour -- modified at 6:48 Wednesday 24th May, 2006

      1 Reply Last reply
      0
      • M MickYL

        Ive got a button on a form and am trying to get the flashwindow api to work with the form , however it seems i don't understand it! As i have never done an api call im not too surprised.!! Declare Function FlashWindow Lib "user32" Alias "FlashWindow" (ByVal hwnd As Long, ByVal bInvert As Long) As Long Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click FlashWindow(1, True)'what are the arguments this call should use? End Sub no error when i click button, just nothing happens? Any help will be appreciated.:confused:

        M Offline
        M Offline
        MickYL
        wrote on last edited by
        #3

        Any advice ??

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups