Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Visual Basic 2005 Basics
|
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 15th, 2006, 02:54 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default What kind of WinApp has no visible i-face?

I want to create a program in VB.NET 2005 that can be started with a Shell command containing argument strings, and which will then go about its business on a server with no one logged in, committing suicide when it is done with its task (or has reported whatever error prevented completion).

  To wit: I want to upload a file with an ASP.NET app, save it to a location designated in web.config, then start this afore-mentioned app, telling the app in the arguments what the name of the file is, under what name in the database the results are to go, and who it is that is making this request.
  Since the process might take awhile, I want it to run autonomously, while the user gets the next web page sent back to them right away: "Thank you for the request; retrieve your results later..."
  I don't think this is a process that a Windows Service would be right for. I don't think the right type is a Console App either. But can a Windows Forms app be written that never puts up a visual interface? (I have done this before in VB6, just entering Sub Main(), and never presenting a form; will that work with VB.NET 05? Is there a better choice?)
 
Old November 21st, 2006, 04:45 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default

Sure, you can create a windows app with no interface, just as you've described for VB6 below. But I believe a service is ideal for what you're trying to accomplish. I've written just such a service to check an upload folder for a file once a minute, and process it automatically. It never "commits suicide", though - it just goes idle except for once a minute when the timer checks the folder for a new file. As yours takes command line arguments, you'd have to figure out a way to pass variable parms to it (via another DB table updated when the file is uploaded, for instance), which would also allow it to process several files if they should all be uploaded at the same time.

Make sense or am I missing something?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Call and/or start C# WinApp from script spif2001 C# 2005 0 September 20th, 2007 02:38 AM
standerd forms in winapp ahmad_diab85 C# 1 January 10th, 2007 12:55 PM
visible vs. not visible on form akibaMaila VB.NET 2002/2003 Basics 2 August 15th, 2005 02:40 PM
can't close a winApp completely csc820203 C# 4 July 19th, 2004 03:12 PM
how to make a WinApp stay in statusbar? csc820203 C# 1 June 22nd, 2004 10:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.