ya lo solucioné, gracias.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=983493&SiteID=1has a solution to the problem (incorporated in the code below)
which works for Visual Studio 2005 (Visual Basic 2005 Express,
Framework 2.0), but not for Visual Studio .NET 2003 (VB 2003
.NET, Framework 1.1).
Here's how to reproduce the problem using either Visual Basic
.NET 2003 or Visual Basic 2005:
Start a new Windows Application project - WindowsApplication1.
This gives Form1.vb.
Add a Module to the project - Module1.vb
Replace the empty Module1 code with the following code:
Imports System.Environment
Module Module1
Declare Function AttachConsole Lib "kernel32" (ByVal
dwProcessId As Int32) As Boolean
Declare Function FreeConsole Lib "kernel32.dll" () As Boolean
Sub Main()
Dim args As String() = GetCommandLineArgs()
If args.Length = 1 Then
'No arguments so show windows form
Dim frmMain As New Form1
Application.Run(frmMain)
Else
AttachConsole(-1)
Console.WriteLine("Arguments supplied")
FreeConsole()
End If
End Sub
End Module
For VB 2003, in Project - Properties, leave Output type as
Windows Application and change Startup object to Sub Main.
For VB 2005, in Project - Properties, untick Enable application
framework, leave Output type as Windows Application and change
Startup object to Sub Main.
Build the project, then open a command prompt and run
WindowsApplication1.exe from it as follows:
1. With no arguments. The form is displayed and the command
prompt returns immediately, allowing other commands to be
entered. Required behaviour.
2. With any number of arguments. The 'Arguments supplied' is
displayed for the VB 2005 application, but not for VB 2003.
3. Run it from Windows Explorer. The form is displayed and a
separate console window is not opened. Required behaviour.
So case 2 isn't working as required for VB 2003.
The AttachConsole and FreeConsole functions described in the link
above make case 2 work for VB 2005.
For the VB 2003 application, it fixes case 2 for a Debug build,
but has no effect for a Release build, which is exactly the same
findings as
http://groups.google.co.uk/group/microsoft.public.dotnet.languages.vb/msg/2d1643af7419e141I'm interested in why it doesn't work for the VB 2003 Release
build, and any ideas for alternative fixes.
cheers,
Lo que hize fue crear la nueva clase, ir a las propiedades del proyecto y decirle que inicie por el sub main y funciona de lujo
Ahora cuando le hago doble click se ven las ventanas solamente pero cuando lo abro desde la consola me aparece el debug en colores jajaja mas las ventanas también.