Equal Button: 9x9=81=729?

Feb 6, 2010

On winxp sci. calculator when you press 9x9=81 you get 729 when you press = again.How can i add this feature to this code i already have.

View 2 Replies


ADVERTISEMENT

Dynamically Created Event - Button To Simply Set A String Variable Equal To The Clicked Buttons Text

Mar 14, 2009

I have a form that I am adding a set of buttons to. I am adding an event to those buttons. I need this event to function slightly to determine what button was pressed.

I need the button to simply set a string variable equal to the clicked buttons text so I can determine what button was pressed.

How can this be accomplished?

''Adding the buttons''
For Each dr In dtMenus
Dim strMenuName As String
strMenuName = dr.Item("strMenuName").ToString

[CODE]...

View 5 Replies

LINQ To SQL Select Equal OR Not Equal To

May 19, 2012

In the following LINQ query, i would like when the Loc=Locale.Gr all the records with GrID=100 returned and when the Loc is anything else all the other records with GrID <> 100 returned.How can i achieve this one? I tried something like the following, but it is totally wrong.

PrivateSub Test(Byval Loc as Locale)
Private Const GrID as integer = 100
Dim Query = From c In Mob Where c.CountryID = IIf(Loc = Locale.Gr, GrID, <> GrID) select c
End Sub

[Code]...

View 1 Replies

Check To See If The System Time Is Equal Or Not Equal To A Specific Time?

Mar 8, 2012

How does one check to see if the system time is equal or not equal to a specific time? So, say I want to perform an action if your system time is between 6pm and 6am. Or something similar?

View 1 Replies

Why A Double 1.0 Its Equal To An Int 1

Sep 17, 2011

Yesterday I asked why a adding 10 times 0.10 to a double is not equal to int 1;in VB Why (1 = 1) is False.I got an excellent answer. The overview is because:Floating point types and integer types cannot be compared directly, as their binary representations are different.The result of adding 0.1 ten times as a floating point type may well be a value that is close to 1, but not exactly.I can see the reason why now. However, if I do something like:[code]In this case I really obtain equality between double 1.0 and int 1. I thought then that double were only approximations so I would expect d to be somehow a value close to 1 as in the original first question. Why is not a good idea to compare directly different data types (in this case double - integer) and why I this time I obtain equality ??

View 2 Replies

Asp.net - Compare Two Dates In Whether They Are Equal Or Not

Dec 28, 2011

I have a Date variable startdt and a String variable hdnsdate. Suppose if startdt has the value in the form 3/1/2012 and hdnsdate has the value in the form 03/01/2012. Than how can i compare that these two dates are equal in vb.net. In if condition of my program i want to do this check. In case the two dates match move out of if loop otherwise go into the if loop. E.g A sample in C# what exactly i want.

[Code]....

View 2 Replies

C# - Determine If Two Types Are Equal?

May 20, 2011

I'm a little foggy on System.Type versus an actual class type (like Object or XmlDocument) in .NET... will this code correctly determine if the type of a particular object is equal to a class I specify?

// Given "myObject" (unknown type), and some class type (let's say "MyClass")...

If myObject.GetType.Equals(MyClass)

If TypeOf(myObject) Is MyClass[code].....

Which one is correct? Bonus points if you can provide some information on what a class identifier is versus what a System.Type is. :)

Note: The language doesn't matter here, VB.NET or C# is fine, the code above is pseudocode.

View 2 Replies

How To Check If Date Is Equal

May 31, 2011

I would like to compare dates (not times) for 2 datetime variables. I get one of the dates from database as follows and comapre it with yesterday.How can I do it?

[Code]...

View 6 Replies

Nothing = String.Empty (Why Are These Equal?)

Apr 13, 2010

Why does the first if statement evaluate to true? I know if I use "is" instead of "=" then it won't evaluate to true. If I replace String.Empty with "Foo" it doesn't evaluate to true. Both String.Empty and "Foo" have the same type of String, so why does one evaluate to true and the other doesn't?

//this evaluates to true
If Nothing = String.Empty Then

[CODE]...

View 3 Replies

Set A Text Box Equal To A Value In DataGridView?

Nov 8, 2011

I'm trying to set a text box equal to a value in dataGridView and I keep getting an error index out of range.The dataGridView is data bound to a stored procedure. When I move the text box setting to initiate after the form loads and a button is pressed it works fine; however, when it tries to automatically load after the fill command it errors out. The following code is what I have:

[Code]...

View 1 Replies

Testing If Images Are Equal?

Mar 25, 2010

I want to test if an image in a picturebox is the same to another image in a picturebox?Also, i get my images from a listBox.I need to use i as a conditional in an if statement.

If (picBox2.Image = picBox1.Image) Then
' code ...
EndIf

[code].....

View 5 Replies

VS 2010 Set 2 Variables To Be Equal

Jan 29, 2011

I would like to set stringa and stringb to be equal and then clear stringa like so:

Dim stringa as String = "abc"
Dim stringb as String
stringb = stringa

[Code]....

However this code sets up a link between the 2 variables, so when I clear stringa stringb is also cleared.

View 1 Replies

Way To Write A String Is Not Equal To A Value?

Oct 6, 2009

I am trying to write an IF statement that checks to see if a certain String variable is not equal to a certain value. What is the best way to do this?

Method #1
IF NOT(Nametxt.Equals("Fred")) Then
x = 3

[code].....

View 10 Replies

Why Is 'rm' (a Variable For ResourceManager) Equal To Nothing

Apr 13, 2010

How do I declare/define a ResourceManager in the following code so it doesn't equal Nothing when it reaches rm.GetString("Magnitude") in the following code? My.Settings.. is returning a valid string.

Imports Gigasoft.ProEssentials.Enums
Imports System.Resources
Imports System.Configuration

[code]....

View 6 Replies

Argument 'Length' Must Be Greater Or Equal To Zero

Feb 12, 2010

This makes no since to me I have a textbox that the user will put in information that I need to cut off so I wrote this code

txtMatID.Text = Trim(Mid(txtMatID.Text, 1, (InStr(txtMatID.Text,
"-") - 1)))

The user will imput a number value then a - then some words after that. I just want the number value. But when I try to debug the app it breaks on this line of code with this error. Argument 'Length' must be greater or equal to zero.

View 11 Replies

Argument Length Must Be Greater Or Equal To Zero

Jun 13, 2011

In my decryption statement I am getting
Argument 'Length' must be greater or equal to zero. is this statement wrong
DecodedStr = Mid(DecodedStr, 1, InStr(DecodedStr, Right(DecodedStr, 4)) - 1)

View 2 Replies

Argument Length Must Be Greater Than Or Equal To Zero

Sep 26, 2011

I disabled an exception because it was bugging me i couldnt find an intermittent error. My program reads textmessages from a phone, however a problem sometimes arises, and I am slowly pinpointing the areas of the code that cause issues. I have found however that it is sometimes here:

'Get a string of certain length
Shared Function GetString(ByRef PDUCode As String, ByVal Length As Integer) As String

[Code]....

check to see if length is zero AND thereofre try again in a moment, (because it usually works second time for some reason). I can think how to get around the exception

View 2 Replies

Check A File's Md5 If It's Equal To One In Listbox?

Feb 22, 2010

How can i check a file's md5 if it's equal to one in a listbox?[code]...

View 3 Replies

Check If A Variable Is Equal To Some Values Or Not

May 15, 2011

I want to check If a variable is equal to some values or not, for example:

if a = 1 or a = 5 or a = 7 or a = 10

is it possible to do it like sql:

if a in (1,5,7,10)

View 3 Replies

Equal Form Event For Vc++ ON_MESSAGE

Mar 20, 2012

what is the equal vb.net form event for vc++ ON_MESSAGE event

View 2 Replies

Equal ListBox - Compare And Say Difference

Aug 14, 2010

What I want is ListBox1 and ListBox2 above are not same Item
ListBox1.Items.Add("2")
ListBox1.Items.Add("4")
ListBox1.Items.Add("6")
ListBox1.Items.Add("8")
ListBox1.Items.Add("10")
[Code] .....

View 6 Replies

How To Generate Four Random Numbers Equal To 100

Mar 15, 2012

i will like to generate four numbers at random, that will total 100 and assign each to a textbox.

View 6 Replies

Storing Equal Signs (=) In XML Documents?

Sep 10, 2010

I'm facing a problem that Google couldn't solve yet!I'm trying to store URLs in an XML file. Problem is that these URLs contain Equal Signs (=) in them. And that generates an error.Here is my code: (**token is a variable that contains the URL)

Dim child As String = vbCrLf & "<Link URL='" & token & "'></Link>"
Dim fragment As XmlDocumentFragment = doc.CreateDocumentFragment
fragment.InnerXml = child

[code]....

View 3 Replies

VS 2008 Get A Statement To Check If A Does Not Equal B?

Oct 4, 2009

Is there a statement to check if a does not equal b? or is it necessary to

vb
if a = b then
'blank
else

[code]....

View 2 Replies

VS 2008 Not Two Equal Rows Consecutive?

Jul 18, 2009

I'm trying to load some data from a MySQL table and sort it so two equal rows doesn't come consecutive. I've been trying to do this on the server-side, but it looks like it's impossible. So I'm wondering if it's possible to load the data into a dataset and sort it there or something like that? I'm open for all solutions, both on the server-side and client-side.

[Code]...

View 3 Replies

[2008] Comparing Two Strings If They Are Equal?

Mar 8, 2009

I have the following
Dim input As String
If e.KeyCode = Keys.Enter Then

[code].....

View 6 Replies

Assign A Number To A Single Variable It Does Not Equal The Same Value?

Nov 2, 2010

I have been searching the internet trying to understand in its simplist form why this behavior happens.

Dim mysingle As Single = 456.11 Dim mybool As Boolean = mysingle = 456.11

In the lines above mybool becomes false. I found this behavior when putting the single into a double I found extra digits showing. The .net documentations states a single is an approimate value I gatehr a single is a 32bit floating point number? But why are extra digits appearing when I have explicitly said what the number is.. surely the memory should store that numbers either side of my number are 0 to fill up the memory location?

View 3 Replies

Assigning Variable If Value Is Equal To This / That (Select Case)

Mar 19, 2012

I have 10 checkboxes on my screen. I have a variable setup called "case" as a string. I want to know how I can say:
If checkbox1 is checked then case would be equal to "this".
If checkbox2 is checked then case would = "that"
Example of something I tried to cook up but didn't work because it tells me that I can't only use this in a "select case".

Dim Case as string
If checkbox1.checked = true
case = test1
end if
If checkbox2.checked = true
[Code] ......

View 5 Replies

C# - WPF ListView Confusing The SelectedItem With Equal Items

Jun 10, 2011

A ListView (or ListBox) with following properties:

<ListView SelectionMode="Single">
<sys:String>James</sys:String>
<sys:String>Claude</sys:String>

[Code]....

will result in selecting two items simultaneously if I click on "James", even though I chose SelectionMode="Single". It's even the same behaviour when I use a helper class with a string-property to display in the ListView. It seems like the ListView is evaluating the Items and selecting those which are Equal() rather than ReferenceEqual(). Is there a way to change this behaviour so that the ListView treats every item individually?

View 2 Replies

Com Interop - Equal Strings Sometimes Behave Differently?

Dec 30, 2009

Example:

Dim Sh32 As Object = CreateObject("Shell.Application")
Dim path As String = "C: empcatalog.zip"
Dim sf As Object = Sh32.NameSpace(path)

-> does not work, sf = Nothing

Dim Sh32 As Object = CreateObject("Shell.Application")
Dim path As String = "C: empcatalog.zip"
Dim sf As Object = Sh32.NameSpace(path.ToString)

Clearly path = path.ToString, but they behave differently when used as COM parameters.

View 1 Replies







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