Click here to Skip to main content
15,896,606 members
Home / Discussions / C#
   

C#

 
GeneralRe: Howto write text into a picturebox on runtime Pin
NewJavaBean13-Jul-09 14:53
NewJavaBean13-Jul-09 14:53 
AnswerRe: Howto write text into a picturebox on runtime Pin
Christian Graus13-Jul-09 14:25
protectorChristian Graus13-Jul-09 14:25 
QuestionPathGradientBrush and irregular shapes Pin
JimLaVine13-Jul-09 10:54
JimLaVine13-Jul-09 10:54 
AnswerRe: PathGradientBrush and irregular shapes Pin
Christian Graus13-Jul-09 10:59
protectorChristian Graus13-Jul-09 10:59 
AnswerRe: PathGradientBrush and irregular shapes Pin
Luc Pattyn13-Jul-09 11:25
sitebuilderLuc Pattyn13-Jul-09 11:25 
AnswerRe: PathGradientBrush and irregular shapes Pin
Henry Minute13-Jul-09 12:02
Henry Minute13-Jul-09 12:02 
Questiongetting specific string error? [modified] Pin
maifs13-Jul-09 10:46
maifs13-Jul-09 10:46 
AnswerRe: getting specific string error? Pin
Luc Pattyn13-Jul-09 10:57
sitebuilderLuc Pattyn13-Jul-09 10:57 
AnswerRe: getting specific string error? Pin
Christian Graus13-Jul-09 10:57
protectorChristian Graus13-Jul-09 10:57 
QuestionGraphics.MeasureString accuracy Pin
tasoss13-Jul-09 10:16
tasoss13-Jul-09 10:16 
AnswerRe: Graphics.MeasureString accuracy Pin
Christian Graus13-Jul-09 10:39
protectorChristian Graus13-Jul-09 10:39 
GeneralRe: Graphics.MeasureString accuracy Pin
tasoss13-Jul-09 10:47
tasoss13-Jul-09 10:47 
GeneralRe: Graphics.MeasureString accuracy Pin
Christian Graus13-Jul-09 10:58
protectorChristian Graus13-Jul-09 10:58 
GeneralRe: Graphics.MeasureString accuracy Pin
tasoss13-Jul-09 11:58
tasoss13-Jul-09 11:58 
AnswerRe: Graphics.MeasureString accuracy Pin
Luc Pattyn13-Jul-09 10:46
sitebuilderLuc Pattyn13-Jul-09 10:46 
QuestionAccessing a mapped drive in windows service Pin
mark_me13-Jul-09 9:48
mark_me13-Jul-09 9:48 
AnswerRe: Accessing a mapped drive in windows service [modified] Pin
Paladin200013-Jul-09 10:22
Paladin200013-Jul-09 10:22 
GeneralRe: Accessing a mapped drive in windows service Pin
mark_me13-Jul-09 11:18
mark_me13-Jul-09 11:18 
GeneralRe: Accessing a mapped drive in windows service [modified] Pin
Paladin200014-Jul-09 9:10
Paladin200014-Jul-09 9:10 
Also, note that you may need to involve these namespaces:

using System.IO;
using Shell32;
using System.Runtime.InteropServices;


mpr.dll should be located in your Windows directory at the following location: C:\WINDOWS\system32. It's part of the OS. (I don't think that they changed it in Vista; I use XP.)

RESOURCETYPE_DISK is a constant hex value; you can use that line as-is.

destinationUser = "Domain\Username", e.g. @"MSHOME\Jane.Doe" or "MSHOME\\Jane.Doe"

destinationPass = The password for the user above.

destinationFolder = The path to the remote folder the user account has rights to. e.g., @"\\SERVER\ShareFolder" or "\\\\SERVER\\ShareFolder"


Note that the purpose of the code snippet given was to move a file from the local machine to a remote share. You would need to modify it slightly to open files instead. (Change the last line, right before the Catch block.) You don't need to provide a drive letter to use this code; I leave mine as string.Empty.

modified on Wednesday, July 15, 2009 12:16 PM

AnswerRe: Accessing a mapped drive in windows service Pin
darkelv13-Jul-09 19:24
darkelv13-Jul-09 19:24 
GeneralRe: Accessing a mapped drive in windows service Pin
mark_me14-Jul-09 7:21
mark_me14-Jul-09 7:21 
QuestionOpenCV Project ? Pin
Mohammad Dayyan13-Jul-09 8:42
Mohammad Dayyan13-Jul-09 8:42 
AnswerRe: OpenCV Project ? Pin
Henry Minute13-Jul-09 8:46
Henry Minute13-Jul-09 8:46 
GeneralRe: OpenCV Project ? Pin
Mohammad Dayyan13-Jul-09 8:51
Mohammad Dayyan13-Jul-09 8:51 
GeneralRe: OpenCV Project ? Pin
Henry Minute13-Jul-09 9:01
Henry Minute13-Jul-09 9:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.