473,466 Members | 1,382 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Copying Object

Hello,

I am trying to use serialization to copy objects. The object in question
"Institution" inherits from a parent object "Party" both are marked as
<Serializable()>. Initially I can copy an empty Institution to another
empty Institution, using the following routine:

Private Sub CopyObject(ByRef FromObject As Object, ByRef ToObject As Object)
Dim m As New MemoryStream
Dim b As New BinaryFormatter
b.Serialize(m, FromObject)
m.Position = 0
ToObject = b.Deserialize(m)
End Sub

I then populate some data into the copy and attempt to copy the object back
to the original. When doing so the following error is thrown:

An unhandled exception of type
'System.Runtime.Serialization.SerializationExcepti on' occurred in
mscorlib.dll

Additional information: The type myProject.EdtInstitution in Assembly
myProject, Version=1.0.1396.28005, Culture=neutral, PublicKeyToken=null is
not marked as serializable.

The interesting thing is that the object "myProject.EdtInstitution" in the
Assembly myProject is a form and is not being passed into the CopyObject
routine. Any suggestions on how to copy the object back?

Thanks,
Dan
Nov 20 '05 #1
6 2538
Solex,
Does Party or Institution have custom events that are handled by the Form?

If so, you need to mark the events as NonSerialized.

Unfortunately VB.NET does not support the NonSerialized attribute on events
(VB.NET does not have a Field Attribute Modifier).

The three methods I know of are:
1. Define your events in a C# base class that defines the event as being not
serializable (via [field: NonSerializable] or event procedures).
2. Implement the ISerializable interface and serialize only actual fields.
3. Create a SerializationSurrogate object that only serializes the actual
fields.

For details on the third method see the "Possible Solution to Serializing
Event Handlers in VB" thread from 10 Oct 2003 in the
microsoft.public.dotnet.distributed_apps &
microsoft.public.dotnet.framework.remoting newsgroups.

Details on all three methods can be found in the following three MDSN
Magazine articles on Serialization.
http://msdn.microsoft.com/msdnmag/issues/02/04/net/
http://msdn.microsoft.com/msdnmag/issues/02/07/net/
http://msdn.microsoft.com/msdnmag/issues/02/09/net/

Because I need ISerializable for version control, I'm using the second
method.

Hope this helps
Jay
"solex" <so***@nowhere.com> wrote in message
news:u6**************@TK2MSFTNGP12.phx.gbl...
Hello,

I am trying to use serialization to copy objects. The object in question
"Institution" inherits from a parent object "Party" both are marked as
<Serializable()>. Initially I can copy an empty Institution to another
empty Institution, using the following routine:

Private Sub CopyObject(ByRef FromObject As Object, ByRef ToObject As Object) Dim m As New MemoryStream
Dim b As New BinaryFormatter
b.Serialize(m, FromObject)
m.Position = 0
ToObject = b.Deserialize(m)
End Sub

I then populate some data into the copy and attempt to copy the object back to the original. When doing so the following error is thrown:

An unhandled exception of type
'System.Runtime.Serialization.SerializationExcepti on' occurred in
mscorlib.dll

Additional information: The type myProject.EdtInstitution in Assembly
myProject, Version=1.0.1396.28005, Culture=neutral, PublicKeyToken=null is
not marked as serializable.

The interesting thing is that the object "myProject.EdtInstitution" in the
Assembly myProject is a form and is not being passed into the CopyObject
routine. Any suggestions on how to copy the object back?

Thanks,
Dan

Nov 20 '05 #2
Jay,

Yes my classes have events that are handled by the form. Thanks for the
info., I was on my way to implementing the ISerializableSurrogate interface,
but had a question When/How will the SetObjectData get called?

I am copying the object as to mimic a transaction, if the user decides to
cancel any editing I just dispose the copy. If they decide to save I want
to deserialize the copy into the original.

Thanks,
Dan
"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...
Solex,
Does Party or Institution have custom events that are handled by the Form?

If so, you need to mark the events as NonSerialized.

Unfortunately VB.NET does not support the NonSerialized attribute on events (VB.NET does not have a Field Attribute Modifier).

The three methods I know of are:
1. Define your events in a C# base class that defines the event as being not serializable (via [field: NonSerializable] or event procedures).
2. Implement the ISerializable interface and serialize only actual fields.
3. Create a SerializationSurrogate object that only serializes the actual
fields.

For details on the third method see the "Possible Solution to Serializing
Event Handlers in VB" thread from 10 Oct 2003 in the
microsoft.public.dotnet.distributed_apps &
microsoft.public.dotnet.framework.remoting newsgroups.

Details on all three methods can be found in the following three MDSN
Magazine articles on Serialization.
http://msdn.microsoft.com/msdnmag/issues/02/04/net/
http://msdn.microsoft.com/msdnmag/issues/02/07/net/
http://msdn.microsoft.com/msdnmag/issues/02/09/net/

Because I need ISerializable for version control, I'm using the second
method.

Hope this helps
Jay
"solex" <so***@nowhere.com> wrote in message
news:u6**************@TK2MSFTNGP12.phx.gbl...
Hello,

I am trying to use serialization to copy objects. The object in question "Institution" inherits from a parent object "Party" both are marked as
<Serializable()>. Initially I can copy an empty Institution to another
empty Institution, using the following routine:

Private Sub CopyObject(ByRef FromObject As Object, ByRef ToObject As

Object)
Dim m As New MemoryStream
Dim b As New BinaryFormatter
b.Serialize(m, FromObject)
m.Position = 0
ToObject = b.Deserialize(m)
End Sub

I then populate some data into the copy and attempt to copy the object

back
to the original. When doing so the following error is thrown:

An unhandled exception of type
'System.Runtime.Serialization.SerializationExcepti on' occurred in
mscorlib.dll

Additional information: The type myProject.EdtInstitution in Assembly
myProject, Version=1.0.1396.28005, Culture=neutral, PublicKeyToken=null is not marked as serializable.

The interesting thing is that the object "myProject.EdtInstitution" in the Assembly myProject is a form and is not being passed into the CopyObject
routine. Any suggestions on how to copy the object back?

Thanks,
Dan


Nov 20 '05 #3
I think that serialization is not the best means to copy your objects. It
introduces a lot of complexity and a whole new class of bugs that probably
aren't worth it.

What I would suggest is a Clone/Commit model where each object implements a
IClonable (to get the Clone method) and can be called to make an exact
duplicate of itself. You can perform any changes to that object and then
when you are done call Commit (this method isn't on any interface but you
can make one called ICommitable) on the original object passing the clone
and the orginal object will change to match the clone.

Here is a small example:

Interface ICommitable
Inherits IClonable
Sub Commit(ByVal clone as ICommitable)
End Interface

Class Foo
Implements ICommitable
Private name as String
Private someDate as Date

Sub Clone() As Object Implements ICommitable.Clone
Dim clone as New Foo
clone.name = Me.name
clone.someDate = Me.someDate
Return clone
End Sub

Sub Commit(ByVal clone as ICommitable)
Me.name = clone.name
Me.someDate = clone.someDate
End Sub
End Class

If the reason you were using serialization is so you didn't have to
hardcode these values, then you may want to look at reflection to handle
this. This is a more advanced approach that I can go into more detail about
if you would like.

Good luck.
--
Mike Sampson | VB .Net Deployment
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
From: "solex" <so***@nowhere.com>
Subject: Copying Object
Date: Tue, 28 Oct 2003 16:39:47 -0500
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <u6**************@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: 208.242.192.253
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:151455
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

Hello,

I am trying to use serialization to copy objects. The object in question
"Institution" inherits from a parent object "Party" both are marked as
<Serializable()>. Initially I can copy an empty Institution to another
empty Institution, using the following routine:

Private Sub CopyObject(ByRef FromObject As Object, ByRef ToObject As Object)Dim m As New MemoryStream
Dim b As New BinaryFormatter
b.Serialize(m, FromObject)
m.Position = 0
ToObject = b.Deserialize(m)
End Sub

I then populate some data into the copy and attempt to copy the object back
to the original. When doing so the following error is thrown:

An unhandled exception of type
'System.Runtime.Serialization.SerializationExcept ion' occurred in
mscorlib.dll

Additional information: The type myProject.EdtInstitution in Assembly
myProject, Version=1.0.1396.28005, Culture=neutral, PublicKeyToken=null is
not marked as serializable.

The interesting thing is that the object "myProject.EdtInstitution" in the
Assembly myProject is a form and is not being passed into the CopyObject
routine. Any suggestions on how to copy the object back?

Thanks,
Dan

Nov 20 '05 #4
Michal,

Thanks for your input. I originally had a version of your Clone/Commit
interface in my VB6 project but I was hoping that in my conversion to DotNet
that the framework would be able to transparently handle the mundane tasks
of Getting and Setting the objects data/object references.

I would be interested in some more detail regarding reflection.

Thanks,
Dan
"Michal Sampson [MSFT]" <mi******@online.microsoft.com> wrote in message
news:Fo**************@cpmsftngxa06.phx.gbl...
I think that serialization is not the best means to copy your objects. It
introduces a lot of complexity and a whole new class of bugs that probably
aren't worth it.

What I would suggest is a Clone/Commit model where each object implements a IClonable (to get the Clone method) and can be called to make an exact
duplicate of itself. You can perform any changes to that object and then
when you are done call Commit (this method isn't on any interface but you
can make one called ICommitable) on the original object passing the clone
and the orginal object will change to match the clone.

Here is a small example:

Interface ICommitable
Inherits IClonable
Sub Commit(ByVal clone as ICommitable)
End Interface

Class Foo
Implements ICommitable
Private name as String
Private someDate as Date

Sub Clone() As Object Implements ICommitable.Clone
Dim clone as New Foo
clone.name = Me.name
clone.someDate = Me.someDate
Return clone
End Sub

Sub Commit(ByVal clone as ICommitable)
Me.name = clone.name
Me.someDate = clone.someDate
End Sub
End Class

If the reason you were using serialization is so you didn't have to
hardcode these values, then you may want to look at reflection to handle
this. This is a more advanced approach that I can go into more detail about if you would like.

Good luck.
--
Mike Sampson | VB .Net Deployment
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
From: "solex" <so***@nowhere.com>
Subject: Copying Object
Date: Tue, 28 Oct 2003 16:39:47 -0500
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <u6**************@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: 208.242.192.253
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:151455
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

Hello,

I am trying to use serialization to copy objects. The object in question
"Institution" inherits from a parent object "Party" both are marked as
<Serializable()>. Initially I can copy an empty Institution to another
empty Institution, using the following routine:

Private Sub CopyObject(ByRef FromObject As Object, ByRef ToObject As

Object)
Dim m As New MemoryStream
Dim b As New BinaryFormatter
b.Serialize(m, FromObject)
m.Position = 0
ToObject = b.Deserialize(m)
End Sub

I then populate some data into the copy and attempt to copy the object backto the original. When doing so the following error is thrown:

An unhandled exception of type
'System.Runtime.Serialization.SerializationExcept ion' occurred in
mscorlib.dll

Additional information: The type myProject.EdtInstitution in Assembly
myProject, Version=1.0.1396.28005, Culture=neutral, PublicKeyToken=null isnot marked as serializable.

The interesting thing is that the object "myProject.EdtInstitution" in theAssembly myProject is a form and is not being passed into the CopyObject
routine. Any suggestions on how to copy the object back?

Thanks,
Dan


Nov 20 '05 #5
Solex,
When you implement IClone if you can use a shallow cloning you can use
Object.MemberwiseClone.

If you need deep coping (you need to clone objects that are referenced by
this object), then you need to handle the mundane task of getting & setting,
at least for any referenced child objects.

Note: If you implement ISerializable or ISerializableSurrogate, you would
also need to handle the mundane task of getting & setting...

Hope this helps
Jay

"solex" <so***@nowhere.com> wrote in message
news:uq**************@TK2MSFTNGP09.phx.gbl...
Michal,

Thanks for your input. I originally had a version of your Clone/Commit
interface in my VB6 project but I was hoping that in my conversion to DotNet that the framework would be able to transparently handle the mundane tasks
of Getting and Setting the objects data/object references.

I would be interested in some more detail regarding reflection.

Thanks,
Dan
"Michal Sampson [MSFT]" <mi******@online.microsoft.com> wrote in message
news:Fo**************@cpmsftngxa06.phx.gbl...
I think that serialization is not the best means to copy your objects. It
introduces a lot of complexity and a whole new class of bugs that probably aren't worth it.

What I would suggest is a Clone/Commit model where each object implements
a
IClonable (to get the Clone method) and can be called to make an exact
duplicate of itself. You can perform any changes to that object and then
when you are done call Commit (this method isn't on any interface but

you can make one called ICommitable) on the original object passing the clone and the orginal object will change to match the clone.

Here is a small example:

Interface ICommitable
Inherits IClonable
Sub Commit(ByVal clone as ICommitable)
End Interface

Class Foo
Implements ICommitable
Private name as String
Private someDate as Date

Sub Clone() As Object Implements ICommitable.Clone
Dim clone as New Foo
clone.name = Me.name
clone.someDate = Me.someDate
Return clone
End Sub

Sub Commit(ByVal clone as ICommitable)
Me.name = clone.name
Me.someDate = clone.someDate
End Sub
End Class

If the reason you were using serialization is so you didn't have to
hardcode these values, then you may want to look at reflection to handle
this. This is a more advanced approach that I can go into more detail

about
if you would like.

Good luck.
--
Mike Sampson | VB .Net Deployment
This posting is provided "AS IS" with no warranties, and confers no

rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
From: "solex" <so***@nowhere.com>
Subject: Copying Object
Date: Tue, 28 Oct 2003 16:39:47 -0500
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <u6**************@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: 208.242.192.253
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:151455
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

Hello,

I am trying to use serialization to copy objects. The object in question"Institution" inherits from a parent object "Party" both are marked as
<Serializable()>. Initially I can copy an empty Institution to another
empty Institution, using the following routine:

Private Sub CopyObject(ByRef FromObject As Object, ByRef ToObject As

Object)
Dim m As New MemoryStream
Dim b As New BinaryFormatter
b.Serialize(m, FromObject)
m.Position = 0
ToObject = b.Deserialize(m)
End Sub

I then populate some data into the copy and attempt to copy the object

backto the original. When doing so the following error is thrown:

An unhandled exception of type
'System.Runtime.Serialization.SerializationExcept ion' occurred in
mscorlib.dll

Additional information: The type myProject.EdtInstitution in Assembly
myProject, Version=1.0.1396.28005, Culture=neutral, PublicKeyToken=null isnot marked as serializable.

The interesting thing is that the object "myProject.EdtInstitution" in theAssembly myProject is a form and is not being passed into the CopyObjectroutine. Any suggestions on how to copy the object back?

Thanks,
Dan



Nov 20 '05 #6
I found an article that may be of help to you. It shows an example
implementation of cloning using reflection.

http://www.codeproject.com/csharp/cloneimpl_class.asp

One thing to consider is if this is worth introducing this amount of
complexity into your code. If you only have 4 or so classes that need to be
cloned, it may be worth hardcoding like I suggested earlier. However, if
you have many classes that need cloning or a complex object graph then
reflection based cloning may be for you.

Good luck!

--
Michal Sampson | VB .Net Deployment
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
From: "solex" <so***@nowhere.com>
References: <u6**************@TK2MSFTNGP12.phx.gbl> <Fo**************@cpmsftngxa06.phx.gbl>Subject: Re: Copying Object
Date: Tue, 28 Oct 2003 17:56:57 -0500
Lines: 128
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <uq**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: 208.242.192.253
Path: cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTN GP08.phx.gbl!TK2MSFTNGP09.
phx.gblXref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:151496
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

Michal,

Thanks for your input. I originally had a version of your Clone/Commit
interface in my VB6 project but I was hoping that in my conversion to DotNetthat the framework would be able to transparently handle the mundane tasks
of Getting and Setting the objects data/object references.

I would be interested in some more detail regarding reflection.

Thanks,
Dan
"Michal Sampson [MSFT]" <mi******@online.microsoft.com> wrote in message
news:Fo**************@cpmsftngxa06.phx.gbl...
I think that serialization is not the best means to copy your objects. It
introduces a lot of complexity and a whole new class of bugs that probably
aren't worth it.

What I would suggest is a Clone/Commit model where each object implements

a
IClonable (to get the Clone method) and can be called to make an exact
duplicate of itself. You can perform any changes to that object and then
when you are done call Commit (this method isn't on any interface but you
can make one called ICommitable) on the original object passing the clone
and the orginal object will change to match the clone.

Here is a small example:

Interface ICommitable
Inherits IClonable
Sub Commit(ByVal clone as ICommitable)
End Interface

Class Foo
Implements ICommitable
Private name as String
Private someDate as Date

Sub Clone() As Object Implements ICommitable.Clone
Dim clone as New Foo
clone.name = Me.name
clone.someDate = Me.someDate
Return clone
End Sub

Sub Commit(ByVal clone as ICommitable)
Me.name = clone.name
Me.someDate = clone.someDate
End Sub
End Class

If the reason you were using serialization is so you didn't have to
hardcode these values, then you may want to look at reflection to handle
this. This is a more advanced approach that I can go into more detail

about
if you would like.

Good luck.
--
Mike Sampson | VB .Net Deployment
This posting is provided "AS IS" with no warranties, and confers no

rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
>From: "solex" <so***@nowhere.com>
>Subject: Copying Object
>Date: Tue, 28 Oct 2003 16:39:47 -0500
>Lines: 34
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <u6**************@TK2MSFTNGP12.phx.gbl>
>Newsgroups: microsoft.public.dotnet.languages.vb
>NNTP-Posting-Host: 208.242.192.253
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:151455
>X-Tomcat-NG: microsoft.public.dotnet.languages.vb
>
>Hello,
>
>I am trying to use serialization to copy objects. The object in question >"Institution" inherits from a parent object "Party" both are marked as
><Serializable()>. Initially I can copy an empty Institution to another
>empty Institution, using the following routine:
>
>Private Sub CopyObject(ByRef FromObject As Object, ByRef ToObject As

Object)
>Dim m As New MemoryStream
>Dim b As New BinaryFormatter
>b.Serialize(m, FromObject)
>m.Position = 0
>ToObject = b.Deserialize(m)
>End Sub
>
>I then populate some data into the copy and attempt to copy the object

back >to the original. When doing so the following error is thrown:
>
>An unhandled exception of type
>'System.Runtime.Serialization.SerializationExcept ion' occurred in
>mscorlib.dll
>
>Additional information: The type myProject.EdtInstitution in Assembly
>myProject, Version=1.0.1396.28005, Culture=neutral, PublicKeyToken=nullis >not marked as serializable.
>
>The interesting thing is that the object "myProject.EdtInstitution" inthe >Assembly myProject is a form and is not being passed into the CopyObject
>routine. Any suggestions on how to copy the object back?
>
>Thanks,
>Dan
>
>
>




Nov 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Robert Tarantino | last post by:
Hello, I am trying to find a way to create a scheduled task or service that will copy my local profile folders under "Documents and settings" to a network drive. This would allow me to restore...
2
by: Marijn | last post by:
Say i have an object that represents or holds a resource like an open file, a block of memory on the heap, or an openGL texture object. The constructor acquires the resource, and the destructor...
21
by: Matteo Settenvini | last post by:
Ok, I'm quite a newbie, so this question may appear silly. I'm using g++ 3.3.x. I had been taught that an array isn't a lot different from a pointer (in fact you can use the pointer arithmetics to...
22
by: Matt | last post by:
When browsing a web page a user has the ability to highlight content on a page (by holding down the left mouse button and dragging the mouse over the desired content). Is there a way to disable...
5
by: Roy Hills | last post by:
When I'm reading from or writing to a network socket, I want to use a struct to represent the structured data, but must use an unsigned char buffer for the call to sendto() or recvfrom(). I have...
5
by: Steve - DND | last post by:
Is there any way to easily deep copy an entire object? Maybe something with unsafe code to make a full and completely duplicated copy of an object with no reference ties to the original? I want...
1
by: chris.atlee | last post by:
I'm writing a program in python that creates tar files of a certain maximum size (to fit onto CD/DVD). One of the problems I'm running into is that when using compression, it's pretty much...
6
by: kimiraikkonen | last post by:
Hi, I use system.io.file class to copy files but i have a difficulty about implementing a basic / XP-like progress bar indicator during copying process. My code is this with no progress bar,...
2
by: raylopez99 | last post by:
Beware newbies: I spent a day before I figured this out: copying a bitmap (image) file to file is not quite like copying a text file--you have to do some tricks (see below), like using a...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.