In Percentage, Should Expect The User To Enter 4 For 4%?

May 24, 2010

If we format a value for percent "{0:#%}" then it will become 400%, and this also applies to all the 3rd party controls I've tried. I've used custom format as a workaround for this but perhaps you guys could enlighten me on this one. If a user inputted 4 for example then did the user intended 4% or 400%? If it were me that I would expect the 4 to be 4% rather than 400%.

View 11 Replies


ADVERTISEMENT

Enter In A Code For An Overall Letter Grade From A Percentage Given?

Feb 23, 2010

How do you enter in a code for an overall letter grade from a percentage given? I have a seperate box for the letter grade and a seperate one for a the percentage grade . I have it setup when an overall grade and possible grade is entered into boxes it will give me a grade percent but not a letter grade. How is that added? I am doing this for my course project but dont undersatnd the coding very well. I am just trying to pass the class.

View 1 Replies

Expect Some Dialog Window To Appear In A Non-modal State?

Apr 19, 2009

If I type this code (VB.net 2003):

Dim myDialog As frmTestDialog
myDialog = New frmTestDialog
myDialog.Show()

you'd expect some dialog window to appear in a non-modal state. For some reason, this isn't the case with a program I am working on. Most of the dialogs use ShowDialog() to open them, and one uses Show(). The second I try to show another non-modal dialog, the dialog appears in a modal state. Another strange thing is, before I show the dialog, there is code to shift the dialog location to centre it on the main form - this isn't executed either: the dialog appears at 0,0.

My usual trend is to blame myself for errors (usually the case), then I blame the software; I have checked every single line of code (including the generated code), and it all checks out - the dialog should be non-modal. But ... it's not. I've come across other errors in VB.net 2003; is this another instance?


I'll try creating a new dialog and displaying this non-modal, and see what happens. If it works, I can just transplant the code but this shouldn't be happening, just like if I go to a shop, ask for a cola, I expect a cola not a Chinese panda; more annoying, I return the panda, ask for a cola, and they give me the panda back do loop until I give up The system does using threading, but none of that code connects to the display dialog routines all dialogs are opened with more-or-less the above code (a few have simple validation routines).

View 5 Replies

Expect The IsInterned Method To Return Null?

Feb 9, 2012

Take the below example. I would expect the IsInterned method to return null, because this string can't possibly be in the intern pool having started up the test app for the first time? I would also expect, that if I did something like string.intern("this112233StringCan'tPossiblyBeInTheInternPool!£$%") first, then this would legitimately be returned by IsInterned from the pool. I've also done the same in c# and the behaviour is the same.

Whenever I use strings in code, I tend to do something like textbox.text = string.intern("someValue") etc or if (textbox.text = "someValue") etc. Infact, whever strings are being used, I've gotten in to the habbit of using string.intern. Is this a bad habbit rather than using constants or the resources file?

[Code]...

View 19 Replies

Feature Updates Expect With Future Version

Dec 3, 2009

After right clicking on the form Context Menu give option to see 'View Code Window' which opens the the view code window and shows from the first line of code in the file, where actually it should show Event handlers related to the control on which Mouse was right clicked. right now we have to go through the line of codes to locate the event related to particular control.Also after double clicking on the control, VB inserts a default event handler to Code file which should happen only when there is no Event Handlers added for that control previously & if a previously added Event Handler present, double clicking controls should locate that procedure.[code]after dragging dataset table to the form vb assigns 'field name' concatinated with 'TextBox' to TextBox Control likewise 'field name' concatinated with 'ComboBox' for ComboBox Control where it is difficult to locate them in Controls Member list into code..Instead why don't you prefix them with 'txt' for TextBox, 'cbo' for ComboBox etc. It is then easy to find one in code. Or make the original Optional.

View 7 Replies

Passing Class ByRef Doesn't Act Like Expect It To

Dec 31, 2009

This is the code:

Public Class userDefClass
private b as integer = 1
End class
Public Class Form1
private SomeClass as new userDefClass
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) [Code]...

View 7 Replies

How To Have User Enter In 3 Different Integers

Feb 9, 2011

How do you ask the user to enter in 3 different integers?

View 17 Replies

User Must Enter A Number Between 1 And 100?

Sep 26, 2009

How do I make it that the user must enter a number between 1 and 100? And If they dont they get an OK messagebox stating that they must do.I imagine it'll be something like this:

If TextBox1.Text = "" Then
MessageBox.Show("You must enter a value between 1 and 100", "Name Entry Error", _
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End If

But Im not sure whats suppose to go inbetween the speech marks.

View 4 Replies

Stored Procedure Expect For Autonumber Field As Parameter

Mar 21, 2011

I have problem here when executing when saving data/ inserting data to db using stored procedure.[code]Waitress_ID is an autonumber field (identity set to yes). the error i get is this : Procedure or function 'WaitressDataSave_SP' expects parameter '@Waitress_ID', which was not supplied (code execution stop at the line ..da.Fill(dt) )as per i know that i don't need to include waitress_ID in my insert query because sql server automaticly assign autonumber.if i debug before the error line, i can see each variable has its content in param , except for the Waitress_ID.[code]fearness means 'looking for mistakes in the future', if only you could always remember that the future is uncertain then you would never try to predict what could be a mistake, and your fearness ends right away.

View 3 Replies

Allow A User To Enter Html Comments?

Nov 12, 2011

Using MVC, EF 4.2. I am working on an application that has a comment section. Right now if a user enters a comment that contains HTML e.g.<b>text</b>and hits submit i get the message "A ptentially dangerous Request.Form value was detected..."How do i handle html on the way into the db? Should I just strip the html? Or encode it? I tried server.htmlencode the text but i still had the same error message.

View 4 Replies

Allow User To Enter Only Numbers In A Textbox?

Aug 5, 2010

How can I prevent the user to enter characters but only numbers and '.' in a textbox in vb.net 2005?

View 4 Replies

Allows The User To Enter The Island Choise ?

Jan 15, 2012

My textbook mentions nothing of it except for the example where me is in the code.'This event handler allows the user to enter the island choise 'and then calls subprocedures to place the island activites in the list.

Dim intIslandChoise As Integer
intIslandChoise = Me.cboIsland.SelectedIndex
lstTours.Items.Clear()[code].....

View 2 Replies

User Only Enter Text Value In Texbox

Jun 5, 2009

i want the user only enter text value in texbox. I use this code to do but it gives me a error.

[Code]...

View 10 Replies

User To Enter Up To Five Passwords At One Time?

Oct 26, 2011

I need to write a program allowing the user to enter up to five passwords at one time. I have the textboxes set the way I need. When the user presses the button, the code should check every password they ve entered, and flag any passwords that are invalid. A valid password includes the following:

At least 6 and not more than 15 characters
At least one uppercase alpha character
At least one lowercase alpha character
At least one numeric character

I'm a little confused about how to check each character of the entered passwords for these conditions.Because it must include alpha characters, I believe I have to do something with ASC and CHAR variables. This is my first post and I need to have this done within a few hours, haha. Help would be awesome.

View 3 Replies

Add A New Row At The End Of An Array Every-time User Enter The Data?

Nov 16, 2009

I dont know how many times user want to enter data .i want to add a new row at the end of arrray everytime user enter the data.

Dim vNames(-1) As String
For vIndex = 0 To vNames.Length - 1
vNames(vIndex) = InputBox("Enter a Name")

[code]....

View 1 Replies

Allow The User To Add Rows And Enter Data Into The Grid?

Mar 17, 2010

I have a DatagridView control. I have 4 columns. What I want to do is allow the user to add rows and enter data into the grid and then click a button and save the data in the Gridview to a table. I can't find any information on how to do this

View 4 Replies

Check If The User Enter Alphabet In Textbox?

Sep 25, 2010

how to check if the user enter alphabet in textbox the only allow in that textbox is number

i think i will use ascii there like in vb 6.. but i dont know how to done in VB 2008..?

View 5 Replies

Create A Program Which Will Allow The User Enter Ten Numbers?

Nov 5, 2009

5. Create a program which will allow the user enter ten numbers. The program is to count how many numbers were above 50?

View 1 Replies

Determine What Characters The User Can Enter Into The Control?

Mar 2, 2010

In reading various answers regarding "masked TextBox Control, am I to assume that the masked textBox control uses a mask to determine what characters the user can enter into the control?

View 1 Replies

How To Detect If User Enter Repeating Sentences

Jan 26, 2010

The user can enter text into the system but I want to detect if the previous string entered is the same as the next string entered. if it is an error message or something will appear.

View 4 Replies

Maskedtextbox On The New Form Won't Allow The User To Enter Any Text?

Jun 22, 2010

When I use this code to open a new form, My maskedtextbox on the new form can't allow the user user t enter any text. This has slowed me down a bit.

Dim F2 As New FrmStudentRegistration()
F2.TopLevel = False
Controls.Add(F2)
F2.Show()

View 1 Replies

Msgbox When User Hits Enter In VB 2010?

Dec 6, 2009

I just want to alert when user hit "enter" key.

I tried this one in keyup event,

If e.KeyCode = Keys.Enter Then
MsgBox("msg")
End If

It didnt work, is that wrong ?

View 5 Replies

Sub Routine - Textboxes Using For The User To Enter Number

Mar 12, 2012

If IsNumeric(Hundreds.Text) Then
HundredsTotal.Text = (CDec(Hundreds.Text) * 100).ToString("##,##0.00")
DollarAmtVar = CDec(HundredsTotal.Text)

[CODE]..

The above code is from a small program I have written. This test is done on about 30 textboxes I am using for the user to enter number.

The following is the sub routine that is called.

Sub ShowError()

MessageBox.Show(BoxName & " must be a number.")

End Sub

Here is what I want to do but it won't work.

BoxName.Select()

This is so I can put the focus on the different boxes that might contain an error.

View 4 Replies

VS 2005 Allow The User To Be Able To Use The Enter Key To Exit A Textbox?

Mar 17, 2009

I'm looking for what will allow the user to be able to use the Enter key to exit a TextBox control.

View 5 Replies

VS 2008 : Prompt A User To Enter A Captcha?

Aug 22, 2010

I'm trying to figure out how to prompt a user to enter a captcha. Some programs out there have a little popup with the captcha image and a textbox, the user then enters the characters from the image and the captcha is solved by the user of the application. When I try to request the image directly, it gives me a different image than the one currently in the webbrowser control. Any ideas how I can create the pop up of this captcha image for the user to enter?

Note : . I'm looking for a way to prompt the user to enter a captcha from website.

View 6 Replies

Visual Studio 2008 - Using Rhino Mocks' Expect.Call For A Mock Property In .NET?

Jun 22, 2011

The following C# code works just fine and the test passes as expected.

using NUnit.Framework;
using Rhino.Mocks;
namespace RhinoMocksTesting
{
public interface ITesting

[Code]...

The Expect.Call line produces the following build error: "Overload resolution failed because no accessible 'Expect' accepts this number of arguments." What is the proper way to use Expect.Call with a mocked property in VB.NET? I've seen a couple posts that say Rhino Mocks works better in VB10, but I'm stuck with Visual Studio 2008 for this current project.

View 1 Replies

AutoComplete Textbox - Start Again When User Hits Enter

Jan 15, 2012

I have an autocomplete textbox in vb.net. It is working fine, but now I need to pop up the window again when the user hits enter or double clicks. So far, I know that when the user hits enter, the keydown event raises with e.kecode = 13. I guess my code would go here. My problem is how do I tell autocomplete to start again after the user hits enter??

View 11 Replies

Change Active Control When User Presses ENTER?

Mar 2, 2011

i am making my final year project in vb.net for data entry i want to make the project more user friendly i use code to change the control focus by pressing 'Enter'(ASCII 13).. and clear the content of current control by pressing 'Esc'(ASCII 27)... in my project one form contains at-least 300 of controls say(t1,t2,t3,t4...)

so in the keypress event of t1 i have writen

if asc(e.keychar)=13 then
t2.focus
elseif asc(e.keychar)=27 then
t1.text=nothing
end if

the code works fine but produce an alert beep when i press ENTER to change the active control...

View 2 Replies

Datagridview - Formatting Don't Applies When User Manually Enter A Value

Nov 19, 2010

The situation: I have a datagridview with one column (col1). In the datagrid definition (design view), i have created this row, and set the formatting to C2 (or C0, or C - I tried them all). then, I load my datagrid view pro programmatically :

dbl_myValue as double
dbl_myValue = 6.99
datagridview1.item(0,0) =
dbl_myValue

The datagridView shows the data correctly : 6.99$. When I "spy" on the datagridview.item(0,0), the "Value" property is a Double.

the problem: It don't work if the user manually enter a value : click in the cell, enter a numeric value (let's say 100, without decimal to avoid complexity) and then LEAVE the cell (so no more in EDIT mode). The formating just don't applies. When I "spy" on the datagridview.item(0,0), the "value" property is a STRING. So I guess this is the problem, but how can i do?

View 1 Replies

Limit And Verify The Textboxes Data Which Enter By The User?

Oct 9, 2010

I want to limit and verify the textboxes data which enter by the user i want to make a class in which i pass the textfield and the methods in that class return boolean value . First method check only numbers with decimal point. second method check only A to Z or a to z with some specify charecters. In java it is very easy by the parse INt methods or use class.

View 3 Replies







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