-
- Create folder on another computer of LAN
by ashk1860
- 4 Replies
- Last post
by ashk1860
- hi
how can I create folder on the other computer of my network which is not mapped as a drive programmatically I mean I have 2 problems:
1- how to address the other computer. I mean which syntax should I use for showing the path
2-how can I specify the credentials to access that computer in the contex of my application
another question is how can I change its security and give acce
-
- security: password encryption
by susantez
- 3 Replies
- Last post
by susantez
- hi, in my winows application i'm connecting to database. I don't want to embed the user name and password to the code. i want to take these from a parameter text. So i have to encrypt the username and password before writing to parameter text, and then while connecting database i will decrypt them. Could you suggest me an algorithm or technique... thnx..
-
- InvalidOperation Exception was unhandled
by BibekWeb
- 10 Replies
- Last post
by TaylorMichaelL
- Im working on desktop Application in C#. When ever I close my application(My desktop Poject) following error pop on the IDE. "Collection was modified; enumeration operation may not execute." Some time it appears in Program.cs file and somtime in my main form designer class. Please rply me if any one has solution regarding this problem.
-
- Cannot implicitly convert type 'void' to 'byte[]'
by Just-Gaming
- 2 Replies
- Last post
by Just-Gaming
- I get error "Cannot implicitly convert type 'void' to 'byte[]'" with this code, how can I fix it Underlined part is the part which causes this error.
Code Snippet
private void button1_Click(object sender, EventArgs e) { WebClient myWebClient = new WebClient(); NameValueCollection myNameValueCollection = new NameValueCollection(); string username = u
-
- Invoking a driver after certain time, without using a timer
by Azurewrath
- 5 Replies
- Last post
by Azurewrath
- Hi all, Anyone knows how to do this Thanks alot, Aw
-
- Outlook add-In -> how to get Sender SMTP Address
by PolkaDance
- 3 Replies
- Last post
by Felan
- Hi,
I'm trying to make an add-in for outlook and I need to grab the Sender Address; I'm using
Microsoft.Office.Interop.Outlook.MailItem which has a SenderEmailAddress Property but when it comes from Exchange, it gives somethign like that:
/O=ANALYSTIK/OU=FIRST ADMINISTRATIVE GROUP/CN=RECIPIENTS/CN=EPLANTE
I have a book that talk about CDO using reflexivity but the example tells how to
-
- How to tell the difference between windows 2000 and windows XP in .net
by MarshallB1
- 1 Replies
- Last post
by Brendan Grant
- I am developing a class library in C# and it uses Win32 API calls that are only available on Windows XP or later. I would like to detect the OS and provide an alternate code path for Windows NT and Windows 2000. The OperatingSystem.Platform returned from Environment.CurrentOS does not allow me to tell between the different versions and the values used for OperatingSystem.Version do not appear to b
-
- Unable to add object data source when project contains class or interface that takes more than 2 template arguments
by StairCounter
- 2 Replies
- Last post
by BillFugina
- I am unable to add an object data source when project contains a class or interface that takes more than 2 template arguments.
The error message is: "An unexpected error has occured.
Error Message: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)"
This happens even on an otherwise empty class library project containing only:
namespace Cl
-
- Semaphore class equivalent in .net framework v1.1?
by wilsond
- 4 Replies
- Last post
by Peter Ritchie
- Is there a .net framework v1.1 equivlant or a similar class to the Semaphore class that's in the .net framework v2 or greater
-
- Static Methods And Thread Safety
by Wee Bubba
- 12 Replies
- Last post
by Wee Bubba
- could somebody please tell me, in the following static method, is it possible for a second thread to call the same method with a different input variable modway through, thereby screwing up the result
thanks
public static int GetString(int i)
{
// do some stuff with i.
e.g. i = i + 100;
i = i / 2 ...
etc.
return i;
}
-
- Delegate invocation
by Z. Margeta
- 2 Replies
- Last post
by Peter Ritchie
- Consider the following situation.
public class SomeObject
{
private OtherObject otherObject;
...
public OtherObject OtherObject
{
get
{
return otherObject;
}
set
{
if (value != otherObject)
{
otherObject.SomeEvent -= new EventHandler(handlerMethod);
otherObject =
-
- using CodeDOM to generate for ( using block in C#.net )
by yeshi
- 2 Replies
- Last post
by nielsvanvliet
- Hello all ,
how to generate for using block in codeDOM.
sample is
using (DbConnection dbcon = db.CreateConnection())
{
// code
}
Please help me.
thanks .
-
- simulating keystrokes
by justinbezanson
- 2 Replies
- Last post
by RizwanSharp
- After piecing together some code I gathered from several forum posts, etc I have the code below. What I was hoping it would do is when the form loads it would fill the textbox with the letter A simulating that the A key had been pressed. It doesn't cause any errors but nothing seems to happen. My ulimate goal is to be able to simulate key presses on other applications to help automate processes (l
-
- XSD file and Typed Datasets Question [2.0]
by tacoman667
- 0 Replies
- Last post
by tacoman667
- I have an XSD from a comany that I need to create an XML file from. I want to create a typed dataset in VS2005 C# in order to view properties and have a faster ADO.NET experience. When I use "add existing" and select my XSD it imports it into my solution tree and creates an XSX file. I cannot create a dataset from the name of the XSD though. It works fine if I "create new" and
-
- Monitoring who is accessing files
by Morten B. Post
- 12 Replies
- Last post
by Morten B. Post
- Hi,
I'm trying to figure out how it is possible to determine what user (in AD forexample) is accessing a file and when. I've come a long way using WMI (__InstanceOperationEvent ) to get noticed when a file is created, deleted or modified. However I cannot find out what user is doing it. I've also tried with FileSystemWatcher, but it doesn't seem possible to get the user invoking the event.
-
- Unique random numbers
by Lucy_H
- 14 Replies
- Last post
by Peter Ritchie
- Hi I have some code that generates a different random number in two textboxes:
Random random = new Random ();
int [] number = new int [48];
for ( int i = 0; i < number.Length; i++)
{
number = random.Next(1, 50);
}
for ( int i = 0; i < number.Length; i++)
{
textBox2.Text = number .ToString();
}
Random random2 = new Random ();
int
-
- Asynchronous method to synchronous
by Amit Bansal
- 2 Replies
- Last post
by Thomas Danecker
- I want to convert the asynchronous method to synchronous. Please suggest some appropriate solution.
-
- how to check if another instance of an application is already running or if a certain port, say 30550, is open or not
by itpro7
- 2 Replies
- Last post
by itpro7
- Hi, I have an application in C# running peacefully. Problem occus when another instance of the application is started on the same machine. How can I, inside my application, check if an instance of the same application is running or not. If running, I shall pre-maturely exit from my new instance preventing it from starting up. In my application, I am using a TcpListener() listener object to listen
-
- Array of Objects and delegates - Parameter count mismatch
by Cminor
- 8 Replies
- Last post
by Ross Dargan
- Good evening guys,
I am trying to loop through my array of delegates and invoke each delegate with it parameter grabbed from another object array. I get the erro "Parameter count mismatch" when i try to execute this. I have three functions, one which adds the delegate to the array and another than runs the invoking process.
private void AddThisDelegate_Click( object sen
-
- Where can i find Eg. Of Unmanaged code in C#
by NeO HackeR
- 6 Replies
- Last post
by NeO HackeR
- i am intrested in learning unmanaged code in c# wher can i find for examples
-
- Settings problem with whitespace
by Colin Newell
- 4 Replies
- Last post
by Colin Newell
- Hi, I've been using the Properties.Settings stuff to save my application settings and it's been really easy to use. I've seen one funny thing though. I've set a text box to bing to a string setting and when I save a space as the setting it gets garbled. The xml written in the settings file is like,
<value> </value> Which means that when it's recalled it ends up looking like a new l
-
- C# MONO compiler error
by gsturbo
- 1 Replies
- Last post
by OmegaMan
- Hi All, I was wondering if anyone can explain this erorr to me. I'm using the C# Mono Compiler on XP and am trying to reference a dll file, but I receive an error saying the dll has invalid assembly metadata. I'm using the command "gmcs source.cs -r:<path to dll>" I'm sure the dll is a valid file for I've used it in VB. Any help is much appreciated.
-
- How i retrive number of my program that is now running ?
by omid talebi
- 7 Replies
- Last post
by H. Tony
- i want that user can only run one instance of my program. what i do
-
- How to use string.replace to replace "\\" with "\" in a string?
by huabing78
- 11 Replies
- Last post
by Figo Fei - MSFT
- say, string = "abc//123"
I want to replace "//" with "/" so that it becomes "abc/123".
Thanks.
-
- foreach statement for dynamic checkbox list
by BrettDerry
- 4 Replies
- Last post
by BrettDerry
- Hi All, I have two dynamically created checkbox lists that I need to do a foreach statement for. How do I write the foreach while getting the dynamically created values for the checkboxes I know how to do it for a standard checkbox list but not when values are issued at runtime. Currently I have: cmdInsertHtlFac.Parameters.Add("@HotelFacilityID", SqlDbType.Int).Value = cblHotelFacilities