Discover The User's Desktop Folder?

Jun 24, 2011

I'm making a little application in visual studio which loads a ROM in an emulator. I have two emulators and 20 ROMs.I made a form and added a few buttons. When you click the Button it opens a new form and closes the old one. Then on the new form I have four buttons: each one loads a different ROM in an emulator. So when you press Button1 this code is triggered:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles yellow.Click
Shell("C:UsersshiftyDesktoppokemon gamesEmulatorVBAVisualBoyAdvance.exe ""C:UsersshiftyDesktoppokemon gamesRomsYellowPokemon Yellow.gb""", vbNormalFocus)
End Sub

It works fine - I click it and it loads the game in the emulator. The bit im having trouble with is the file paths. If I send this application to a friend, it would still look for "C:UsersshiftyDesktop" - but that's on my computer, not his.Is there a way to make the application look for the file on his computer (without changing the file path to (C:Users""his user name""Desktop))

View 4 Replies


ADVERTISEMENT

Detecting Which Folder Desktop Is In?

Oct 21, 2009

usually the desktop folder is something like:

C:UsersusernameDesktop

is it possible to detect where the desktop folder is using vb.net?

View 1 Replies

Error; The Folder Desktop Cannot Be Used

Jul 27, 2011

I have a button click on my form, when I click it I receive the following error; The folder Desktop cannot be used Choose another folder

OK

When I click OK,

it opens My Documents, My computer then I can browse through the drives..

We have restriction in my work place and cant open the desktop, therefore, I wish to change the code to go straight to my computer where all the drives can be seen..

Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim fbd As New FolderBrowserDialog

[Code].....

View 5 Replies

Accessing Desktop Folder From Code?

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

Copy The Log And Paste It Under A Folder In Desktop?

Oct 15, 2011

I'm writing a small app to collect IE command diag. The problem is it's not waiting till the process finishes and it's errors out in the next line. My goal is to copy the log and paste it under a folder in Desktop

Try
Process.Start("C:Program FilesInternet Exploreriediagcmd.exe")
My.Computer.FileSystem.CopyFile(USERPROFILE & "DesktopIEDiag.cab", USERPROFILE & "DesktopW8IEDiag.cab",
Microsoft.VisualBasic.FileIO.UIOption.AllDialogs,

[code].....

View 3 Replies

VS 2008 Why Can't Create Folder On Desktop By VB

Jan 10, 2010

I don't know what went wrong, but I am not able to create a folder using the following code

My.Computer.FileSystem.CreateDirectory(Environ("%UserProfile%") & "Desktopabc")

View 5 Replies

Add/remove Application Shortcuts From The Startup Folder Or Desktop?

Apr 11, 2009

How do I add/remove application shortcuts from the Startup folder or Desktop?

View 1 Replies

How To Display Folder On Desktop (screen) After Exit VB Program

Oct 17, 2011

how to display folder on desktop:What I did was:My program read external text files and generate word documents files on d:stage-in.After program finished (exit VB application), how to display folder "d:stage_in" on screen.

View 3 Replies

Move All Text Files To A Created Folder On The Desktop?

Jun 9, 2011

I want to create a program that I can create a Text file folder on my desktop and move all the text files into the folder.

Here is what I have so far:

Below is where I create the Text folder:
Dim myPath As String = IO.Path.Combine(My.Computer.FileSystem.SpecialDirectories.Desktop, "Text")

[Code].....

View 5 Replies

Folder Selection - Enable The User The Ability To Select A Folder And The Folders Music Files Populate A List Box

Jan 6, 2009

Basically I am trying to enable the user the ability to select a folder and the folders music files populate a list box. I want two list boxes on the page, one with all the contents of the folder and then the other one for files selected from the first box. I have no clue on how to do this at all...

View 4 Replies

Call A Class From The Code - 'Calculate Size Of Desktop Folder

Mar 19, 2010

How would I call a class from the following code?

'Calculate size of Desktop folder

Public Sub Ck_Box_Desktop_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CK_Box_Desktop.CheckedChanged

[CODE].......................

View 3 Replies

Way For Software To Discover Others On Network

Feb 5, 2010

I am developing a system where multiple client apps are going to communicate with a server app. I will probably use TCPIP classes to facilitate the communication.

However, is there a way that a client install can automatically discover the location of the server software on another machine?

View 1 Replies

VS 2008 Play Sound Files That Are Located In Folder On Computer's Desktop?

Feb 13, 2011

In my application I play sound files that are located in a folder on my computer's desktop.

Const sSoundFolder = "C:UsersChrisDesktopSound"

Now that I'm ready to deploy my app, I want to reference all the audio files so others can hear them in the application.

I read how to reference them... but what I don't know:

Do I have to change the above code to some sort of reference folder in my application instead of my desktop?

View 3 Replies

Discover If Excel Running In Browser?

Feb 1, 2012

I have VSTO Excel addins (.net 3.5) and need to know when the Excel wookbook is being opened in a Browser rather than the Excel client. I haven't figured out a way to do this nor found a solution online and I suspect I am just not using the right seach words. Does anyone know how to do this?

View 2 Replies

Make A Program Discover Its Own Directory?

Oct 7, 2009

I am trying to make a program that is able to find out where it has been saved on the computer, and take that directory and save the output of the program, which is a text file, to the same folder that it is in.

I have already made it so that I can type in the directory in my code, but i want it to be more adaptable.

View 3 Replies

VS 2008 Discover A Window Class Name

Jun 21, 2009

how can i Discover a Window Class Name ?

View 3 Replies

Generate A .exe To The User Desktop?

Nov 1, 2009

if i have a form called form1 and a button on that form could that button be clicked and then it generate a .exe to the user desktop?

View 3 Replies

Locate An User's Desktop?

Feb 2, 2010

I am making a program that stores all information that is entered into a directory and then zips that directory onto the C drive. It is working perfectly fine, but I think it would be easier for the user if the final directory was zipped onto the desktop.

Is there a way that VB.Net can locate the user's desktop and then zip the directory and place it on the desktop? For example, zipping it to "C:Documents and SettingsAdministratorDesktop" would work on my PC, but it may be different on a user's computer.

View 4 Replies

AutoLoad - User Load Application Will Automatically (without Prompt, Or User Selecting) Upload All Files In A Folder

Jun 13, 2010

How can I do it so every time the user loads my application it will automatically (without prompt, or user selecting) upload all the files in a folder i select beforehand and add them into ListBox1

View 16 Replies

Any Way To Locate Desktop Path For User On Another PC?

Jun 1, 2012

VB2010. I'm trying to figure out how to locate the desktop path for a user on another pc/server. Something similar to:
Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
The main reason is we area talking about an Environment that has XP, Win Server 2003 (TS), Win Server 2008 and Win 7. Obviously different path depending on the OS. I need to copy a file to a users desktop and would like to do so without having to hardcode the path as it could change depending on where they are working from.

View 10 Replies

Create A File On The User's Desktop

Mar 4, 2011

As part of a program for class we were instructed to create a text file on the user's computer. The instructions were to create the file to the C: (or the same drive as the Windows directory) but Windows7 requires Admin privileges to write to this directory. It works great if I run Visual Studio as admin, but I'd rather just write to an unrestricted area. For example the desktop. Is there a way to write directly to the user's desktop without knowing the user's username. Right now I'm using this "c:UsersNickDesktopScores.txt"; which works but of course the user's name is different on every machine. How would I go about specifying the user's desktop?

View 10 Replies

Disable User From Entering Desktop?

Jun 6, 2011

How do i disable user from goto desktop and when they press Control+Alt+Del it must prompt with admin username/Password.Is it possible to do....i have created a login page but i have no idea on how to make it prompt when user press Control+Alt+Del

View 3 Replies

VS 2008 : Get The Argument For The Desktop Of The User?

Sep 5, 2009

I cant remember which one it is , i looked in Application. and My.Application but couldn't find it, i want to get the argument for the desktop of the user?

View 2 Replies

User Specified Folder Name Vs Folder Dialog

Mar 18, 2009

In my application, user can select a folder via folder browser dialog box.

However, I want them the freedom to type folder name manually as well.

When they select folder path via folder browser dialog box, everything runs fine.

However, VB is not accepting user typed folder path eg. "C:Appjob"

View 7 Replies

Method To Develop And Deploy A Multi-user Desktop Application?

Sep 17, 2009

I have developed an application using vb.net. This application will run on approximately 15 machines at the main office and also roughly 10 machines spread over 3 different locations. I am using SQL Server Express edition in the backend. I deployed the application on the network using caspol but it is extremely slow. The Company Manager's perception is that because a script will invariably have to be deployed on each client machine to configure CASPOL, that the solution is not viable.

What is the best method to develop and deploy a multi-user desktop application?

View 9 Replies

Shortcut On Desktop Takes To Application Folder Not Running The Application?

Oct 21, 2010

I am trying to use Setup project. Want my setup to create a desktop shortcut with my application.I donot understand how to do it. Clicked on User's desktop, I created Shortcut to User's desktop, changed the properties Target and Working Folder as 'Application Folder'But it does not connect with MyApplication.exe When I ran the setup and tested Desktop short cut, it took me to the folder where application was installed, instead of running the application.How to make the application run using this shortcut?

View 1 Replies

Application To "discover" Wireless Networks In The Vicinity?

Apr 29, 2011

I would like to create my own application that will simply discover the wireless networks in the area, similar to how the wireless card software works. I don't really know where to start, except with maybe the System.Net namespace.

View 2 Replies

Open Excel On Local Desktop Using Remote Desktop Application ?

Jun 11, 2012

We have a Windows Forms VB.NET application running on Windows Server 2008. Users access this app using Remote desktop.The app displays information in Excel, but Excel opens on the server.Is there a way for the .NET app to launch Excel on the users local desktop?

View 1 Replies

Start Explorer.exe - Switching To A New Desktop It Starts A New Instance Of App In That Desktop?

Sep 5, 2011

Some of u already know I'm making a 'virtual desktop'- thing.Only one problem. When switching to a new desktop it starts a new instance of my app in that desktop (works) and on the form load event it says process.start("explorer.exe") <- here is the problem. It only shows a window not the actually bar.Also this may be important it shows the window, but when I navigate to explorer.exe 'C:Windowsexplorer.exe' and open it there. The explorer bar does show up.

View 14 Replies

Allow The User To Create A New Folder?

Jul 14, 2011

How can I allow the user to create a new folder and tell it where to be saved? I was thinking of using the savedialog but I don't know how to use it for folders instead of files.

View 3 Replies







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