Refreshing the system
-
Howdy, I'm using
this.Refresh()
method in the Button_Click event to refresh the machine, but this only works for the form in particular. It doesn't seem to refresh the system, rather it seems like as if the form is getting refreshed up. Any way through which I can refresh the machine from two to three times, on a single button click? And is it possible to send theF5
key in oder to refresh? plz help! i_w32_app. -
Howdy, I'm using
this.Refresh()
method in the Button_Click event to refresh the machine, but this only works for the form in particular. It doesn't seem to refresh the system, rather it seems like as if the form is getting refreshed up. Any way through which I can refresh the machine from two to three times, on a single button click? And is it possible to send theF5
key in oder to refresh? plz help! i_w32_app.What are you trying to achieve? this.Refresh() just invalidates the object (in this case the form your button is on) and issues paint messages for it and child controls.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones
-
What are you trying to achieve? this.Refresh() just invalidates the object (in this case the form your button is on) and issues paint messages for it and child controls.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones
Hi, Lemme clarify my question. I am trying to refresh the machine after a specific task has been accmplished. Like:
private void button1_Click(object sender, EventArgs e)
{
//Some statements that needs to be executed on the button click
.........................................................
.........................................................//In order to make the changes take place, I need to refresh the system from once to thrice.
}Help
-
Hi, Lemme clarify my question. I am trying to refresh the machine after a specific task has been accmplished. Like:
private void button1_Click(object sender, EventArgs e)
{
//Some statements that needs to be executed on the button click
.........................................................
.........................................................//In order to make the changes take place, I need to refresh the system from once to thrice.
}Help
Do you mean you want to refresh the entire view in the monitor? If so, you'll have to use some PInvoke and at a minimum, get the desktop's handle and call InvalidateRect or UpdateWindow. You may need to do this for every open window too.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
Why are you using VB6? Do you hate yourself? (Christian Graus) -
Hi, Lemme clarify my question. I am trying to refresh the machine after a specific task has been accmplished. Like:
private void button1_Click(object sender, EventArgs e)
{
//Some statements that needs to be executed on the button click
.........................................................
.........................................................//In order to make the changes take place, I need to refresh the system from once to thrice.
}Help
Invalid_Win32_app. wrote:
I am trying to refresh the machine
What exactly do you mean by "refresh the machine"? Do you mean reboot?
There are three kinds of people in the world - those who can count and those who can't...
-
Invalid_Win32_app. wrote:
I am trying to refresh the machine
What exactly do you mean by "refresh the machine"? Do you mean reboot?
There are three kinds of people in the world - those who can count and those who can't...
molesworth wrote:
What exactly do you mean by "refresh the machine"? Do you mean reboot?
Not Reboot, I am just trying to refresh the PC, like we do by right-clicking on an empty space on the desktop and clicking on the Refresh option from the menu display. Thats what I want to do.
-
molesworth wrote:
What exactly do you mean by "refresh the machine"? Do you mean reboot?
Not Reboot, I am just trying to refresh the PC, like we do by right-clicking on an empty space on the desktop and clicking on the Refresh option from the menu display. Thats what I want to do.
-
Your request is totally dumb! refresh the system doesn't mean anything. Refresh your desktop doesn't mean to refresh your system... Try to be more explicit Rajdeep
-
I think this should do:
private void button1_Click(object sender, EventArgs e)
{
SendKeys.Send("{F5}");
}What do you say? PS: How did you know that I am Rajdeep?
-
Howdy, I'm using
this.Refresh()
method in the Button_Click event to refresh the machine, but this only works for the form in particular. It doesn't seem to refresh the system, rather it seems like as if the form is getting refreshed up. Any way through which I can refresh the machine from two to three times, on a single button click? And is it possible to send theF5
key in oder to refresh? plz help! i_w32_app.Hey Rajdeep.NET, did you think that we wouldn't notice if you changed your name? You're still asking strange questions. Now I don't really know about this refresh thing, this is not normally something you even need to consider doing. Why do you even need to do this? Anyway, I'd look into sending a F5 keypress, like you suggested..
-
Do you mean you want to refresh the entire view in the monitor? If so, you'll have to use some PInvoke and at a minimum, get the desktop's handle and call InvalidateRect or UpdateWindow. You may need to do this for every open window too.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
Why are you using VB6? Do you hate yourself? (Christian Graus)Is there some comprehensive way to this? I mean to say that this is quite difficult. PS: I only want to refresh the desktop. What about this:
private void Button1_Click(object sender, System.EventArgs e) {
SendKeys.Send("{ENTER}");
}Please let me know.
-
Hey Rajdeep.NET, did you think that we wouldn't notice if you changed your name? You're still asking strange questions. Now I don't really know about this refresh thing, this is not normally something you even need to consider doing. Why do you even need to do this? Anyway, I'd look into sending a F5 keypress, like you suggested..
now that guy has changed his name to x+y=xy?! some one has to take care of his activities....
Padmanabhan
-
Hey Rajdeep.NET, did you think that we wouldn't notice if you changed your name? You're still asking strange questions. Now I don't really know about this refresh thing, this is not normally something you even need to consider doing. Why do you even need to do this? Anyway, I'd look into sending a F5 keypress, like you suggested..
-
y do u frequently change you name.... do you think that we are fools here...
Padmanabhan
-
now that guy has changed his name to x+y=xy?! some one has to take care of his activities....
Padmanabhan
-
sit and recollect all your posts and the replies then you will know who is a fool....MR.XYZ
Padmanabhan
-
Invalid_Win32_app. wrote:
Ok Ok!!! Chill now, I haven't asked any strange question this time.
This question is very strange, to refresh your system, you need to reboot your PC (after changing registery keys...). How does windows refreshing itself after an update? It just reboot.. To press F5 on tour desktop only refresh the 'explorer.exe' program, but not your system who's loaded on startup. To press F5 on your application will do anything :) not even refresh your 'explorer' application. Try to discover the basics of windows before trying to hack it...
-
Is there some comprehensive way to this? I mean to say that this is quite difficult. PS: I only want to refresh the desktop. What about this:
private void Button1_Click(object sender, System.EventArgs e) {
SendKeys.Send("{ENTER}");
}Please let me know.
It seems the easiest way to do this is to make the shell think file associations have changed. When it does, it redraws the desktop. Not sure how 'expensive' this is - but it works.
SHChangeNotify(SHCNE_ASSOCCHANGED, 0, 0, 0);
[DllImport("shell32.dll")]
static extern void SHChangeNotify(uint wEventId, uint uFlags, uint dwItem1, uint dwItem2);const uint SHCNE_ASSOCCHANGED = 0x08000000;
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
Why are you using VB6? Do you hate yourself? (Christian Graus) -
I think this should do:
private void button1_Click(object sender, EventArgs e)
{
SendKeys.Send("{F5}");
}What do you say? PS: How did you know that I am Rajdeep?