Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
tools
vsnet.act
vsnet.debugging
vsnet.documentation
vsnet.enterprise.tools
vsnet.general
vsnet.ide
vsnet.jlca
vsnet.servicepacks
vsnet.setup
vsnet.vsip
vsnet.vss
vsnet.vstools.office
vstudio.development
vstudio.extensibility
vstudio.general
vstudio.helpauthoring
vstudio.setup
vstudio.sourcesafe
  
 
date: Tue, 12 Aug 2008 10:57:56 -0400,    group: microsoft.public.vstudio.general        back       


VB.Net 2008 run project   
How do you create a formless program?  I have a project now that has a 
button to fire off an event.  Is there away when you run the project to fire 
the button click event when you run the project?
date: Tue, 12 Aug 2008 10:57:56 -0400   author:   Ed Wyche

Re: VB.Net 2008 run project   
Ed Wyche wrote:
> How do you create a formless program?  I have a project now that has a 
> button to fire off an event.  Is there away when you run the project to 
> fire the button click event when you run the project?


A formless program is a "console" program.  This type starts with a 
"Main" subroutine.

If you just want to use what you have (a form) then on the form load 
event simply call the routine that you want to execute.

LS
date: Tue, 12 Aug 2008 11:37:42 -0400   author:   Lloyd Sheen a@b.c

Re: VB.Net 2008 run project   
How would I have it fire that cmdButton from the Form_Load?  Also how would 
I allow switches from the command line.  For example I would like a /r to 
fire the command button without user interaction and if they run it without 
/r it will bring up the form.

"Lloyd Sheen" <a@b.c> wrote in message 
news:#4PAfFJ$IHA.1148@TK2MSFTNGP02.phx.gbl...
> Ed Wyche wrote:
>> How do you create a formless program?  I have a project now that has a 
>> button to fire off an event.  Is there away when you run the project to 
>> fire the button click event when you run the project?
>
>
> A formless program is a "console" program.  This type starts with a "Main" 
> subroutine.
>
> If you just want to use what you have (a form) then on the form load event 
> simply call the routine that you want to execute.
>
> LS
date: Tue, 12 Aug 2008 14:09:38 -0400   author:   Ed Wyche

Re: VB.Net 2008 run project   
Ed Wyche wrote:
> How would I have it fire that cmdButton from the Form_Load?  Also how 
> would I allow switches from the command line.  For example I would like 
> a /r to fire the command button without user interaction and if they run 
> it without /r it will bring up the form.
> 
> "Lloyd Sheen" <a@b.c> wrote in message 
> news:#4PAfFJ$IHA.1148@TK2MSFTNGP02.phx.gbl...
>> Ed Wyche wrote:
>>> How do you create a formless program?  I have a project now that has 
>>> a button to fire off an event.  Is there away when you run the 
>>> project to fire the button click event when you run the project?
>>
>>
>> A formless program is a "console" program.  This type starts with a 
>> "Main" subroutine.
>>
>> If you just want to use what you have (a form) then on the form load 
>> event simply call the routine that you want to execute.
>>
>> LS 
> 


First off there is no more cmdButton in a console program.  I think you 
are only using the button to start the process right?

If so the code you run on the button click is the code you run on the 
load of the application.

Now if you want to be able to use a windows form for this and control it 
with commandline switches , you can get the command line switches from 
System.Environment.CommandLine.

Take all the code from the button click event and put it into a 
subroutine.  Then in the button click event call the subroutine. If when 
you parse the commandline parameters and you see your combination to 
auto-click , just call your subroutine.

LS
date: Tue, 12 Aug 2008 17:19:21 -0400   author:   Lloyd Sheen a@b.c

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us