I'm writing an import application that import .csv files into my SQL Server 2005 database.When the import is complete I need to change that files extension from .csv to .imp with the same path. I've tried using the following:
I declare 2 tab pages and add them to a tab control. These 2 tab pages have different texts: Products and Support and the text's forecolor is black. Is it possible to change the text's forecolor of the second tab page to blue and keep the text's forecolor of the first page as black? e.g., Products is in black and Support is in Blue.
I am using VB 08 running an openfiledialogue wanting to get the result of the GDS file (*.gds) to be the default extension at the drop down menu instead of All file when the openfiledialogue box opens.
but the results i get in the open file dialogue box remains as all files being in the drop down menu as the default file extension. How to i set it to ".gds" format?
I have File Like "Sample.bak" and when I compress it to be "Sample.zip" I lose the file extension inside the zip file I meann when I open the compressed file I find "Sample" without any extension.
I use this code :
Dim name As String = Path.GetFileName(filePath).Replace(".Bak", "") Dim source() As Byte = System.IO.File.ReadAllBytes(filePath) Dim compressed() As Byte = ConvertToByteArray(source) System.IO.File.WriteAllBytes(destination & name & ".Bak" & ".zip", compressed)
Or using this code :
Public Sub cmdCompressFile(ByVal FileName As String)
'Stream object that reads file contents Dim streamObj As Stream = New StreamReader(FileName).BaseStream
[CODE]...
I need to compress the file without loosing file extension inside compressed file.
I need to be able to find files in a folder where the extension can be either caps or small letters. Here's my code:
Code: Public Function GetIcon(ByVal name As String) As Icon Dim execAssembly As Reflection.Assembly = Reflection.Assembly.GetExecutingAssembly Dim stream As System.IO.Stream =
[Code]....
How can I modify that function to return the file regardless of whether the extension is in caps or small letters?
This is in VS2005 for a .NET 2.0 Compact Framework project
Recursive File Copy based on file extension. I have a single root folder that contains numerous folders that contain a few files that I want to extract. For this example, lets state that I want to copy all �txt� extensions and put them into a repository folder.
Why would I use an extension method instead of just creating non-extension sub or function?
For ex, I could have an extension function called IsNullOrEmptyOrAllSpaces on String, which does a check as its name implies. Or I can write a stand alone function that does the same thing. Other than having the extension show up in Intellisense, is there any advantage? Is a call to the extension quicker/more efficient than a call to a regular function?
Using the below code I want to set the '*' to any file. This folder (C:ewtemp) will only have one TIF file in it at a time so I want it to use that file as TextBox1, but that filename is dynamic, but always with extension .TIF.
I want to create my own extension without changing my registry file. I have a VB.NET project and I firstly want to create my own extension like ".abc" afterwards if there is any file like xxxxxx.abc when a person try to open this file I want windows to startup my project and open that file.
i want to create a new file extension like, .newprog file.and i want it to be able to get back by opendialogbox. i want it to store the control of my form that will be at different place on the form.
i'm using vb 2008 express edition and i'm trying to create a little software and i need to know how to change an extension of a file :like from myfile.rar to myfile.flv only to change the extension,not convert it or anything. and also can you tell me how to terminate a process like: microsoft paint or firefox?
I'm trying to save this picture from a website automatically, but the problem is there is no file extension. I tried the following code, but it always gives me an error:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load My.Computer.Network.DownloadFile("http://www.hackthissite.org/missions/prog/2/PNG/", "C:PNG.bmp") End Sub Error: An exception occurred during a WebClient request.
P.S - I believe the reason it doesn't have an extension is because the picture changes each time the url is loaded (probably through a php code). I'm not too sure on the specifics, but the lack of an extension is what I am having problems with.
I am trying to copy a file from one location to other by clicking on a link label.the original file is saved at "D:\New Folder\" and the complete address of the file is stored on the link label.whenever i click on the click label, a form appears with three button Open, Save as, and cancel file is opening normally but when i click on save as , save as dialog box appears normally, but after entering the file name when i click on save button, file is saved on the destination but without any extension.
Here is the code...
ext1 = System.IO.Path.GetExtension(LinkLabel3.Text) saveFile1.DefaultExt = ext1 saveFile1.Filter = ext1 + "All Files|" If (saveFile1.ShowDialog() = System.Windows.Forms.DialogResult.OK) And (saveFile1.FileName.Length) > 0 Then System.IO.File.Copy(Form3.LinkLabel1.Text, saveFile1.FileName.ToString) End If
now am doing circuit simulator using vb.net, now i need save this file with new extension .zen so i need code for this file save ,open and print in vb.net then i need to konw what are the properties to set in windows form to save ,open and print the file
I am trying to populate all the files i find with a date time stamp extension . My extensions look like this .20090911 and 20091130 and so on. I cant seem to get that to show me in my Lstbox [code]...
When I open appl.exe in C: , app1.exe call in app2.exe and then app2.exe will run and app2.exe will give the file location of app1.exe with extension such as C:app1.exe in run time. Here I wanna know how to reveal the location of calling application (app1.exe) with extension from app2.exe. I mean that app2.exe is called by app1.exe and when app2.exe is running, I wanna reveal the location of app1.exe with extension from app2.exe.
I suppose I have two applications such as app1.exe in C: and app2.exe in D: .When I open appl.exe in C: , app1.exe call in app2.exe and then app2.exe will run and app2.exe will give the file location of app1.exe with extension such as C:app1.exe in run time.Here I wanna know how to reveal the location of calling application (app1.exe) with extension from app2.exe.I mean that app2.exe is called by app1.exe and when app2.exe is running, I wanna reveal the location of app1.exewith extension from app2.exe.
i think this is related to savefiledialogbox..but i dont know how i can make a new extension that can be read by my program only. for example i have labels in certain position. i can be anywhere in the form. in each label.text have a value.
how can i do a save file to a new extension. for e.g save to .newprog file. so that only my program can read it.
I am working on a project where i have yo save the records of application in a file having my extension( like .myex) and i want that when anyone double click this file,it gets open in read only format ,it should not be opened in .txt,.pdf or in any format ,this extension must be saved in registry also (regedit)
I am using Vb.NET2008 to develop Window Application. When the user enter the File Name on the textbox, I need to check the file name to ensure that it has the File Extension. (Eg. Sales.XLS) I have not done the coding before and stuggling with it.