Is there a number format in .Net that will display a given number of significant digits, but also NEVER displays in scientific notation (for example,declaring 3 sigfigs you would have 1234.567 = 1230 and .000123456 = .000123)
I am in the process of upgrading hardware for a significant number of users. When we upgrade them to new hardware we often upgrade a lot of their software. Once the base load of the OS is on their new machine I run a vb script that copies their profile from the old machine to the new machine and sets up a lot of the software on the new machine that we use. I am trying to migrate this application to VB.Net for a variety of reasons (speed and UI being among the biggest). There are two separate issues that I am having.
One issue is that I can't seem to find a good .Net way to query what printers and ports they have on the old machine and set those up on the new machine. I am still using script (called from VB.Net) to do this. Another issue is with CopyProfile. We have several users that have directory structures that use names longer than this utility seems to allow. Is there a better way to copy a profile from one PC to another than this utility? Is there any documentation on exactly what this utility does so I could determine if I wanted to code it myself?
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.
I want to generate random number, which is 9 digits including leading zero if the number is less than 9 digits, say 123 will be 000000123. I have the following code which doesn't include leading zero : Dim RandomClass As New Random() Dim RandomNumber = RandomClass.Next(1, 999999999)
It try to insert 10 digits number to database sql server through textbox it give me this error.Here is the code which i use for validation the textbox
Private Sub contacttxt_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles contacttxt.KeyPress If (e.KeyChar < Chr(48) Or e.KeyChar > Chr(57)) And e.KeyChar <> Chr(8) Then
Is there a format string to format a decimal to 000000000,00. So first 9 digits, right padded with zeros if needed; a comma as fraction separator and two fraction digits. 0 => 00000000,00 12 => 00000012,00 987456,456 => 000987456,46 So something like myDecimal.ToString("D9") together with .ToString("F2").
Project Euler's problem 16:2^(15) = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.
What is the sum of the digits of the number 2^(1000)?I have been trying to do this problem for a few days now and i just can't figure out how to get vb.net 2008 to recognize anywhere near that large a number. I have seen in other posts that some software like java has the integer type BigNumber or BigInteger but i cant find anything like that in visual basic. I'm running into this problem a lot using Visual Basic. I also can't seem to find any of the standard upper level math features in visual basic such as factorials and a few others that i can't remember but couldn't find under the math feature. any suggestions? (Sorry let me rephrase, any suggestions on how to do this stuff without switching to a different programming language.)
I'm trying to match a string to see if it matches exactly this:####-####, it has to be 4 digits followed by a hyphen followed by 4 more digits. Right now I have this pattern: "d{4}-d{4}" but it's allowing 5 digits in either (or both) instead of strictly 4 per group. Here's an example of what it should allow:
1999-2000 2003-2007 2009-2010
and here's what my pattern is allowing but should not be allowing:
I have 10 labels with 10 numbers and i want theses numbers to compare with other 10 labels with different numbers and when they found that second pair of labels are not equal with the first to show me in a new label where is the fault and in another new label the sum of the mistakes
is there any way to get a numberupdown text to show the value "+" so if the value is a positive number then it adds the plus sign in front of the digits.
example:
2.00 would become +2.00 3.25 would be +3.25
as when its negative its
-2.00 -3.25
It already adds the negative value when its negative of course.
Question:Using VB.NET/C#, is it really not possible to read the below XML in a dataset without significant work ? I tried
oDataSet.ReadXml(strFileName)<BR>and Dim oDataSet As System.Data.DataSet = New System.Data.DataSet Dim strLocation As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) strLocation += System.IO.Path.DirectorySeparatorChar + "filename.xml" oDataSet.ReadXml(strLocation)
But all this is doing is putting ONE row with one cell with content "2010-02-12T10:33:39" in my dataset.
I am trying to run a nested loop; it should call a result from a MDB database. Which it does, when I run the single loop it goes thru all of the entries. But when I try to get a number to display twice it stops on the second entry. Having it display the number twice is just a test to make sure it does work, I am going to modify it after I can prove the loop works. The count on the Message Box is correct, but the number displayed is wrong?I want it to display each number twice and then move on to the next number. [code]
I have a Visual Basic.Net Windows Forms application to which I am considering adding the WebBrowser control. I'm assuming that the PC's on which this application will ultimately be deployed/installed will have the latest Windows (XP, Vista, or 7) updates, a firewall, and an Internet security suite installed/running.
With this deployment environment in mind, does the WebBrowser control make my application or the deployment PC vulnerable to any significant security risks? Are there any programming issues that should be addressed to eliminate potential security risks when using the WebBrowser control?
For some reason i keep getting an error whenver i try to display a number in a message box. If i write some simple code like this:Code:Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1.Click
Ive a richtextbox and want to display the number of lines it has in a separate RTB just like:
1 Hello 2 From 3 VB
I did it using the code:
<pre lang="x-vbnet">Private Sub text_RTB_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles text_RTB.TextChanged numbering_RTB.Text = ""
I have a field in datatable .If 1000 is the value in it, i want to display it as 1000.00.Then if user changes to 1000.50 it should display as it is.Is there anyway to do this?
I've been asked to write an age guessing game using vb. We have to have 4 buttons and a text box where the random number is displayed. The range is between 5 and 110. we have a 'too high' 'too low' , 'start' and 'correct' button
I need to display the version number of the application on the top bar of the application. I managed to crate a setup wizard but I have no idea how to manage the verions.