IonicWind Software

IWBasic => Console Corner => Topic started by: billhsln on February 01, 2013, 09:39:54 PM

Title: Simple program brings up CMD screen and I don't know why
Post by: billhsln on February 01, 2013, 09:39:54 PM
This is a simple program to read multiple files and create an SQL update file based on the values in the file.  My question is, normally on CONSOLE programs it brings up a quick screen that I can read or write to, but this one actually brings up a CMD.EXE window along with the screen I can write to.  Just wondering why or what I am doing to get the CMD.EXE window to open.  I don't need or want it.

Thanks,
Bill
Title: Re: Simple program brings up CMD screen and I don't know why
Post by: LarryMc on February 01, 2013, 10:23:16 PM
Sounds like, if I'm reading you correctly, that when you run the program you attached that two black windows appear.
I don't get that.

If I compile with the CONSOLE EXE option then I have one black window and it has  CMD.EXE in the caption and the program print statements print to it.

If I compile with the WINDOWS EXE option then I have one black window and it has Update_DRAccount.exe in the caption and the program print statements print to it.

I never have two back windows.

Post a screen shot of your two screens you're getting at the same time.

Title: Re: Simple program brings up CMD screen and I don't know why
Post by: billhsln on February 01, 2013, 11:47:50 PM
Here is what I see when I run the program.

I am running Windows 7 - 64bit.

Bill
Title: Re: Simple program brings up CMD screen and I don't know why
Post by: LarryMc on February 01, 2013, 11:55:00 PM
I don't have the data files so I can't get that far.
Did you compile it as a CONSOLE EXE or a WINDOWS EXE?

1.swap and recompile and see if it makes any difference
2. comment out the print filename statement and see if that makes any difference
Title: Re: Simple program brings up CMD screen and I don't know why
Post by: Bruce Peaslee on February 02, 2013, 08:42:45 AM
I have Windows 7 and I only get the Console.
Title: Re: Simple program brings up CMD screen and I don't know why
Post by: billhsln on February 02, 2013, 09:33:46 AM
Very strange.  Original compile I do is in CONSOLE mode and it gives me the 2 screens.  When I switch it to WINDOWS, it opens the one CONSOLE screen and works as I would expect it to when doing CONSOLE mode.  Then I switch back to CONSOLE and it gives me the 2 screens.

I modified the program to point to another subdirectory with TXT files in it.  You can use any subdirectory with text files.  It still gives me the 2 screens.

Attaching the most current version of the program.

Bill