'=========================================================================== ' Subject: PB/CC NO-CONSOLE SOURCE Date: 01-16-99 (22:52) ' Author: Marc van den Dikkenberg Code: PBCC ' Origin: excel@xs4all.nl Packet: PBCC.ABC '=========================================================================== '-------------------------------------------------------------------------- $If 0 NoConsole 1.0 -- Marc van den Dikkenberg, (C) 1999 (Freeware) A small tweak To prevent PB/CC 1.0 programs From opening a console window At startup -- essential For writing true GUI applications! No need to include anything in your own program, just 'patch' your compiled .EXE with this program... Thanks To Steve Hutchesson For discovering this gem! The PowerBasis Archives -- http://www.xs4all.nl/~excel/pb.html $EndIf Function PbMain() As Long FileName$=Command$ Print If FileName$="" Then Print "Usage: NoCons " Exit Function End If If UCase$(Right$(FileName$,4))<>".EXE" Then FileName$=FileName$+".EXE" End If Open FileName$ For Binary As #1 Base=1 Seek 1, &H00DD Get$ #1,1,TidBit$ If TidBit$=Chr$(3) Then Seek 1,&H00DD Put$ #1,Chr$(2) Print "File Patched!" ElseIf TidBit$=Chr$(2) Then Print "File Already Patched" Else Print "Not a PB/CC 1.0 executable" End If Close #1 End Function '--------------------------------------------------------------------------