Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Using a textfile for a Shell


Reply
 
Thread Tools Display Modes
  #1  
Old 03-28-2005, 01:43 PM
bobp bobp is offline
Newcomer
 
Join Date: Dec 2004
Posts: 16
Question Using a textfile for a Shell


Hi, I'm making a program for people who don't know the programs built in with Windows. It has buttons for Notepad, Explorer, Paint and such. The a problem I had is that Shell ("iexplore.exe") didn't work, although Shell ("notepad.exe") did. I fixed that (partially) by using Environ$("ProgramFiles") + "\Internet Explorer\iexplore.exe" and dumping the location into a textbox. I was able to save the textbox into Config/ie.txt (without quotes) and now my question is, is there a way to run a file from a .txt file? Definately not this, but something like Shell (Config/ie.txt), or maybe having a hidden textbox that first loads the file, and then lets you do the shell thing. Any ideas?

Edit: I just re-read it and "save the textbox into Config/ie.txt (without quotes)" didn't seem to make sense. What I mean is that I made it save the text into Config/ie.txt, without the quotes around the location, because I know quotes around a saved .txt file is a common problem.

Last edited by bobp; 03-28-2005 at 11:05 PM.
Reply With Quote
  #2  
Old 03-29-2005, 03:00 PM
bobp bobp is offline
Newcomer
 
Join Date: Dec 2004
Posts: 16
Default

Answered my own question

Code:
Shell ("" + frmLocation.txtIEloc), vbNormalFocus
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->