3 Replies - 1383 Views - Last Post: 03 November 2012 - 02:05 PM Rate Topic: -----

#1 NewK  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 07-October 12

How to use Application.restart without focusing my program?

Posted 03 November 2012 - 01:20 PM

Everytime I use Application.restart, it restarts my program but when it opens it again it focuses it and brings it to the front over all the other programs I have opened on my pc. For example if I'm playing a game and I use a key to trigger Application.restart, it will minimize my game and focus my program.How can I make application.restart not focus my program when it opens it?
Is This A Good Question/Topic? 0
  • +

Replies To: How to use Application.restart without focusing my program?

#2 _HAWK_  Icon User is online

  • Master(Of Foo)
  • member icon

Reputation: 1055
  • View blog
  • Posts: 4,085
  • Joined: 02-July 08

Re: How to use Application.restart without focusing my program?

Posted 03 November 2012 - 01:33 PM

I would think a Setting would work - when you call Restart you set the setting to true. When you open the app you check the Setting and if true then during form_load you set the windows state to minimize. -untested-
Was This Post Helpful? 1
  • +
  • -

#3 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9204
  • View blog
  • Posts: 34,581
  • Joined: 12-June 08

Re: How to use Application.restart without focusing my program?

Posted 03 November 2012 - 01:35 PM

What - making a game cheat app?

Typically I would go into your program's load event and have it start the window state as minimized.

Me.WindowState = FormWindowState.Minimized

Was This Post Helpful? 1
  • +
  • -

#4 NewK  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 07-October 12

Re: How to use Application.restart without focusing my program?

Posted 03 November 2012 - 02:05 PM

Thanks that worked, don't know how I didn't remember that before, oh well I'm still learning though. And no I'm not trying to do a cheat app or any kind of malicious app, that would go far beyond my knowledge, like I said I'm still learning and not that I would need it anyway.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1