Results 1 to 9 of 9

Thread: Is there a way to refresh your computer with out restarting?Please Help

  1. #1

    Thread Starter
    Fanatic Member newprogram's Avatar
    Join Date
    Apr 2006
    Location
    in your basement
    Posts
    769

    Unhappy Is there a way to refresh your computer with out restarting?Please Help

    Im using a code to change my system name it work great but I need to restart my system to have it change . So I was think is there a way to do a system refresh so I don't have to restart my computer very time?
    Last edited by newprogram; Dec 23rd, 2006 at 12:25 PM.
    Live life to the fullest!!

  2. #2

    Thread Starter
    Fanatic Member newprogram's Avatar
    Join Date
    Apr 2006
    Location
    in your basement
    Posts
    769

    Cool Re: Is there a way to refresh your computer with out restarting?Please Help!

    anyone?
    Live life to the fullest!!

  3. #3
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Is there a way to refresh your computer with out restarting?

    Here is something which I read somewhere...

    I haven't tried it...

    This code will tell windows to re-read the locale settings ...

    VB Code:
    1. Declare Function SendMessageTimeout Lib "user32" _
    2.    Alias "SendMessageTimeoutA" _
    3.   (ByVal hwnd As Long, ByVal msg As Long, _
    4.    ByVal wParam As Long, ByVal lParam As Long, _
    5.    ByVal fuFlags As Long, ByVal uTimeout As Long, _
    6.    lpdwResult As Long) As Long
    7.  
    8. Const HWND_BROADCAST As Long = &HFFFF&
    9. Const WM_SETTINGCHANGE As Long = &H1A
    10. Const SMTO_ABORTIFHUNG As Long = &H2
    11.  
    12. Call SendMessageTimeout(HWND_BROADCAST, _
    13.                                         WM_SETTINGCHANGE, _
    14.                                         0&, _
    15.                                         "intl", _
    16.                                         SMTO_ABORTIFHUNG, _
    17.                                         10000&, success)
    About WM_SETTINGCHANGE ....

    wParam:
    When the system sends this message as a result of a SystemParametersInfo
    call, wParam is a flag that indicates the system parameter that was changed.
    For a list of values, see SystemParametersInfo.
    When the system sends this message as a result of a change in policy
    settings, this parameter indicates the type of policy that was applied. This
    value is 1 if computer policy was applied or zero if user policy was
    applied.

    When the system sends this message as a result of a change in locale
    settings, this parameter is zero.

    When an application sends this message, this parameter must be NULL.

    lParam:
    When the system sends this message as a result of a SystemParametersInfo
    call, lParam is a pointer to a string that indicates the area containing the
    system parameter that was changed. For example, this string can be the name
    of a registry key or the name of a section in the Win.ini file. This
    parameter is not particularly useful in determining which system parameter
    changed. For example, when the string is a registry name, it typically
    indicates only the leaf node in the registry, not the whole path. In
    addition, some applications send this message with lParam set to NULL. In
    general, when you receive this message, you should check and reload any
    system parameter settings that are used by your application.
    When the system sends this message as a result of a change in policy
    settings, this parameter points to the string "Policy".

    When the system sends this message as a result of a change in locale
    settings, this parameter points to the string "intl".

    Hope this helps...
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  4. #4

    Thread Starter
    Fanatic Member newprogram's Avatar
    Join Date
    Apr 2006
    Location
    in your basement
    Posts
    769

    Re: Is there a way to refresh your computer with out restarting?

    How would you uses it? like this? I can't get it to work
    VB Code:
    1. Private Declare Function SendMessageTimeout Lib "user32" _
    2.    Alias "SendMessageTimeoutA" _
    3.   (ByVal hwnd As Long, ByVal msg As Long, _
    4.    ByVal wParam As Long, ByVal lParam As Long, _
    5.    ByVal fuFlags As Long, ByVal uTimeout As Long, _
    6.    lpdwResult As Long) As Long
    7. Const HWND_BROADCAST As Long = &HFFFF&
    8. Const WM_SETTINGCHANGE As Long = &H1A
    9. Const SMTO_ABORTIFHUNG As Long = &H2
    10.  
    11. Private Sub Command8_Click()
    12.  
    13.  
    14.  SendMessageTimeout(HWND_BROADCAST, _
    15.                                         WM_SETTINGCHANGE, _
    16.                                         0&, _
    17.                                         "intl", _
    18.                                         SMTO_ABORTIFHUNG, _
    19.                                         10000&, success)
    20.  
    21. End Sub
    Quote Originally Posted by koolsid
    Here is something which I read somewhere...

    I haven't tried it...

    This code will tell windows to re-read the locale settings ...

    VB Code:
    1. Declare Function SendMessageTimeout Lib "user32" _
    2.    Alias "SendMessageTimeoutA" _
    3.   (ByVal hwnd As Long, ByVal msg As Long, _
    4.    ByVal wParam As Long, ByVal lParam As Long, _
    5.    ByVal fuFlags As Long, ByVal uTimeout As Long, _
    6.    lpdwResult As Long) As Long
    7.  
    8. Const HWND_BROADCAST As Long = &HFFFF&
    9. Const WM_SETTINGCHANGE As Long = &H1A
    10. Const SMTO_ABORTIFHUNG As Long = &H2
    11.  
    12. Call SendMessageTimeout(HWND_BROADCAST, _
    13.                                         WM_SETTINGCHANGE, _
    14.                                         0&, _
    15.                                         "intl", _
    16.                                         SMTO_ABORTIFHUNG, _
    17.                                         10000&, success)
    About WM_SETTINGCHANGE ....

    wParam:
    When the system sends this message as a result of a SystemParametersInfo
    call, wParam is a flag that indicates the system parameter that was changed.
    For a list of values, see SystemParametersInfo.
    When the system sends this message as a result of a change in policy
    settings, this parameter indicates the type of policy that was applied. This
    value is 1 if computer policy was applied or zero if user policy was
    applied.

    When the system sends this message as a result of a change in locale
    settings, this parameter is zero.

    When an application sends this message, this parameter must be NULL.

    lParam:
    When the system sends this message as a result of a SystemParametersInfo
    call, lParam is a pointer to a string that indicates the area containing the
    system parameter that was changed. For example, this string can be the name
    of a registry key or the name of a section in the Win.ini file. This
    parameter is not particularly useful in determining which system parameter
    changed. For example, when the string is a registry name, it typically
    indicates only the leaf node in the registry, not the whole path. In
    addition, some applications send this message with lParam set to NULL. In
    general, when you receive this message, you should check and reload any
    system parameter settings that are used by your application.
    When the system sends this message as a result of a change in policy
    settings, this parameter points to the string "Policy".

    When the system sends this message as a result of a change in locale
    settings, this parameter points to the string "intl".

    Hope this helps...
    Live life to the fullest!!

  5. #5

    Thread Starter
    Fanatic Member newprogram's Avatar
    Join Date
    Apr 2006
    Location
    in your basement
    Posts
    769

    Re: Is there a way to refresh your computer with out restarting?

    anyone please help
    Live life to the fullest!!

  6. #6

    Thread Starter
    Fanatic Member newprogram's Avatar
    Join Date
    Apr 2006
    Location
    in your basement
    Posts
    769

    Re: Is there a way to refresh your computer with out restarting?Please Help

    is this even posable?
    Live life to the fullest!!

  7. #7
    Frenzied Member zynder's Avatar
    Join Date
    Nov 2006
    Location
    localhost
    Posts
    1,434

    Re: Is there a way to refresh your computer with out restarting?Please Help

    Some settings really need a reboot especially doing some changes on explorer.exe.

  8. #8

    Thread Starter
    Fanatic Member newprogram's Avatar
    Join Date
    Apr 2006
    Location
    in your basement
    Posts
    769

    Re: Is there a way to refresh your computer with out restarting?Please Help

    But is there some way, it hard for me to think it can't be done any time I do I'm always prove woung.
    Quote Originally Posted by zynder
    Some settings really need a reboot especially doing some changes on explorer.exe.
    Live life to the fullest!!

  9. #9
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: Is there a way to refresh your computer with out restarting?Please Help

    Well... if you change it manualy through Control Panel>>System>>Computer Name... you have to restart as well.... so... if it would be possible, Windows would allow it

    Merry Christmas

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width