Solved

Refreshing the Win95 Enviroment

Posted on 1998-07-28
4
197 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

930 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

22 Experts available now in Live!

Get 1:1 Help Now