Oh thats quit intresting, this is similair to what they had in the past, called DDE ( http://en.wikipedia.org/wiki/Dynamic_Data_Exchange ) connection between apps.
ill have a go with it, ill comment back when i find probs.
What's wrong with "Enable single instance application" ?
Well not all the peeps arround here had a clue what this does or should perform, perhaps this could be tagged as a challenge ^^
(Oct 1, 2014 06:15 AM)Nikey646 Wrote: Besides not passing the Command Parameters from the old instance of the application to a new one, nothing.
If you know of a better way to do this, then please go ahead and enlighten me.
Wtf are you talking about with command parameters?
I figured it quite out, i don't figure is why you would need such a thing, let's face it, most programs won't, so this is kinda pointless.
No one's gonna code a "so-called browser" and for other programs there's other ways i could think of.
Although this may have value, don't call me dumb at the first reply and don't be so defensive for a rather OLD topic.
(Oct 1, 2014 08:54 AM)Nikey646 Wrote: How is this topic "OLD", in any way?
If you figured it out however cannot think of any usage's of such a program, then why didn't you try to think of a new usage?
In a short-term application there is no usages, however If you are trying to replicate an entire website's functionality in an application (Like i am for several projects, with and without owner approval), generating and using links that use a *name*:// format (URI Scheme) which will automatically open your application and respond to it is quite a useful user interaction feature.
The same could can be done with files, if you associate .*name* file's to your application (Say a Image Converter that adds a Watermark), instead of creating an entirely new instance of your application, it can load it up in a new tab, saving memory and load time.
This topic is not old, and quite a lot of Professionally made applications still use some form of inter-process operations to date. Steam, TS3, Origin, Firefox, Thunderbird, Outlook, GIMP, Any program that can open multiple files into a SINGLE instance.
Unless i've miss understood what you are implying Old to be, this is quite a relevant snippet of code, it's just not usable in any of the normal rinse-repeat code you find the average skid looking for here, aka Malicious code for RATs, Keyloggers, Spammers, etc.
"In any way?" it is, fairly old, since vb6 at least, no need for the "extra feature" for most of it imo.
I wasn't talking about usages of this program, i was talking about other usages that may accomplish this. (in perhaps a more dirty way depending on my brain-mood)
There you go, "website's functionality" , how many vb programs use that? Less than 5% right? (that is, if you want to take a wild guess.)
I'm not saying other programs don't use it, i'm not saying the use of it is old, i'm saying you're comming up to that solution which only brings an extra possible-feature to an older solution (or even the .net built-in one which i was talking about) just for the use referred above.
I'm not saying this is bad, i didn't even see the code (perhaps that's what started this.) i was just referring to the Title basically.
(Oct 1, 2014 08:54 AM)Nikey646 Wrote: Edit: Also i put this code out there more so if i ever lose it locally it'll be online. It's not like i'm forcing you to use this code in your next application, and infact, if anyone used this code in a proper application, i would be surprised, since it seems this forum's Creativity is limited to Malicious code.
The Creativity is limited. Period.
with MyApplication u use it like
Edit - 😊 just saw dbots paste link
Code Namespace My
Partial Friend Class MyApplication
Private mtx As Threading.Mutex = Nothing
Private Sub MyApplication_Startup(sender As Object, e As ApplicationServices.StartupEventArgs) Handles Me.Startup
Dim bExists As Boolean = True
mtx = New Threading.Mutex(False, "Local\UniqueMutexName", bExists)
If Not bExists Then
' An instance is already opened.
e.Cancel = True
Else
' No instances opened yet.
End If
End Sub
'Private Sub MyApplication_StartupNextInstance(sender As Object, e As ApplicationServices.StartupNextInstanceEventArgs) Handles Me.StartupNextInstance
' Dim inputArgument As String = "/input="
' Dim inputName As String = ""
' For Each s As String In e.CommandLine
' If s.ToLower.StartsWith(inputArgument) Then
' inputName = s.Remove(0, inputArgument.Length)
' End If
' Next
' If inputName = "" Then
' MsgBox("No input name")
' Else
' MsgBox("Input name: " & inputName)
' End If
'End Sub
End Class
End Namespace
(Oct 2, 2014 03:19 AM)unknown123456 Wrote: I bet you have no idea aswell . You just like to talk like a tough guy
Aww how cute ^^ now hush hush, go play with the others kids.
|