Solved

Refreshing the Win95 Enviroment

Posted on 1998-07-28
4
193 Views
Last Modified: 2010-05-03
Is there a command from VB5 that'll refresh the Win95 Enviroment including the taskbar, the desktop, etc.?
0
Comment
Question by:ChrisH
  • 2
  • 2
4 Comments
 
LVL 2

Expert Comment

by:shchuka
ID: 1466960
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
 
LVL 1

Author Comment

by:ChrisH
ID: 1466961
How do I do that?  How do I find out the name of the other API call?
0
 
LVL 2

Accepted Solution

by:
shchuka earned 50 total points
ID: 1466962
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
 
LVL 1

Author Comment

by:ChrisH
ID: 1466963
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now