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

C#

 
QuestionQuadtree Implementation Pin
MagicalC4Wombat16-Feb-10 9:45
MagicalC4Wombat16-Feb-10 9:45 
AnswerRe: Quadtree Implementation Pin
Luc Pattyn16-Feb-10 9:58
sitebuilderLuc Pattyn16-Feb-10 9:58 
GeneralRe: Quadtree Implementation Pin
MagicalC4Wombat16-Feb-10 10:06
MagicalC4Wombat16-Feb-10 10:06 
GeneralRe: Quadtree Implementation Pin
Luc Pattyn16-Feb-10 10:13
sitebuilderLuc Pattyn16-Feb-10 10:13 
AnswerRe: Quadtree Implementation Pin
harold aptroot16-Feb-10 10:14
harold aptroot16-Feb-10 10:14 
Questionassociating a file with a .EXE on a cd Pin
shadowthief_0316-Feb-10 8:55
shadowthief_0316-Feb-10 8:55 
AnswerRe: associating a file with a .EXE on a cd Pin
Luc Pattyn16-Feb-10 9:11
sitebuilderLuc Pattyn16-Feb-10 9:11 
GeneralRe: associating a file with a .EXE on a cd Pin
shadowthief_0316-Feb-10 11:01
shadowthief_0316-Feb-10 11:01 
so i wrote the code below and it worked it automatically moved a file from my D: drive to my C: drive but when i try to run it from a CD, it erros out with the following

System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at System.String.Substring(Int32 startIndex, Int32 length)
at CustomerDecrypt.Form1.OutputFileNameDe()
at CustomerDecrypt.Form1.AutoRun()
at CustomerDecrypt.Form1.button1_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

private string path = Path.GetDirectoryName(Application.ExecutablePath);

private void AutoRun()
        {
            txtBoxDecrypt.Text = path;

            string newPath = path.Substring(0, 3);

            newPath += "bb.zip.dpa";

            MessageBox.Show(newPath);

            OutputFileNameDe();

            CreateDirectory();

            string copyFile = @"C:\!@#$%Encrypted\" + txtBoxDecryptOutputFile.Text + ".dpa";

            txtBoxDecrypt.Text = copyFile;

            File.Copy(newPath, copyFile, true);

            System.IO.FileInfo fileInfo = new System.IO.FileInfo(copyFile);

            fileInfo.IsReadOnly = false;

        }

GeneralRe: associating a file with a .EXE on a cd Pin
hammerstein0516-Feb-10 11:36
hammerstein0516-Feb-10 11:36 
GeneralRe: associating a file with a .EXE on a cd Pin
shadowthief_0316-Feb-10 12:09
shadowthief_0316-Feb-10 12:09 
QuestionWindows service Pin
aurelcly16-Feb-10 8:26
aurelcly16-Feb-10 8:26 
AnswerRe: Windows service Pin
Dimitri Witkowski16-Feb-10 9:03
Dimitri Witkowski16-Feb-10 9:03 
AnswerRe: Windows service Pin
Calla16-Feb-10 19:53
Calla16-Feb-10 19:53 
AnswerRe: Windows service Pin
Mouldiwarp17-Feb-10 3:03
Mouldiwarp17-Feb-10 3:03 
Questionxml Pin
naghoumeh1416-Feb-10 6:09
naghoumeh1416-Feb-10 6:09 
AnswerRe: xml Pin
dan!sh 16-Feb-10 6:35
professional dan!sh 16-Feb-10 6:35 
AnswerRe: xml Pin
Not Active16-Feb-10 6:37
mentorNot Active16-Feb-10 6:37 
GeneralRe: xml Pin
naghoumeh1416-Feb-10 12:09
naghoumeh1416-Feb-10 12:09 
GeneralRe: xml Pin
Not Active16-Feb-10 12:18
mentorNot Active16-Feb-10 12:18 
Questioncopy datagridview to another datagridview Pin
jashimu16-Feb-10 6:03
jashimu16-Feb-10 6:03 
AnswerRe: copy datagridview to another datagridview Pin
dan!sh 16-Feb-10 6:06
professional dan!sh 16-Feb-10 6:06 
GeneralRe: copy datagridview to another datagridview Pin
jashimu16-Feb-10 6:52
jashimu16-Feb-10 6:52 
QuestionIMessageFilter to capture click event Pin
nuttynibbles16-Feb-10 5:45
nuttynibbles16-Feb-10 5:45 
AnswerRe: IMessageFilter to capture click event Pin
dan!sh 16-Feb-10 6:02
professional dan!sh 16-Feb-10 6:02 
GeneralRe: IMessageFilter to capture click event Pin
nuttynibbles17-Feb-10 0:12
nuttynibbles17-Feb-10 0:12 

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.