Overwrite Ot Delete A Picture?
Mar 23, 2012PicFirma.BackgroundImage = Image.FromFile(mappe & "Logoer" & RS("billede").value)
Thats works fine
[code].....
PicFirma.BackgroundImage = Image.FromFile(mappe & "Logoer" & RS("billede").value)
Thats works fine
[code].....
I'm creating an program that needs to delete/overwrite an image called "Image.jpeg".i have to code to upload already, but i need to be able to overwrite image.jpeg, so i was thinking of: delete file, upload new version or[code]...
View 1 RepliesHow can I save an Excel-file, which I'd edit with VB.NE, to a file, which already exists? Evertime there is a dialog: File already exists. Do you really want to overwrite? YES|NO|Abort
How can I overwrite without this dialog?
How do i delete Picture boxes in code? for example
i have a game (using picture boxes .. space invaders..) and after wave1 i want it to reset. so how do i remove the picture box.
How to insert, search and delete a picture in vb.net and Microsoft access 2007? A picture that will be store in access is inserted in a form or a picture box. But it seems I have the wrong codes.. and when I click the insert button, it doesn't store in the access, and when I click the search button, nothing appear in the picture box.
Here's my code for insert.
Dim konek As New OleDbConnection
konek.ConnectionString = strConnection
Dim sqlInsert As String = ""
sqlInsert = "INSERT INTO Table1" _
& "(Picture )" _
[Code] .....
i have a picturebox which displays a map i have 2 modes add point and delete point when the user clicks the picture it creates a point on the picture where the user has clicked that works perfectly its when i try and delete the point when it doesent work :/ i have all the points loading from an xml file this is the code i have:
[Code]...
basicly i want it to when the user clicks the point it fines the x any y in the xml delete the node then delete all the points on the map then reload them all according to the xml
How can be find out which file is going to delete when, user provides command like DELETE or SHIFT + DELETE or by programmatically gives DELETE command. Well I know about FileSystemWatcher Class, but this class doesn't provide information before delete...
View 1 Repliesi want to copy file but the same name is exist so i want to overwrite it
i used this code
If File.Exists("filename.exe") = True Then End If
but i dont know the overwrite code
I am trying to get a text file to be overwritten since it's already there. The thing is, that I'm not trying to overwrite a specific file. In fact, EVERYTHING must have the right name, or my project won't turn out right: http:[url]....However I don't have that problem any more because I solved it. Now my problem is much more simple. Again, I'm NOT trying to overwrite one specific file, so I couldn't say something like,
HTML
RmDir("C:KQQuestion1")
I need a way to overwrite any file name.
I've been searching all over the web to find a code to copy a file to a destination. I found one, but i need to get one so it can overwrite cause i get error when the file already exist in both location.There is my code:
Dim FileToCopy As String
Dim NewCopy As String
FileToCopy = "C:\test.txt"
NewCopy = "C:\NewTest.txt"
[code]....
Whenever I create two files with the same name, it overwrites it. I want the second file to be [Name] (#)
View 2 RepliesI've a program that draw an image in a picturebox with DrawImage. This image, a ball (.png transparent), every second is overwritten by another ball of different color. After 3-5 second the edge of the ball becomes bad, because of overwriting.
I tried to clean the background with a FillRectangle before any overwrite, but i need to preserve the windows form background. How can i do that?
I'm writing to a RichTextBox using the with command:
With RichTextBox
.AppendText("blablabla" & vbCrLf)
.ScrollToCaret()
End With
But sometimes I would like to overwrite what I've just written instead of writing it on the next line.
I have a text file to read. Then i took the lines from the text file and write in temporary file. Now i want to overwrite the lines from temporary file to original file.My original file contain Top and bottom part.
My temporary file look like this
4.5 28 Red (T1 ) [1 12.86 53.8] 100.00 100.00 198452 -1309 | 11.0 28 Red (2 13.10 04.0) [T1 ] 130611 2948 100.00 100.00
1.5 28 Blue (T2 ) [1 07.06 59.1] 102.54 100.00 190456 39339 | 6.5 28 Blue (2 03.00 03.0) [T2 ] 132111 -67725 102.54 100.00
[code]....
So i want to overwrite the lines before "|" to the Top part and the line after the "|" to bottom part.. I attach my original and temporary files.
How can I force SaveFileDialog in Visual Basic 2008 not to allow overwrite file or Files?To aim is not enough.
View 8 RepliesDim filesave As System.IO.StreamWriter[code]...
The above code works fine, but the problem is it overwrites the Quiz0.txt file's text. I want it to append the (";" & TbxOutput.Text & ";" & answrstrng) thing to what is already written in the Quiz0.txt file so that I can use the button (which runs this code) multiple times to add to the Quiz0.txt file.
I have a couple of files which I have to update periodically through a process written in VB.net . These files are on a server and part of a domain that many users can access. These files should never be written to as they are for reference only. I need to be able to overwrite some of them even if a user has them opened. Is it possible to do this? Presently the files permissions are not set as read-only but I can do this as long as the user under which the process runs will still have permission to overwrite them.
UPDATE: thx for your responses. The files are pdf and are opened by clicking on them from windows file explorer. This also happens when a user simply has the file selected in windows explorer.
I've installed VS 2008 on a new workstation and everything works fine except that the second time the solution is built it fails when it attempts to overwrite a .resx file in the bin folder stating that the permissions are not sufficient to overwrite the file. Deleting the bin files and building the solution works fine. The logged in user has full control permissions to the directory. I have a feeling this may be a simple issue, but I cannot find anything relating to the problem in my searches. If this is the wrong forum,
View 1 RepliesI have a program that records time data in database when the user performs task. When I published the program for user install, I did not specify any update location. So, since initial creation, whenever I need to update the software, I simply install the new .exe file and this overwrites the old version and erases all data created by the old version (similar to uninstall and reinstall). Is there a way to only install updates to the software so that all data is not erased each time I need to update? Seems like this would be simple, but I can't figure out how to do it and am quite new to programming. I will eventually want to have the software check for updates online, but I need to understand how to update from a local file location first (without erasing current data).
View 3 RepliesMy company puts out a monthly newsletter which I host on our internal website. I have a page for the author of the newsletter to upload the latest version. Once the author has uploaded the latest newsletter, he sends a broadcast email to announce the new newsletter. Employees invariably check the new newsletter and send feedback to the author with corrections that need to be made.
Once the author has made the necessary corrections (typically within an hour of sending the broadcast email), he revisits my page and replaces the latest version with the updated newsletter.
Immediately following the replacement (or update, if you will) of the newsletter, anyone attempting to access it gets a 500 - Internal Server Error.
My IT guy who maintains the server cannot delete/rename/move the file because of a permissions error and has to do a lot of convoluted things to get the file deleted (and once the file is deleted, the author of the newsletter can re-upload the corrected copy and it works fine.
My IT guy and I are pretty sure that the problem stems from that I'm trying to replace the file while IIS is actively serving it to users (which I thought of and thought that I had coded against happening).[code]...
I am wondering how I can replace a file locked by another application. I am using VB.NET from 2008.
View 4 RepliesIs that even possible in Vb
View 1 RepliesHere's the catch - for the program I'm making I would like to avoid creating a copy of the file in its totally unencrypted state (I'm using a modified, quick-and-dirty XOR cipher for that. It's secure enough for my purposes and faster than the stronger encryption). Anyhow, what I would like to do is read a block of data, de/encrypt it (in memory) and then write the changed bytes to the same location they previously would have been within the file.
I've found the problem a little outside my programming abilities, so I was wondering if anybody had a pre-made solution, links to appropriate examples, or an all out explanation.
I was wndering if its possible to change specific data in a text file from VB.NET code? i want to use a save game feature, and update the score of the user currently logged in, but i dont know how to do this. Any ideas? my text files stores 4 fields from the user; Username, Age, Score and Password.[url]...
View 3 RepliesI've got this little problem with my listview Control, I decided I wanted to hide some of my data in each listview item so I inherited from the Listview "DiaryItem".The problem is I'm in this cross threading situation and I cannot seem to overwite one Listviewitem object with another, I'm sure its some sort of refrencing problem as when it goes out of scope(function close) the original data is still present, I know I could add the new data by adding a new ListviewItem and deleting the old one but they must be away around this.
Because of cross threading I could not use Items even though I'm checkign for it. Code:
[Code]...
I'm trying to figure out/learn how to overwrite previously saved data. Right now when I save data to my excel form and then reopen it, to edit, a duplicate row with the edited data is shown along with the previously saved data as well.
View 7 RepliesI have a log file that is open and in use by another program, and I read it's contents with the following:[code]This works for reading the text from the file while it is still in use by the other program, however, immediately after this I need to truncate the text file (without deleting it) so that it is blank again. But the file will still be in use by the other program.[code]But I get the "in use by another application" exception. I've tried looking in StackOverflow and googling but I can't seem to find an answer, and I can't find a way to do this with filestreams either, or I would try to use Dim fs As New FileStream(FullPath, FileMode.Open, FileAccess.Write, FileShare.ReadWrite)
View 4 RepliesI'm using VB.NET 2003, and I'm using the installer that comes with the language. I remember reading on this forum a couple of years ago how to configure the installer so that it will automatically overwrite the previous installation. I had configured mine to do that and it worked great. Recently, the installer was lost do to a drive crash, and this trick was lost with it. I have looked through the forum for the post I read, but have not been able to find it. Does anyone know how to configure the built in installer to overwrite the previous installation when installing the program?
View 4 RepliesEverytime I go to save my listbox to a file (the same text file each time) I'm trying to overwrite the file (old list) with new file (new list), but it just adds my current list to the end of the list that was already in the text file to begin with..
[Code]...
in my program i am populating a datatable and then bulkcopying it into my database.however, i want it to overwrite a row in the database if 3 of the columns in the the row match. [code] so if the membernum, dateregistered and name match i want to overwrite the row.with the data from the bulk insert. in my program the entire database table is not populated and i think its to big to load it. [code] if the best method is to create a datatable with my database table how would i compare the rows and then overwrite the tables where there are matches in the particular 3 columns. and then update the database with only the rows that have either changed or the new ones. [code]
View 2 Replies