473,385 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Using Shell()

Hi all. I'm fairly new to programming, and have started using visual
basic.net, just found this place, so hope someone can help as I'm a little
stuck :)

I'm trying to write a small front end to an application, now this was going
fine up until this morning, where I had to send the parameters to the actual
app. I have this:

Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MenuItem2.Click

If OpenFileDialog1.ShowDialog = DialogResult.OK Then

TextBox1.Text = OpenFileDialog1.FileName

ProcID = Shell("C:\WINDOWS\pscp.EXE", AppWinStyle.NormalFocus)

What would be the correct way of sending the contents of TextBox1.Text (the
path to the file to be used) to Shell? The help doesnt really mention this
at all.

Thanks heaps for your help

Ken
Jul 17 '05 #1
1 3528
This is really a VB 'classic' group, so you may want to hang out with the
dotnetters on the msnews server, e.g one of these or other similarly-named
groups devoted exclusively to .net programming:

news://msnews.microsoft.com/microsof...dotnet.general
news://msnews.microsoft.com/microsof...t.languages.vb
news://msnews.microsoft.com/microsof....vsnet.general

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"Ken Miller" <ke*@NEIN.metaSPAMhusky.net> wrote in message
news:cb**********@sparta.btinternet.com...
: Hi all. I'm fairly new to programming, and have started using visual
: basic.net, just found this place, so hope someone can help as I'm a little
: stuck :)
:
: I'm trying to write a small front end to an application, now this was
going
: fine up until this morning, where I had to send the parameters to the
actual
: app. I have this:
:
: Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As
: System.EventArgs) Handles MenuItem2.Click
:
: If OpenFileDialog1.ShowDialog = DialogResult.OK Then
:
: TextBox1.Text = OpenFileDialog1.FileName
:
: ProcID = Shell("C:\WINDOWS\pscp.EXE", AppWinStyle.NormalFocus)
:
: What would be the correct way of sending the contents of TextBox1.Text
(the
: path to the file to be used) to Shell? The help doesnt really mention this
: at all.
:
: Thanks heaps for your help
:
: Ken
:
:

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: none | last post by:
Hello all, I wrote a shell program a few years ago in VB6 that needs to be modified. The problem I have is this: The SysAdmin uses this shell in place of Explorer, so there is no taskbar. When...
9
by: Ben Dewey | last post by:
Project: ---------------------------- I am creating a HTTPS File Transfer App using ASP.NET and C#. I am utilizing ActiveDirectory and windows security to manage the permissions. Why reinvent...
3
by: moondaddy | last post by:
I need to start an ms access 2003 app from a vb.net winforms app and didn't want to load all the interop stuff for office into the .net project. I thought that using the shell cmd would be a nice...
4
by: RLN | last post by:
Re: Access 2003/WinXP Pro-SP3 I have a shell command that does not run correctly. I have two programs located on a file server: Pgm1.mdb and Pgm2.mdb Pgm1 launches Pgm2 via a command button...
16
by: John Salerno | last post by:
Hi all. I just installed Ubuntu and I'm learning how to use the bash shell. Aside from the normal commands you can use, I was wondering if it's possible to use Python from the terminal instead of...
1
by: bruce628 | last post by:
I want to use SWT Label and popmenu to construct a menubar ,and the effect of this menubar is same to the menubar in SWT.When click the Label,it should be highlighted and popmenu shows.The issue is...
1
by: ohaqqi | last post by:
Hi guys, I'm still working on my shell. I'm trying to implement a function typefile that will take a command line input as follows: > type <file1> This command will implement a catenation of...
0
by: choukse | last post by:
Hi All, I am trying to bind to ADAM instance with a windows user through JNDI and it keeps failing. My ADAM and AD is running on same Windows 2k3 server. But, through LDP I am able to bind with...
0
by: Cameron Simpson | last post by:
On 17Aug2008 21:25, John Nagle <nagle@animats.comwrote: Because $HOSTNAME is a bash specific variable, set by bash but NOT EXPORTED! Like $0 and a bunch of other "private" variables, subprocesses...
7
by: Samuel A. Falvo II | last post by:
I have a shell script script.sh that launches a Java process in the background using the &-operator, like so: #!/bin/bash java ... arguments here ... & In my Python code, I want to invoke...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.