Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 238
  • Last Modified:

Refreshing the Win95 Enviroment

Is there a command from VB5 that'll refresh the Win95 Enviroment including the taskbar, the desktop, etc.?
0
ChrisH
Asked:
ChrisH
  • 2
  • 2
1 Solution
 
shchukaCommented:
Not directly in VB, but you can do that using API calls.

Use GetDesktopWindow call to get the handle of the desktop window and then
there's another api (I'm not sure the name) to make the window to repaint itself.
0
 
ChrisHAuthor Commented:
How do I do that?  How do I find out the name of the other API call?
0
 
shchukaCommented:
Ok, here's what I would do.  (I didn't test this code.)

REM in declaration section
Declare Function GetDesktopWindow& Lib "user32" Alias "GetDesktopWindow" ()
Declare Function UpdateWindow& Lib "user32" (ByVal hwnd&)

REM where you need the stuff to be done
dim desktop as long
dim dummy as long

destkop = GetDesktopWindow()
dummy = UpdateWindow(desktop)

Good luck
0
 
ChrisHAuthor Commented:
Yea.. I just figured it and tested it AS I heard the Outlook new mail beep.  Pretty funny.. thanks for the help..
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now