|
this is the error message
full error text:
************** Exception Text **************
System.UnauthorizedAccessException: Access to the path is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.File.Move(String sourceFileName, String destFileName)
at Test_Ainfo.frmMain.btnMove_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)
now, The problem is because I want to delete or move a file from an external drive, ie f or g, or h
I want somebody to tell me one of the following:
1. this is the code you need to add permissions to the drive\folder to do this
2. this is the code you need to get administrator permission
3. this is the code to both the above
4. it can't be done
surely I am not the only one with this problem, but where is the answer?
|
|
|
|
|
Right Click on Your Application.exe then Run it as Administrator.then check it.
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
It seems as though I can't get any answers to this problem
I have also logged it on 2 other forums with same result
So at the present time I will close this post in this forum
Thanks for your contribution
|
|
|
|
|
Hey guys if anyone could help me this would be extremely appreciated. My homework assignment is to take a checking account program that we've already written and add function procedures to it. The exact instructions are: Write function procedures for processing deposits, checks, and service charges. Deposit function adds the deposit to the balance; the check subtracts the transaction amount from the balance; the service charge function subtracts the amount from the balance. each of the functions must return the updated balance.
Again, this program currently works as it is right now but we have to tweak the code to include function procedures as per the above mentioned directions.
<pre>
Private Sub CalculateToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CalculateToolStripMenuItem.Click
Try
If Decimal.Parse(AmountTextBox.Text) > 0 Then
'assigns the variable
amountDecimal = Decimal.Parse(AmountTextBox.Text)
'checks to see which Radio button is checked and performs calculations
If DepositRadioButton.Checked Then
newbalanceDecimal += amountDecimal
totalamountdepositsDecimal += amountDecimal
totaldepositsInteger += 1
ElseIf CheckRadioButton.Checked Then
'checks to see if balance is greater than the amount entered
If newbalanceDecimal >= amountDecimal Then
newbalanceDecimal -= amountDecimal
totalchecksInteger += 1
totalamountchecksDecimal += amountDecimal
'If amount entered is more than the balance then give an error and deduct 10 bux from balance
Else
MessageBox.Show("Insufficient Funds")
newbalanceDecimal -= 10
totalamountchecksDecimal += 10
totalservicechargesInteger += 1
End If
ElseIf ServiceChargeRadioButton.Checked Then
newbalanceDecimal -= amountDecimal
totalamountservicechargesDecimal += amountDecimal
totalservicechargesInteger += 1
'If no radio button is selected then give an error
Else
MessageBox.Show("You must select either Deposit, Checking, or Service Charge" _
, "Selection Required", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
'displays the final total in textbox
NewBalanceTextBox.Text = newbalanceDecimal.ToString("C")
'enable the summary menu
SummaryToolStripMenuItem.Enabled = True
'if numeric values are not entered then give an error
Else
MessageBox.Show("You CANNOT enter negative numbers into the Amount of Transaction textbox" _
, "Invalid Input", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
Catch
MessageBox.Show("You must enter numbers into the Amount textbox", "Invalid Input" _
, MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
|
|
|
|
|
So what's the problem?? No, we're not going to write your code for you. You wouldn't learn anything if we did that.
|
|
|
|
|
That's where your completely wrong. if someone would write one of the functions for me I would see how it's done and be able to do it again on my own. If you dont know the answer dont bother posting.
|
|
|
|
|
Boblc123 wrote: able to do it again on my own
Until your next homework assignment. We are here to help not do it for you.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
At least he admitted it was homework!
------------------------------------
"I am always serious about what I do, not necessarily about how I do it."
Tom Baker
|
|
|
|
|
Dalek Dave wrote: he admitted it was homework
Probably the only thing saving him from a flame-fest
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
Boblc123 wrote: if someone would write one of the functions for me I would see how it's done and be able to do it again on my own.
You stated in your original assignment that you needed to write three functions. I take it that you'll model the other two yourself, once you got an idea of what is expected?
I are troll
|
|
|
|
|
Oh, I know the answer all right. Do you really think we all haven't had the same homework assignment??
I could write it up in about 15 minutes, but you'd still fail. The problem is coding style. Everyone writes code a bit differently, and mine would make the rest of your code VERY different. I'd also probably be using stuff that you haven't covered in class yet.
This is where you make the initial attempt at it, get stuck, then start asking questions.
|
|
|
|
|
You are an idiot. But just wanted everyone to know that I got help on another forum. So you can all go f*** yourselves. You stupid geeky no good son of a bitches who like to talk sh*t in forums because you know if you did it in real life you'd get your f***in face smashed in.
|
|
|
|
|
Boblc123 wrote: who like to talk sh*t in forums
I wasn't "talkin' sh*t". I was just mearly pointing out the truth.
Have fun failing your class...
...Oh! I hope you don't tell a prospective employer what your name is. These forum posts tend to show up in Google and Yahoo searches pretty fast, and, you know, the Internet never forgets, right?
|
|
|
|
|
That's got to be a record - 3 post and you have managed to piss off one of the most helpful people in the VB forum, you have proved that you are a foul mouthed fool too immature to take advice and too lazy to do your homework.
Bye - I don't expect we will see much of you here in the future.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Communication over the World Wide Web is unique. You have time to read and re-read the conversation as many times as you want. You can put together a reply, and revise it until it is just right. You can bring together hundreds of sources, and check the phrasing until it reads well. Presumably, you know this, and do this to every post where you want to make a well-thought out point. Now, after going through all of this, what justifies sending verbal abuse to another member, who has proved that he knows the answer by the simple fact that has already used it in many other replies to many other people? If this is the way you react to refusals, then that other forum is welcome to you
The general policy on this site is tough love; if you cannot refactor code yourself, then you need to learn how before moving on to a more advanced lesson. It's like a brain surgeon not knowing how to open the skull, but moving on to rewiring neurons. Would you want him/her working on your brain? It's a similar case when it comes to code
|
|
|
|
|
Hello every one,
Is there any way that we can convert or use a vb.net application as web application.
I did a some research and got more confused. Can some one plz guide in for the same
Regards
|
|
|
|
|
VB.NET is the language the app is written in. It is not the application type. No, you cannot convert a Windows Forms app into a Web App without rewriting at least the user interface layer BY HAND.
|
|
|
|
|
Thanks for the input.
Can you plz provide me any details
|
|
|
|
|
Details of what?? What's so hard to understand about sitting down and redesigning your app from scratch??
|
|
|
|
|
No good deed goes unpunished, I read his reply and got an excellent chuckle. I hope he's troll I'd hate to run up against his work sometime down the path.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: I'd hate to run up against his work sometime down the path.
I would. I would charge per hour to replace it
|
|
|
|
|
Hi everybody,
I am planning a PIN PAD and to get response from the device needs to send the command CE as only single byte, does anyone know how can I do?
Thanks
|
|
|
|
|
Considering that is two characters, the minimum number of bytes you need is two. I think you better get out the programmers documentation on your pin pad and read it again.
|
|
|
|
|
I want to generate a list view with files for a specific path with relevant icon for each file. How to do that.
|
|
|
|
|
Pasan148 wrote: I want to generate a list view
I want you to Google for get file icon and maybe even getfileicon
|
|
|
|