Calculate The Relative Humidity?
Jul 19, 2011I wish to calculate the relative humidity with 3 known params which are: moisture(Absolute Moisture Content (AMC) in g/kg dry air), AirTemp(in degree c) and AirPressure(in kpa).
View 5 RepliesI wish to calculate the relative humidity with 3 known params which are: moisture(Absolute Moisture Content (AMC) in g/kg dry air), AirTemp(in degree c) and AirPressure(in kpa).
View 5 RepliesI wish to calculate the relative humidity with 3 known params which are: moisture(Absolute Moisture Content (AMC) in g/kg dry air), AirTemp(in degree c) and AirPressure(in kpa).
View 1 RepliesI was reading this article about relative time calculation
The problem is that the results are wrong due to the time offset. My webpage is Greek.So how should i modify that function to work correctly, including the GMT+2 or GMT+3 hours offset?
I am trying to calculate the number of years for my calculate age event handler, however i am apparently missing a method or whatnot because im trying to calculate the age , can anyone suggest help on this. I need to subtract years to get my age but when i try the birthdate.Subtract (currentDate) method i get an error about not able to convert from LONG?
So below is what I have.
Private Sub btnCalculateAge_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculateAge.Click
Dim currentDate As Date
Dim BirthDate As Date
Dim Age As Long
[CODE]
I need help navigating to a local Url. I know how to navigate to a web site on the internet with webBrowser1.navigate (url...) BUTto navigate to a relative URL? Let's say I want to navigate a file called "index.html" or "index.aspx" and the file is local to the Web Browser Control.[code]...
View 3 RepliesI'm trying to open a text file in a program I've created but it won't work unless I specify it as an absolute file path. I can't seem to make a relative path name.
View 3 RepliesI'm trying to determine in vb if a URL is absolute or relative. I'm sure there has to be some library that can do this but I'm not sure which. Basically I need to be able to analyze a string such as 'relative/path' and
View 3 RepliesI'm writting a small program to send data to another application.Have not probs with that, my only problem now is to get the coordinates relative to the screen of that application so I don't need to move it, when I start the application, or to avoid probs if the customer moves that application on the screen.Currently this is my code to find if the other application is running or not, and if running then move it to the left upper corner of the screen.
Dim nWnd As IntPtr
Dim ceroIntPtr As New IntPtr(0)
Dim Wnd_name As String
Wnd_name = "thisname"
[code]....
i am trying to create an application with with a tree view on the left and a list view on the other (which functions like a explorer )but i need a folder icon in both tree vies and list view it is only working as complete path C:Documents and Settings6025DesktopAccessProviderclose.jpgbut when you deploy this application the location always changes where shall i copy my images? and how can i locate itPlease see my code
Private Sub AddAllFolders(ByVal TNode As TreeNode, ByVal FolderPath As String)
Dim imageListSmall As New ImageList()
TreeView1.ImageList = imageListSmall
[code].....
set the relative path of a exe file in .net?
View 11 RepliesPROBLEM #1: I have a program that accesses several XML files that are located in a subfolder called "xmlfiles." This folder is a sub-folder in my project. I am using "Application.Settings" to store the locations of the XML files. For example, I have an entry for "JobsXML" that has a string with the file path of the XML file to load. To get these files to load, I had to use relative references: The path settings for "JobsXML" is "......xmlfilesjobs.xml"
I have to go up 3 directories because the files are in "debugin" during design. This will not be the case at runtime. This arrangement works fine in the editor, but when I make a "ClickOnce" package, the relative path will no longer work for installed applications. The directory will be different.
How can I setup my code so that the "xmlfiles" subfolder will be correctly used at runtime? I need to be able to run this from my project folder under "My Documents/Visual Studio 2005/Projects/etc..." and also, I need it to work from the runtime directory that the user installs the program to. So if the user installs the package to "C:temp" then the code should use the setting for "JobsXML" by going to "C:empxmlfilesjobs.xml."
PROBLEM #2: There is an attribute in some of my XML files that is also, a relative file reference. I have another subfolder called "images" that also resides in my project. This folder contains images that are loaded at runtime. In my XML file, each node has an attribute, "filepath" that has a value of "......imagesfilename.jpg". I also need to be able to access this relatively, just like the XMLfiles I mentioned in PROBLEM #1.
I have tried different combinations of StartupPath, Path.Combine and a few others, with no success. I am new to this so I could use some sample code to put this together correctly.
I am wondering how to point to a relative file that would be the same on all computers. How would I go about this.
View 4 RepliesI am calling a program that runs in DOS screen.Is it possible to position this screen to always open exactly same cordinates relative to my FORM1 screen?Or is it possible to run the FORM1 to start at same screen cordinates all the time?
The Code:
Sub Install1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Install1.Click
instance = Process.Start(Application.StartupPath & "Driver.exe")
instance.WaitForExit()
End Sub
I have a file path like this:
C:Documents and SettingsusernameMy DocumentsProgram NameFormDataGForm1Music.mp3
I need to change it from that to this:FormDataGForm1Music.mp3
The only problem is, that the rest of the file path could change but that.
I've used the search function but couldn't yield any solutions. Sorry if I didn't look hard enough. Anyway, it's just a quick question. How can I find the mouse cursor X and Y co-ordinates relative to the form itself and NOT the screen?
View 9 RepliesI'm using VS2010 Express, and Visual Basic.I'm trying to make a fancy drop down list next to text box. When the user enters some text in the text box, the program will look up values in a database and show them in a list box (to easily select some existing items).The list box is in a panel control, which is initially hidden (and I have other stuff in the panel for other features.)If the query finds some entries in the database, I want to show the list box (and the panel and everything in it) and then move the panel so its top left location aligns with the top right location of the text box.I can get the panel to show (visible = true) but I can't get it to line it up with the top right edge of the text box.I'm using this code to move the panel after I set it visible.
View 4 RepliesI am working with Visual Studio 2008 to concieve a small program.pdf file is supposed to open when a button is pressed. It work great with the code:
System.Diagnostics.Process.Start("<Full File Path>")
Only, I would like to place the pdf file in the project's folder and that would open wherever the project's folder is (on the Desktop, a USB port, anywhere).
1- How to get this relative path?
2- in which folder to put the pdf?
I'm trying to write a little Jukebox application in VB Forms, and I need the pathnames of the sound files (inTracks"Insert Name Here") to be relative instead of absolute, so that it may work on a different computer to mine. At the moment, I am testing with the simple Soundplayer class, and the single line of code to play a song is this: My.Computer.Audio.Play("inTracks" & txtCurrentlyPlaying.Text) It works when, instead of inTracks, I put the full pathname (C:Documents And Settings etc.), but not when I try a relative path such as this.
View 1 Replieshow to make buttons and other objects move to the center of the form and possibly grow in size when form is maximized and also move back to its position when minimized.
View 2 RepliesI have a project that is WPF4 and VB.net. I'm trying to set a mediaelement's source using a mediatimeline (inside a storyboard construct), so I can loop the mediaelement. However, I cannot figure out how to set the source to a relative URI in WPF. I know how to do it in VB.net, but by setting the source there, I can't have the media looping.How do I set the source of a mediaelement in a mediatimeline to a relative URI?
View 1 Repliesi have so far set up a form to save data into a database and i am using:
[Code]....
i have so far set up a form to save data into a database and i am using:
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0.;" & _
"Data Source = F:Database1.mdb"
con.Open()
I tried saving the database as i did with images in the resource folder and used my.resources but this didnt work is there any way i can save the database into the project folder and link to it no matter whan machine i am on?
Possible Duplicate: SQL Express Connection string - Relative to application location
I have a desktop application written in vb.net. The app uses an SQL Server express 2008 database (.mdf file).Currently i have the connection string as absolute path like this:
Dim ObjConnection As New SqlConnection("Data Source=.SQLEXPRESS;AttachDbFilename=C:UsersPantheoDocumentsVisual Studio 2010ProjectsFood Manager 2012(new)Food Manager 2012Food_CustomerDB.mdf;Integrated Security=True;User Instance=True")
[Code]...
Possible Duplicate: SQL Express Connection string - Relative to application location I have a desktop application written in vb.net. The app uses an SQL Server express 2008 database (.mdf file).Currently i have the connection string as absolute path like this:
Dim ObjConnection As New SqlConnection("Data Source=.SQLEXPRESS;AttachDbFilename=C:UsersPantheoDocumentsVisual Studio 2010ProjectsFood Manager 2012(new)Food Manager 2
[code].....
I have a form with a tabbed control on it. Each tab in the control simply loads an existing file in a reader to display to the user. I have added the files in a folder in my project. When I debug it works great. However, when I publish and move it to another computer, the program runs fine but none of the files show in the tab control tabs. The files do come with the solution when I publish.[code]I know there is a way to make the file path "relative" but I cannot figure out how and there really isn't many resources available to explain how this can be done.
View 2 RepliesIs there an easy way to get the relative complement of two sets? Perhaps using LINQ?I have to find the relative compliment of a set A relative to B. Both A and B are of type HashSet<T> but I think the algorithm could be made more general (IEnumerable<T> or even ISet<T>)?
View 1 RepliesI want to display a "date/time submitted" value much the same way as Stack Overflow does
e.g.* 2 hours ago
* 3 days ago
* a month ago
how to do this in PHP
I need to play a sound file: Soundsopen_creaky_door.wav"
However the code only works if I specify the EXACT location:
My.Computer.Audio.Play("c:soundsopen_creaky_door .wav")
Is there a way I can set the relative path to something like this?
My.Computer.Audio.Play("soundsopen_creaky_door.w av")
I would like my 'quit' button to appear in the bottom right hand corner of my menu screen, but it seems that every computer in the office has a different sized screen, different size ration (some are widescreen) and different resolution. When I deploy my program, the quit button may appear off-screen (the user has to scroll down to find it) or it may appear half way across the screen on a widescreen laptop for example. If I set my form to 'maximized', is there a way to position a button relative to the bottom right hand corner of the form? Also, on one maximized form I have two datagridview's side by side. Is there are way to automatically set each one to take up half of the available form width, so they fill the form nicely?
View 2 RepliesI'm trying to figure out how to keep control locations relative on maximize. For example, if i have a button on the very right hand of my window, when i maximize it, i want the button to remain on the very right hand. Or when i grow my window, i want my controls to change location so its always relative to the size of the window. how can i achieve this?
EDIT: To provide a better example, if i have a window with a button in the center, when i maximize that window the button should remain in the center rather than in the same location as before and therefore being out of place.