Creating And Accessing An Environment Folder?
Jun 6, 2011
I have written a data analysis program and I want to keep a list of recently accessed data files. I have kept this list in a text file in the same directory as my .ese file which is installed in a subfolder in my programs folder. But in Windows 7, it is not possible to write to files in the programs folder without assigning privileges to that folder which I found confusing to do. I would rather not subject clients to this process. It seems like a good place might be in one of the user folders. But I have no idea of how to go about establishing a path to such a folder in code. I thought it might be possible to identify an environment path such as %userapps% or some such thing that would work in both Windows XP, Windows Vista, and Windows 7. I would also like to generate a .log file in the same directory to aid in debugging.
View 3 Replies
ADVERTISEMENT
Sep 21, 2010
I need to create a DLL that's callable from C, that executes database queries and returns results. The first tool I reached for was VB, and I found it easy to create a DLL, but when I view the DLL using dumpbin /exports, I don't see any functions.
So, my questions:
1) Is VB the right tool for the job? If not, (The ideal solution would be a 3rd-party DLL that will let me do database queries -- a friendly higher-level wrapper above ODBC. I've searched around and come up empty, but maybe I haven't looked in the right place).
2) If VB is the right tool for the job, how do I export a class method so that it's callable as a function in a legacy C environment?
More details:
1) The target environment is Mercury Loadrunner VUGen. It's able to import DLLs and make function calls, but the environment is (non-.NET) legacy C.
2) My development environment is MS Visual Studio 2008
View 2 Replies
Dec 12, 2011
How would I create a dir Inside %temp%? Then extract the file to it and Open a That folder. So far this is my code.
[Code]...
View 5 Replies
Sep 3, 2009
In the above form the user will first enter a folder name and click the create folder button,then the folder will be created in the applications bin folder.I did the code for this:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If ComboBox1.Text = "" Then
[code]......
View 4 Replies
Jul 26, 2009
I have a button which on click creates a folder where the user wants. But as soon as the folder is created i want to save its name to the database(Access) The database contains one column named "FolderName"
Here lies my code that i tried:
Imports System.Data
Imports System.Data.OleDb
Public Class Form1
Dim con As OleDbConnection
[Code]...
View 6 Replies
Jul 5, 2009
how to access to a folder created inside the project from the code.i want, once the program installd in the machine it access to that folder and then access to the files which i want.i tried this : My.Application.Info.DirectoryPath() & "Docsa.docit works well in the developpment phase, but once the application is installed, it doesn't work
View 3 Replies
Dec 29, 2010
I'm writing an application in which the user can select files from a directory structure. My problem is that I only have the C: drive and a D: drive. I also need to be able to provide access to the "Desktop" directory structure. How can I add the Desktop directory structure to a "Directory" control? I basically need something like Windows Explorer.
View 9 Replies
Oct 15, 2011
I have some variables that are distinct by numbers, like in1, in2...If I have for loop, how would I access those variables, using the counter, and attaching it to the variable?I believe in JAVA, you could just use in+ct... where ct is the counter to access the variable.also how could you make a new variable in the for loop?Initially I had variables declare outside of the for loop. The problem was how to access those variables using the for loop.
var_nm1 = in1.Text
var_nm2 = in2.Text
var_nm3 = in3.Text
Dim nmList(2) As Integer
[code]....
This is object oriented programming, and I made the textboxes in1, in2, and in3 using the GUI editor. that was so easy.
View 10 Replies
Sep 24, 2011
I was reading from a book, and there's a way of creating database and accessing its tables using tools available in IDE. i-e DataSet, BindingSource, TableAdapter, BindingNavigator. Is this the correct way of using database or through the code??
View 2 Replies
Oct 8, 2009
From my vb.net code I am trying to set a printer name for the crystal reports printing
rpt.PrintOptions.PrinterName="johnKingHP LaserJet 2200 Series PCL"
But when I go to windows-->Start--> Run and enter JohnKing
It is showing me Printers and Faxes folder and Scheduled task folder. But when I open Printers and Faxes it will show the adderess as Printers and Faxes on JohnKing.
From my web application I want to sent the Printer name is the name shown above.
View 1 Replies
Aug 27, 2009
How to use Folder Monitor (or something else) to get the username along with folder activity?
View 1 Replies
Dec 15, 2009
I have VB6 Dll which I am referencing in vb.net ,I am calling the following function in it. It working fine in developemnt environment but not in deployement environment.
Error Method not found: 'Boolean MyUtils._MyUtils.LoadMyObjectRecords(ADODB.Stream ByRef, System.Array ByRef)'.
View 4 Replies
May 23, 2012
I'm not really much of a programmer, so I was hoping I could get a little assistance with a simple task.
Quite simply, all I want to do is create a small program that creates a new folder on my C drive, and inside that folder, I want to generate 99 subfolders, named 01-99. I want to be able to input the name of the new folder, click a button, and then voila99 subfolders inside it. That's all I need.
I am pretty good at creating forms, and I already have an idea of how to design it, but the code, nahhh. Thirty years ago, I could probably come up with a for-next loop, but not today.Would anyone be willing to provide a snippet of code that might do this? PS: If anyone is wondering why the heck I need 99 subfolders in a folder, here's why I have a car stereo that supports USB flash drives. I have a 16 GB flash drive, but the car stereo only recognizes 99 folders. There are far, far more than 99 folders on the flash drive, so I have to consolidate them. That's it.
View 4 Replies
Oct 8, 2009
Currently i developing a system which require me to create a log file.My code is working but I need to enhance it make the log file folder create automatically bcoz right now i have to create the folder manually in the debug folder.
[Code]...
View 5 Replies
Jul 20, 2009
I want to create a folder " c:imagebox " when the user runs my setup. I tried this in " Add special folder --> Custom folder " then a folder appears i renamed it to ImageBox and in default location i typed " C: " and set its property to always create but when i tested the setup on xp an vista i did not created any folder.
View 1 Replies
Mar 19, 2010
When I programmatically create a shortcut to a folder like this:
CODE:
All works fine.
But I need multiple shortcuts. I tried this:
CODE:
But it seems that VB NET is creating the shortcuts over the previous ones and all that I have after runtime is the last one - a shortcut to C:.
How can I create multiple shortcuts to multiple folders in the same folder?
CODE:
View 2 Replies
Oct 7, 2009
i am doing a vb.net windows application. in that i am creating one folder and making it shared and also assigning shared permission to SYSTEM. My code is as given below.
[Code]...
View 1 Replies
Mar 8, 2009
How would I create a shortcut of my exe file when its run, I can work out the directories and stuff but how would I actually create the program that it starts when windows boots?
I have done quite a few google searches and have found nothing to interesting or useful but I did find out that there is two main ways of doing this registry or startup folder and im more pulled into the startup folder because I dont think that I yet know enough about controlling the registry to be confident of using code like that, so I fall to my other alternative using the startup folder to trigger my program, I read somewhere that this doessn not work for vista but im not sure of that. What I would like to as is how you actually create a shortcut as I cant really understand VB6 Code very well its all I could find.
View 3 Replies
Jul 26, 2009
By this code i am creating a folder at a desired location:
Imports System.Data
Imports System.Data.OleDb
Public Class Form1
Dim con As OleDbConnection
[code]....
Now i want to create a .txt file in that folder.so how to proceed wirth this?
View 10 Replies
Jul 31, 2009
[Code]...
In the database i am saving the enitre path of the newly created folder along with the folder name..... but i want to save only the folder name in the database.... How to do this?
View 11 Replies
May 12, 2010
I'm creating a folder via this method
vb.net
Dim dib As IO.DirectoryInfo = New IO.DirectoryInfo(MainForm.MasterFolder & Now.Year")
If di.Exists Then
[code]....
How can I make this folder so no one can delete or rename it?
View 10 Replies
Jan 22, 2010
I tried googling it, but I couldn't find it.How do I create a new folder (not key!) in the registry?
eg:
HKEY_LOCAL_MACHINESOFTWAREMyProgam
View 4 Replies
Oct 17, 2010
I'm trying to save files in a new folder that get created and then copy 2 other files that are in my resources to that folder. I get this error:
Quote:
UnauthorizedAccessException was unhandled: Access to the path 'C:UsersMike.Mike-PCDesktopJava IDE' is denied.
This is my code:
Code:
Dim desktopPath As String = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)
Dim sdlg As New SaveFileDialog
[Code].....
View 13 Replies
Oct 22, 2009
how to create a list of the contents of a folder (T:ENERGY) using *.pdf as the filter. Also could this be adapted to read folders names and place that into a string ";" delimited to be called upon and modify T:ENERGY)?
View 6 Replies
Jul 15, 2009
if anyone knows the code for ftp upload and download, folder creation and a good server that supports uploading and downloading files from a vb.net application.
View 1 Replies
Nov 11, 2011
I was just wondering if this is possible. I have a site that admins use to add products to our database. The database is in SQL Server 2008 and I use Visual Studio 2010 using VB.net and was hoping that upon addition of a new product, it would automatically generate a folder assigned to that product's ID.I haven't found anything online that would suggest that this is a possibility, but it would make it a lot easier for me. As of right now, I have to remember to create a folder in the X: drive for each product that has been added. We are up to 645 products now,
View 2 Replies
Feb 9, 2012
I have to create a project management application in VB.Net Framework 4 which should create a client folder in a public folder in Exchange server.
I think the only way to create a public folder is through the management console. Is there a way to connect to the Exchange server and execute the creation command file from the code but I do not know how.
View 1 Replies
Sep 29, 2009
i am creating an app that will display the contents of a folder containing hundreds of other folders. these folders are in the following format <Movie.Name>[<Year>]i am trying to create a function that will filter out the years i.e. if i wish to search for movies from 2009 i could use the code 'FilterMovies("2009")' etc... and remove/hide the others.
View 14 Replies
Oct 22, 2009
how to get a list of all the files in my remote folder. I want to have them listed in a listview (whatever) and download them seperately.
This is the code I have so far:
vb.net
Imports System.Net
Public Class frm_download
[Code].....
View 3 Replies
Jul 25, 2009
Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Directory.CreateDirectory("D:Micheal")
End Sub
End Class
This creates a folder. How to create a folder by giving its name and path at the runtime?
not like changing the code and running it again and again
Directory.CreateDirectory("D:Micheal")
View 19 Replies