Wednesday, October 10, 2007

Xanax And Alcohol Party Effects

Advanced breackpoint in visual studio net

Creando particolari chiavi di registro è possibile da un link posizione su una pagina web eseguire la propria applicazione passando parametri.
Esattamente come fa Emule quando si clicca su un link ed2k://filedascaricare. Create un file di registro con questo contenuto (personalizzatelo secondo le vostre esigenze) e importatelo nel vostro registro di sistema
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ESTENSIONE]
@="URL: ESTENSIONE Protocol"
"URL Protocol"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ESTENSIONE\DefaultIcon]
@="c:\\programmi\\percorso\\programma.exe"
"OldIcon"="c:\\programmi\\percorso\\programma.exe,1"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ESTENSIONE\shell]
@="open"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ESTENSIONE\shell\open]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ESTENSIONE\shell\open\command]
@="\"c:\\programmi\\percorso\\programma.exe\" \\ "% 1 \\" "
" OldDefault "=" \\ "c: \\ \\ Program Files \\ \\ path \\ \\ program.exe \\" \\ "% 1 \\" "



Where"

EXTENSION "is the protocol to associate with your application
At this point to verify that the operation is successful, open Internet Explorer and how to set address "extension: / /" While
in your HTML links are simply links to the software


Tuesday, October 2, 2007

Are People That Get Tattos Stupid

Run your application from a link

window when your application form is registered for the initiation of a type of file is useful to open files within the same application, even if the program is already running well to integrate seamlessly with Windows.
The association is valid for both extensions to link eg mylink: / / In our view, it is necessary that the application is defined as a single istance, then click on "View Application Events"


will be added to the project file
ApplicationEvents.vb , select the item from the menu of events StartupNextInstance this:


Sender The parameter will be the new instance and the parameter and contains some details including the command line passed!

At this point we have all the information necessary to open the requested file in the current instance.

Is The Ct Driving Test Hard

open associated files in the current

Dovento exploit the mechanisms of internal serialization vb.net you can run into a problem.
When the class has to be serialized events run by non-serializable object (eg a form window) serialization crashes.
Everything comes from the impossibility to declare serializable events. Following the instructions from
Using the extended event declaration can be used a double list of objects that handle events generated class, the objects serializzabili e quelli non serializzabili.




_
Private mNonSerializableHandlers As New Generic.List(Of EventHandler)
Private mSerializableHandlers As New Generic.List(Of EventHandler)
Public Custom Event NameChanged As EventHandler
AddHandler(ByVal value As EventHandler)
If value.Target.GetType.IsSerializable Then
mSerializableHandlers.Add(value)
Else
If mNonSerializableHandlers Is Nothing Then
mNonSerializableHandlers = _
New Generic.List(Of EventHandler)()
End If
mNonSerializableHandlers.Add(value)
End If
End

RemoveHandler AddHandler (ByVal value As EventHandler) If
value.Target.GetType.IsSerializable Then
mSerializableHandlers.Remove (value) Else


mNonSerializableHandlers.Remove (value) End If

RemoveHandler

End RaiseEvent (ByVal sender As Object, ByVal e As EventArgs) For Each item As EventHandler
In mNonSerializableHandlers
item.Invoke (sender, e)

Next For Each item As EventHandler In mSerializableHandlers
item.Invoke (sender, e) End RaiseEvent


Next End Event




In this way the problem was around, needless to say that the syntax is quite extensive, effort pays off serialization.
If there are events with parameters, you must weigh down even further, using a delegate:


_
Private mNonSerializableHandlers As New Generic.List (Of On_Progress)
Private mSerializableHandlers As New Generic.List (Of On_Progress) Public Delegate Sub
On_Progress (ByVal status As String, ByVal progress As Integer) Public Custom Event Progress As On_Progress
AddHandler (ByVal value As On_Progress) If value.Target.GetType.IsSerializable Then
mSerializableHandlers.Add(value)
Else
If mNonSerializableHandlers Is Nothing Then
mNonSerializableHandlers = New Generic.List(Of On_Progress)()
End If
mNonSerializableHandlers.Add(value)
End If

End AddHandler

RemoveHandler(ByVal value As On_Progress)
If value.Target.GetType.IsSerializable Then
mSerializableHandlers.Remove(value)
Else
mNonSerializableHandlers.Remove(value)
End If
End RemoveHandler
'
RaiseEvent(ByVal status As String, ByVal progress As Integer)
For Each item As On_Progress In mNonSerializableHandlers
item.Invoke(status, progress)
Next
For Each item As On_Progress In mSerializableHandlers
item.Invoke(status, progress)
Next
End RaiseEvent
End Event




In questo modo è possibile serializzare e deserializzare la nostra classe

'SERIALIZE
Dim FS As New System.IO.FileStream("c:\prova.wbp", FileMode.OpenOrCreate) As New BinaryFormatter Dim
BinFormatter
'
BinFormatter.Serialize (FS, myClassWithEvents)





' Deserialize Dim FS As New System.IO.FileStream
(file, FileMode.Open) Dim
BinFormatter As New BinaryFormatter
'RETURN
BinFormatter.Deserialize (FS)