InputFile.PostedFile.ContentLength Units Of Measurement?
Sep 13, 2010the units measured by InputFile.PostedFile.ContentLength . I need to make sure the file is less than 500k.
View 2 Repliesthe units measured by InputFile.PostedFile.ContentLength . I need to make sure the file is less than 500k.
View 2 RepliesIs there any way so that i can set the measurement unit of a form from Pixels to Twips?
View 5 RepliesI'm trying to resize one image to 5 different sizes (and then upload them to amazonS3).
I'm using imageresizer.net the problem seems to be that i cannot use the inputstream twice. it works the first time.
[Code]...
The code breaks when i try to retrieve the FileUpload1.PostedFile.InputStream the second time.
I'm trying to upload a file in VB.NET using an HtmlInputFile, but everytime I upload, the HtmlInputFile's PostedFile is Nothing.
[Code]...
I am trying to get the file size from FTP so i used ContentLength and it's giving me -1 value??? How can i get the right file size?
View 5 RepliesIf you run this code, builder.Append("Content length: " & response.ContentLength & _" bytes" & vbCrLf)
it returns a string builder object which shows the number of bytes contained in the page. But the url here must exceed some sort of character limit because it is returning -1 as the value which means (Unknown?)
Dim uri As New Uri("http:raws.wrh.noaa.gov/cgi-bin/roman/raws_ca_monitor.cgi?state=NWCC&rawsflag=2")
Dim builder As New StringBuilder
builder.Append("AbsolutePath: " & uri.AbsolutePath & vbCrLf)
builder.Append("AbsoluteUri: " & uri.AbsoluteUri & vbCrLf)
builder.Append("Host: " & uri.Host & vbCrLf)
[Code...
[code] to get the width of a page in pixels - however if i wanted this in centimeters or inches how would i go about doing this?
View 2 RepliesI have this code that was working in a proof of concept app I had - but now will not work.
For Each ddfile As String In ddfiles Dim MyThread As Thread ' simple new thread Dim newFS As FSObject = New FSObject() 'new FSObject which is a file object I made up' used because i needed to keep the name and index matched so the callback function had something to work with
[Code]...
Searching about kernel32.dll and battery functions in it, I came across some interesting
Public BatteryLifeTime As System.UInt32
The full declaration is:
Private Declare Auto Function GetSystemPowerStatus Lib "kernel32.dll" ( _
ByRef lpSystemPowerStatus As SYSTEM_POWER_STATUS) _
As Integer
Private Structure SYSTEM_POWER_STATUS
Public BatteryLifeTime As System.UInt32
What I don't understand is, what measurement do the "BatteryLifeTime As System.UInt32" is in? I mean, is the Battery life Time in seconds or hours.. Or something else, so how can I convert it to something I can use..
I need to create a software for orthodontists that would allow them to calculate the measurement of the teeth.I need to calculate the path of a curve created by the user over the teeth.I dont know how to calculate a curve is there any idea how to do it?or any other software available for it?i have searched for photoshop and there is no option available.
View 5 RepliesI know that you can return the length of a string, which results in the number of characters and spaces. Is there a way to return a width of the string in say, pixels,inches or some unit of measurement.
View 8 RepliesSo i decided to make a units converter for my term's project and my teacher insisted on including the combo box in this project. I'm not really familiar with the combo box as i am still a beginner in visual basic. I've looked around and learned a bit about using the combo box but later i faced a problem. First i created a Main combo box and placed it in the middle of the form. I managed to use the select case command to make other combo boxes appear and disappear as i wish. I don't really know how to describe the problem, i want to make it that if i choose the input as a unit and the output is any other unit from two different combo boxes, the value in the input text box would be multiplied by a certain conversion factor and the result will be shown in the output text box
View 7 Repliesive got to create a BMI calculator using metric units, when i enter my data, it doesnt work (i put in 1.5m and 90kg but the answer comes out at 3, and in clearly not anorexic heres what ive got at the moment
Dim BMIResults As New frmBMIResults
Dim Answer As Integer
Dim BMIAnswer As Integer
Answer = CType(tbHeight.Text, Integer) * 2
BMIAnswer = CType(tbWeight.Text, Integer) Mod Answer
'BMIResults.Show()
'Me.Hide()
So i decided to make a units converter for my term's project and my teacher insisted on including the combo box in this project. I'm not really familiar with the combo box as i am still a beginner in visual basic. I've looked around and learned a bit about using the combo box but later i faced a problem. First i created a Main combo box and placed it in the middle of the form. I managed to use the select case command to make other combo boxes appear and disappear as i wish. I don't really know how to describe the problem, i want to make it that if i choose the input as a unit and the output is any other unit from two different combo boxes, the value in the input text box would be multiplied by a certain conversion factor and the result will be shown in the output text box.
View 1 RepliesI have original dataTable as [code].....
But I want to edit this table so as when Project P1 recieves some Units then in the next entry of Project P1 the Units ( Actual) Should be equal to Units (Actual) - Units Recieved. after editing the datatable it should be something like this [code].....
The program I am making requires the user to select what units he will be using. But it has to be able to convert his entered units and display them in the text boxes at all times during run-time. It works fine the first time the user switches units, but the second time the units are switched all the values in the text boxes go to 0... Ok Button
[code]...
im trying to create a program that will convert between metric and standard units.I chose length as my measurement so i have nanometer,millimeter,centimeter,meter,hectometer,kilometer,inc,feet,yard and mile.i wanted the input to be
- number to be converted(text box)
-unit number is in(combo box)
-unit to convert to(combo box)
i know how to do combo boxes,buttons and labels and stuff.The output is the converted number this is what i have so far but its soooo wrong?
Public Class Form1
Private Sub Convert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Convert.Click
Dim Inch, Feet, Yard, Mile As Integer
Dim Nanometer, Millimeter, Centimeter, Meter, Hectometer, Kilometer As Double
[code]....
I'm trying to place multiple units that have already been selected on a previous form to appear where selected on the battlefield. I have tried it multiple ways and all I can do is get one to appear not the econd ect.
[Code]...
I'm trying to write a little program to help me find the distance (in feet/inches) between the frames of a ship. This would be fairly easy, except the frames are unevenly spaced.Let's say this is a top view of a shape, and the frames are vertical lines that comprise the overall ship. (In ships, this is the shape of the hull.) Each number is a frame.
1 2 3 4 5 6 7 8 9 10 11 12 13
In this example, there are 1 units between frames 1-3, two units between frames 3-6, three units between 6-9, four units between 9-11, and 1 unit between 11-13.So, what I want to do is post a program where the user inputs two frame numbers: so they would enter, for instance, a start location of 5 and an end location of 11. So, it would calculate the number of units between those two frames based on the limits. So, between 3-6 there are two units, so it would subtract the start location from the nearest limit (6).
6-5 = 1
Multiply by 2 units spacing per frame, so that's 2 units. Frames 6-9 are all included, so 9-6=3 x 3 units = 9 units. Since 9-11 are also all included, it would be 11 - 9 = 2 x 4 units = 8 units. Then the program would add that all together - 2 + 9 + 8 = 19 units total.
Now, for my instance, there are a few more complications (it's in inches, and large increments (i.e. 36" spacing), and there are 304 total frames split between the middle of the ship in two sections, fore and aft of the line), but really I'm just trying to get a handle on how to impose these limits and calculate the distance. Attached is the proposed layout for my program (ignore the 20'5", that's just how I want the output to look).
Our VB.NET project is using a Java library from Vivid Solutoins [URL}... to do Geometry calculations.[URL}...
What I can't figure out are the units specifically for the Buffer property, or any other distance for that matter. My program is dealing with Nautical Miles, and the documentation gives no indication if the units are degrees, miles, Nautical Miles, Kilometers, inches, etc.
I have a DataSet with a DataTable that has several numeric columns of Data. The numeric data is composed of distances given in U.S. Standard units. I currently have my ComboBoxes set up and working, but I need to expand on what I currently have in two ways.I need to be able to convert the Decimal numbers in my data column being displayed to Fractions, is there a way to do this and maintain databinding? In this case its the Display Member of the data source...I need to be able to display my drop down options in different sets of units... I've written Unit Conversion classes to help take care of this, but I don't know if I can somehow do this as well and maintain databinding? I'd like to convert the units on the display members as well...
Private Sub ComboBox1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ComboBox1.SelectionChangeCommitted
Select Case ComboBox1.SelectedItem
[code]....
What is the best approach for using ComboBoxes when dealing with issues such as displaying fractions and units...
Part of my assignment is to check if input to Group Number and Number of Units are correct input by making error handling exceptions...
I have to check the following:
a) group number is neither 501 nor 062
b) number of units are NOT numbers
c) number of units is NOT a positive number
So my first question is, am I checking correctly? 2nd question is, How do I make sure my Exceptions will pertain to their correct respective things (a, b, and c.. above)?
[Code]...