Click here to Skip to main content
15,889,852 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to start a form without being activated? Pin
BillWoodruff21-Oct-17 0:27
professionalBillWoodruff21-Oct-17 0:27 
GeneralRe: How to start a form without being activated? Pin
OriginalGriff21-Oct-17 0:41
mveOriginalGriff21-Oct-17 0:41 
GeneralRe: How to start a form without being activated? Pin
alin121-Oct-17 7:04
alin121-Oct-17 7:04 
GeneralRe: How to start a form without being activated? Pin
alin121-Oct-17 7:00
alin121-Oct-17 7:00 
AnswerRe: How to start a form without being activated? Pin
Sascha Lefèvre21-Oct-17 7:20
professionalSascha Lefèvre21-Oct-17 7:20 
GeneralRe: How to start a form without being activated? Pin
alin121-Oct-17 11:40
alin121-Oct-17 11:40 
GeneralRe: How to start a form without being activated? Pin
Sascha Lefèvre21-Oct-17 12:28
professionalSascha Lefèvre21-Oct-17 12:28 
GeneralRe: How to start a form without being activated? Pin
alin121-Oct-17 13:54
alin121-Oct-17 13:54 
Thanks for help. The test is working. But I'm a beginner and I have troubles implementing this on my actual project. I'm using SingleInstanceController at Program.cs in order to prevent opening the same app twice (forced single instance). Because of that, the simple ShowWithoutActivation doesn't work.

This app works in 2 main stages:
1. The app starts minimized, then it reads the arguments (file paths), then it displays those arguments in a listbox, then it waits.
2. If it's started again, it gets other arguments (actually just one), rename the files from stage 1, then it quits.

Basically it's a file (picture) arranger: the user selects the files to be renamed (stage 1) and the target file after those files will be placed through auto-renaming (stage 2). Like this: FileArranger - Streamable[^] Each stage means a launch of this app.

I want this app to stay minimized and without focus during its whole "lifetime". Of course, except when the user activates it by clicking its taskbar button. I uploaded the whole project here: MEGA[^] This app has around 300 LOC (MainForm.cs + Program.cs). Please, could you modify it in order to start without focus? That would be very helpful.

modified 21-Oct-17 21:37pm.

GeneralRe: How to start a form without being activated? Pin
Sascha Lefèvre21-Oct-17 20:59
professionalSascha Lefèvre21-Oct-17 20:59 
GeneralRe: How to start a form without being activated? Pin
alin122-Oct-17 1:57
alin122-Oct-17 1:57 
GeneralRe: How to start a form without being activated? Pin
Sascha Lefèvre22-Oct-17 2:07
professionalSascha Lefèvre22-Oct-17 2:07 
GeneralRe: How to start a form without being activated? Pin
alin122-Oct-17 2:17
alin122-Oct-17 2:17 
GeneralRe: How to start a form without being activated? Pin
Sascha Lefèvre22-Oct-17 2:51
professionalSascha Lefèvre22-Oct-17 2:51 
GeneralRe: How to start a form without being activated? Pin
alin122-Oct-17 3:22
alin122-Oct-17 3:22 
GeneralRe: How to start a form without being activated? Pin
Sascha Lefèvre22-Oct-17 3:33
professionalSascha Lefèvre22-Oct-17 3:33 
GeneralRe: How to start a form without being activated? Pin
Sascha Lefèvre22-Oct-17 3:35
professionalSascha Lefèvre22-Oct-17 3:35 
GeneralRe: How to start a form without being activated? Pin
alin122-Oct-17 4:14
alin122-Oct-17 4:14 
GeneralRe: How to start a form without being activated? Pin
Sascha Lefèvre22-Oct-17 4:19
professionalSascha Lefèvre22-Oct-17 4:19 
GeneralRe: How to start a form without being activated? Pin
Sascha Lefèvre22-Oct-17 5:11
professionalSascha Lefèvre22-Oct-17 5:11 
GeneralRe: How to start a form without being activated? Pin
alin122-Oct-17 5:53
alin122-Oct-17 5:53 
AnswerRe: How to start a form without being activated? Pin
Eddy Vluggen21-Oct-17 12:56
professionalEddy Vluggen21-Oct-17 12:56 
GeneralRe: How to start a form without being activated? Pin
alin121-Oct-17 14:22
alin121-Oct-17 14:22 
GeneralRe: How to start a form without being activated? Pin
Dave Kreskowiak22-Oct-17 2:03
mveDave Kreskowiak22-Oct-17 2:03 
GeneralRe: How to start a form without being activated? Pin
alin122-Oct-17 2:12
alin122-Oct-17 2:12 
GeneralRe: How to start a form without being activated? Pin
Eddy Vluggen23-Oct-17 8:32
professionalEddy Vluggen23-Oct-17 8:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.