Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Refreshing Windows

Posted on 2004-10-03
8
Medium Priority
?
176 Views
Last Modified: 2010-05-02
So I made this program called XP Edit, anywho I have a minor problem with it. Basically what the program does is, it's like a replacement for TweakUI, only my problem is before any changes are applied, you have to log off then log on. I want it to apply the changes right away, so I would assume the best way to do that would be to end explorer.exe and then re-launch explorer.exe, so my question is how do I do that?
0
Comment
Question by:Captain_Obvious
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
8 Comments
 
LVL 12

Expert Comment

by:jkaios
ID: 12216328
You have to use some sort of "Nofity..." API calls to inform the OS of the change.
0
 

Author Comment

by:Captain_Obvious
ID: 12231340
That's a very vague description... could someone else help a little?
0
 

Accepted Solution

by:
prodesign777 earned 1200 total points
ID: 12259357
This should work for you:

Public Declare Function NotifyChangeEventLog Lib "advapi32" Alias "NotifyChangeEventLog" (ByVal hEventLog As Long, ByVal hEvent As Long) As Long


Hope this helps you, good luck :)
0
 

Author Comment

by:Captain_Obvious
ID: 12262570
Thanks, that's a big help. Only one further question :D kinda funny really how do I call it. I put it in a module but when I call it, I get some errors. Could you just help me out with that? Thanks a bunch!
0
 

Expert Comment

by:prodesign777
ID: 12635755
Sorry, I was on vacation. Now here is how you do it.
First include a new module in your project. In the module put the following code:

Public Declare Function NotifyChangeEventLog Lib "advapi32" Alias "NotifyChangeEventLog" (ByVal hEventLog As Long, ByVal hEvent As Long) As Long

Then where ever you want the notifychangeeventlog api call to be called from for instance a button click event put the following code:

Dim a As Long
Dim b As Long
NotifyChangeEventLog a, b

And that's all. Have fun with it my friend :)
0

Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

636 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