|
Use asnychronous access.
only two letters away from being an asset
|
|
|
|
|
24000 records should still return quicker than 5 to 8 seconds - check the execution plan of your query in query analyzer.
|
|
|
|
|
Hello All,
I have a rather strange app that I want to keep visible in the taskbar at all times, even when the app is set to visible = false.
Thanks in advance for your time and help.
|
|
|
|
|
you can achieve it by overriding OnVisibleChanged. In overrided method, you can force to minimize whenever set visible to false
protected override void OnVisibleChanged(EventArgs e)
{
if(this.Visible == false)
{
this.Visible = true;
this.WindowState = FormWindowState.Minimized;
}
else
base.OnVisibleChanged(e);
}
|
|
|
|
|
A bit modification for my last reply ... you can achieve by VisibleChanged Event of form too!!!
private void Form2_VisibleChanged(object sender, EventArgs e)
{
if(this.Visible == false)
{
this.Visible = true;
this.WindowState = FormWindowState.Minimized;
}
}
|
|
|
|
|
Thanks MqPasta,
I've put it into my app and it did the job.
Thanks once more for your time,
Robert
|
|
|
|
|
Hello
I am able to get all the process running on my system. But i am not able to get all the process running on another system. I am getting an error i.e. couldn't connect to remote machine.
Reply me asap.
Thanks
Devesh Mishra
|
|
|
|
|
The account your code is running under doesn't have the permissions to get the process list or the account isn't recognized by the remote security authority.
|
|
|
|
|
Thanks for ur reply.
Now tell me also the solution. How i'll get the all the process running in another system.
Thanks
Devesh Mishra
|
|
|
|
|
The account your code is running under is not recognized by the remote system. Unless your code is running under an account recognized by BOTH systems, like if both machines were running in a domain environment, you can NOT get the processes of a remote computer.
This has nothing to do with your code, but a lack of understanding about how Windows networking works. If your running the code under your own user account, it means your account doesn't have the appropriate rights to the remote system.
|
|
|
|
|
Hi, I am developing TicTacToe in which i finished working functionlity where 2 people will play.
Now i want to add AI to my game what can be the best algorithm to do that. One more thing any piece of algorithm or any starting code would be very nice.
Now just a real question lets say
Player selected one box. Now its Computer turn. It has 8 possible moves how would you implement that can you give any idea in algorithm shape or Pseudocode please.
I would probably not write code to evaluate each state individually, I'd write a state evaluator that checked for winning moves, blocking moves, and then potential moves based on difficulty.
thanks
|
|
|
|
|
An obvious way is to write a system where it chooses moves randomly or semi randomly ( prefer the middle, then prefer the corners, etc, or whatever you think ) and remembers which moves lead to it winning. Obviously, some basic 'finish the row if I can win this turn' code also makes sense to have.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I dont think you will need much in the line of AI. you could simply calculate all available moves and assign a weight to each move and choose the best one. You could even use some kind of probability to "see ahead" to try to guess what the opponents best moves may be given a certain move.
|
|
|
|
|
there're only 9! (363k) potential games. Brute force is a viable option.
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
Agreed! Not very elegant but certainly viable.
|
|
|
|
|
I got to the same point a couple of years ago.
As already stated, brute force (check every move possible) is viable in TTT as the number of moves is quite small.
You might also like to read up on AI algo's like AlphaBeta - there is LOADS of reading online about AI.
My head got a bit swallowed up by it all and thats why I never got any further with my TTT game. But I did learn a hell of alot anyway.
|
|
|
|
|
I want to fix the location of form in my application that user could not change its location.
reply soon
|
|
|
|
|
Will the form be maximised ? If not, the best you can do is catch the moving event and move it back.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Or you can make form without border and users won't be able to move it
|
|
|
|
|
I want to create a spooler service (windows Service) which spools the job (which has to executed in time) in message queue.
What will happen if the system crash occurs or the system is restarted.
Is it possible to recover and restart it?
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
you can set the start up type to automatic, you will have to program the recovery yourself because if it crashes in the middle of some work, that work will be lost.
Regards
Shajeel
|
|
|
|
|
|
Thank you very much for you both. I will try the link and I will get back to you if more clarification is necessary.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
I have combobox column in DataGridView.
Up and down error keys should be used to navigate previous and next row in
grid.
For this I override them in ProcessCmdKey() event.
When combobox dropdown menu is open arrow arrow keys should move to previous
and next item in
dropdown menu instead of moving betveen rows.
How to check that combobox dropdown menu is open in ProcessCmdKey() ?
DataGridView ProcessCmdKey() method:
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) {<br />
<br />
const int WM_SYSKEYDOWN = 0x104;<br />
<br />
if ((msg.Msg == WM_KEYDOWN) || (msg.Msg == WM_SYSKEYDOWN)) {<br />
switch (keyData) {<br />
case Keys.Down:<br />
if (this.CurrentCell is DataGridViewComboBoxCell) {<br />
CurrentCell = Rows[CurrentCell.RowIndex + <br />
1].Cells[CurrentCell.ColumnIndex];<br />
return true;<br />
}<br />
break;<br />
<br />
case Keys.Up:<br />
if (this.CurrentCell is DataGridViewComboBoxCell) {<br />
CurrentCell = Rows[CurrentCell.RowIndex - <br />
1].Cells[CurrentCell.ColumnIndex];<br />
return true;<br />
}<br />
break;<br />
}<br />
return base.ProcessCmdKey(ref msg, keyData);<br />
}
Andrus
|
|
|
|
|
Can any one pls give me the answers for the following questions.
1) diff b/w for and for each loop??
2) wat is Lock in c#?
3) diff b/w abstract class and interface ?
4) when do we go for abstract class and interface class?
5) diff b/w visual studio 2003 and 2005 ?sql 2000 and 2005?
6) Use of constructor.when and at wat suitation we go for constructor.
I dont want to browse sites and get answers .as v dont cant conclude 4m it.
Thanks in Advance
Bino Varghese
-- modified at 7:33 Friday 1st June, 2007
|
|
|
|