I'm having some problems understanding how this may work. This program is supposed to give convert 1-255 from Decimal to Octal, Hex, and Binary and display them in the outputTextBox with the headers listed as such (above). I can't seem to get the headers to show up correctly and using the book example only gets me this error "Items' is not a member of 'System.Windows.Forms.TextBox'".
Public Class Form1
Private Sub outputTextBox_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles outputTextBox.Click
Dim sTemp As String = ""
i m trying to write a program that displays in a textbox a table of the binary, octal, and hexadecimal equivalents of the decimal numbers in range 1-222.
I need to write a program to convert in a textbox a number to its roman numeral and written english equivalent. I can write everything except how to get the program to recognize the numbers and convert it into what I need it to.
This is what I have so far, and I'm not completely sure if this is even right, but I can't figure much else out. I've talked to other people who know about this and they aren't sure how to go about it, and my book isn't a big help either.
I would really appreciate any and all help than anyone could give me. I just don't know what else to do and I've been stuck here for a few days trying to learn how to do this...
Option Strict On Public Class Form1 Private Sub btnRoman_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRoman.Click
I want to create a VB.NET function that will take a string containing accented characters and convert it into the non-accented equivalent. My particular requirement is associated with non-English names. Some real examples are Štimac, Hukić, Böttcher, Bjørnbakk, Fürnrohr and Synnevåg. I would want to convert those examples to Stimac, Hukic, Bottcher, Bjornbakk, Furnrohr and Synnevag, respectively.
I am aware that a ü (with an umlaut accent) is often replaced by 'ue' but replacing it with u is better for my purposes. Similarly, I want to replace ö with o, rather than 'oe'. I am assuming that all the required conversions will need to be hard-coded in the function.Are there any slick ways to write such a function, ideally preserving the capitalisation in the original string?
in my application there's Textbox1.text, Textbox2.text, Textbox3.text and Button1.
my code is:
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox3.Text = Val(TextBox1.Text) / Val(TextBox2.Text) End Sub End Class
I got this class from another vb help forum and I'm using it for fields that accepts monetary values. Is there a way to incorporate a '1-decimal' point only rule?ATM, I can enter values like this: 1.2.2.20000..I need to limit the number of decimal points used. (1.0000)[code]
I have 1 access database with 3 tables How do I make the combobox get data from one table and input it to another table?ex.I have a table with all my Carriers and another table with jobs that are assigned to Carriers?
Im wanting to use a textbox for the entry of Decimal figures (currency). Is there any way I can have it so if a user does not put a decimal figure (ie 15 instead of 15.00) it will put it on.
I tried a masked textbox, but that means i have to set the maximum number of digits before the decimal too which is no good.
After converting all degrees-->decimal, and decimal-->hours, how can i use Tan, Cos and Sin formula in vb.net? I want the user must enter an input (which it is a coordinat-->i already convert the degrees-->decimal value as suggested by stanav and paul.
The questions like this (i only calculate on paper but dont know how to implement in code):
Input user need to enter: -latitude local (e.g. 1.4875) -longitude local (e.g. 103.3883333)
My user requests to change the . on the numpad to a when entering text in a multiline textbox.So I was thinking about the KeyDown event.To determine if the numpad . was pressed I can do something like this [code]But now how do I change the returned charachter as a , ? All e.Key... properties are ReadOnly. The KeyPress events let me change this by providing e.KeyChar, but in that event I can't check for the numpad .
How would I go about rounding up decimal numbers to the nearest 2 decimal places? For example $7.0000032 would be $7.01 In theory, VB would make it $7.00 but if it is > $7.00, I want it to reflect that to the nearest penny... so $3.0000001 would be $3.01
I do this in Oracle databases just in a snap, but now I have to do it in VB using ADODB and I don't know how to do it.
I have two Access 2007 tables. Table A contains: Col1 (text), Col2 (text), Col3(date), Col4(amount), Col5(text)
Table B contains Col1(date), Col2(amount) What I need to do is to insert into table B the records of table A (col4 summed) grouped by date of table A. The date is a variable contained in a text box so it cannot be hardcoded into the SQL statement.
I want to make it so when cancel is used it exits the loop but I need the Input as a decimal. Do txtItems.Text = intCounter.ToString intCounter = intCounter + 1 msgInput = CDec(InputBox("Enter Item Price", "Item Price", "")) decSubTotal = msgInput + decSubTotal txtItemPrice.Text = msgInput.ToString("C2") [Code] .....
I am working on a simple vb project to read data from a PC serial port and write that data to a file.The data is ascii sent in Hex format. I used MySerialPort.ReadChar() to read data and MyStreamWriter.Write(MySerialPort.ReadChar()) to write it to a file.
I copied my code below, sorry about the format.The trouble is: MySerialPort.ReadChar() acts the same as MySerialPort.ReadByte() , both takes the Hex data input and returns data in decimal format.I tried to use Convert.ToChar(MySerialPort.ReadChar()) to covert decimal to char, but it's too slow.I tried decimal.ToChar(MySerialPort.ReadChar()), but VB doesn't recognize decimal.ToChar, even after I installed .NET4.
Did I do something wrong? how to make MySerialPort.ReadChar() to read Hex data and return char?
Create a function named DecimalDegrees to refactor the code that converts a latitude or longitude into a value in decimal degrees. (This function will be used inside the functions ValueOf and Distance.) Task 2a: Write the code for the function DecimalDegrees with an input parameter for DegreeString as type string, and returns the value as type Double.
Here is my code for the function part Private Function DecimalDegrees(ByVal DegreeString As String, ByVal degrees As Double, ByVal minutes As Double, ByVal seconds As Double, ByVal ID As Integer) As Double
I am having difficulties with the 2nd part which is I believe to take the code for the calc1 and calc2 buttons and somehow get it to convert to decimal degrees by the function I have created. The buttons would then be removed as the code would automatically take the latitude and longitude and convert the degrees, minutes and seconds into a decimal.
Here is the code for the current buttons: Dim StartPtr, StopPtr As Integer 'To Replace Calculator 1 Button 'Convert degrees before passing argument - Latitude StartPtr = 0 [Code] .....
SQL Server has a Data Type of "Float". Visual Studio has a Data Type of "Decimal". In other words, if I have a variable in a VB.Net app that is defined as a "Decimal" ...can I move that value into a SQL Server Data Table column defined as a "Float"?
Maybe this is just a really basic question that everyone knows the answer to, and is why I couldn't find the answer. What I want to do is pretty simple. I want to declare a custom type that's just like a Single, except when you access the value, you get the value rounded to the second or third decimal place. Something like this:
Dim MyNumer as TwoDecimalNumber MyNumer = 1.124 Msgbox(MyNumber) 'This would pop up a box showing "1.12"
Problem: Using the sub routing below, when adding a value to another value the results eventually change from 2-decimal places to multiple decimal places.Basically, the amount stored should always only be 2 decimal places, because the values passed in are always 2 decimal places. Output from calling the sub routine multiple times.
Running total = 329430.75 New Withheld Amount = 710.79 Running total = 330141.54
[code]....
As a workaround, I have a new routine that uses a custom round function to properly store only 2 decimal places - as the VB round function does not perform the type of rounding desired.I understand that we are removing the value from the dictionary and adding it back..