Paths To External Resources?
Feb 16, 2009
I am preparing a project for distribution, and I need advice as to how to establish my paths to some of the dynamic data elements; sound clips, external imagery and a database.I am reading the environment.startuppath, but it's pointing all the way in to the debug folder, whixh I'm sure I'm not going to be using when I publish things for distribution.I was hoping for something that could establish a relative base folder, and then just reference a few subfolders from there.
View 14 Replies
ADVERTISEMENT
Aug 27, 2011
I am trying to write a simple standalone windows forms project that basically contains various buttons which run external application setup files. The problem is I want to be able to run it from a USB stick. I have created a folder inside the project with all the files I need to call in it. I am using Process.start but the paths are obviously going to be wrong when the project is running from the stick as the drive letter may be different each time. How do I over come this.
View 1 Replies
Apr 12, 2010
I want to create a vb.net project that I will use to only hold image and string resources that I will need in multiple projects.What I can't figure out is how do I access these resources using code from other projects.
View 1 Replies
Feb 26, 2010
My current solution consists of several Class Libraries and a Website. I'm in the process of globalizing the application and I realized that my resources need to be accessed by all the projects not just the website so placing my resources in the App_GlobalResources folder didn't work. I added my resources to one my class Libraries and now I'm trying to figure out what the best way of accessing the resources are from my markup. When my resources were in the App_GlobalResources folder I was able to access them by using an expression such as this: <$ Resources: MyApp.Name %> for server controls
Or <%=Resources.MyApp.Name %> for plain text
What's the best way of accessing my Resources from my website aspx files now that they are in a Class Library DLL?
View 2 Replies
Jan 22, 2011
The thing is im making formless application, thats visible in tray only.. But i have like 21 icons for default functions.. and when my program launches all icons with the exe file is loaded in RAM. Is there a way to use an external resources file, where all the icons is stored, so when application needs one it takes it from rscx file and loads it, and when it needs other icon it releases the one taken and takes other.. Im asking this not just for ico files, but for any file types that can be stored in my.resources..
View 3 Replies
Feb 28, 2009
i'm unable to debug my project that i made. i save it and everything, but it just won't playit says Warning 1 Could not find type 'WindowsApplication1.My.Resources.Resources, Time table'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built. C:SchoolIPTTime table, using 2 loopsTime table, using 2 loopsForm1.Designer.vb 123 0 now when i open it up and try to debug it , it comes up with an error, i even try referencing it but it does nothing ,
View 2 Replies
Feb 3, 2012
I wanted to know if it is possible to Zip a folder without any external dll nor any external references - just with native features.I've been able to Zip files with System.IO.Packaging, but it does not include folders and I cannot tell it to Zip the parent folder.I know there are external dll and so, but I'd like to know if it's possible to make it from a native way.
View 1 Replies
Aug 26, 2009
In more and more of my functions (althought they still work) i'm getting a warning the function doesn't return a value on all code paths.[code]...
View 3 Replies
Jan 14, 2010
My development machine runs Windows XP, but the target machine runs Windows 2000 with .NET 2.0.I've set my compile options to compile 2.0, which is fine.However, I have some references which are causing issues.For example, Microsoft.Office.Interop.Outlook.dll - in VS2008 the path is shows as the C:Windowsassembly folder which works fine. Until the app is built and run on the target machine and fails:Could not load file or assembly 'Microsoft.Office.Interop.Outlook, Version=12.0.0.0, Culture-neutrl, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.Presumably because on Windows 2000 the assembly folder is C:WINNT.I cannot work out how to target the WINNT folder for my references.
View 9 Replies
Feb 4, 2011
The end result I am looking for is I want to add File Paths to a CheckedListBox. I only want certain file extensions and if a file by the same name but a specific extension exsists allready then I do not want to add those files to the CheckedListBox.
Example: I am only wanting these filetypes in my CheckedListBox (.gif, .tif, .bmp, and .jpg).However if the filetype (.PNG) allready exsists with the same filename (i.e. image. png and image.jpg) I then do NOT want to add that JPG. Only files that do not allready have a PNG with the same name. (I hope I was able to make this clear)
My current code will add the filetypes (.gif, .tif, .bmp and .jpg) to the CheckedListBox. However I do not know how to have the code only add the files that don't have the PNG.Here is my current code:[code].....
View 2 Replies
Oct 12, 2007
I designed an app that basically gets paths to servers I have admin rights to, I am doing such things such as checking available space on the servers etc., the problem I am having is my app only works if I manually login via something like (start, run, \server) and supply my admin username and password just to store that authentication.How do I code this so it prompts the user in my program ONE time for all 5 servers (they all use the same username and password)
View 5 Replies
Mar 5, 2010
I'm attempting to use the Left function to extract the 3 leftmost characters from a string.
I declare the function as follows
Public Shadows Function Left(ByVal str As String, ByVal Length As Integer) As String
End Function
I get a notification that "function Left doesn't return a value on all code paths"
View 3 Replies
Feb 21, 2011
[code].....
View 12 Replies
Nov 13, 2010
but i can't complete it if i dont know how to make it auto detecting the pathsexample: i have a combobox and only the text COD 4 MWand i have a textbox so when they select COD 4 MW in the combobox the install path shows in the textbox.
View 1 Replies
Aug 19, 2010
I have file paths such as:
' Any number of folders before and after the Project name
C:acdProject1efgsomefile.someextension'
How would I:Extract only the path before the project name?
C:acd
Extract the path after the project name?
efgsomefile.someextension
Note: Of course given the filename.Would Split be better or some complicated regex?
View 1 Replies
Jan 4, 2012
I've been trying to wrap my head around using the registry, but I have to say I'm a little lost. Is there a way I can use a "path structure" to write to a specific key, rather than using it as a dim and storing it in memory?
[Code]...
View 2 Replies
Apr 18, 2010
I wrote an application that shows about 2000 GPS track segments on a map (ATV trails in Quebec). The user may select and zoom an area of the map, then print a detailed map that includes the GPS tracks:
When I print the map, I use the full resulution of the printer, so a 8.5x11 lanscape page on a laser printer generates a 6260 x 4800 bitmap. If I preview or print the entire page WITHOUT showing the GPS tracks, it appears / prints within 5-10 seconds.
When I include the GPS tracks, the preview is very fast (5-10 seconds) but the actual printing now takes over 10-12 MINUTES! I fail to see why the printing becomes SO SLOW when I include my GPS tracks.
My map only includes 3 graphics path, which were defined only once at the maximum zoom level:
- One RED path that includes all the tracks valid all year long (AnnualPath)
- One GREEN path that includes all the summer tracks (SummerPath)
- One BLUE path that includes all the winter tracks (WinterPath)
The printing is slow only when I add the 3 graphicspath to my printing output and looks like this:
' e = Drawing buffer of the Print function Factor = adjustment factor between the zoom level used when the graphicspath were defined and the actual printing zoom level
' HorzOffset = Horizontal adjustment to align the graphicspath with the output buffer VertOffset = Vertical adjustment to align the graphicspath with the output buffer
[Code]...
Anyone has an idea why adding a graphicspath to a printed page drastically slow it down? What should I do to imprime the printing speed? I have been baging my head on my monitor for the past week and I fail to see how I can fix that problem.
View 2 Replies
May 12, 2010
I have this code for drawing a path.
Dim map As New Bitmap(l1.Size.Width, l1.Size.Height, l1.CreateGraphics)
Dim nextPoint As Point
Using g As Drawing.Graphics = Graphics.FromImage(map)
Dim dPath As New Drawing2D.GraphicsPath
For i As Integer = 0 To path.Count - 1
[Code] .....
l1 is a Label. When I call this it draws the path fine, but when I call it again it draws another path but doesn't get rid of the first path. Basically, I only want one path on the Label at a time.
View 8 Replies
Jan 1, 2012
I'm working on a project right now that I've had my head wrapped around for about the last week or so. Without getting fully into it, it's a 2 part application. DoIT and DoER. DoIT creates commands that another computer, running DoER, is supposed to do.
[Code]...
View 4 Replies
Mar 11, 2011
I tried running code analysis the first time and found what it appears many others on SO doing the same have found: an abundance of
In method 'SomeMethod()', object
'SomeObject' is not disposed along all
exception paths. Call
[code].....
View 1 Replies
Mar 19, 2011
Private Function ViewPropertyCast(ByVal type As String) As String
Select Case type
Case "smallint"
Return "Short"
Case "nvarchar"
Return "String"
[Code]...
View 3 Replies
Mar 14, 2011
We have a multilingual site, or culture-sensitive, and some of the static content now needs to be targeted; for this I'm using themes as it seems the easiest way to achieve what I want, but I can't for the life of me get the images to pick up.I'm setting the theme in code-behind, and thought at first that maybe this was the issue, but on checking up it looks like I'm doing the right thing (setting on Pre-Init).I expect to be able to reference images using relative paths where App_Themes/ThemeName/ is automatically resolved, such as:[code]In the above code, CurrentSite. Culture Name would be a language culture name (for example, en-gb, or nn-no) that does have an existing corresponding theme folder containing all required resources.Pages do have EnableTheming set to True. Also, I have tried removing the theme-setting code and applying the theme in the page using Theme="en-gb" to no avail.Is there anything immediately evident as to why the URLs aren't resolved?
View 1 Replies
Jun 28, 2010
I have a problem with my code. My code is using the fileupload control to browse for a filename when you add a filename it processes it and the code runs fine on when it lives on local host, but when I put the code on our prodution server it cannot find the filenames listed by user.
For example if I use the upload control to browse to B:MISCH IntiveRPTTOFL_3.csv and the code lives on my localhost which know what that file path means it works, but if the code is moved to a production server it may or maynot know what B:/ is or B:/ maybe mapped to something else. Even if I am browsing to a file on my C drive it will work on if the code is on the machine that the C drive is on, but it will not work if the code is on another machine because obviously that file wouldnt be on that C drive.
[Code]...
View 1 Replies
Mar 14, 2012
I want to check if two directories are pointing to the same place. Of course string based compare can be done easy but I also want to check for the situation in which a mapping points to the same location. Hence if m:dataapplicApicturesjpg n:applicApicturesjpg point to the same location it must be flagged. I have already searched I know there is something like GetFileInformationByHandle but I don't want to create a file, so I have not got a handle.
View 1 Replies
Apr 27, 2012
Im fooling around with the Windows Media Player control in Visual Studio 11 (Beta) and I'm wondering how to
1. How to get the path to a folder, and then add all the paths of the files in that folder into an ArrayList
2. How can I get the length of the current .mp3 file that's playing in the Windows Media Player control?
View 5 Replies
Sep 7, 2010
I'm in need of a way to find the original path of a substituted (Virtual) drive, set with the subst command.
Start -> Run -> type "cmd"
[code]
subst l: c:\scripts
[\code]
This create a virtual drive that points to c:\scripts\
in .net an easy way to get all the drives on the computer is using the Drive property of My.Computer.FileSystem. However, this will give you the current substitued name of the drive. Is there a way to find the original path?
I get the path of the virtual drives mapped to network folders using WNetGetConnectionA of mpr.dll, However, this only resolves mapped network drives.
I currently don't have away to find the original path of LOCAL virtual drives.
View 3 Replies
Jun 22, 2010
I'm writing an app where a user selects a folder on the network for a job to deposit output into.The person setting up the job will not necessarily be the same person who runs the job and that the job will not be ran on the same machine so I need to keep the path in UNC format. I can get the user to "see" the network when the FolderBrowserDialog runs by pointing the route folder at the desktop folder.
The issue is that if the network share is local even though the user has selected the folder through the network folders it returns the local path!! Which of course means that when the job is run on the other machine it can not find the folder specified.
E.g. The user on machine1 selects the network share \machine1jobsmyjob but the dialog returns C:work2010JobsClientjobsmyjob. machine2 then runs the job and looks for C:work2010JobsClientjobsmyjob and can not find it then throws an error.
As you can see from the above example I can't just replace c: with the local machine name as the share may not be in the root of the drive. I did think about parsing the text and changing it to \machine1c$work2010JobsClientjobsmyjob but this would mean I'd have to allow all the users to have admin access to our servers which is a non starter.if there is a way to switch off this behaviour in the dialog?
dim myDialog as new FolderBrowserDialog
With myDialog
.Description = "Browse to Job destination"
.ShowNewFolderButton = True
[code].....
View 3 Replies
Oct 11, 2009
Function can't return a value on all code paths.[cde]...
View 2 Replies
Nov 20, 2011
I am getting the warning that the function doesn't return a value on all code paths.
Function newgradelevel(ByVal valscore As Integer, ByVal strgradelevel As String) As String
If valscore >= 70 Then
If strgradelevel = "Freshman" Then
newgradelevel = "Sophomore"
ElseIf strgradelevel = "Sophomore" Then
[Code] .....
View 1 Replies
Oct 11, 2009
I'm trying to write a program that allows you to; 1) open a mp3 or wav file via the user finding the file and copying the file path and pasting it into a text box and, 2) by pressing a button it will play the desired file, and then 3) by pressing another button it will stop playing the file. I've already have this under pat,
Private Sub cmdOne_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdOne.Click
My.Computer.Audio.Play(My.Resources.buzzer, AudioPlayMode.Background)
End Sub
View 1 Replies