Code 3 Buttons To Get Same Text?
Jan 24, 2012I want to code 3 buttons to get the same text but I am getting an error as soon as i press the debug (run) button.[code]...
View 6 RepliesI want to code 3 buttons to get the same text but I am getting an error as soon as i press the debug (run) button.[code]...
View 6 RepliesI have a group box with 4 radio buttons and another groupbox with 4 text boxes.how do i write a short code to clear all text boxes and radio buttons within each box.i have written code the long way, ie..[code]but i think there is and easier way but i cannot find the statement.
View 1 RepliesI'm using vb.net. Basically, I have a drop down list, text box and a submit button. You choose a movie director from a drop down list, then type in a movie, click button and it adds the data to my database.There's another button which hides/shows drop down list, text box and submit button using Visible = True and Visible = False, but what I don't like about it is when it hides the things I said before, it leaves some white/empty space like if they are still there, but not visible.Is there anyway to put some kind of holder/container and place a button which when clicked could add my drop down list, text box and submit buttons to that place?
View 1 RepliesSo im creating a mail bomber here is the code
Imports System.Net.Mail
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
[CODE]...
Pretty simble but im trying to make buttons that chage between [URL] and [URL]on the timer code
Dim MyMailMessage As New MailMessage()
MyMailMessage.From = New MailAddress(TextBox1.Text)
MyMailMessage.To.Add(TextBox3.Text)
[CODE]...
I have a piece of software with two tabs, inside each tab there are buttons (the user can add the buttons when they want). when tab1 is full tab2 should start to fill. I currently know how many buttons fit on the screen so I just say something like if buttons > 150 then start to populate tab 2 The problem i have now though is if the resolution is changed then a different amount of buttons can be displayed. so if I put my screen to 1280x720 some buttons are left of. I was thinking of detecting the resolution and then using different cases for different resolutions but this seems very inefficient im wondering if there is a different way?
View 5 RepliesI want to make a code to appear buttons when I want with timer.What I'm trying to say is something like this:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Select Case Timer1.Interval
[CODE]...................
I've already tried:
If Timer1.Interval = 100 Then
Button2.Visible = True
[CODE].............................
I am trying to add buttons on the form using code; i need this for a program I want to makeHow can i do this? I am new with .net guys. Sorry for my stupid questions. Will be lots of them.
View 3 Repliesso im using two split containers to show four different panels at the users request using two buttons. Split container 1 works fine and will only show the panel requested by the user but split container 2 when i hit the button does not hide panel one and only show panel 2 it shows both panels at the same time yet the code for the buttons are exactly the same
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShow.Click
[code].....
Make all the buttons code work properly with the help of combo box The combo box will show the category.Suppose there are 2 categories A and B.When we click on A then the code given inside 4 buttons should work.I tried in this way ,I checked the condition of selecteditem based on that added all 4buttons sub code.
[Code]...
So I am having difficulty coding with radio buttons. I have 4 radio buttons in 2 different lists.
CODE:
I am using the BindingNavigator control on my form. I want to use my own buttons instead of "BindingNavigator". I tried double clicking on "Binding NavigatorMoveFirstItem" button to see the code behind it. But nothing is there.What is the code to use the BindingNavigator but on my custom buttons? Actually I want to use my custom buttons but the same code which BindingNavigator uses and then I will delete the BindingNavigator.
View 7 RepliesHow do I code different buttons to display different information on the same panel removing the previous information before displaying the new information?
View 4 RepliesI need code to read a serial port state in which I have 2 buttons attached to some configuration on pins 1-9. The program will then, when one of the buttons are pushed, right arrow or left arrow as a keyboard command.
View 2 RepliesI have a grid which users enter their contact information - fname,lname then phone number.
I want to know how i can when the usr clicks a button create an extra row of input boxes
And if possible be told how to make the form scrollable, so i can have many, many input boxes present when required
I need help in finding out if there is a more efficient way of writing my code. The code below is a list of radio buttons all of which have different values for example
radiobutton1 has a value of 1
radiobutton25 has a value of 20
the values are stored in a variable called 'count'
the 'count' is incremented by the ammount from the radio button clicked.
Is there a way the radio buttons can be compressed into a for loop and if so how can i still access thier each values.
[Code]...
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 RepliesPrivate Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
[Code]...
I am trying to make a webform that will act as a "wizard". My problem is how to get the program started e.g. I want to ask the user a question and have them choose a radio button, then have them click a next button. when the user clicks the next button I want to use the radio buttons as a condition so for example if the user selected the "yes" radio button then the program will display some new labels and textfields or radio buttons and so on.
View 3 RepliesI have a grid which users enter their contact information - fname,lname then phone number.I want to know how i can when the usr clicks a button create an extra row of input boxes..And if possible be told how to make the form scrollable, so i can have many, many input boxes present when required.
View 8 RepliesI'm making a text Editor, that can load unrelated code then edit it graphically using buttons.So far my problem is with replace, I'm probably not using the right context some times it works, most times it does not.
[Code]...
The combo box will show the category. Suppose there are 2 categories A and B. When we click on A then the code given inside 4 buttons should work. I tried in this way ,I checked the condition of selecteditem based on that added all 4buttons sub code. But it shows blue underlines.
I did in this way: If ComboBox1.SelectedItem = "A" Then Private Sub Button1_Click....
[CODE]............
Like this I have used 3 more buttons. How can it be done?
Wondering if there is a way I can duplicate controls and have them work properly? basically, i have a datagridview with code in it plus buttons that do various things to it etc etc. ideally, i'd like to be able to have two of these datagridviews on show. So, user presses button, second datagridview shows. Note that I don't want them to both display the same data - they should both be independetly editable..
View 3 RepliesDoes Microsoft provide the Up/Down Chevron Buttons displayed below, either through code or the actual images?
View 2 RepliesCODE:
Right now i have the following code. it is 4 radio buttons that if selected will display the price of a ticket.
There is a button called "repeat offender" that should take the price and double it. so me, being new to visual basic, were thinking of trying an if statement such as If it is selected decTicketTotal * 2
But this did not work. any help would be appreciated.. just trying to get the repeat offender selection working so when it calculates the price will double.
The problem is that I want from the interface after pressing a button 1 to show a value in text box but only if the button 2 is pressed too. In the background their is a timer so the value will show after pressing button 1 and button 2 but with time interval for example in 1 second the value is showed in text box in next second text box is clear like blinking in every second. The buttons are working like the on/off for the text box.
View 4 RepliesDoes anyone know the code which would let me randomly place 4 words on 4 buttons. For example i have the words:
ORANGE
RED
BLUE
GREEN
and I have 4 buttons on my form and each time I start the program I need those words to appear on the buttons in a random order like when I start the program first time It would look like:
Button1's text: RED
Button2's text: GREEN
Button3's text: BLUE
Button4's text: ORANGE
[Code].....
I have a program with lots of buttons and textfields etc in my main class (I guess), in the default on called Form1.
Aaand, I want to create a class, but can someone tell me how to change the text on labels and buttons from that other class, since the labels and such exsists in the main class?
I have 45 buttons on a form, Button1, Button2, Button3 to Button45. Each one has to have a Button?.Text value from a database eg. Button1.Text = "Beef", Button2.Text = "Cabbage", etc. In old VB6 I could use the Index value of each button to reference it, but in VB.Net there's no Index capability.
Is there a more elegant way to populate these buttons other than having a Select Case statement from 1 to 45 as below? [code]....
I would like to know the Handle of every tournament open of PokerStars.
The problem is that even if I open 100 tournaments at the same time, there is ONLY ONE running process called "PokerStars.exe".....
So I cant' use the
Dim MyProcess As Process() = Process.GetProcessesByName("PokerStars")
hwnd = MyProcess(0).MainWindowHandle
because I obtain only one hwnd... the hwnd of the last clicked tournament table.
So I think: every table has it button on the task bar, with the text of the table window.
If I should be able to retrieve that text, may be starting from the text I can find every table handle with some API.
But how to get the task bar buttons text??
I have 14 command buttons on my form. what i want to do is change the text of the form based on the current date. button1 should have todays date.button2 should have tommorows date.button3 should have day after tomorrows date and so on. I want this for fourteen buttons.I can do it manually by assigning each button.text to each date... i want to do it using a loop. is it possible.my buttons are named , button1,button2,button3,button4, and so on toll button 14.and the text i want on them is from the current date to 14 days later...basiocally want to display the dates on the button..is it possible though a loop.m using visual studio and vb.net
View 5 Replies