Make A Program That Opens A File In The Folder The Program Is Stored?
Aug 26, 2009How do I make a program that opens a file in the folder the program is stored?
View 6 RepliesHow do I make a program that opens a file in the folder the program is stored?
View 6 RepliesI currently have a program that I made which opens other apps packaged with an installer. I have set the installer to install everything to the Program Files folder. However, not all computers have a C: hard drive. I have a way in which they can enter their drive letter in one form then in the next form it remembers the drive and will take them to the program. The problem is my program stores the drive letter in an xml file. On the startup of the program it looks in the xml file to find the drive letter, if there is no drive letter the form opens then lets the user set his drive letter. The xml file is stored in the folder "Math Wizard" in the Program Files folder. But if not all computers have C:Program Files I need a shortcut to the program files folder. I have been trying to use %ProgramFiles% (%Program Files% + "Math Wizardconfig.xml") but vb is saying that the % is an invalid character. Here's my code:
[code]...
I wan't to make a button in my program that opens it when the computer starts up but how would I do that? I am using Visual Basic 2008 Express Edition.
View 4 Repliesim trying to make a program that opens multiple urls in a webbroswer box. like a url opens and after it loads that url closes and moves to the next one.
example: i have around 4 to 5 url....
[URL]
so how do i make it so after it loads google.com it moves to the next url [URL] but i wanter to do that in the same webbrower box.
I have a program where a lot of the required information for it is stored in text files. I simply read this information into large arrays. However, I don't think it's necessary to load all the information each time. Rather, it would be more efficient if I could simply search through a list of items to find the one I need and then use the data from it, or to find a similar name and use it elsewhere.
Would I be right in using a database? And is database programming done in SQL? I have a book on it telling me to use the SQL Server (IIRC), so I shouldn't be doing it in the VB.NET Express GUI?
Here's an example of what I would do:
Hex = 03 00 => dex number 003
Search in file Pokemon Dex Numbers
003 returns Bulbasaur
Check Bulbasaur base stats in the base stats file
etc
So basically I'm reusing a lot of information. I think a database would be best and it would all be internal right? I'm getting complaints about access denied to a text file (since it's stored in the program directory in the program files).
So to cap up the few questions I have:
-Databases are done in SQL and not inside the GUI?
-Databases would load internally?
-I could search a database without having to load it into like an array or something?
I'm trying to make a file.copy to the program files folder but can't get access to it.This is on windows vista and 7.
View 6 RepliesI want to be able to double click a custom file that contains text and it pulls up my program and adds the text in the richtextbox.
Basicly I created a file extention called .pwt but I can't get it to load the text stored in it on the richtextbox.
Need to design a program that can encrypt and decrypt messages stored in simple text files using a private key stored in a separate file. Software should also be able to allow the users to enter simple messages that either displays the encrypted or decrypted message. The encryption method should use a simple substitution method. It should be set out in the following format:
Example (the "@" is the separator):
@
The character The Code End of line
A @ 4gh EOL
B @ 84!9 EOL
Has to use the 256 ASCII character codes. The separator will be used to separate the character and its corresponding code.Here are the pseudocodes I have come up with:
� Read any private key file
separator = readline(file);
while not EOF(file) do
tempStr = readline(file);
[code].....
Im trying to use a Settings file that the program opens and reads the info from when it loads BUT when the user chooses a custom color (ex: ff5f67d6) How can i assign the form background color to that color code?
Dim BgColor As Color = ColorTranslator.FromHtml(Settings(0))
Me.BackColor = BgColor
Settings(0) = the color code
that is the code i tried to use that doesn't work
the first problem is getting my program to load rss feeds from other websites mostly here:http:[url..... im trying to load it using the webbrowser. i want the rss feed to load right onto the form. im positive that its possible. i have the imports system.net in my code already for xml documents.the second is i cant get my program to write into a file that is several folder deeper into the bin folder.[code]......
ive tried playing with the code moving around the folder names, making sure there capitals are correct, etc. but nothing works. it creates the file in the wrong spot.
Is it possible to build a program through VB that creates a folder in program files folder and behaves like any other usual program?If not, though witch program can i make this?
View 6 Replieshow to make a simple folder locking program and sorry don't have any code for it.
View 2 RepliesHow do i make a folder that my program makes hidden. I am using (MkDir)
View 5 RepliesI use VB 2008 express edition and i have this problem.I want to make a program that password locks any folder you want.(Using Icacls from command promt).My problem is that when i run the program
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If My.Computer.FileSystem.DirectoryExists(TextBox1.Text) Then
[Code].....
All this is done becouse i can't save the listbox contents in My.Mysettins.If anyone would be able to show me how to do it i would be helpfull.But please don't give me 50 lines of ununderstandable content.I want something that i will be able to understand becouse there no reason if i use it without knowing what it does.
I need to have my VB program look for two specific programs in the same folder it is running from. How do I do that?Here is the code for when I run my program. I need it to look for the files that are underlined. They are the tpfh20 and tphd20.
Private Sub btnRunRelap5_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles btnRunRelap5.Click
Dim pathString As String = String.Format("relap5 -i {0} -o {1} -r {2}", txtInput.Text, txtOutput.Text, txtRestart.Text)Dim stripString As String = String.Format(" -s {0}", tbStripFile.Text)
Dim guiString As String = " -n gui"
Dim waterprop As String = " -w tpfh20 -d tphd20"
If Not lblChangeStripFile.Visible Then
[Code]...
how i can write a program to create a shortcut in the startup folder of a different program. So i have one program on my computer that should run at startup, i just need another program to create a shortcut to it, and then copy this shortcut into the startup folder.
View 20 RepliesI'm trying to make a notepad, but I can not get it to open files on start up.what i mean, example, I right click on a text file on my desktop and select open with and then my program(it opens the program with a blank textbox, it does not open the text file)I do not know the code for makin this come true
View 4 RepliesHow can we know folder is using some other program or thread? what if happen if two different threads are trying to deleting same folder recursively at the same time. how can we know folder is using or deleting some other thread before try to delete that?
View 1 RepliesHow can i open a file (like .mp3 , .avi) or a folder (like C:program files ) using my program? I use visual basic
View 8 RepliesI am creating a program that has many text boxes and labels on the form. I want to be able to edit fields close the program and open it up so that the form opens with the last editing I did in the fields.
View 1 RepliesHow can I combine specialized string collections so that I can accomplish this :
-Save all the tab's texts from a tabcontrol
-Save contents of the tabs : eg.Every tab contains a label and I save the text of each label
And the real problem:
-Loading them when the program opens
I have made some thoughts about saving them, but not about loading them
setting.TabNames.Clear()
setting.TabLabels.Clear()
For Each item As TabPage In TabControl1.TabPages
Dim name As String = item.Text
setting.TabNames.Add(name)
[Code] .....
How do I open this .REG file in Visual Basic 2010?
I'm trying to make a program that will launch this registry file that I've put already in the Resources folder of the program.
BTW if you're curious it's not a harmful program I'm making.
So all I've done so far is put the file in the resources folder of the program, but I don't know how to actually launch it.
I have a program that reads the version of a program off of a txt file in the program folder and off a txt file hosted off a site and compares them. If it's different it downloads the update, if not then you can use it. My problem is when I update it. It doesn't replace the version in the file. How would I update the version on the txt file in the program folder when it gets updated.
View 7 RepliesI have ran into a small problem with my code. I got bored lately so I wanted to try a project. A program that will start up with windows starts up and it opens a webpage like google.
My code is below.
Imports System.IO
Public Class Form1
[CODE]...
I use the code [code] System.Diagnostics.Process.Start [URL] when a button is clicked, but when I add that code in without clicking a button, it does not work. I have tried to put it everywhere, but it just does not work. I have also looked it up.
I created a webrowser in VB.net to track employee usage and it seems to be working fine but I wanted to find out what it would take to set this as a default browser on a PC.I also would need to know how to pull the URL from shortcuts so when the program opens I can have it open to the URL in the shortcut.
View 7 RepliesI need to create/get a simple program that opens up a webpage, writes to a log if it is successful or not, logs out and repeats 5 minutes later.I'm not a coder myself, and I have no coders available at my work, I do on the otherhand have access to Visual Basic .NET 2010.
View 5 RepliesI'm developing the program which opens files/programs that I have selected and checked with checkbox1, 2 and 3(i haven't coded the tihrd one yet, but it doesn't affect). The first program runs instantly and others run after X interval if it's wrote in textbox4 and checked by checkbox4. So Checkbox is like an activator for this interval. If checkbox4 isn't checked then every program should run instantly. The problem is that checkbox4 isn't doing a job. Program activates the interval if there are somekind of numbers in textbox4. It doen't matter that is the checkbox4 checked or not.
Here is the
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[CODE]...
And here is the screen of the program:
I make an application and make setup file using VS setup project. This work fine and create default text files into Program Files Folder for winodw 7/vista .but can not modify these files or create any new files.There are few text files need to create ,modify during application running ,but in windows 7/vista unable to create,modify files.I am using full default admin right for these OS. If iuse C: root path then application work fine or for win XP no problem.I think UAC restricting to perform these opeartion. But i do not know how to change these restriction using vb.net, whenever application start.
View 5 RepliesI have an issue with the Windows permission system. And every time it tries to do something that needs a windows permission (to be ran as administrator) it fails !
At the moment I was trying to implement an updater which should download a file from an ftp site but because copying a file into one of the program files folder requires a permission I am not able to do this.
I make an application and make setup file using VS setup project. This work fine and create default text files into Program Files Folder for winodw 7/vista .but can not modify these files or create any new files.
There are few text files need to create ,modify during application running ,but in windows 7/vista unable to create,modify files.I am using full default admin right for these OS. If iuse C: root path then application work fine or for win XP no problem.I think UAC restricting to perform these opeartion. But i do not know how to change these restriction using vb.net, whenever application start.
I found one solution that , if change user rights manually then this problem solved.Follow these step to change your account settings.Control Panel-->User Accounts and Family Safety-->User Accounts-->Change User Account Control settings-->Never notify(Set tab to never notify).After this change need to restart system.Now can make all changes like windows XP into Windows 7.can also make changes into program files.
Its working fine, but need to make these changes manually in OS.but its not efficent solution. So if any one knows how can make these changes by coding that will nice.