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
ADVERTISEMENT
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
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
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
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
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
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
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
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
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
Apr 11, 2009
How do I add/remove application shortcuts from the Startup folder or Desktop?
View 1 Replies
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
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
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
Mar 15, 2009
I need a code to work to simply open the my document folder.However, I tried using open file dialog:[code]
View 4 Replies
Feb 23, 2009
I have an ASP.NET (C# Code-behind) code. I need the very same functionality in one of my VB 6.0 program. As the code is too complex, I don't want to replicate it in VB once again.
Now, is there any way to access my .NET code from VB?
View 5 Replies
Aug 14, 2009
technique for calling VB.NET methods (C# methods as well) from VBA code?
View 2 Replies
Jan 9, 2010
Dont even know how to word this, reason I'm having so much trouble finding out the answer in help.But, basicly I'm trying to get data from many different text boxes named similar from my form, example:[code]where i would count up in a for and next statment from like 1 to what ever.
View 17 Replies
Jan 13, 2011
I now need to pass this string into .net object.I have tried to below to no avail; the message box is empty.
Dim SourceTextBox As TextBox
SourceTextBox = CType(FindControl("search_input"), Tex
[code].....
View 9 Replies
Apr 16, 2010
I need to get the decibel level of sound being sent to the sound card (not the actual sound level the speakers are instructed via volume level).
View 3 Replies
Apr 21, 2010
I am trying to programatically use my SQLdatasource in my code behind so that I can select a certain field from a table based on the selectedindexchange event of a listbox control on my form. I have one datasource already set to the listbox control but i want a seperate datasource to select a field based on the value of the listbox. I declared a new datasource sqlDataSource2, set the connectionstring to the same database/table and i have the following line set for the select statement
View 1 Replies
Jan 15, 2009
Anyone knows the code to REFRESH the WINDOW DESKTOP by clicking a button from a form?iCzZz...^^Private Sub Button1_Click(ByVal senderSystem.Object, System.EventArgs)les Refrh.Click
View 12 Replies
Dec 17, 2011
Is it possible to hide desktop icons with code? If yes could someone give me clues?
View 7 Replies
Nov 6, 2011
I have a HTML checkbox which will perform a simple validation on another textbox, so the textbox will only be enabled if the checkbox is checked, but I also want to access this checkbox control in code behind to check and uncheck it. I don't think I can use the runat="server" because on the onClick event which will cause ('<%=uitxtVouTypeRedeemValue.ClientID%>') to be output as plain text.
<input type="checkbox"
onclick="document.getElementById('<%=uitxtVouTypeRedeemValue.ClientID%>').disabled =(this.checked)?0:1" id="uichkVouTypeRedeemable" />
View 2 Replies
Oct 31, 2010
I am trying to access objects created at run time.The following code works IF Options Strict is off. If it is on it indicates "Option Strict On disallows implicit conversions from 'System.Windows.Forms.Control' to 'System.Windows.Forms.TextBox'."
Option Strict Off
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim txt As TextBox = Me.Controls("T3")
[code]....
I am having trouble formulating the type conversion.A Second problem I am having occurs when I create a groupbox at runtime and then add the textboxes to the groupbox. I am having trouble drilling down to gain access to the textboxes inside the groupbox.
View 4 Replies
May 20, 2012
How can I change my code # to Code & in All the text files within a folder
View 10 Replies
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
May 13, 2011
I am using Entity Framework 4.1 code first+MVC3 and the inheritence stratagy that I use is TPC
I have the following classes
Public Class ObjectBase
<Key()>
Public Property Id As Integer
Public Property Description As String
End Class
[Code]...
Question 1 (and question 2) should be very simple, but I have allready spent hours on Google to find an answer with no result at all. The only thing I have found is that you can get all computers in ObjectBase by writing context.ObjectBase.OfType(Of Computer), and that does not help since you cannot write context.BorrowObjects.ObjectBase.OfType(Of Computer) code samples in VB.NET (if you can), but more importantly: Please ensure that the codesamples you supply work without hours of modification!
View 2 Replies
Jan 1, 2010
Suppose I want to broadcast CTRL+C to my program without using complicated code (accessing Windows API) to do it.
View 3 Replies