single-instance

Use running instance to execute commandline in vb.net

与世无争的帅哥 提交于 2019-12-01 11:39:36
I'd like to use a running instance of my application (a single instance application) to run a new commandline... I've heard about mutexes and IPC mechanisms but I don't know how to use it. Explanation : Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load MsgBox(Environment.CommandLine) End Sub End Class Example : I launch the app with a file as argument, it shows the MsgBox and I let it run. If I launch once again the app with a file as argument, it won't show the MsgBox... How can I show it with the new commandline ? Regards, Drarig29. In VB.NET you

Use running instance to execute commandline in vb.net

偶尔善良 提交于 2019-12-01 10:52:11
问题 I'd like to use a running instance of my application (a single instance application) to run a new commandline... I've heard about mutexes and IPC mechanisms but I don't know how to use it. Explanation : Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load MsgBox(Environment.CommandLine) End Sub End Class Example : I launch the app with a file as argument, it shows the MsgBox and I let it run. If I launch once again the app with a file as argument, it

Android’s overridePendingTransition and singleInstance

这一生的挚爱 提交于 2019-12-01 05:42:33
I am stuck on an issue with overridePendingTransition not working after changing an activity’s launchMode to ‘singleInstance’. I’d love to hear your inputs on it I am working on an app to navigate through a deck of cards. To keep things simple, let’s assume the App contains two activities card_deck and card . Tapping anywhere on the card_deck activity opens a card activity. You could then swipe left or right on the card activity to open the next/previous card from the deck. I have a neat enter and exit animation that occurs on swiping through card . Here is how the android activity stack would

Getting Permission error java.lang.SecurityException: Permission Denial on 3.x Android devices while getting email attachment name

拜拜、爱过 提交于 2019-12-01 03:19:07
I am facing issue in opening Email in MYApp when I made its launch mode to "singleInstance". I have attached sample Android project which reads file name from email attachment and displays it on screen. Works fine in case of onCreate but throws error in onNewIntent when apps launch mode is singleInstance. Launchmode.java package your.namespace.launchmode; public class LaunchModeActivity extends Activity { private static final int OPEN_ACT = 2; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

Android’s overridePendingTransition and singleInstance

这一生的挚爱 提交于 2019-12-01 03:07:58
问题 I am stuck on an issue with overridePendingTransition not working after changing an activity’s launchMode to ‘singleInstance’. I’d love to hear your inputs on it I am working on an app to navigate through a deck of cards. To keep things simple, let’s assume the App contains two activities card_deck and card . Tapping anywhere on the card_deck activity opens a card activity. You could then swipe left or right on the card activity to open the next/previous card from the deck. I have a neat

Single instance batch file?

前提是你 提交于 2019-12-01 00:55:21
:: dostuff.bat @echo off :: insert long-running process call here : End What can I add to this batch file to make it terminate if it's already running in another process when it's executed? Well, if there can be only exactly one instance ever, then you can probably do this by creating a dummy file somewhere, probably in the temp directory: copy NUL "%TEMP%\dostuff_is_doing_stuff.tmp" you then remove it after you're done: del "%TEMP%\dostuff_is_doing_stuff.tmp" and at the start of the batch file you can check whether that file exists and exit accordingly: if exist "%TEMP%\dostuff_is_doing_stuff

Getting Permission error java.lang.SecurityException: Permission Denial on 3.x Android devices while getting email attachment name

只谈情不闲聊 提交于 2019-11-30 23:03:05
问题 I am facing issue in opening Email in MYApp when I made its launch mode to "singleInstance". I have attached sample Android project which reads file name from email attachment and displays it on screen. Works fine in case of onCreate but throws error in onNewIntent when apps launch mode is singleInstance. Launchmode.java package your.namespace.launchmode; public class LaunchModeActivity extends Activity { private static final int OPEN_ACT = 2; /** Called when the activity is first created. */

Single instance batch file?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 19:06:34
问题 :: dostuff.bat @echo off :: insert long-running process call here : End What can I add to this batch file to make it terminate if it's already running in another process when it's executed? 回答1: Well, if there can be only exactly one instance ever, then you can probably do this by creating a dummy file somewhere, probably in the temp directory: copy NUL "%TEMP%\dostuff_is_doing_stuff.tmp" you then remove it after you're done: del "%TEMP%\dostuff_is_doing_stuff.tmp" and at the start of the

single instance and notify in system tray

大城市里の小女人 提交于 2019-11-30 16:17:18
I am working on the application (C# 2.0). I have implemented single instance in it. Everything is fine. If i run the application again, it shows messagebox saying "instance is already running". Actually i don't want to show the message through messagebox. I want to show this message using Balloon tip of already running instance (it has notify icon in system tray). How can i achieve this? Thanks in advance. You need a form of interprocess communication , to signal to the other instance that it should display the messagebox. In this instance, you could go one better than telling the existing

How to enable only one instance of my application

廉价感情. 提交于 2019-11-30 08:59:24
I need only one instance of my app in android. If I run my app after installation and go to Home screen, and again run my app (click on app's icon), second instance is opened, I need to open already running first instance not to run second instance. I don't know how to solve this. Vyacheslav Shylkin Use android:launchMode="singleTask" or android:launchMode="singleInstance" in your manifest.xml in your activity tag 来源: https://stackoverflow.com/questions/9467802/how-to-enable-only-one-instance-of-my-application