Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 24th, 2007, 06:35 PM
rn2j rn2j is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 34 rn2j User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 27 m 59 sec
Reputation Power: 5
Exclamation Cmd lines

Right im creating an application to load exe's but I have a problem

I have 2 forms
Menu
Admin

The menu has links to open applications such as notepad using images.
The Admin Page should contain text box's to enter a command line for an image on menu to use

So same img1 uses the command line notepad.exe
and an admin wanted to change that to paint.exe then he could just change the command line (textbox called img1cmd) on the admin page to change it.

Is there anyway possible to do this? Or am I going the wrong way around this.

Please Help

Reply With Quote
  #2  
Old April 24th, 2007, 08:42 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 57 m 26 sec
Reputation Power: 181
What do you have coded so far?

Visit www.mvps.org and you might find some existing code that addresses your situation, it's an excellent site with an excellent VB section.
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
  #3  
Old April 25th, 2007, 09:12 AM
rn2j rn2j is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 34 rn2j User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 27 m 59 sec
Reputation Power: 5
Code:
 Private Sub game1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles game1.Click
        Dim p As New System.Diagnostics.Process

        p.StartInfo.FileName = "notepad.exe"   <--- I need to change 

        p.Start()
End Sub


I have point out my "notepad.exe" this needs to change using a textbox in my admin page
Sorry such a newb. Only done some simple stuff in VB before.

Reply With Quote
  #4  
Old April 27th, 2007, 02:37 PM
rn2j rn2j is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 34 rn2j User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 27 m 59 sec
Reputation Power: 5
Exclamation

I am creating this for a "games cafe" which users come in to play games across a LAN. I want the user to be able to just press an icon and it to launch a game. The problem is if they change a location of the .exe file I want an admin to change the cmd path to the new .exe

Also I would like a timer to count how many minutes they have been using the pc so they can be charged for how long they have been using it. I plan to disable the close button or deactivate it for normal users.

Reply With Quote
  #5  
Old April 27th, 2007, 05:18 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 57 m 26 sec
Reputation Power: 181
A "games cafe" in VB hardly qualifies as "simple".

Put the desired path in a global variable or class property. In the snip you posted, use that variable content instead of "notepad.exe"

Reply With Quote
  #6  
Old April 29th, 2007, 12:20 PM
rn2j rn2j is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 34 rn2j User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 27 m 59 sec
Reputation Power: 5
Quote:
Originally Posted by Doug G
A "games cafe" in VB hardly qualifies as "simple".

Put the desired path in a global variable or class property. In the snip you posted, use that variable content instead of "notepad.exe"


I didn't say it was simple, I said I had only done some simple stuff before. What's a global variable/class property? I don't understand sorry. But will have a mess around tomorrow when I have chance.

Reply With Quote
  #7  
Old April 29th, 2007, 06:36 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 57 m 26 sec
Reputation Power: 181
Quote:
What's a global variable/class property?
If you don't understand these terms you should start at the beginning and learn the fundamentals of VB

Reply With Quote
  #8  
Old April 30th, 2007, 11:45 AM
rn2j rn2j is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 34 rn2j User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 27 m 59 sec
Reputation Power: 5
Exclamation

Quote:
Originally Posted by Doug G
If you don't understand these terms you should start at the beginning and learn the fundamentals of VB


Yeah I need to you recommend any websites or books?

Reply With Quote
  #9  
Old April 30th, 2007, 09:08 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 57 m 26 sec
Reputation Power: 181
Quote:
Originally Posted by rn2j
Yeah I need to you recommend any websites or books?
I started with the MS documentation that comes with VB and is also online at the MSDN library, and never found much need to go further. In VB6 if you declare a variable as PUBLIC in a module, it's global, and available from any form. For myself, in my VB6 apps I generally start with a public class "MyApp" and stuff application-wide properties as class properties.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Cmd lines


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT