|
Hi All
I would like to implement the "CANCEL" operation while I'm copying a large file because it can takes too much time. I would like to do it in wondeful C# language.
Do you think that creating a separate Thread for the copy operation (implemented using File.Copy method) that could be killed when I call the CANCEL button put in a different Thread?
Regards
ManuStone
|
|
|
|
|
|
Hello
I have a computer which has a share folder with username and password.
I want to copy a file from this folder without having to map the folder into a drive just by a simple copy. What copy command accepts also username and password for file copying purpose ?
Thanks,
Clint
|
|
|
|
|
I don't know of any, but what I do is make sure what ever user is running the process that needs to copy things from the share also exists on that computer with the correct rights. That way there is no prompt for username or password.
Hope that helps.
Ben
|
|
|
|
|
Hello experts,
What do you do when your catch block contains statements with a potential for throwing their own exceptions?
Thanks in advance,
Shy.
|
|
|
|
|
shyagam wrote: What do you do when your catch block contains statements with a potential for throwing their own exceptions?
Same answer as any other situation where exceptions might be thrown: Decide whether it can be handled at that point and catch it if it can, otherwise let it unwind the stack until it is caught.
NOTE: Some exception handling blocks deliberately throw an exception (and place the original exception as the InnerException to the new exception)
|
|
|
|
|
Colin Angus Mackay wrote: Decide whether it can be handled at that point and catch it if it can
Does it mean I should nest a new try/catch block inside of the original one?
|
|
|
|
|
If you have exceptions that you can handle there yes.
--
CleaKO The sad part about this instance is that none of the users ever said anything [about the problem].
Pete O`Hanlon Doesn't that just tell you everything you need to know about users?
|
|
|
|
|
I'm considering a transition from C++/MFC to C# for an upcoming project. Can anyone tell me where to find articles or examples of how MFC concepts might be mapped onto a C# implementation. For example are there any implementations of the Doc/View pattern, printing and previewing, menu enabling and updating etc? Or have I missed the point - is it back to the ancient and abominable collection of forms?
Thx++
|
|
|
|
|
|
Hi,
I have ODBC connectionstring , say, "DSN=xyz, trusted_Connection=yes"
I want to generate equalent SQLClient connectionstring from the available ODBC connectionstring, say, "Server=abc,Database=db, UID='',PWD=''"
Actually i am trying to redirect all connections using ODBC provider to native SQLServer provider.
Is there any way?
Thanks
kumar
|
|
|
|
|
Hey Guys,
Heres another one for ya
I'm inserting data with a liststore(gtksharp) and my problem is that the data I'm inserting allows you to insert rows at a time and my columns are dynamic(coming from a csv file) so for example
musicListStore.AppendValues (multiarray[gtkrow,gtkcol], multiarray[gtkrow,gtkcol+1], multiarray[gtkrow,gtkcol+2]);
This allows me to add data to the current row, called from my multidimensional array, multiarray.
Anyway every time multiarray is called it adds another 'cells' worth of data to the row for in this example there are 3 columns in my sheet. But for example if I decide to open a sheet with 6 columns the next 3 would be missing, the only idea I can come up with is an
if amtofcols = 6 then multiarray[gtkrow,gtkcol]....... mutiarray[gtkrow,gtkcol+5)
etc etc, but with the csv's we're using there is not upper limit and its not the nicest code at all, there must be a more elegant way of doing it but I yet to figure it out.
Entering data a 'cell' at a time is also proving impossibly hard to find information about and I realise this is a gtk widgit so people maynot have much experience but I thought it was worth a shot.
Any help or suggestions appreciated.
Cheers
Tom
|
|
|
|
|
Hi All,
Trying to write a little application to export DFS information from Active Directory and disply the Active DFS link. I've found the objects i need, but unsure how to handle the Partition Knowledge Table (PKT) attribute.
The description from Microsoft is;
"The PKT is a sorted lookup table that requires about 400 bytes per entry. One PKT resides in Active Directory for each Dfs root in a domain-based Dfs. The PKT for a stand-alone Dfs resides locally in the registry."
It seems the PKT attribyte is System.Byte[]. When i export this and convert to string (just so I can see what it produces) i get the following;
"\domainroot¬㨾껷䍖뗵⏢\DOMAIN\DATA\DOMAIN\DATA:.SERVER1DATAĬ`\domainroot\37ca6fad-bb48-45cb-be26-ae234dc71717Â澭㟊뭈䗋⚾⎮읍\DOMAIN\DATA\DRIVERS\DOMAIN\DATA\DRIVERS곰ኞ艍LJ곰ኞ艍LJ곰ኞ艍LJ@4SERVER2drivers܈\siteroot䄻厔䈪궴嫛討 "
I can see the information i'm after (which should be \\SERVER2\drivers) but unsure the best way of getting the information out.
Any ideas?
|
|
|
|
|
Hi!
I am trying to launch from code the default email client. Here's how I do it:
emlText = "mailto:" + strAddress + "?subject=" + strSubject + "&body=" + strBody;
System.Diagnostics.Process.Start(emlText);
If the body text is smaller than 2024 characters the client launches perfectly. If it exceeds 2024 characters I receive an Access Denied exception.
Can anyone please tell me how can I overcome this problem? Thanks
|
|
|
|
|
The reason it's not working is because the maximum length of a query string in IE is 2048 characters.
Check System.Web.Mail for sending emails.
|
|
|
|
|
I figured that out ...but I do not trust SMTP... maybe there is another way
|
|
|
|
|
How to send bulk emails embedded with images? Please provide Examples or code snippets
Shrikant
|
|
|
|
|
Sounds a little suspicious -- you're not doing spamming software, are you?
|
|
|
|
|
Hi,
I am facing problem of counting words for .doc or .txt files.
I am using following methods ,
1.
aDoc = wordApp.Documents.Open(ref fileName, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref isVisible, ref missing, ref missing, ref missing, ref missing);
aDoc.Activate();
aDoc.Select();
int WCnt = aDoc.Content.Words.Count;
2.
aDoc = wordApp.Documents.Open(ref fileName, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref isVisible, ref missing, ref missing, ref missing, ref missing);
aDoc.Activate();
aDoc.Select();
string ToCount = aDoc.Content.Text;
int RCount = ToCount.Split('\r').Length;
int WCnt = ToCount.Split(' ').Length + RCount;
Still it is not counting words properly.
Please tell me proper method to count the words in .doc or .txt file correctly.
#Abhi#
|
|
|
|
|
Hi All,
Is there any open source tool like Castor(for java) to convert XML/Schema to C# classes in .NET other than xsd.exe?
Thanks in Advance.
Gokulan
|
|
|
|
|
|
Hi All!!!
I´d like to know if somebody can give any idea, cause I don't know what else to do:
Scenario:
ASP.NET GridView, linked to a Customer Object (public/private properies) through a ObjectdataSource
The Thing is that when I am doing the Update of the Grid, the Object Customer arrives with all the data to the BLL, but when I am clicking in the Delete one, the object arrives empty to the BLL.
I have debuged it, and in the "Deleting Event" of the Grid, the values for the parameters are there, but in the "Deleting Event" of the Object DataSource the values dissapear...
Can anybody give any ideas
Thanks and Regards
Ricardo Casquete
|
|
|
|
|
Hello,
I am creating a GUI in C# which is like a Outlook sidebar and containing controls of Views, Sources and Displays instead of Mail, Calendar & Notes etc.
The Client UI is getting these sources and views from the server/backend. I want to populate these resources in respect of my controls. Say if I click on Views - I wud be able to see the list of the availiable views on the server-side.
Can somebody help me in this with a sample or any link.
I am quite new to C#. I have already got a code snippet to create Outlook Style sidebar.
Any help will be appreciated.
Thanks,
Kapil
|
|
|
|
|
Kapil Singhal wrote: I am quite new to C#. I have already got a code snippet to create Outlook Style sidebar.
Seriously, if you're new to C#, you shouldn't be taking on a project of this complexity. Piecing together snippets you find online is not programming, and will bring you to grief if you don't know enough to understand what they are doing.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks a lot for the advice.
I do agree that I am new to C# in developing GUI but I know the language.
I am not using any one's code for my own development. I just using their design and then modifying that according to my project. I think I able to do this only if I am able to understand the langauge.
As for the my project, complexity is there but yes I can learn and achieve my target. But i think I need help from people like you in learning the complexities of the GUI.
The same application is being created in Java by my collegaues and I am creating it in C#.
Thnaks & Regards,
Kapil
|
|
|
|
|