By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,107 Members | 1,607 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,107 IT Pros & Developers. It's quick & easy.

serialize

P: n/a
i get an exeption and i do not know what else to do to continue
Dim sdf As New SaveFileDialog
With sdf
.AddExtension = True
.DefaultExt = ".record"
.FileName = Now.ToLongDateString
.Filter = "recorder (*.record)|*.record"
End With
If sdf.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim Serializer As New
Runtime.Serialization.Formatters.Binary.BinaryForm atter
Dim DataFile As New FileStream(sdf.FileName,
FileMode.Create, FileAccess.Write, FileShare.None)

Serializer.Serialize(DataFile, eventsi)
DataFile.Close()
' Data = Nothing
End If

exeption message :
type 'System.Windows.Forms.MouseEventArgs' in assembly
'System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' not serializable

Sep 9 '08 #1
Share this Question
Share on Google+
9 Replies


P: n/a
For now you are trying to serialize a mouse event argument (whihc is not
marked as serializable) to a file ? Is this what you are trying to do ? What
is the big picture ? If not, the eventsi argument should be likely replaced
by something else...

--
Patrice

"Gillard" <gillard_georges@@@@@@@@@hotmail.coma écrit dans le message de
groupe de discussion : #G**************@TK2MSFTNGP02.phx.gbl...
i get an exeption and i do not know what else to do to continue Dim sdf
As New SaveFileDialog
With sdf
.AddExtension = True
.DefaultExt = ".record"
.FileName = Now.ToLongDateString
.Filter = "recorder (*.record)|*.record"
End With
If sdf.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim Serializer As New
Runtime.Serialization.Formatters.Binary.BinaryForm atter
Dim DataFile As New FileStream(sdf.FileName,
FileMode.Create, FileAccess.Write, FileShare.None)

Serializer.Serialize(DataFile, eventsi)
DataFile.Close()
' Data = Nothing
End If

exeption message :
type 'System.Windows.Forms.MouseEventArgs' in assembly
'System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' not serializable

Sep 9 '08 #2

P: n/a
yes i'm trying to serialize mouse event
Private eventsi As List(Of MacroEvent) = New List(Of MacroEvent)()

I need to do this for a mouse and keyboard recorder
i 'm trying to do a smal utility like it was one in win3.1

the code i have do all the job but i can't find how to save that to a file
for later play back
and that's the problem i have

thank you forthe time you take to help me

Georges
"Patrice" <http://www.chez.com/scribe/wrote in message
news:7E**********************************@microsof t.com...
For now you are trying to serialize a mouse event argument (whihc is not
marked as serializable) to a file ? Is this what you are trying to do ?
What is the big picture ? If not, the eventsi argument should be likely
replaced by something else...

--
Patrice

"Gillard" <gillard_georges@@@@@@@@@hotmail.coma écrit dans le message de
groupe de discussion : #G**************@TK2MSFTNGP02.phx.gbl...
>i get an exeption and i do not know what else to do to continue Dim sdf
As New SaveFileDialog
With sdf
.AddExtension = True
.DefaultExt = ".record"
.FileName = Now.ToLongDateString
.Filter = "recorder (*.record)|*.record"
End With
If sdf.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim Serializer As New
Runtime.Serialization.Formatters.Binary.BinaryFor matter
Dim DataFile As New FileStream(sdf.FileName,
FileMode.Create, FileAccess.Write, FileShare.None)

Serializer.Serialize(DataFile, eventsi)
DataFile.Close()
' Data = Nothing
End If

exeption message :
type 'System.Windows.Forms.MouseEventArgs' in assembly
'System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' not serializable

Sep 9 '08 #3

P: n/a
So the problem is that this type is not marked as serializable. I'm not sure
you have a quick and easy solution to serialize something not marked as
being serializable. A quick search gave :

http://www.codeproject.com/KB/dotnet...alization.aspx

I didn't gave a close look but it looks like a suggested pattern to
serialize class not marked as serializable.

My personal preference would be likely to use my own type (that I would then
marked serializable) as I feel you'll need anyway some more info for replay
so I would likely just copy the interested members (and would perhaps do
that at the WndProc level).

A quick search gave :
http://www.codeproject.com/KB/applic.../winmacro.aspx
--
Patrice

"Gillard" <gillard_georges@@@@@@@@@hotmail.coma écrit dans le message de
groupe de discussion : OD**************@TK2MSFTNGP03.phx.gbl...
yes i'm trying to serialize mouse event
Private eventsi As List(Of MacroEvent) = New List(Of MacroEvent)()

I need to do this for a mouse and keyboard recorder
i 'm trying to do a smal utility like it was one in win3.1

the code i have do all the job but i can't find how to save that to a file
for later play back
and that's the problem i have

thank you forthe time you take to help me

Georges
"Patrice" <http://www.chez.com/scribe/wrote in message
news:7E**********************************@microsof t.com...
>For now you are trying to serialize a mouse event argument (whihc is not
marked as serializable) to a file ? Is this what you are trying to do ?
What is the big picture ? If not, the eventsi argument should be likely
replaced by something else...

--
Patrice

"Gillard" <gillard_georges@@@@@@@@@hotmail.coma écrit dans le message
de groupe de discussion : #G**************@TK2MSFTNGP02.phx.gbl...
>>i get an exeption and i do not know what else to do to continue Dim
sdf As New SaveFileDialog
With sdf
.AddExtension = True
.DefaultExt = ".record"
.FileName = Now.ToLongDateString
.Filter = "recorder (*.record)|*.record"
End With
If sdf.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim Serializer As New
Runtime.Serialization.Formatters.Binary.BinaryFo rmatter
Dim DataFile As New FileStream(sdf.FileName,
FileMode.Create, FileAccess.Write, FileShare.None)

Serializer.Serialize(DataFile, eventsi)
DataFile.Close()
' Data = Nothing
End If

exeption message :
type 'System.Windows.Forms.MouseEventArgs' in assembly
'System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' not serializable

Sep 9 '08 #4

P: n/a
thank you I will take a deep look at those informations
and give feedback

"Patrice" <http://www.chez.com/scribe/wrote in message
news:eJ**************@TK2MSFTNGP04.phx.gbl...
So the problem is that this type is not marked as serializable. I'm not
sure you have a quick and easy solution to serialize something not marked
as being serializable. A quick search gave :

http://www.codeproject.com/KB/dotnet...alization.aspx

I didn't gave a close look but it looks like a suggested pattern to
serialize class not marked as serializable.

My personal preference would be likely to use my own type (that I would
then marked serializable) as I feel you'll need anyway some more info for
replay so I would likely just copy the interested members (and would
perhaps do that at the WndProc level).

A quick search gave :
http://www.codeproject.com/KB/applic.../winmacro.aspx
--
Patrice

"Gillard" <gillard_georges@@@@@@@@@hotmail.coma écrit dans le message de
groupe de discussion : OD**************@TK2MSFTNGP03.phx.gbl...
>yes i'm trying to serialize mouse event
Private eventsi As List(Of MacroEvent) = New List(Of MacroEvent)()

I need to do this for a mouse and keyboard recorder
i 'm trying to do a smal utility like it was one in win3.1

the code i have do all the job but i can't find how to save that to a
file for later play back
and that's the problem i have

thank you forthe time you take to help me

Georges
"Patrice" <http://www.chez.com/scribe/wrote in message
news:7E**********************************@microso ft.com...
>>For now you are trying to serialize a mouse event argument (whihc is not
marked as serializable) to a file ? Is this what you are trying to do ?
What is the big picture ? If not, the eventsi argument should be likely
replaced by something else...

--
Patrice

"Gillard" <gillard_georges@@@@@@@@@hotmail.coma écrit dans le message
de groupe de discussion : #G**************@TK2MSFTNGP02.phx.gbl...
i get an exeption and i do not know what else to do to continue Dim
sdf As New SaveFileDialog
With sdf
.AddExtension = True
.DefaultExt = ".record"
.FileName = Now.ToLongDateString
.Filter = "recorder (*.record)|*.record"
End With
If sdf.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim Serializer As New
Runtime.Serialization.Formatters.Binary.BinaryF ormatter
Dim DataFile As New FileStream(sdf.FileName,
FileMode.Create, FileAccess.Write, FileShare.None)

Serializer.Serialize(DataFile, eventsi)
DataFile.Close()
' Data = Nothing
End If

exeption message :
type 'System.Windows.Forms.MouseEventArgs' in assembly
'System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' not serializable

Sep 9 '08 #5

P: n/a
thank you but that'a all in other languages

i need something in vb
"Patrice" <http://www.chez.com/scribe/wrote in message
news:eJ**************@TK2MSFTNGP04.phx.gbl...
So the problem is that this type is not marked as serializable. I'm not
sure you have a quick and easy solution to serialize something not marked
as being serializable. A quick search gave :

http://www.codeproject.com/KB/dotnet...alization.aspx

I didn't gave a close look but it looks like a suggested pattern to
serialize class not marked as serializable.

My personal preference would be likely to use my own type (that I would
then marked serializable) as I feel you'll need anyway some more info for
replay so I would likely just copy the interested members (and would
perhaps do that at the WndProc level).

A quick search gave :
http://www.codeproject.com/KB/applic.../winmacro.aspx
--
Patrice

"Gillard" <gillard_georges@@@@@@@@@hotmail.coma écrit dans le message de
groupe de discussion : OD**************@TK2MSFTNGP03.phx.gbl...
>yes i'm trying to serialize mouse event
Private eventsi As List(Of MacroEvent) = New List(Of MacroEvent)()

I need to do this for a mouse and keyboard recorder
i 'm trying to do a smal utility like it was one in win3.1

the code i have do all the job but i can't find how to save that to a
file for later play back
and that's the problem i have

thank you forthe time you take to help me

Georges
"Patrice" <http://www.chez.com/scribe/wrote in message
news:7E**********************************@microso ft.com...
>>For now you are trying to serialize a mouse event argument (whihc is not
marked as serializable) to a file ? Is this what you are trying to do ?
What is the big picture ? If not, the eventsi argument should be likely
replaced by something else...

--
Patrice

"Gillard" <gillard_georges@@@@@@@@@hotmail.coma écrit dans le message
de groupe de discussion : #G**************@TK2MSFTNGP02.phx.gbl...
i get an exeption and i do not know what else to do to continue Dim
sdf As New SaveFileDialog
With sdf
.AddExtension = True
.DefaultExt = ".record"
.FileName = Now.ToLongDateString
.Filter = "recorder (*.record)|*.record"
End With
If sdf.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim Serializer As New
Runtime.Serialization.Formatters.Binary.BinaryF ormatter
Dim DataFile As New FileStream(sdf.FileName,
FileMode.Create, FileAccess.Write, FileShare.None)

Serializer.Serialize(DataFile, eventsi)
DataFile.Close()
' Data = Nothing
End If

exeption message :
type 'System.Windows.Forms.MouseEventArgs' in assembly
'System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' not serializable

Sep 9 '08 #6

P: n/a
Gillard,

I have looked at your code before, and did not understand like Patrice what
you wanted to serialize.

Now I look again I get the idea that you want to serialize an already
serialized file.

Here is a link to our pages where you see a simple sample how easy
serializing is.

http://www.vb-tips.com/SerializeArrayList.aspx

However like Patrice wrote as well to serialize something the class (type)
needs the attribute that it is serializable.

A lot of .Net classes are marked as not serializable.

As this sample does not solve your problem, then try to bring your problem
back to the essention, as that does not help you then rephrase your problem
here.

Cor

"Gillard" <gillard_georges@@@@@@@@@hotmail.comschreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
thank you but that'a all in other languages

i need something in vb
"Patrice" <http://www.chez.com/scribe/wrote in message
news:eJ**************@TK2MSFTNGP04.phx.gbl...
>So the problem is that this type is not marked as serializable. I'm not
sure you have a quick and easy solution to serialize something not marked
as being serializable. A quick search gave :

http://www.codeproject.com/KB/dotnet...alization.aspx

I didn't gave a close look but it looks like a suggested pattern to
serialize class not marked as serializable.

My personal preference would be likely to use my own type (that I would
then marked serializable) as I feel you'll need anyway some more info for
replay so I would likely just copy the interested members (and would
perhaps do that at the WndProc level).

A quick search gave :
http://www.codeproject.com/KB/applic.../winmacro.aspx
--
Patrice

"Gillard" <gillard_georges@@@@@@@@@hotmail.coma écrit dans le message
de groupe de discussion : OD**************@TK2MSFTNGP03.phx.gbl...
>>yes i'm trying to serialize mouse event
Private eventsi As List(Of MacroEvent) = New List(Of MacroEvent)()

I need to do this for a mouse and keyboard recorder
i 'm trying to do a smal utility like it was one in win3.1

the code i have do all the job but i can't find how to save that to a
file for later play back
and that's the problem i have

thank you forthe time you take to help me

Georges
"Patrice" <http://www.chez.com/scribe/wrote in message
news:7E**********************************@micros oft.com...
For now you are trying to serialize a mouse event argument (whihc is
not marked as serializable) to a file ? Is this what you are trying to
do ? What is the big picture ? If not, the eventsi argument should be
likely replaced by something else...

--
Patrice

"Gillard" <gillard_georges@@@@@@@@@hotmail.coma écrit dans le message
de groupe de discussion : #G**************@TK2MSFTNGP02.phx.gbl...
i get an exeption and i do not know what else to do to continue Dim
sdf As New SaveFileDialog
With sdf
.AddExtension = True
.DefaultExt = ".record"
.FileName = Now.ToLongDateString
.Filter = "recorder (*.record)|*.record"
End With
If sdf.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim Serializer As New
Runtime.Serialization.Formatters.Binary.Binary Formatter
Dim DataFile As New FileStream(sdf.FileName,
FileMode.Create, FileAccess.Write, FileShare.None)
>
Serializer.Serialize(DataFile, eventsi)
DataFile.Close()
' Data = Nothing
End If
>
exeption message :
>
>
type 'System.Windows.Forms.MouseEventArgs' in assembly
'System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' not serializable

Sep 10 '08 #7

P: n/a
Gillard,

Why are you not use the isolated storage for this.

You can make it for the user or for the computer.

http://msdn.microsoft.com/en-us/library/bdts8hk0.aspx

Cor

"Gillard" <gillard_georges@@@@@@@@@hotmail.comschreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
what i try to serialize is a list of mouse and keyboard eventarg for
later
playback
the code is in the attached zip file
"Cor Ligthert[MVP]" <no************@planet.nlwrote in message
news:7F**********************************@microsof t.com...
>Gillard,

I have looked at your code before, and did not understand like Patrice
what you wanted to serialize.

Now I look again I get the idea that you want to serialize an already
serialized file.

Here is a link to our pages where you see a simple sample how easy
serializing is.

http://www.vb-tips.com/SerializeArrayList.aspx

However like Patrice wrote as well to serialize something the class
(type)
needs the attribute that it is serializable.

A lot of .Net classes are marked as not serializable.

As this sample does not solve your problem, then try to bring your
problem
back to the essention, as that does not help you then rephrase your
problem here.

Cor

"Gillard" <gillard_georges@@@@@@@@@hotmail.comschreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
>>thank you but that'a all in other languages

i need something in vb
"Patrice" <http://www.chez.com/scribe/wrote in message
news:eJ**************@TK2MSFTNGP04.phx.gbl...
So the problem is that this type is not marked as serializable. I'm not
sure you have a quick and easy solution to serialize something not
marked as being serializable. A quick search gave :

http://www.codeproject.com/KB/dotnet...alization.aspx

I didn't gave a close look but it looks like a suggested pattern to
serialize class not marked as serializable.

My personal preference would be likely to use my own type (that I would
then marked serializable) as I feel you'll need anyway some more info
for replay so I would likely just copy the interested members (and
would
perhaps do that at the WndProc level).

A quick search gave :
http://www.codeproject.com/KB/applic.../winmacro.aspx
--
Patrice

"Gillard" <gillard_georges@@@@@@@@@hotmail.coma écrit dans le message
de groupe de discussion : OD**************@TK2MSFTNGP03.phx.gbl...
yes i'm trying to serialize mouse event
Private eventsi As List(Of MacroEvent) = New List(Of MacroEvent)()
>
I need to do this for a mouse and keyboard recorder
i 'm trying to do a smal utility like it was one in win3.1
>
the code i have do all the job but i can't find how to save that to a
file for later play back
and that's the problem i have
>
thank you forthe time you take to help me
>
Georges
>
>
"Patrice" <http://www.chez.com/scribe/wrote in message
news:7E**********************************@micr osoft.com...
>For now you are trying to serialize a mouse event argument (whihc is
>not marked as serializable) to a file ? Is this what you are trying
>to
>do ? What is the big picture ? If not, the eventsi argument should be
>likely replaced by something else...
>>
>--
>Patrice
>>
>"Gillard" <gillard_georges@@@@@@@@@hotmail.coma écrit dans le
>message de groupe de discussion :
>#G**************@TK2MSFTNGP02.phx.gbl...
>>i get an exeption and i do not know what else to do to continue
>>Dim
>>sdf As New SaveFileDialog
>> With sdf
>> .AddExtension = True
>> .DefaultExt = ".record"
>> .FileName = Now.ToLongDateString
>> .Filter = "recorder (*.record)|*.record"
>> End With
>> If sdf.ShowDialog = Windows.Forms.DialogResult.OK Then
>> Dim Serializer As New
>>Runtime.Serialization.Formatters.Binary.Bina ryFormatter
>> Dim DataFile As New FileStream(sdf.FileName,
>>FileMode.Create, FileAccess.Write, FileShare.None)
>>>
>> Serializer.Serialize(DataFile, eventsi)
>> DataFile.Close()
>> ' Data = Nothing
>> End If
>>>
>>exeption message :
>>>
>>>
>>type 'System.Windows.Forms.MouseEventArgs' in assembly
>>'System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
>>PublicKeyToken=b77a5c561934e089' not serializable
>>
>>
Sep 10 '08 #8

P: n/a
For ISerializationSurrogate try perhaps :
http://bytes.com/forum/thread349594.html

It lloks to be still in C# but as the MSDN magazine likely give detailed
explanation it should be possible to translate this to VB quite easily.

For journalrecord/journalplayback try :
http://social.msdn.microsoft.com/for...-93f1d2e429c0/

I can't do much more than searching Google using those keywords...

--
Patrice
"Gillard" <gillard_georges@@@@@@@@@hotmail.coma écrit dans le message de
groupe de discussion : #l**************@TK2MSFTNGP02.phx.gbl...
thank you I will take a deep look at those informations
and give feedback

"Patrice" <http://www.chez.com/scribe/wrote in message
news:eJ**************@TK2MSFTNGP04.phx.gbl...
>So the problem is that this type is not marked as serializable. I'm not
sure you have a quick and easy solution to serialize something not marked
as being serializable. A quick search gave :

http://www.codeproject.com/KB/dotnet...alization.aspx

I didn't gave a close look but it looks like a suggested pattern to
serialize class not marked as serializable.

My personal preference would be likely to use my own type (that I would
then marked serializable) as I feel you'll need anyway some more info for
replay so I would likely just copy the interested members (and would
perhaps do that at the WndProc level).

A quick search gave :
http://www.codeproject.com/KB/applic.../winmacro.aspx
--
Patrice

"Gillard" <gillard_georges@@@@@@@@@hotmail.coma écrit dans le message
de groupe de discussion : OD**************@TK2MSFTNGP03.phx.gbl...
>>yes i'm trying to serialize mouse event
Private eventsi As List(Of MacroEvent) = New List(Of MacroEvent)()

I need to do this for a mouse and keyboard recorder
i 'm trying to do a smal utility like it was one in win3.1

the code i have do all the job but i can't find how to save that to a
file for later play back
and that's the problem i have

thank you forthe time you take to help me

Georges
"Patrice" <http://www.chez.com/scribe/wrote in message
news:7E**********************************@micros oft.com...
For now you are trying to serialize a mouse event argument (whihc is
not marked as serializable) to a file ? Is this what you are trying to
do ? What is the big picture ? If not, the eventsi argument should be
likely replaced by something else...

--
Patrice

"Gillard" <gillard_georges@@@@@@@@@hotmail.coma écrit dans le message
de groupe de discussion : #G**************@TK2MSFTNGP02.phx.gbl...
i get an exeption and i do not know what else to do to continue Dim
sdf As New SaveFileDialog
With sdf
.AddExtension = True
.DefaultExt = ".record"
.FileName = Now.ToLongDateString
.Filter = "recorder (*.record)|*.record"
End With
If sdf.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim Serializer As New
Runtime.Serialization.Formatters.Binary.Binary Formatter
Dim DataFile As New FileStream(sdf.FileName,
FileMode.Create, FileAccess.Write, FileShare.None)
>
Serializer.Serialize(DataFile, eventsi)
DataFile.Close()
' Data = Nothing
End If
>
exeption message :
>
>
type 'System.Windows.Forms.MouseEventArgs' in assembly
'System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' not serializable

Sep 10 '08 #9

P: n/a
i do not know how so i 'll take a look at the documentation first

"Cor Ligthert[MVP]" <no************@planet.nlwrote in message
news:0E**********************************@microsof t.com...
Gillard,

Why are you not use the isolated storage for this.

You can make it for the user or for the computer.

http://msdn.microsoft.com/en-us/library/bdts8hk0.aspx

Cor

"Gillard" <gillard_georges@@@@@@@@@hotmail.comschreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
>what i try to serialize is a list of mouse and keyboard eventarg for
later
playback
the code is in the attached zip file
"Cor Ligthert[MVP]" <no************@planet.nlwrote in message
news:7F**********************************@microso ft.com...
>>Gillard,

I have looked at your code before, and did not understand like Patrice
what you wanted to serialize.

Now I look again I get the idea that you want to serialize an already
serialized file.

Here is a link to our pages where you see a simple sample how easy
serializing is.

http://www.vb-tips.com/SerializeArrayList.aspx

However like Patrice wrote as well to serialize something the class
(type)
needs the attribute that it is serializable.

A lot of .Net classes are marked as not serializable.

As this sample does not solve your problem, then try to bring your
problem
back to the essention, as that does not help you then rephrase your
problem here.

Cor

"Gillard" <gillard_georges@@@@@@@@@hotmail.comschreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl.. .
thank you but that'a all in other languages

i need something in vb
"Patrice" <http://www.chez.com/scribe/wrote in message
news:eJ**************@TK2MSFTNGP04.phx.gbl...
So the problem is that this type is not marked as serializable. I'm
not
sure you have a quick and easy solution to serialize something not
marked as being serializable. A quick search gave :
>
http://www.codeproject.com/KB/dotnet...alization.aspx
>
I didn't gave a close look but it looks like a suggested pattern to
serialize class not marked as serializable.
>
My personal preference would be likely to use my own type (that I
would
then marked serializable) as I feel you'll need anyway some more info
for replay so I would likely just copy the interested members (and
would
perhaps do that at the WndProc level).
>
A quick search gave :
http://www.codeproject.com/KB/applic.../winmacro.aspx
>
>
--
Patrice
>
"Gillard" <gillard_georges@@@@@@@@@hotmail.coma écrit dans le
message
de groupe de discussion : OD**************@TK2MSFTNGP03.phx.gbl...
>yes i'm trying to serialize mouse event
>Private eventsi As List(Of MacroEvent) = New List(Of MacroEvent)()
>>
>I need to do this for a mouse and keyboard recorder
>i 'm trying to do a smal utility like it was one in win3.1
>>
>the code i have do all the job but i can't find how to save that to a
>file for later play back
>and that's the problem i have
>>
>thank you forthe time you take to help me
>>
>Georges
>>
>>
>"Patrice" <http://www.chez.com/scribe/wrote in message
>news:7E**********************************@mic rosoft.com...
>>For now you are trying to serialize a mouse event argument (whihc is
>>not marked as serializable) to a file ? Is this what you are trying
>>to
>>do ? What is the big picture ? If not, the eventsi argument should
>>be
>>likely replaced by something else...
>>>
>>--
>>Patrice
>>>
>>"Gillard" <gillard_georges@@@@@@@@@hotmail.coma écrit dans le
>>message de groupe de discussion :
>>#G**************@TK2MSFTNGP02.phx.gbl...
>>>i get an exeption and i do not know what else to do to continue
>>>Dim
>>>sdf As New SaveFileDialog
>>> With sdf
>>> .AddExtension = True
>>> .DefaultExt = ".record"
>>> .FileName = Now.ToLongDateString
>>> .Filter = "recorder (*.record)|*.record"
>>> End With
>>> If sdf.ShowDialog = Windows.Forms.DialogResult.OK Then
>>> Dim Serializer As New
>>>Runtime.Serialization.Formatters.Binary.Bin aryFormatter
>>> Dim DataFile As New FileStream(sdf.FileName,
>>>FileMode.Create, FileAccess.Write, FileShare.None)
>>>>
>>> Serializer.Serialize(DataFile, eventsi)
>>> DataFile.Close()
>>> ' Data = Nothing
>>> End If
>>>>
>>>exeption message :
>>>>
>>>>
>>>type 'System.Windows.Forms.MouseEventArgs' in assembly
>>>'System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
>>>PublicKeyToken=b77a5c561934e089' not serializable
>>>
>>>
>
Sep 10 '08 #10

This discussion thread is closed

Replies have been disabled for this discussion.