7 Replies - 369 Views - Last Post: 15 July 2012 - 07:58 AM Rate Topic: -----

#1 hellborg  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 55
  • Joined: 19-March 11

Dont minimize active program

Posted 15 July 2012 - 06:42 AM

my question is this: i have a Console application that runs at times, and when it runs it minimizes the program currently active. so if i play a game and my software runs the game is minimized. Is there anyway to over ride this?

i did look into outputting my software as windows form and that works in that it doesnt show any console, but i want the console to be able to be shown when passing certain parameters. and have yet to found out how to do this.

Is This A Good Question/Topic? 0
  • +

Replies To: Dont minimize active program

#2 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3576
  • View blog
  • Posts: 11,117
  • Joined: 05-May 12

Re: Dont minimize active program

Posted 15 July 2012 - 07:07 AM

Is it your Console application that is telling the game to minimize? Or does the game minimize when any other program has focus? Or does the game minimize when another console program (for example: "sort.exe", "ping.exe" ) is run?
Was This Post Helpful? 0
  • +
  • -

#3 hellborg  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 55
  • Joined: 19-March 11

Re: Dont minimize active program

Posted 15 July 2012 - 07:16 AM

as it is now the game minimizes with any consoleprogram. but that is not really a problem seeing as you can control when to run those.
Was This Post Helpful? 0
  • +
  • -

#4 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3576
  • View blog
  • Posts: 11,117
  • Joined: 05-May 12

Re: Dont minimize active program

Posted 15 July 2012 - 07:28 AM

So the game is happy to stay maximized if another Windows application is running, but not when a console window is opened. Kind of strange, if you ask me, but it's their software.

Anyway, it sounds like you only need the console because you need to display some things. Typically designing an entire form can be a pain just for some simple strings. Is calling MessageBox() sufficient to display the things that you want to display?

If not, I believe there are a few samples on the Internet of logging text to a TextBox, or a RichTextBox, or a ListBox. Simply create a Form that has one child control (textbox, or rich textbox, or listbox) set to Fill.

In the back of my mind, I still find it strange that the game only minimizes for console programs... So if you start notepad, then start your game, and then Alt-Tab back to notepad, does the game minimize? Obviously notepad is not a console program.

This post has been edited by Skydiver: 15 July 2012 - 07:29 AM

Was This Post Helpful? 0
  • +
  • -

#5 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5529
  • View blog
  • Posts: 11,838
  • Joined: 02-June 10

Re: Dont minimize active program

Posted 15 July 2012 - 07:39 AM

View Posthellborg, on 15 July 2012 - 08:16 AM, said:

but that is not really a problem seeing as you can control when to run those.


The answer is in the question then, isn't it. Control when your application runs.
Its your child, be a responsible parent and teach it better manners.

Program it to not open if your game (or the foreground application) is not Windows Explorer... or if the foreground application is maximized...

View PostSkydiver, on 15 July 2012 - 08:28 AM, said:

So the game is happy to stay maximized if another Windows application is running, but not when a console window is opened. Kind of strange, if you ask me, but it's their software.



Probably a development hold-over, or an anti-cheat measure. The developer may have programmed it to do that because they had a console app monitoring it's performance. Or they are trying to thwart hackers that are using console applications to peer into the memory of the game to find security measures or variables like amount of ammo and lives remaining, in an effort to make the player invincible.
Was This Post Helpful? 0
  • +
  • -

#6 hellborg  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 55
  • Joined: 19-March 11

Re: Dont minimize active program

Posted 15 July 2012 - 07:42 AM

no what i meant with that is, if i play a game and want to open ping, i alt tab(ie i control when i want to open it). but any program opened while ingame would result in minimize of the game.

but so if i am to ask another question then. if i output the project as a windows form, the console is never shown. is there anyway to add code to show the console window? ie if certain parameters are passed?
Was This Post Helpful? 0
  • +
  • -

#7 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5529
  • View blog
  • Posts: 11,838
  • Joined: 02-June 10

Re: Dont minimize active program

Posted 15 July 2012 - 07:57 AM

A WInForms application can create a console window.
But I think that feels like a hack. If you're going to make a WinForms app then take the extra 10 minutes to direct your output to a GUI control instead of a console. Just put a ListView on the Form and add your output to it.

That would ensure no console window exists anywhere to be detected by the game.
Was This Post Helpful? 0
  • +
  • -

#8 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3576
  • View blog
  • Posts: 11,117
  • Joined: 05-May 12

Re: Dont minimize active program

Posted 15 July 2012 - 07:58 AM

View Posthellborg, on 15 July 2012 - 07:42 AM, said:

no what i meant with that is, if i play a game and want to open ping, i alt tab(ie i control when i want to open it). but any program opened while ingame would result in minimize of the game.


Ah, that sounded more like it. Probably a DirectX game that wanted exclusive access to the display (and/or input devices). It's like a lot of current games that cannot run in "windowed mode". Thankfully, there are less and less of these games that can't run windowed. I need to feed my DIC addiction even while I'm playing a game. :lol:

This post has been edited by Skydiver: 15 July 2012 - 07:59 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1