|
This is because your Waiting for the process to exist before you start the process! You can't wait for something to exit if it doesn't exist yet! Switch those two lines around and it'll work.
|
|
|
|
|
thanks for your reply
i think u r mistaking me.
its waitforexit not exist...
|
|
|
|
|
himangshu123 wrote: i think u r mistaking me.
No but you are mistaking him.
Dave Kreskowiak correctly pointed out that your code waits for exit before it starts. It should start and then wait for exit;
p.waitforexit()
p.start()
switch those two lines round then all should be well.
Incidentally in your OP you stated that the code you posted was not the exact code, and the error message was not the exact error message. In this case it doesn't seem to have made any difference, but you really should (particularly for error messages), give the exact wording.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
oh apologise me...
my mistake...
actually I have done the same...i didnt cut copy the code so that mistake came...sorry...
please help me
|
|
|
|
|
|
sorry....
code is
dim p as new process
p.startinfo="calc"
p.start()
p.waitforexit()
this was my actual code
still the problem arise
|
|
|
|
|
Next time, copy and paste the code. Don't retype it from memory. You'll get the order of statements wrong and quite possibly not convey some minor detail that makes all the difference to whether your code runs or not.
Between the call to .Start and .WaitForExit, add the line p.WaitForInputIdle() . This will force your code to wait for the app to start.
|
|
|
|
|
Hi to All,
Here is an another problem of mine.I am using vb.net2005.
I want to maximize the form so that user can not access the taskBar. I got some code,to hide the windows task bar. But when I run another process(say calculator) from my application, the taskbar reappears.
So I was wondering if any method or property is there to maximize the form so that, the form comes top of the task bar itself....
Please suggest a way
Thanks in advance
|
|
|
|
|
|
hi to all
Could anyone please tell me how to block certain drives to be accessed while looking for sub directories and files.
(All I want is to give an environment to the user so that HE CAN LOOK FOR FILES IN A DIRECORY, WHICH ALSO MAY HAVE SUBDIRECTORIES). The tool I am using is dirListBox in vb.net2005.
But my problem is that user can go to all the files and directories in the computer. (i WANT HIIM TO ACCESS THE FILES AND FOLDER OF A SPECIFIED DIRECTORY ONLY, SAY INSIDE C:\AA)..
NOW HOW TO FILTER THE DIRLISTBOX,?
please advice me if any other method is there for the same...(not necessary to be the DirListBox control)
THNAKS IN ADVANCE
|
|
|
|
|
himangshu123 wrote: The tool I am using is dirListBox in vb.net2005.
There is no "DirListBox" in VB.NET. Are you talking about the OpenFileDialog or are you using the old DirListBox from the VB6 days?? The old DirListBox could not be filtered or limited to a group of folders.
|
|
|
|
|
thanks for the reply
ok can openfiledialog be make to show or start from a particular directory? User shouldnot be able to view others
|
|
|
|
|
Have a read through the members of OpenFileDialog, in the MSDN documentation. It should be fairly easy to find the correct solution.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
The OpenFileDialog class is a wrapper to call the Win32 function OpenFile (? I can't remember which the function name exactly!). Win32 displays the dialog, not the .NET class OpenFileDialog.
OpenFileDialog is also a sealed (NotInheritable) class, so you can't really modify it at all. You can't even get the window handle to the dialog and start throwing messages at it since your code stops running when you call the dialogs .ShowDialog method.
Your going to have to write your own dialog to support this. It would just be a simple Form with a TreeView for a directory browser, and a ListView for files in the currently selected directory. Oh, and of course, a couple of buttons for Open and Cancel.
|
|
|
|
|
Hello every one,
I am having a VB.net 2005 application.
Earlier we had designed the application with a fixed window size, now we had implemented TableLayoutPanel in it to make it full screen.
After the implementation I made Windowstate as maximized for the forms. Now I am encountering some thing strange,
On formName.show first the form1_activate is executed instead of form1_load.
(Openinf form1 from form)
Once I reverted back “Windowstate to Normal” the execution sequence comes back to normal (Lode and then execute)
Can any one plz help me out with it...
Regards
Nishkarsh
|
|
|
|
|
You can't change the firing order of events, so the only thing you can do is change your code to handle both cases. I have to question what code you're putting into the Activate event handler, since this event fires every time the form gets focus for any reason, not just when the form first appears. Normally, you'd use this event to update the forms controls with new data when the form regains the focus.
|
|
|
|
|
Thanks Dave for the input. My exact question is that after making The window state to full screen in designer, why form activate is executed before load.
I had done a way around now that i change the window state to full screen at the end of form load. But want to know why way it happening
Regards
Nishkarsh
|
|
|
|
|
|
Can anyone help to generate a PRINT PREVIEW of a sales report from SQL 2000 database and group by INVOICE NO. With INVOICE SUB TOTALS. THANK YOU
|
|
|
|
|
Through VB.NET, or do you just want a report?
If the latter is the case, then simply install Microsoft Access. Link the SQL2000 tables to the Access-database, open up the report-wizard and enjoy
I are troll
|
|
|
|
|
|
to generate a PRINT PREVIEW
You'll have to decide what you're going to use for a reporting-engine, or what you want to use to display this print-preview in. There's Crystal Reports, there's some integrated components from Microsoft or you can simply spit out a HTML-document.
of a sales report from SQL 2000 database and group by INVOICE NO. With INVOICE SUB TOTALS
That's a relative simple SQL-query, with a grouping and an order-by
Have you worked with VB.NET before?
I are troll
|
|
|
|
|
Not crystal report but print document in vb.Net. and also i'll need each invoice total to be printed eg.
INV_NO QTY ITEM UNIT_COST AMT_PAID
001----- 2 --- Bag -- 20.00 ---- 40.00
001 ---- 6 --- Purse - 0.20 ---- 1.20
---------sub total(invoice 001)- 41.20
______
002 ---- 10 - Bag --- 20.00 ---- 200.00
---------sub total(invoice 002)- 41.20
______
GRAND TOTAL -------------------- 241.20
______
This is just to give you an idea
THANK YOU
modified on Sunday, May 3, 2009 1:59 PM
|
|
|
|
|
When i add crystalreport9 to vb6.0 in Windows vista,Appcrash problem occured. What is the solution for this. Can u help me....
|
|
|
|
|
VB6 is a POS and is no longer supported
Crystal Reports is a POS and should be shot
Vista is a POS and we are moving to Weven
I think you have absolutely no chance of getting a sensible answer with all the POS you are using.
I suggest you move to VB.net NOW, do not commit any more resources to the VB6 POS.
Never underestimate the power of human stupidity
RAH
|
|
|
|