|
You could hash the original file, and the copied file, and check that the hashes match.
.net provides an MD5 has class. Doc are here[^].
Simon
|
|
|
|
|
There's a problem with doing this instead of relying on the file system to do it for you.
You have to read the entire source file, hash it as you copy it, then write the file out to the destination. Then, you have to go and read the entire destination file and hash it. Depending on the file size, this can be a time consuming process! Then compare the hashes. But, this does NOT guarantee a good copy!! Why?? What if the source file was read incorrectly?? You have no way of knowing that it was a bad read, so you'll end up hashing it and writing it out correctly, and just end up guaranteeing that you made a bad copy.
|
|
|
|
|
This is the filesystems job, not yours. If the filesystem has a of corrupting a bit on read, then your checking will have two effects:
1) Double the amount of work, so the copy takes twice as long.
2) Double the number of reads, so you are twice as likely to get a single read error over the operation - which means you'll have to try again.
You will also very likely stuff this up and end up reading the written file straight back out the OS's cache, which won't check the underlying media at all.
|
|
|
|
|
i have a problem that Form size. It is different for different computer
tell me how can i fix size of my form for any computer
|
|
|
|
|
Like I said in your other thread, you can grab the dimensions of the primary monitor (System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height) and set your form to that size....
WHOOPS; just misread what you typed there, sorry about that.
What's the problem with the size? Be more specific
|
|
|
|
|
Ok, I think I understand your problem. Sorry, reading that English was a little different.
Form sizes may appear skewed from monitor to monitor due to different resolutions. An approach on how to fix that isn't something I'm familiar with. Each control would be proportionalized evenly so they would all have the same aspect ratio, but not the size that you want visibly.
I guess one (annoying) way would be to change the screen resolution yourself manually as a part of your program.
|
|
|
|
|
hi
i want a help
i want my form to open in maximize when i click on exe file and i also want to disable the maximize/minimize button b'cos i don't want my user to change the form size .....
can anyone tell me how i can do it....
|
|
|
|
|
formborderstyle fixedtoolwindow
private void Form1_Load(object sender, EventArgs e)
{
this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
this.Width = this.MaximumSize.Width;
this.Height = this.MaximumSize.Height;
}
or you can get bounds of the primary screen and set width and height to that, set topmost to true so its always on top
|
|
|
|
|
Hi,
there are several Form properties dealing with your needs; check MimimizeBox, MaximizeBox, and WindowState. Read up on these and others. Be careful, some of them do not work when others have specific values (e.g. for some border styles minimize/maximize are always absent).
|
|
|
|
|
That's why I suggesting setting the size to the PrimaryScreen.Bounds so he won't run into that problem
|
|
|
|
|
We have a funny problem with our serverfarm. We run 8 (2xquadcore) XEON servers which are connected in a GB-Network running on Windows 2003 R2. They ommunicate over the MS-Framework 2.0 with remoting functions. We process between 15’000 to 20’000 updates per second.
When starting the servers, everything works fine but the processes goes slower after 1-2 days. Even restarting the application does not help. We have to reboot the servers and everything is fine again for 1-2 days.
Has somebody an idea what this could be?
|
|
|
|
|
I want to have a usercontrol displayed in a datagridview details view which shows when you press that [+] sign but I couldn't figured out how to do it. I'd appreciate any ideas about this
|
|
|
|
|
|
Hi all, I'm Alessio.
I've developed a vb.net windows service that every 30 seconds opens an outlook session to connect via MAPI to exchange (2003) and to read e-mails and download attachments.
And all works fine and seems beautiful.
But as soon as possible, this situation will change.
All people that now can send messages, will receive a digital-sign onto a smart-card to encrypt e-mails and attachments.
When it happens, my service will MUST to be able to decrypt messages and attachments, but I don't know how can I do this and where can I find some examples.
Please, help me.
Thanx in advance and excuse me for my english.
Alessio
|
|
|
|
|
|
I mean everywhere.
In these last 3 days I'm looking for solutions/examples but no useful results have been found
|
|
|
|
|
mandrake_2 wrote: I'm looking for solutions/examples
I know this is not popular these days but try actually learning about the individual aspects of your project. Do that rather than looking for a solution/example. You might make some progress and wind up being able to develop the solution yourself rather than just copy/paste something into your code.
I can't speak for others but I have been doing it that way for almost 20 years now and it has always worked for me.
led mike
|
|
|
|
|
Thanx mike but now isn't a "philosophic" moment for me.
Trust me, I always try to understand where is my problem and, step by step, to solve it but now is a critical moment for me and I haven't enough time to spent to find a wonderful solution.
I totally unknow the securtity environment and it is too big to try to study it and to learn all its engine.
I know that very very soon I have to know how can I see if an email is encrypted, how to extract its certificate, how to verify if it is valid and than decrypt message and attachment.
This is my problem, my big problem, and at this moment is enough for me and for the time I have to spent.
Anyway, don't think I didn't understand what you want to say.
My english is too bad to exactly explain what I think, anyway let me say that I think you're right and I really appreciated you msg but now isn't the right moment for me.
Thanx anyway.
Alessio
|
|
|
|
|
mandrake_2 wrote: Thanx mike but now isn't a "philosophic" moment for me.
Neither was my post or point. You either know how to use the tools of your trade or you don't, period. Nothing philosophical about it.
mandrake_2 wrote: but now is a critical moment for me and I haven't enough time
See this[^]
led mike
|
|
|
|
|
I'm still looking for a method where I can be spoon feed all the magic answers.
Until then, I create utility apps to test proof of concepts, read books and articles, trial and error (AKA "school of hard knocks"), curse at the programming gods, and drink heavily. When I get really stuck and twisted, I ask a question here in which one of the regulars typically easily answer (which usually results in more cursing at the programming gods).
That tends to work for me.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Can I just take this opportunity to say... you are a complete a**hole. The guy asks a legitimate question after having done legitimate research, and you pop off with a smart ass comment about doing a google search. Either answer the damn question, or go away. The subject of encryption is a vaste and difficult thing to begin learning about. When one is presented with a specific task that involves encryption, "learning" enough to be able to do what you've got to do apart from finding some code that does what you want it to do (or close enough to be changed), is damn near impossible if one is under any kind of deadline at all. Why the need to be mean? What purpose is served? Either you know what this guy needs to know and are just being stingey and mean, or you don't and are just being mean for the sake of being mean. Either way.... I mean seriously... what is wrong with you?
|
|
|
|
|
pathogen wrote: what is wrong with you?
You think you already know the answer to that. And here is what's wrong with you, and many, many others by the way.
pathogen wrote: "learning" enough to be able to do what you've got to do apart from finding some code that does what you want it to do (or close enough to be changed), is damn near impossible if one is under any kind of deadline at all.
|
|
|
|
|
Hi all
I making an application in which the user has the option of making a new video from an existing video by picking the end and start points......How can this can be done in .NET without using the Windows Media Format SDK(WMFSDK)????....Are there directshow or other SDK's that can be used?????
Plz Help I am in dire straits
Thanx in Advance
Dr.Dang
|
|
|
|
|
|
I hope to write an application which makes an outgoing call to a
phone. When the phone is pick up a soundfile have to play over the
modem.
Please help me
|
|
|
|