VS 2008 Coding Multiple Buttons At The Same Time
Jan 23, 2010
I have 80 buttons and each of them will have the same code. I've coded one of the buttons. The code is a long one and is there any other way to code all of them at the same time or should I code it by copy and paste? The names of the button are in sequence, Button1 - Button2 - Button3 - and so forth until Button80
View 2 Replies
ADVERTISEMENT
Feb 25, 2009
I'm having issues with my current homework. I've got 6 different radio buttons and depending on which one is checked, the corresponding price shows up in the text box. I'm not sure if I need to create a sub-procedure or what. I can't seem to get anything to work.
[code]...
I've gotten this far with the code but not sure where to go next.
View 3 Replies
Jul 26, 2010
I'm just trying to learn alot of the tricks and such so I'm making small programs and games to just get the swing of things.I'm having abit of trouble with this one, currently. I'm tying to create a form with two buttons. Now, I want to be able to press two keys on the keyboard and have one of the two buttons activate So, instead of clicking Button1, I pressed Control + C and it will say "Comment" and instead of clicking Button2, I press Control + U and it will say "Uncomment".
Public Class Form1
[code]...
The problem I keep running into is that the only way for the buttons to actually work is if they are already selected (Or, the last one clicked will work but the other will not). Then the keycode will work for them. How do I make this work without having to click on the button prior.
View 10 Replies
May 7, 2009
I am trying to code my pet age calculator form to allow user interface for the user to choose feline or canine, choosing the ok button will then invoke the frmCanine or frmFeline, can anyone work with me on this?
Public Class frmPetCalculator
Private Sub rdoCanine_checkedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rdoCanine.CheckedChanged
[Code].....
View 3 Replies
Apr 3, 2009
I have a form with a large GroupBox on it. Inside there are a total of 22 buttons, arranged in two columns of 11. These buttons are basically shortcuts that can be defined by the user. I would like to allow the user to rearrange these buttons by some simple means. (Drag and Drop being ideal.) I have the following code, which allows me to drag the buttons around:
[Code]...
View 5 Replies
Aug 28, 2009
I've been looking all over and i can't find an answer to this syntax problem. I want to show a message box with multiple lines before the buttons. This is my latest try:[code]How do you do this? Also, is there a way to have text AFTER the buttons?
View 12 Replies
Mar 4, 2012
What is Generics in vb.net. could you please explain me about Generics in real time life example and the simplest real time coding example. give me in simple coding to understand very easily. what are the benefits to use it. Where and what situation I should apply it.
View 2 Replies
Feb 24, 2009
I'm not great with VB and I'm having some trouble with my University assignment at the moment.I'm trying to code a multiple choice program with several forms with different questions and then a scoring form
I'm not sure how to tell VB what the correct answer should be and how to display the scores in another form, the answers need to show how many correct in each section out of how many the user attemped to answer, so they can check scores before completing all the questions.
View 5 Replies
Feb 5, 2009
So i am working on something for school. And we have to make a program that has 2 buttons, 2 text boxes used for input and a label used for output. One button is New Customer wich displays this in the output label (named totalLabel)
Public Class Form1
Private Sub newButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles newButton.Click
[Code].....
View 1 Replies
Sep 28, 2011
I would like to count time range for hour in visual basic and my time is in 12hr format and the time1, time2 including date is from oracle database.
View 5 Replies
Nov 4, 2010
I have used CSV files before for a simple database of about 12,000 items - this was a simple one page form... Now I want to have the same database but with the data available to multiple forms at the same time.. eg.. Form 1 displaying persons 1,2,3,5,7 name, addy, phone etc and form 2 pulling info for persons 2,3,4,8... Is this possible with CSV files?? or even XML?... The only other thing is that I do it all in .NET 2.0....
View 3 Replies
Jan 29, 2010
how to read multiple arrow keystrokes at the same time.Like when I have up + left so it should do something like diagonal up-left? I have search the forum to no luck, also tried on keydown, keyup, ProcessCmdKey, etc etc... no good.
View 1 Replies
Sep 15, 2009
i need to get some buttons to interact with other buttons on screen when i click then, as each indivual button gives a slightly different result.imagine this:[code]....
then i need then to hide different buttons depending on which button was pressed. so say i pressed button 1 then all the buttons showed but alternativly if i had of pressed 2 then say button 5 and 6 disapear.managed to get one way to work but then i would only ever end up with the first results every time.
View 2 Replies
Sep 12, 2011
If i place 20 different buttons on my form, how can i hide them using the for each function or any other function instead of writing the following for each button[code].;..
View 1 Replies
Apr 6, 2011
I have some VB.NET web forms that have multiple buttons (Submit, logout etc.) If I enter data in a textbox and want to use the submit button, if I actually click on the button it works fine but if I hit ENTER instead it appears the Logout button always takes precedence. How do I control this action as most people hit ENTER rather than actually clicking the button?
View 8 Replies
Aug 22, 2011
I have exactly 88 buttons and they all do the same function. So the function is.
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
Dim sr As New System.IO.StreamReader(OpenFileDialog1.FileName)
button1.text = sr
And I need to do that to all 88 button how can i do this without having to do it manually. and how can i just get the name of the file not the path.
View 6 Replies
Jan 9, 2012
I have lots of items on a contextmenustrip, I want to be able to use multiple buttons for just 1 contextmenustrip instead of creating loads of menustrips for each button, here is what I want my code to do
Private Sub ToolStripMenuItem10_Click(sender As System.Object, e As System.EventArgs) Handles ToolStripMenuItem10.Click if button1 is selected and pressed an item from contextmenustrip then
Button1.BackgroundImage = My.Resources.Boss_Room
end if
if button2.is selected and pressed an item from contextmenustrip then
Button2.BackgroundImage = My.Resources.Boss_Room
end if
[Code]...
View 1 Replies
Jan 27, 2011
We're developing a WPF & MVVM application that requires multi-language support. On each control with static text, we're using a converter to do a lookup for the appropriate word for the user's language.
However, this means that each control does not display any text. This causes some irritation for the UI developers at design-time. Is there any way to display design-time text?
For example:
<TextBlock>
<TextBlock.Text>
<Binding Converter="{StaticResource Translator}"
Path="Controller"
ConverterParameter="Search for" />
</TextBlock.Text>
</TextBlock>
How can I make this converter execute at design time to display the translated converter parameter?
View 1 Replies
Jan 14, 2012
I'm trying to draw multiple radio buttons on my form. I've used this same logic to draw multiple text boxes and for some reason, this doesn't work.
For counter As Integer = 0 To rc - 1
'controller name Radio button and properties.
Dim dynRadio As New RadioButton()
Me.Controls.Add(dynRadio)
[code]....
I have validated that:
rc = 3 and the loop does iterate three times.The values that come back from the db are correct.xAxis and yAxis are placed properly and is the same increment as my text boxes.It's just not giving me three radio buttons for some reason. It only displays the first one.
View 1 Replies
Jul 13, 2011
When loading the buttons to the class I keep getting the 'Null Reference Exception was unhandled' error. How can I fix it? Here is the code...
Class Module:
Public Class Buttons_Group_Class
Public WithEvents Button_Group As System.Windows.Forms.Button
Sub Button_Group_Click()
[code]....
View 7 Replies
Jan 13, 2010
I have a facebook account that has around 1200 friend request. Obviously I dont wanna go through and click each one. So I figure I would make a App for it. So I have it working, but its going sooooo Slow....I have it, Clicking the first Confirm button then closing IE, Then opening it back up and clicking the next one. I know it would be alot faster if i could keep that instance of IE open and have it go through and click each Confirm Button but I cant figure out away to do it. If I put it in a loop, it will submit the first one, then when it loops for the second time it finds the first one again, and says its disabled. Any Idea of how I can get it to move on to the next Confirm button? Here is the code I got written so far.
View 1 Replies
Dec 26, 2011
i want to use multiple radio buttons in if loop....each button performs certain function....how can i do it...in c#
View 10 Replies
Oct 15, 2009
i am working on an alarm system software, i am required to blink buttons whenever an alert SMS is received by my gsm modem, after checking for its authentication with the database. The buttons represents the individual units of houses that are armed with a hardware whereby whenever an alarm is triggered, the hardware sends a alert SMS which is received by my gsm modem. The unit under alert represented by the button will start blinking to show that its under alert, when clicked, it will stop blinking to show that the alert is acknowledged. But now i am facing a situation whereby when the second alert comes in, the first alert will be overwritten by it, which is not what i wanted, i want it to be like both buttons will be blinking, not overwritten. The buttons are all created when the program is running, with its text referred to the database. I have placed a timer to do all the blinking. The timer will start after the checking for authentication.
[Code]...
View 15 Replies
Jun 11, 2009
If a Form contains 2 Group Boxes each containing 3 Radio Buttons and the Form itself contains 5 Radio Buttons not in either of the Group Boxes how many Radio Buttons can be checked at any one time?
View 2 Replies
Nov 5, 2009
May i know is there any methods apart from the method that i have to detect drag and drop buttons when u create them at run time?the code that i have is
For Each ctl As Control In PictureBox1.Controls
If TypeOf ctl Is BlinkButton Then
[code].....
View 2 Replies
Nov 10, 2009
How could I can change de back color of multiple buttons (2700 aprox) depending on the results of my SQL Query i know how to doit one by one i just want to doit in another way
View 5 Replies
Dec 16, 2011
Using VB/VS 2010 and am trying to provide the user with a way to change the color of the control buttons on my main windows form. I'm starting with the button click event that then calls another sub-form (code shown respectively below).
I was testing with DirectCast as I need to deal with a multitude of button controls (i.e., will have more than the two shown below).
I would like to know how to deal with the following:
1. How do I save the BackColor so when the user opens the form for the first time (or any other time thereafter) the color set earlier appears (the default via properties is green).
2. When I click on the button for the first time and change the color it doesn't change until I click the button again.
[Code].....
View 1 Replies
Feb 7, 2010
so I have a game in VB 2008 and 21 options for a something in the game and all 21 options have the same code but the number is different. for example: timerX.enabled = true where X is the number from 1 to 21. Is it possible to link them all to one Sub instead of 21?
View 6 Replies
Sep 10, 2010
Visual Basic 2008. Here is the code. I have a form where there is an exercise as follows:
Dim varText as String = " Elephant, Cow, Snake, Horse "
The question ask how many letters are in the word "Horse". The possible answer are 6 radio buttons with values of 3, 4, 5, 6, 7, 8. What I need is how do I check that the correct radio button is selected.
Public Class frmConteo0al10Parte1
Private RightAnswer = New System.Media.SoundPlayer("c:WindowsMedia ada.wav")
Private WrongAnswer = New System.Media.SoundPlayer("c:WindowsMediachord.wav")
Private timeLeft As Integer
Private Sub btnVolver_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnVolver.Click
[Code] .....
View 3 Replies
Mar 21, 2012
I have a quoting system that can generate several variants of a quote. these quotes are displayed on a screen for sales staff to compare and choose which is the most suitable. Is it possible to programmatically create a button and click event for each quote that is generated?
View 1 Replies