Delete A File In Many Different Ways?

Nov 14, 2011

What is the difference between these ways to delete a file.Is one of the methods better than the other?Are there other ways to delete a file (. Net 4)

System.IO.File.Delete(path
to file)

My.Computer.FileSystem.DeleteFile(path to file)

View 3 Replies


ADVERTISEMENT

How To FileInfo Before, Delete Or SHIFT + DELETE, Process Final Delete Of File

Feb 13, 2011

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 Replies

File Association - Diffrent Ways To Open And Read Files?

Jun 13, 2010

Before I start, I'm not 100% sure this is the right place to ask. Okey, so I'm making my own Notepad, which will contain newer features. (Private use only though) One of them being tab control.

Now I want the program to be in the "Open With..." menus for all files, so I can choose myself.

And if the program is already running when user opens a new file, I want the text to appear in a new tab, instead of a new window of the program.

I tryed to be straight forward, and keep it short. So if you need more info, fell free to ask.

View 7 Replies

Properly Delete A File Using File.Delete()?

Mar 9, 2008

How To Properly Delete A File Using File.Delete()

View 5 Replies

.net - C#: Different Ways To Run Code Asynchronously?

Feb 14, 2011

I have this code List<string> myList = new List<string>();

myList.AddRange(new MyClass1().Load());
myList.AddRange(new MyClass2().Load());
myList.AddRange(new MyClass3().Load());
myList.DoSomethingWithValues();

What's the best way of running an arbitrary number of Load() methods asynchronously and then ensuring DoSomethingWithValues() runs when all asynchronous threads have completed (of course without incrementing a variable every time a callback happens and waiting for == 3)

View 4 Replies

Chat System With One Or Two Ways?

Jan 15, 2010

I'm trying con build a simple chat client/software (whole in on executable) wich start listen from the start on the port 5900 and when a client connect to that port the chat is established.

The problem is that only the client can chat to the server, the server cannot answer the client because the connection is working in one way.The i've tried to connect from "server" to the client when it establishes a connection but the system crash warning me that the port is already on use.

[Code]...

View 1 Replies

Different Ways For Playing Audio (MP3)?

Jan 28, 2009

I'm new to VB and have over the last week or two been looking at the different ways to play audio (mp3's). Windows Media Player, Microsoft Multimedia Control, Bass.dll, SndPlaySound, MCI SendString and DirectX (including audiovideoplayback, direct3d and directsound.) I originally decided to use windows mediaplayer, mainly because it seemed the logical choice but quickly found out I couldn't get it to work properly.

So I installed the Directx SDK but now I'm completely overwhelmed about what to use and why. I need to be able run the compiled code on a win 2k box, play an mp3 from start to finish then load and play another mp3 from start to finish and so on. Whats the difference between the varied choices and which would be the best for me to use?

View 5 Replies

Different Ways To Create Object

Jun 13, 2011

I want to know by how many different ways I can create an object. The most common usage I am aware about is:
Dim obj as ClassA = new ClassA().

View 1 Replies

Different Ways To Declare Variables?

Aug 20, 2009

I'm new to VB.NET programming.What I'm confused about is the different ways one can declare a variable.Would someone please explain the difference between the two declarations below? [code]

View 2 Replies

Different Ways To Play Audio?

Dec 10, 2009

I'm new to VB and have over the last week or two been looking at the different ways to play audio (mp3's). Windows Media Player, Microsoft Multimedia Control, Bass.dll, SndPlaySound, MCI SendString and DirectX (including audiovideoplayback, direct3d and directsound.)I origninally decided to use windows mediaplayer, mainly because it seemed the logical choice but quickly found out i couldn't get it to work properly. So i installed the Directx SDK but now i'm completely overwhelmed about what to use and why.

View 3 Replies

Different Ways To Sending Emails Using .net?

Jul 14, 2009

What are the different ways to send the emails using vb.net?

View 4 Replies

Ways To Play Audio?

May 4, 2010

I'm looking at creating an mp3 player to keep myself busy. However I'm trying everything I can to avoid using the windows media player COM component. It makes it a little too easyWhile looking around I stumbled upon the DirectX.AudioVideoPlayback namespace and I was wondering if this would be sufficient. Would I be able to create an equalizer and other more advanced things for my application?

View 2 Replies

Ways To Play Mp3s

Jun 20, 2012

Just found out the hardway that there is no longer support for Direcshow for VB.net and C#. Does anyone know other ways of playing mp3s in VB.net, or even video for that matter?

View 9 Replies

Better Ways For Reading And Writing To .txt Files?

Jun 29, 2006

I am trying to create a bunch of records, there will be a limited number of "Codes", about 50. Each "Code" is associated with a name from a textbox, I was trying to have it save each one when you click a button, to a .txt file.So, from the start the record will be blank, the person will go through the form, choose a number from a numerical up and down box, pick a name associated with it (both of these are mandatory and not implied). When they click the button, it will save the contents I talked about into a .txt file, say the number is #2, and the name is "Bob", the next time they try to change that value for #2, it will overwrite "Bob".

View 6 Replies

Compare Ways To Instantiate A DataTable?

Feb 17, 2012

Presuming "instantiate" is the appropriate terminology, may I get some insight as to which of these are better, more efficient,[code]...

View 3 Replies

Different Ways To Test DBNull From Dataset

Oct 6, 2009

Im using VB in VS 2005.I have found several methods of testing if a value from a dataset is null. Are there differences between these two ways of doing it:

[code...]

Is one faster than the other? From some searching online, there seems to be debate about the best way to handle null values.

View 1 Replies

How To Setup MyClass To Work Both Ways

May 7, 2010

I'm using VS 2010 so I have auto-implemented properties.I have a class and I want to access the properties by a string.[code]But, I also want to be able to access the variables something like this way.[code]How can I setup MyClass to work both ways?

View 7 Replies

VS 2010 - Best Ways To Store Values?

Oct 11, 2009

I want to store say like 8 values, that in the end will be combined into one string. What's the best way to store them? They should be reached in a own namespace I did. In a separate .vb file. I want to able to edit them. The values are both text and numbers. So whats the best way according to you?

View 3 Replies

VS 2010 2 Ways Of Reading All Records - Which One Is Best And Why

Oct 17, 2010

I have come up with this 2 methods of reading all records on a database table. Both work nice but I would like your expert opinion on which delivers best performance and why.We are reading table "DATA" and filling an array called lstData with the contents of the "Data" field.

1) Method one is using the bindingsourse to go through all the records.

[code]...

My guess is that the first method, while simpler to the eye could use more overhead. What I really would like to know is if the second method really delivers better performance and if it is worth doing all the manual SQL queries.

View 7 Replies

Ways To Declare/define Variables?

Feb 12, 2010

This is a VB.Net newbie question. I'm confused at the different ways to declare and define variables.Here's an example:

Dim URL As String = http://www.c-sharpcorner.com/default.asp
Dim request As HttpWebRequest = WebRequest.Create(URL)
Dim response As HttpWebResponse = request.GetResponse()

[code]......

View 1 Replies

What Ways Do People Know How To Speed Up Browser

Jun 12, 2011

What ways do people know how to speed up vb browser??

View 1 Replies

Application Config Suggested Ways Pro And Cons

Apr 6, 2012

I have a general question on app.config, or the best way to NOT hard code a SmtpServer.Host = XXXXXXXX setting. I wrote this very simple SMTP texting application and wanted to have the settings not hard code but a form that read or writes to app.config or .ini or registry. my question is the pros and cons? and if anyone hae suggested or a link to sample project that is doing what I'm after. I have a single .exe and am new to vb.net and either want the exe to check for app.config, ini or registry if does not exist to create and then save added config, if the exe runs again it uses the newly created settings.

View 5 Replies

Figure Out Different Ways Of Making Programs Work?

Jun 22, 2010

I've been going through a VB book I had while in College, and was trying to figure out different ways of making programs work.One assignment was to create a multi-dimensional array to figure out wind chill factors. The only part I really can't get to work right is using 2 numericUpDown controls. Using 2 dropdown menus was obviously easy because the items are indexed, but as far as I know, numericUpDown controls are not indexed.

Instead I used 2 selectCase statements to determine the index in each updown control, then passed the indexes to a function to determine the answer.The numericUpDown controls both increment by 5, (wind from 5 to 30) (temp from -20 to 15)Just looking to see if someone has any ideas of a better way of doing this.

[Code]...

View 1 Replies

VS 2008 - Other Ways Of Handling Events Without Using Methods

Aug 5, 2010

Whenever we need to handle events, we do it by creating a method which handles the event. Without creating methods; is there some other ways of handling events?

View 6 Replies

VS 2008 Ways To Update Application Files?

Mar 16, 2010

I am looking to get some information on updating my own applications. Because what I have to do at the moment is replace the files every time it changes so I would like to know what are the options available starting with the easier ones or does it involve any third party applications. For example I have noticed some applications checks the files before it starts up and then asks a user if he wants to update it

View 4 Replies

Ways Of Shortening The Amount Of Code Used, Or Changing It?

May 6, 2011

(I'm using 2010 express), which includes, i think, very basic knowledge of coding. I have made a game in vb 2008 express before and it was a basic arcade game where you move your guy from the left to the right collecting points and dodging enemies that are randomly moving in the opposite direction that you are. Now I am attempting to make a sort-of user interface similar to that of the ps3 home screen, as a windows shell replacement app..

so far i have got what I am looking for in terms of moving between the menus, however the code that I have made seems very extensive for such a thing (in my opinion)..the question I am asking is whether there are ways of shortening the amount of code used, or changing it to be more efficient..if someone is willing to help, I will post my code, or upload my project (if given instructions on how to do so)

View 5 Replies

Ways To Print To Pdf Using Itextsharp Or A Local Pdf Printer

May 23, 2011

Ive searched the forum and found numerous ways to print to pdf using itextsharp or a local pdf printer which is great. The problem I have is that "from what I can see" paths are specified to documents which are trying to be converted.Can anyone tell me if its possible for the VB code to point to say a pdf printer but not specify the document I wish to send. The reason for this (and if you've seen a simular post in the VB6 forum sorry - I decided to try .net). Im trying to incorporate the process to create an API.

View 9 Replies

Create A File Removal Which Revieve Directory Files To Delete From Text File

Feb 8, 2012

I want to create a file removal which revieve directory files to delete from a text file..[code]

View 2 Replies

Windows Xp - Get Full Permissions To Modify Boot.ini File And A Registry Value And To Delete A File

Jun 13, 2010

i am working on an application called logonscreenchangerxp i made my program and when i run it on xp virtualmachine i get errors the program is made using vb 2008 and using .net framework 2.0 i am not able to get full permissions to modify boot.ini file and a regisrty value and to delete a file

View 5 Replies

Delete The Transaction From Listview And Text File(temporary Log File) Using Button

Jun 6, 2011

Below is my code for DELETE button. What i want is if the user select the transaction from the listview and press the DELETE button it must be able to delete the transaction from listview and text file(temporary log file) which i keep all the transaction record. At the same time the list view must able show the total current balance from the deleted trnsaction.

[Code]...

View 11 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved