|
Use this code instead:
Dim proc As New Process()
proc = proc.Start("file name")
MsgBox(proc.Id.ToString())
Hope it helps !
AliAmjad(MCP)
|
|
|
|
|
Hi, AFAIK you should wait for the process to start before fetching its ID, so have
a look at Process.WaitForInputIdle().
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
hello friends
I am freshers for .net, i am developing asp.net(with vb.net)project,I want detail about how to create "MENU".
srinivasan.s
|
|
|
|
|
Have you tried google ? There's tons of articles that will give you what you need. I doubt you would benefit as much from a forum reply.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi,
i want to execute a batch file from vb.net by passing user input as arguments to the batch file.
by
siva
|
|
|
|
|
Process.Start will run a batch file. The user input to your program is available to you from the Application object, I believe.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
you can use "shell" command to do the same if you are not expecting any return value from the batch file..
Also you can redirect the output to a file and read that file in case you want the return value from the batch file...
In case you want to have the return value then using process related classes is a better method
|
|
|
|
|
hi,
i have developed one web application,in dis application i have generated
reports using excel,in my system it is working every thing fine
bt whn i open dis application from another system,there also works fine
bt excel sheet doesnt open,
i mean in another system excel sheet is not opening
can i one know's how can i do dis,
plz reply if u know
thnks in advence
afreen
|
|
|
|
|
Dude don't post same thing two times.
Regarding your problem, be specific about your description - like - error messages, error codes, may be screenshots you should provide.
"hi, I am explorer.exe. sometimes when you are doing anything at all, I will just freeze for ten minutes. All of my brother and sister windows will also freeze, because they are sad for me. Maybe we will come back, maybe not, it will be a surprise!"
|
|
|
|
|
hi,
i have developed one web application,in dis application i have generated
reports using excel,in my system it is working every thing fine
bt whn i open dis application from another system,there also works fine
bt excel sheet doesnt open,
i mean in another system excel sheet is not opening
can i one know's how can i do dis,
plz reply if u know
thnks in advence
afreen
|
|
|
|
|
afreen taj wrote: bt whn i open dis application
What language is this ? You're at a computer, not hunched over your phone.
afreen taj wrote: bt excel sheet doesnt open,
I guess Excel is not installed on the computer then.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi all,
I want to design a PropertyGrid which supports function of adding Attributes and Values in a Button click event.For example if the PropertyGrid contains one row with Attributes and value, and if I click any button I want to add another row.Can anyone give some idea
Thanks
Dana
|
|
|
|
|
My application requries loading all the pictures from a specified folder, and then reading the exif meta data off them.
Pictures will be displayed by PictureBoxes, and that the images are loaded using the PictureBox.Image property. I cannot make it work by using the
PictureBox.LoadAsync() function because the LoadAsync() method does not read the exif meta data.
And here are my questions:
1)
Is there any way to generate the images without first loading the whole image into memeory? As of this moment, my thumbnails are generated by first setting the PictureBox.Image property, and then use the PictureBox.getthumbnailimage and then setting the PictureBox.image to the thumbnail, which first loads the whole image into memeory, and then generating one, and then finally assigning it back to the picture box
2)
Is there any way to load the picture Async without using the LoadAsync() function. Or is there any way to load the picture using the LoadAsync() function while keeping all the exif meta data available?
thank you very much
|
|
|
|
|
Hi,
some comments:
1.
you don't need a PictureBox to generate a thumbnail. You can use the Image class,
with Image.FromFile() or Image.FromStream(). Then do new Bitmap(image, newWid,newHei)
and dispose of the original image.
2.
If you need to keep the EXIF data, you may want to copy it into some kind of list
(otherwise you can't dispose of the image, hence are loading your memory a lot).
3.
You can do the above in one or a few threads, hence async with respect of your main thread.
I would not use more than 2*N threads here, if N is the number of processors (See
Environment.ProcessorCount).
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Is there any way to generate the thumbnail without loading the whole image into memeory first? I realize that by using the Image will load into memory right away.
How do i do the above async? There is no loadasync method in the Image class
Also, is there a way to tell if the picture has finish loaded into memory? perhaps by extending the picturebox or something?
|
|
|
|
|
2hdass wrote: Is there any way to generate the thumbnail without loading the whole image into memeory first?
no, unless you want to implement your own file parser/thumbnailer yourself for all
relevant file formats.
2hdass wrote: How do i do the above async?
with additional threads, as I told you before.
2hdass wrote: is there a way to tell if the picture has finish loaded into memory?
for Image.FromFile(): when it returns.
2hdass wrote: perhaps by extending the picturebox or something?
forget about PictureBox if all you need is a thumbnail. Reread my previous reply!
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hello anyone and eveyone
what is the best coding language for making games.
in the future i want to program games.
is writing games in vb a good idea or no?
I have some knowledge in vb.
thanks for any advice
|
|
|
|
|
nwahsbac wrote: what is the best coding language for making games.
C. C++ is probably the best mix of power and features, but C is the best for writing hardcore games
nwahsbac wrote: is writing games in vb a good idea or no?
Depends on the games. Fast, 3D, commercial quality games ? No. Puzzle games and the like ? Sure.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi everyone
I am using crystal reports to generate a recepit for clients in my app. This recepit shpuld be based on the last receipt number entered into the database. In order to do this I would need to pass parametrs to Crystal. Does any one out there know how this can be done? How do you pass parameters to Crystal?
I have heard of SQL server reporting tools, are these tools availible in SQL server 2005 express edition?
Thank you vety much for your time. I hope you will be able to help me.
|
|
|
|
|
Hi,
I am working on an existing vb 6.0 application. i get this error
"multiple step operation generated errors. check each status value."
I am getting the the error at execution of if condition, where data in recorset field is null and TEMP_BIDDEADLINE is "1/1/1900". This code was supposedly working fine till now.
If (NVL(mrecFundData!bid_deadline, dt) <> TEMP_BIDDEADLINE) Then
'''do something
Else
''do else
End If
Any suggetions or solutions will definitely help.
Regards,
Gaurav
|
|
|
|
|
What you have is an "there are errors" error message, which doesn't say anything at all by itself.
The connection object has an Errors property that contains a collection of ADODB.Error objects. Examine each error message there to determine the cause of the error.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
This means that the Length of the value inserting in the table column is more than the column definition. You have to check the column length and Data Length
Dana
|
|
|
|
|
I have the following displayed in textboxes:
Price: 1.8 Quantity: 6 , and the item (pencil) relating to the purchase in a combolistbox
How do i get this three bits of information in one line of a listbox:
e.g 6 pencils $1.80
|
|
|
|
|
You should use ListView Control instead for such output. Add a ListView Control to your form then change its 'View' property to 'Details' then add columns to its Column collection according to your requirements, use the SubItems property of Listviewitem to display the data for Sub columns.
AliAmjad(MCP)
|
|
|
|
|
I am not familiar with the ListView control, would you be able to clarify or help with the listbox control
|
|
|
|