|
Hi Joe,
Yes I am able to see the window.and also i am able to get the process handle.but not able to close the window either using process.kill or sendmessage.when i set createnowindow to false ,I am able to use pocess.kill successfully.now it's working.Thanks a lot.
Rakesh
|
|
|
|
|
Hi Joe,
May be i replied too early.even in this case if i make the current thread sleep for some time again i get the same error that the process has been exited.actually what i want basically to open a window and close it after some time but the process.kill works only if i give it just after process.start or when the sleep time is so that the window does not show at all.Thanks in Advance.
Rakesh
|
|
|
|
|
hi rakesh
smile, the only way is to find out the window handle. tray this page
http://msdn.microsoft.com/vstudio/downloads/101samples/default.aspx
you find 101 c# samples in a msi file. this msi file contains a sample to find out all running processes in your system. download the right file, the page contains samples for both .net 1.1 and 2.0
|
|
|
|
|
Hi Joe,
thanks for the link.I have got the handle using enumWindows.but even after that i am not able to close it. i tried SendMessage , CloseWindow(according to documentation it only minimizes the window),DestroyWindow,EndTask and some more but even after all this i am not able to close the window.although i can kill the process (windows explorer in this case) by using TerminateProcess, but I just want to close the window.the windowhandle i valid as i am able to get the text of all windows using GetWindowText but while trying to close the window I am getting different errors.Again thanks for the marvellous link.
Rakesh
|
|
|
|
|
Hi Joe,
Thanks a lot.Finally i am able to do it using EndTask.Actually previously i was sending the third parameter fForce to true which kills the explorer instead of the task.But sending it as false closes the window.Thanks for all your help.
Rakesh
|
|
|
|
|
Hi Rakesh
this is a good message .
if i can help you in other programming problems send me an email at:
joe.carbone@mymail.ch
Joe
|
|
|
|
|
I know this is along time ago. But I was wondering if you would post the code that worked for you. The links pointed to in this thread don't work any more.
Thanks
Brent
|
|
|
|
|
Hi all,
i have written a small program in which i want to check whether a
Queue exists and for this i used the Exists method of the MessageQueue
but i throws an Exception saying that
" Cannot determine whether a queue with the specified format name exists"
Anyone knows wht is the right way to check that
Thanks
Pramod
|
|
|
|
|
Can you specify the path of the queue you are using and whether this queue is on the same server as your application.
Akif
|
|
|
|
|
the application is not on the server
i more thing is that i am not able to create a queue on the server
by executing the application from my machine
Thanks
Pramod
|
|
|
|
|
If you are using a private queue then the format of the path for the queue will be:
"FormatName:DIRECT=OS:machinename\private$\queuename"
and if you are using a public queue, then the format of the path will be:
"ServerName\QueueName"
but remember one thing, you cannot use a private queue in ActiveDirectory environment. It can only be used in workgroup environment.
Hope it will help you.
Akif
|
|
|
|
|
The server which i am using is a XP professional machine
and it does not shows Public Queue,
I wanted to know whether i can create a private queue from my code
on that machine,
I created a queue manually by going to the computer management window,
but i want to check whether a specified queue exists or not
if not then it should be created
Is there a way to do that.
Thanks
Pramod
|
|
|
|
|
If it is a private queue then you can check whether it exists or not. You just need to use:
"FormatName:DIRECT=OS:machinename\private$\queuename"
as its path and then check IsExists property.
Akif
|
|
|
|
|
i cannot find the isExists property
can u please send me the code
Thanks
Pramod
|
|
|
|
|
Use MessageQueue.Exists(QueueName) to check whether the queue exists or not.
Sorry;) it is not a property infact a static method.
There is a good article on the usuage of MSMQ. Check it out[^]
Akif
|
|
|
|
|
i have already tried that but that throws an Exception
saying "Invalid Queue PAth name"
i am not able to check the existence of the Queue on the server
i am able to send and Receive msgs
Thanks
Pramod
|
|
|
|
|
"Exists cannot be called to verify the existence of a remote private queue"
Syntex of the QueueNamePath is:
Public queue: MachineName\QueueName
Private queue: MachineName\Private$\QueueName
Journal queue: MachineName\QueueName\Journal$
Machine journal queue: MachineName\Journal$
Machine dead-letter queue: MachineName\Deadletter$
Machine transactional dead-letter queue: MachineName\XactDeadletter$
Akif
|
|
|
|
|
then how should one check whether a Queue exists or not
we cannot directly send or receive msgs whether checking the existence
of the queue
Thanks,
Pramod
|
|
|
|
|
You can go for public queues. In that case, you ll be able to check its existance.
If you want to use private queues, the dirty way of finding whether the queue exists is to create the queue with the path specified and then catching the exception. If the path is wrong, then its object will not be created and an exception will be raised.
Hope it will help you
Akif
|
|
|
|
|
|
|
read my topic below to get a description to the problem i am trying to adress.
i wan't to run caspol so that it disables .net security, i've found an article stating that it should be run as :"caspol -security off" but how exactly d oi do this? is it a command line option? or what?
m$: It is normal for your screen to go blank and for your computer to restart itself several times
|
|
|
|
|
I've a database access with 1 OLE OBJECT field contained an Image.
I've queried the database the result is in the DataSet.
Now i would to get the image contained here:
myDataSet.Tables[0].Rows[i]["Image"]
how?
|
|
|
|
|
You got it. Right there. What do you want to do with it?
---
b { font-weight: normal; }
|
|
|
|
|
it doesn't work if i do:
myImage = (Image)myDataSet.Tables[0].Rows[i]["Image"];
|
|
|
|