VS 2008 Creating/Changing Directories?
Dec 25, 2011
I'm having trouble creating a new directory for a registration form. When I try to execute this, the directory stays the same as it was and I have no idea what the issue is. I've tried altering the If statement in a few ways to try and produce the same outcome, but I can't figure a solution.
Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
clearVar()
txtUser.Text = newUser
txtPass.Text = newPass
If (Not System.IO.Directory.Exists(My.Computer.FileSystem.CurrentDirectory & newUser)) Then System.IO.Directory.CreateDirectory(My.Computer.FileSystem.CurrentDirectory & newUser)
[Code]...
View 3 Replies
ADVERTISEMENT
Sep 21, 2009
I'm creating that sets up project directories based on a template and also allows users to select folders from the template to add to a selected path (their project dir). I've got everything figured out as to creating the directory initially except for 1 thing that ties into another (stick with me here). I'd like to create the directories based on a text file or some sort of config file. Essentially, I would have a text file that contains lines like:
oot
ootsub1
ootsub2
[code]....
etc. Then when I create the directories, I can create them based on these lines. I think I can figure that part out myself. Where I'm stuck is on comparing the selected dir to the template dir. Right now I have a treeview control with checkboxes that is populated based on a path that the user selects from the folderbrowserdialog. What I need to do is compare the selected directory with the directories in the text file and if the directories exist (match) then they are checked. If they don't exist in the selected directory then they are unchecked.
If a user wants to add a directory from the template, they check the box for the dir they want and uncheck the boxes for the ones they dont. Then hit apply and the app will either create or delete the checked/unchecked dirs. What's the best way to handle the template dir? Should I do the text file thing or should I simply have the directory structure setup somewhere where the app can copy the dirs from the template to the selected directory? Or should I use an ini file? I want to make the app flexible so that down the road, if they change the template layout, or where the template lives, the app can be told that. So I need to add a way for the users for example to choose the template directory (but not everytime!) or specify the path that the template dir txt file lives.
View 10 Replies
Jun 6, 2011
I'm creating a program that creates new directories and subdirectories in the "C:Program Files" folder, and the operation fails if the user has the User Account Controls enabled in both Windows Vista and Windows 7. Is there a way I can give my application permission to automatically create these directories without requiring the user to turn off the User Account Controls?
View 2 Replies
Dec 14, 2009
I am using Visual Studios 2005 and I am creating an application for our IT Security.Part of the program is for documents and procedures. What I am trying to do is automatically create a menu based on the folders and files. So far I have it taking into account the base folder and one subfolder level and files within it, but I want it to automatically also take into account any subfolders and files that may be added at a later date without having to replicate the code below for each new level. My code is as follows, it is very messy as I am not a programmer.
Code:
Public Sub ISMSMenus()
Dim clsMenuName As ToolStripMenuItem = CType((My.Forms.FrmMainScreen.TSMISMS), ToolStripMenuItem)[code]....
View 1 Replies
Jul 29, 2011
This is currently the code I am using.
Dim fileList As Collections.ObjectModel.ReadOnlyCollection(Of String) = My.Computer.FileSystem.GetFiles(FolderDialog1.SelectedPath, FileIO.SearchOption.SearchTopLevelOnly)
For Each topLvlFile As String In fileList
[code]....
The above code reads all the files & directories in a selected path. It ignores any hidden folders, like it suppose to. Except it doesn't ignore folders inside of the hidden folders that it finds & I need it to.I can't quite wrap my head around how to make it ignore all folders & files inside of a hidden folder that it find.
View 3 Replies
May 3, 2010
[Code]....
it just creates 1 folder but not other folders with in folder.
View 1 Replies
Jun 2, 2010
First of all let me say im not trying to change the assembly of the main app (done by going to the properties etc..) I have an application which (On press of a button) creates a new file (Newfile.exe) i would like the user to be able to specify the new files version info etc... I have tried a DLL called Flash Dissasembler which I did not like.
View 7 Replies
Mar 18, 2010
I was trying the get subfolders a folder's to insert a listbox. But, directories listing with pathname. I need only the folder name.
View 7 Replies
Nov 9, 2009
I want to have a treeview as directory navigator I can view the first path of my dir (C:Dirmanin), I can list all files in and folders in this path, but I can't add the subfolders as node, and the subfolder of the subfolder...
Public Sub LoadFolderTree(ByVal path As String, ByVal e As System.Windows.Forms.TreeView)
Dim sbasenode As System.Windows.Forms.TreeNode
Try
sbasenode = e.Nodes.Add(path)
[code]....
View 3 Replies
Jul 3, 2011
I need to upload a large set of files and directories to my web server, all of the files that I want to upload to my server are located in "C:Files_To_Upload" directory, it contains thousands of files and maybe 100 directories/sub directories so I don't want to have to specify each specific sub folder and file - jmcilhinney's ftp example which I am currently working with shows a way to upload all of the files from a specific directory, but not subfolders and their files. How can I get it to also upload the sub folders and their files?
Code I am using based on jmcilhinney's threaded ftp example:
Private Sub UploadFolder(ByVal source As String, ByVal destination As String)
For Each file As String In IO.Directory.GetFiles(source)
Threading.ThreadPool.QueueUserWorkItem(AddressOf UploadFile, _
[Code]....
View 1 Replies
Mar 6, 2009
[Code]....
I am only getting files in current directory. how to get all files included the directory and all sub directories?
View 3 Replies
Jun 19, 2012
I need to list all files folders, subfolders and subfolder files under a selected directory in a list box not sure how to do the logic in the last amount of code lines to enumerate all subfolders dna files.Here is what I have so far:
Dim OldProfileDir As String
Dim NewProfileDir As String
Dim Newdocs As String = ""
Dim Olddocs As String = ""
[code].....
View 3 Replies
Nov 21, 2009
I have this small file search engine here made in VB.NET:
ListBox1.Items.Clear()
ListBox3.Items.Clear()
ChDir("C:")
Try
[code]....
It searches through your whole C: for the file you entered. Although the problem I get is that some directories get access denied or not existing directories.
View 2 Replies
Jan 21, 2011
I need to figure out a method to execute a task once my method to delete specific directories has completed.
Does anyone know of an event or property that I can tie to event to in order to do this?
I've been looking through MSDN, but I can't seem to find anything at the moment.
View 2 Replies
Dec 22, 2010
I've tried my.settings examples and the arn't working such as:
Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
[code].....
View 8 Replies
Nov 8, 2009
How would I be able to make a variable that holds the value of the directories that exist in the C:?
View 2 Replies
Mar 13, 2010
I have a button ad a list box, the button when clicked lets the user select a directory on the HDD, and then the app is meant to list all the sub directory's of that folder int he list box. However I cant seem to get it to list just the sub directory names, not the full paths, and also to only scan by 1 folder deep (selected foldersub folder).
View 1 Replies
Jan 15, 2009
I'm having some trouble with list boxes at the moment. I need a list box to display the names of directories that are in certain a folder. How can I do this?
View 3 Replies
Jul 11, 2011
Basically I'm going to try and develop a software that merges PDFs automatically using the PDFSharp API.What I want in the program is to basically that: Have the program to give and Input and Output directoryMerge all the documents in the directory or sub-directoryRename the merged PDF file according the the name of the directory/sub-directoryIf the folder has PDF files and a Sub-Directory I want to merge the PDF files in the folder and rename them as per the main folder, and rename the files in the sub-folder according to its name (i.e. seperate|)
It's the first time I'm using an API.The problem I have is how to use the directories and sub-directories as I need them.
View 2 Replies
Dec 13, 2011
I'd like to know if there are other ways to write a submission program (submitting urls or pad xml to directories, submission sites, blogs) other than using the webBrowser. I've evaluated some shareware programs that submit urls or data very quickly, like 100s in a matter of mins. I couldn't write a program using a webBrowser because it might take 15 secs just to load the url. How are they writing the code??
View 1 Replies
Sep 21, 2010
I'm searching for a way to change the font size of selected text in a RichTextBox (rtf) having different font families (e.g. Arial and MS SansSerif) and font styles (underline, bold...) using the FontDialog, but without changing the families and styles. The following code resets all the font attributes, which is not what I want:
[Code]...
View 5 Replies
Mar 20, 2009
I have a webbrowser1 and textbox and button is there anyway i can put an proxy in textbox1 and change mine to it ? so webbrowser1 can browse a website under that ip and not mine ?
View 2 Replies
Dec 31, 2010
I need to change my .exe's icon easily without having to rebuild it unless I can compile my code AND change exe through command line.
Reason for needing to change exe is for a small game creator so everyone doesn't have same exe.
View 5 Replies
Aug 28, 2009
How would I change the process name? Like if the program is named Program.exe, how will I change it so that in task manager it shows up as something like Program2.exe
View 7 Replies
Feb 1, 2010
with vb.net 2008 expressmy intention is to change the value of a variable to dbnull.value if the variable = ""so that i can insert null values in to the data base
Module sonsilaxa
Public Function deFcheck(ByVal i As String)
If Not i = "" Then
[code].....
View 5 Replies
Jul 24, 2010
I've read alot where users have disabled the UAC or tried to set the level higher in the manifest file. My application uses a control that requires admin user rights and I'm trying not to have it prompt the user each time. I read more about using the Impersonate another user in Windows for vb.net. Would using the impersonate user method not prompt for admin and give the user admin rights as long as it has the username and password? I hate to disable the UAC - not good at all!
View 14 Replies
Aug 22, 2009
I have a label where several sentences of text is displayed, 2 radio buttons below it and then a Button. Instead of making the radio buttons display a MsgBox, would it be possible to make the radio button (depending on which you choose) alter the Label where the text is?
View 6 Replies
Mar 4, 2009
I am trying to change the computer name and IP address of a client computer, doing so locally.Ideally, I would like it to look something like thisNew Computer Name: [TextBox]New IP Address: [Textbox][Button]That comes up when you click the executable and the program changes the computer name and ip and automatically reboots the computer to apply said computer nameI think have figured most of it, but I can't figure out how to get the my.computer.name out of "readonly" mode.
View 3 Replies
Aug 2, 2010
I am working on a a program that uses a textbox to display data from a telescope. Normally the data is standard ASCII characters, but there is one time when the data is displayed as blocks to indicate the number of degrees to go. The textbox font is set to Sans Serif in the property box. When I show the blocks, I want to switch to Wingdings. I have searched how to change the textbox font and tried several ways found, but none of them work. I know that the textbox will handle Wingdings - I can set the font property and it displays correctly.
The most common method I have seen is: txtDisplay1.Font = New Font("Wingdings",26.0, FontStyle.Regular) ,but like all the other methods tried, the font never changes.
View 7 Replies
Oct 26, 2010
I'm trying to change the look of some controls in VB.An example would be a button, I now have a stack of 4 images on top of eachother. By using the mouseover events and such, I get the same result as a normal button. However, I'd like to be able to insert those images into a normal button like thing.
I know it's possible to do this by creating a custom control, but that'd end up with the exact same code, just in a different file.
However, the real issue would be a dropdown box and slidebar. I'd like to get them to look nice with my theme. (Background, buttons, borders. Things like that..). I got absolutely no clue on how I should do that.
I know that there's a tool to create controls, but that's from scratch and I can't get a grip on it, at all.
View 10 Replies