Determine The Output Displayed When The Button Is Clicked In Visual Basic?
Dec 7, 2009I am having problems with these questions... 4. Private Sub btnCompute_Click(...) Handles btnCompute.Click
[Code]...
I am having problems with these questions... 4. Private Sub btnCompute_Click(...) Handles btnCompute.Click
[Code]...
I am trying to determine output displayed when a button is clicked in visual basic for the following code:Private Sub btnCompute_Click(...) Handles btnCompute.Click Dim a As Integer = 1, b as Integer = 3
[code]...
Dim names(3) As String
Private Sub frmNames_load(...) Handles MyBase.Load
names(0) = "Al"
names(1) = "Gore"
[code].....
I need to determine which students have a specific major based upon the button that is clicked , then code will pull all the CS student's name and put them in the results list box. The text box above the results list box should contain the specified major and the text box below the results list box should contain a message indicating the total number of students with specific major.
View 4 RepliesOk, basically, I need to know what the current hard drive letter that the current user is using, along with the user's name, followed by Music. When using the command prompt, we can use a simple code that is just %currentuser%Music but, I guess Visual Basic is a bit more complicated. Haha.
If you're curious why I need this, it is because I am making a program for my company to help backup our music and documents from their computers before we get new computers.
When using the code above in the command prompt in Windows, you would get something like: C:UsersRobertMusic, but this does not work for Visual Basic 2008.
My current operating system is Windows 7. I can supply more information if needed.
Sweet candy store currently has a special offering of heart shaped candy. It comes in two sizes: small and large. The company sells the large one for $29.50 and the small for $16.25.Design an application to calculate how much a costumer owes. When the user clicks the "Calculate" button, the program gets the number of large and small chocolate hearts ordered from the textboxes, calculates and displays the extended price for each type of the chocolate in a label. The program also calculates the weight of the chocolate to determine the shipping cost, displays the total weight, the shipping cost and the final total due. The large chocolate weighs 4 pounds 10 ounces, and the small one weighs 2 pounds 14 ounces. Shipping cost is 35 cents per pound and 3 cents for each additional ounce. Display all dollar amounts except the final total due with 2 decimal places. Display the FINAL TOTAL DUE with a leading dollar sign and 2 decimal places. Be sure to also include a CLEAR button that will remove all inputs/outputs from the form, and an EXIT button. Define the CALCULATE button as the accept button and the EXIT button as the cancel button.
View 4 RepliesI have already posted this assignment . The assignment is to create a VB.NET program that calculates the monthy mortgage payment for a $200,000 mortgage with an interest rate of 5.75% for 30 yrs. The program compiles and the interface window comes up but when you click the payment button nothing happens. fix this program because my other 4 assignments are based on this progam. The Visual Studio project file is attached.
Public Class Form1
Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
[code]...
I am Sorry but I Can not get my head around Saving data in a Form to my records (DataBase) When I Click Button1. I know how to clear the controlls when i click Button1. How Do i start The code "Do I use a SaveFileDialog1" or "Do I Look in the property settings" how the code starts. is what i have at the moment is below. also Button1 should be able to clear the controls ready for the next user input.
[Code]...
I'm stuck on this exercise that asks me to create a text box and a button. Each time the button is pressed it is supposed to add 1 to the text box. Anyone know how to approach this?
View 2 RepliesI have a two part question
I have a button on a form that when clicked i want to have it flash a few times. I have tried creating a for-next loop using the visible true/false property but I only get one result, that being false.
I also want to vary the lenght of time between the flashing.
I want to be able to have a print button on my form that when clicked, automatically prompts the users printer to print the form in it's current state when the button was pressed.
View 6 RepliesAt each end of the row on a DataGridView I have Inserted a button But when I Double click either Button on the Design page the code page Loads and I get
Private Sub DataGridView1_CellContentClick(Sender as system.object, e as Windows.system.Forms.DataGridViewCellEventArgs) Handels DataGridView1_CellContentClick
End Sub
But why is this, when I Double clicked the Allocate Button in the DataGridView1 in the Design page, surely as I double Clicked the Allocate Button or View_Job Button in the
[Code]...
how do I fix my button to run?
View 4 RepliesI have to make a calculator for school but I'm in a big dilemma. :( The thing is, I have this calculator with three textboxes and of course digits and operators. There's two input textboxes, txtInput1 and txtInput2 and then there's the buttons from btnZero to btnNine. My operator buttons automatically do the calculation and the output comes in txtDisplay which is disabled (so that you can't write in it).
And the problem is here, I want my btnZero to btnNine move their textvalue to my txtInput1 and txtInput2 as long as they are selected (so the cursor is blinking in it). Now I use "txtInput1 = txtInput1.text & btnZero.text" sure that works, but only for one txtInput. If I can't solve this I'd have to make all the buttons twice. ;( (Edit: If I press my operator button then "txtDisplay.text = (txtInput1 "operator" txtInput2)")
Is it possible to add a small icon/picture within a button (to the left of the button text)? I don't seem to find any solution to this
View 1 RepliesI have a form in visual basic 2008 express edition and i want to be able to press a button to make the form go into fullscreen i have tried various codes but they all just remove the taskbars and i want the form to increase in size and not leave a section of the side blank i want it to sort of zoom the form size
View 10 RepliesI have yet another Problem with the save button on my form. After filling out all the textbox's, Selecting the date from dateTimePicker Selecting comboBox's Items I get an Error message saying: "Column 'JobID' does not allow nulls". "(I thought this ID column Inserted a number automatically").
View 5 Replieshow do you put a close button on tabs in visual basic
View 5 RepliesI want my calculate button to automatically click multiple times upon the user clicking it once because it seems that it only works properly if it is clicked multiple times... I'm not sure if there is an error in my code.
Public Class frmford
Dim Make, Model, InitialPrice, Options, AirConditioningTax, GST, PST, Total, Subtotal, Finance, Months, RoofRack, SunRoof, SideAirBags, TintedGlass,
[Code]......
Please tell me how can i disable print screen in Visual Basic 2008.
View 13 RepliesI'm using resources in VB.NET(2008) to manage my files and have 3 icon files that need to be on 3 buttons on my form (clicking the button changes the icon of the form tot the pressed button)
ICO_1.ico
ICO_2.ico
ICO_3.ico
but when I try the code below i get the error that "Value of type system.drawing.icon cannot be converted to system.drawing.image" any idea what's wrong?
btnIcon1.image = my.resources.ICO_1
btnIcon2.image = my.resources.ICO_2
This is what I have so far for the following scenario: I want to have it so that if a users clicks submit without checking a check box from one section it throws up a dialog box that makes the process loop and give them a chance to check a box. The process wont continue until at least one check box is checked. The same thing above goes for my radio buttons as well. Here's my code:
[Code]...
i clicked and dragged a picture into my form. How can I get it to be displayed in a picturebox?
View 1 RepliesJust wondering if its possible for an image to be displayed along with some text when an item is clicked in a list box?
View 4 RepliesHow do you extract source code from a VB.NET .EXE file?
View 3 RepliesExample i have a tabcontrol contains 4 tabpages.Each tabpage have a datagridview. I want when i click any datagridview in those tabpages then a msgbox ll show name of datagridview which has just clicked.I want to determine it. But i dont want to use method loop though controls of tabcontrol and check what datagridview visible.Shortly i want to determine what datagridview i clicked ?
View 12 RepliesI have a program with 32 PictureBoxes (pb1 ... pb32). The user will select one of the picture boxes. All picture boxes will call the same subroutine, passing the variable of the name of the box clicked. Rather than writing a click event for all 32 boxes, and call the same subroutine from each event, is there a way that I can determine which picture box has been clicked?
View 3 RepliesIs there a way to determine is any control at all on a form has gotten focus? I know you can individually determine if a single control has focus or has been clicked, etc. but is there an event that can tell you that some/any control has been clicked?
i.e.
Private Sub myFrm_Magic(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.SomethingClicked
Msgbox(Me.ActiveControl.Name)
End Sub
I click to textbox which have a string.How can i determine what character i clickd to it ? Example : That string is " I am Ann".I click coordinate contains "m" character. How can i know i click that character.
View 3 RepliesI'm used to coding in VB6, where arrays of components and their events were simple. I've got:
Event(args) Handles Comp1.click, Comp2.click, Comp3.click
How do I determine which component had been clicked?