Comparing A Single To A Double?

Oct 19, 2010

Here's my test code:

Dim testSingle As Single = 7.2
Dim testSingleF As Single = 7.2F
Dim testDouble As Double = 7.2

[code].....

View 2 Replies


ADVERTISEMENT

Intercept Single Or Double Mouse Click - Only Execute Double Click Code On Double Click?

Jan 27, 2011

I have a situation where I am handling both single & double mouse click events on a form. In both cases something has to be loaded, however when a double click occurs, I do not wish to execute the code attached to the single click event.Is there a way to intercept the mouse click's and check if double or single and then execute the right event appropriately?

View 2 Replies

C# - Convert MBF Single And Double To IEEE?

Jun 4, 2010

Follow-Up available: There's a follow-up with further details, see Convert MBF to IEEE.

I've got some legacy data which is still in use, reading the binary files is not the problem, the number format is. All floating point numbers are saved in MBF format (Single and Double). I've found a topic about that on the MSDN boards but that one only deals with Single values. I'd also would like to stay away from API-Calls as far as I can.

Edit: Just in case somebody needs it, here is the VB.NET Code (it's Option Strict compliant) I ended up with (feel free to convert it to C# and edit it in):

''' <summary>Converts a MBF Single to an IEEE Single</summary>
''' <param name="src">The MBF Single value</param>
''' <returns>The converted IEEE Single value</returns>

[Code]...

View 2 Replies

Double And Single Quotes In String?

May 12, 2009

I have a problem with double and single quotes in a string.I have a textbox where i take a string from.In the textbox are double quotes and single quotes quotes.Problem is that if i return the string all the single quotes are replaced by double quotes.How can i get it to keep the single quotes as single quotes?

View 4 Replies

Implicit Conversion From Double To Single

Jun 13, 2011

[Code]...

The code compiles and seems to run correctly, but is underlined with the message "Implicit Conversion from 'Double' to 'Single'" Why would this be an implicit conversion if each of the variables is cast as a Single? Is this something I should worry about or change?

View 2 Replies

Put A Single Double Quote As A String?

Mar 15, 2011

It would seem to be Dim MyString as String = """""" but VB doesn't like that.

View 2 Replies

Check Single And Double Bytes Character?

Feb 16, 2011

How to check the Single byte character (e.g. English) and Double bytes character(e.g. Chinese) ?

Since I want to printing out their code which are representing in Hex.

However, Single byte character is using 2 digits of Hex. And Double bytes character is using 4 digits of Hex.

So, how can I check them and output with more readable pattern ?

input likes: 微軟 Microsoft output likes: B74C B36E 4D 69 63 72 6F 73 6F 66 74

View 1 Replies

Reverse Casting - Single Back To Double?

Nov 10, 2011

I wanted to know if it's possible - after casting a double to a single, to turn it back into a double again? i tried doing something like:

Dim x_double as double = 12345678.987654321d
Dim x_single as single=x_double
x_doubble=Cdbl(x_single)

but it doesn't give me the original value.

View 2 Replies

Reverse Casting \ Single Back To Double?

Mar 30, 2010

Reverse casting? Single back to Double

View 5 Replies

Access Single Bytes That Form A Double Variable?

Sep 20, 2009

How can I get access in a fast way to the single bytes that form a double variable?

In pseudo-code I want to do something like this:

Dim myDouble as Double
Dim myArray(7) as Byte
myArray = myDouble

'continue doing things with the single bytes

The code is meant for use in a I/O-handler. The double-variables have to be sent / received via TCP. For this purpose they shall be put into / assembled from I/O-buffers.

View 2 Replies

Saving A Text Field That May Contain A Single Of Double Quote?

Jun 16, 2010

I am saving a text field that may contain a single of double quote.' or "If i use a double quote in my SQL save funciton I can save and use single Quotes. When I use a Single quote I can save Double Quotes. Yet not both.People use both, so I would like to know how I could change the delimiter to something other than a Double Quote for my text saves

View 3 Replies

Calculator Application - Use Datatype - Variables Be Single Double Decimal ?

Mar 11, 2009

I am writing an calculator application and i dont know what datatype to use. i mean should the variables be single, double, decimal...?

View 1 Replies

Set Folder Options Single Or Double Click To Open Item?

Nov 4, 2010

I would like to be able to set the following settings in the folder options:

- single click to open an item
- double click to open an item

I am using Visual basic 2008 Express edition.

View 2 Replies

VS 2008 - Option Strict Continued - Gives Me The Going From Double To A Single Error

Oct 13, 2009

Quick code example:

v1.magnitude = myVectors(c).magnitude * 0.95

I have a vector class...and the magnitude is single precision...Now the problem is this, when I run this with option strict on, it gives me the going from double to a single error...Why? Does multiplication imply double precision?

So with option strict on, can you not multiply single precision numbers together and assign them to another single precision variable without first convert.tosingle?

What is the point of this? I am currently changing hundreds of lines of code in a project that runs perfectly...

View 22 Replies

Created A Button Control - Change Into Single Click Insted Of Double Click ?

Feb 26, 2010

I created a button control ,, by double clicking only the process was going on,,when iam single click the button nothing is to be happenend,,so i want to change into single click insted of double click........here my coding is given below.......

<asp:Button ID="getrec" UseSubmitbehavior ="false" runat="server" Style="left: 30px; position: relative; top: 0px; z-index: 101;"
Text="Get Record" />

[CODE]...

Here the coding is all are correct but the problem is when double clicking the button only it was worked ,,,iwant want to change it into single click

View 1 Replies

C# - Using SelectNodes With Attribute Having Single Quotes And Double Quotes?

Nov 9, 2011

Is there any way to use selectnode with the attribute having both single and double quotes? If we are having single quote in the attribute we can use like below,

nodeList = root.SelectNodes("//book[contains(title,""'attribute'"")]")

If we are having double quotes we can use,

nodeList = root.SelectNodes("//book[contains(title,'"""attribute"""')]")

how can I use an attribute ['attribute"] having both single and quotes in SelectNodes.

View 1 Replies

Call Double Click On Mouse Single Click?

Mar 11, 2012

how do we call double click on single mouse click event? Iam doing this and it's not working.

Private Sub RichTextBox1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles RichTextBox1.MouseClick
RichTextBox1_MouseDoubleClick(sender, e)
End Sub

View 3 Replies

Double Click Firing On Single Click In Grid?

Jun 24, 2010

I have a grid that displays data from a binding source. I have a method to handle the CellContentDoubleClick which will get the value of the cell and use that to do a new look up. This will generate a new datasource (with different columns) which I then rebind to the grid.

My grid double click works, but when it repaints with the new data, a single click fires the double click. I have no code in place to handle a single click .

The interesting thing is that it is (in my case) a toggle. If I double click, on the repaint, a single click fires the double click code. When it repaints again, I need a double click .

The double click code fires off a messagebox - if I tell it not to continue, then I have to double click to get it to fire again. So it is not dependant on what data is displayed.

View 9 Replies

Grid Double Click Fires On Single Click?

Jun 24, 2010

I have a grid that displays data from a binding source. I have a method to handle the CellContentDoubleClick which will get the value of the cell and use that to do a new look up. This will generate a new datasource (with different columns) which I then rebind to the grid.

My grid double click works, but when it repaints with the new data, a single click fires the double click. This happens whether or not thre is a single click handler.

The interesting thing is that it is (in my case) a toggle. If I double click, on the repaint, a single click fires the double click code. When it repaints again, I need a double click.

The double click code fires off a messagebox - if I tell it not to continue, then I have to double click to get it to fire again. So it is not dependant on what data is displayed.

When it is in the mode to respond to a single click, I can tab through all the controls and then click on any cell in the grid and it will still fire the double click.

No matter what I try to do (set focus to other controls, refresh the grid, etc.) nothing seems to reset the grid so it works consistently.

View 1 Replies

Make A Single Click On Mouse To Double Click?

Jul 3, 2011

How to make a single click on mouse to double click, may the story like this :if i press left mouse button, that mean i press double click left mouse button..I'm using Vb.net but if the code for it only in another language like C++, C# or Js, no problem but if you want, please give me an example.I want to use that method for playing game house. That game make me always to double click mouse.

View 1 Replies

Convert Single Digit To Double Digit?

May 28, 2011

I'm making a project that randomly picks a number from an array, but if it picks a number less than 10 then the number is a single instead of a double.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim N(2) As Integer
N(0) = "0" & 1
N(1) = "0" & 2
N(2) = "0" & 3

[Code]...

View 1 Replies

Discard Any Clicks Except Single- And Double-clicks?

Nov 30, 2010

I process single- and double-clicks on a listbox in VB .Net 2005; I use single-click to just select a particular entry and double-click to select and open the entry. I want to discard any other type of click, especially triple-clicks.

View 7 Replies

Single Clicking, Double Clicking And Contextmenu?

Mar 27, 2010

Someone asked me to add a function when the notifyicon is doublcliked. I figured that'd be easy with the mousedoubleclick event being available. I find out that then both the single and double will then be called. Well that sucks, I want it to only do the one the user requests. So I tried to get it to work:

Private Sub DblClick_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles DblClick.Tick

[Code]...

View 3 Replies

VS 02/03 Use A Double Dot Notation Instead Of The Single Dot Notation?

Apr 11, 2009

I am trying to have a firm grasp of VB.NET and wondering if there is a way to use a double dot notation instead of the single dot notation people are normally accustomed to?The double dot notation that I want to implement is shown directly below:

PersonData.Birthdate.IsValid

Currently, the only way I know is by using the call shown below which I suspect is not using the full capabilities of .NET:

Validations.IsValid(PersonData.Birthdate)

My code is shown below:

vb.net
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
modVar.intDay = 25

[code]....

View 6 Replies

Flickering - Double Buffered Picturebox - Not Double Buffere - Black Screen With The White Lines

Nov 17, 2010

I have a htpc project that I am working on. The main program loads dll plugins which are basically other win forms. On each of these forms, including the main program, I use a picturebox (a double buffered picturebox) for the background image and then draw everything on it by hand. Whenever I load the form from the dll and show it, I get a weird flicker. It looks like it is the previously used double buffer. Is there any way to clear the background double buffer before the flicker? Or am I going in the wrong direction?

Here's a couple of videos of the problem:
[url]
[url]

Notice the black screen with the white lines on it or the flash of the desktop after I click "Movies." How do I get rid of that?

View 14 Replies

Use A Decimal Instead Of A Double (why Then Do Microsoft Use A Double For Most Math Class Functions)

Aug 15, 2011

For greater accuracy I should use a Decimal instead of a Double ( so I've been told ). Why then have Microsoft chosen to use DOUBLE for most of the functions that return a floating point value in the Math Class?

[Code]....

View 9 Replies

VS 2008 : Double Quotes Inside A Double Quote?

Apr 4, 2009

In vb.net, im using objWriter.Write("playerA= "x"")as you can see im using double quotes inside double quotes, how do i skip it so the error doesnt show up?in php you make an "" to skip the string like ("playerA = "x" ")

View 6 Replies

Vb6 Double Versus .Net Double Data Type?

Aug 11, 2010

When i use VB6 i get the following outputs

961.605 * 100 = 96161
936.495 * 100 = 93650
929.295 * 100 = 92929

NOW..... When i do the above in vb.net 2005 i get the following

961.605 * 100 = 96160
936.495 * 100 = 93650
929.295 * 100 = 92930

How can i get the same output as the VB results. And i have tired it ! Type conversions, math functions, everything i can think of to get the same VB6 output !

View 8 Replies

Is Running Multiple Threads Faster Then A Single Thread On A Single Core Cpu

Dec 23, 2009

Say I have a code with 3 methods that do some pretty intensive work. Would executing these methods on 3 seperate threads be faster then executing them one after the other on a single core cpu? And what if it's a dual core or HT?

View 8 Replies

Querying A Single Column And Displaying All Results In A Single Textbox?

Sep 5, 2010

I am trying to make a list, separated by a comma, of entries from a single column in a SQL database. I have been spending the last several days searching for a way to do this, but every thing I found either didn't work, or wasn't exactly what I was looking for.

The query will pull all the email address that are not null. What I need to know is how to take the result of that query and make it look like this:

email0@address.com, email1@address.com, email2@address.com, etc, etc, ...

I feel like I should know this, but for the life of me, I can't remember nor can I find it in any of the textbooks I have.

I am using Visual Basic 2010 and SQL Server 2005. I also have access to Visual Basic 2005 if needed.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved