I have two forms in my project, Form1 and Form2. In Form1 there is one TextBox called Text1, and in the Form2 there is TextBox called Text2. I have one button in Form1, called Button1. When I click on Button1 I want that Form2 open and in Text2 is text from Text1.
Code for Button1:
Me.Hide
Form2.Show
Form2_Shown:
Text2.Text = Form1.Text1.Text
And Form2 open but in Text2 there is no text.
I use this code that works well. Option Strict On Public Class Form1 Dim mylist As New List(Of Integer) Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim mystring As String = "12,13,12,12,12,12,13" [Code] .....
Imagine that you have a couple of baskets with different number of apples. Need to be determined (in textbox2) in which the basket is, for example apple number 29. (the number is entered in textbox1). I want to add two textboxes and expand the code to do two jobs at once ( in one button click event): - For example, need to be determined in which the baskets are apples number 17. and 38.?
i am developing one automate application for tht i hav done some coding i dont know how to proceed further can any one guide me if possible? [code] I am using SHDocVw for IE. Now i need to know how to do. [code]
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source =
I am making an application in which i want to add new windows form with a specific name in my application and save it with that name then make a class for that form. After that i want to add controls on that form and all of the code that i need...
I am trying to build a application where I can add another .exe program to a button_Click Event. I want this exe program to be run from within my Program so I can remove them from my pc and have them all contained within my new application.
I am in development mode VB 2005 Pro in WinXP, I have a command button called Button2, with some code in the Click event. I Cut the button and immediately Paste it onto a Group (ie. Frame) on the same form. The Button2 properties still say Name = Button2. I double click the button expecting to view the Click event code, but it opens a new Click event called HTML
Is there a way to prevent the Enter key from being interpreted as a button click.
I am trapping key strokes at the form level but if a button has the focus and the ENTER key is pressed I cannot trap the enter because the button consumes it as a button click event. I am also unable to trap the enter key in any of the button's key events.
I am interfacing with magtripe swipe and barcode readers that send their information as keystrokes with a CRLF at the end. I have a work around by chaning the focus to a textbox anytime keystrokes are detected but I am hoping for better control.
Is there a way to disable the buttons ability to do this?
Is it possible to have multiple click events for a button based on the button text? In other words, if I change the button text can i create a new click event based on that text but use the same button?
for example:
button1.text starts as "steel" button2.text starts as "brass"
If I click button1 again a string would then be added to a textbox and the process would start over again. can I have a different click event or would I need to put an If/Then or Select/Case in the sub to handle this? I have 10 buttons I would need to do this with and each needing at least 3 different choices for each depending on the previous button press.
I am creating a little form that shows files (on my computer) in a listbox and well i am wanting to be able to click on one of these files in the listbox and hit the delete button and delete it off the listbox and off my computer how can i do this?
I created a function that retrieves information on which checkboxes are checked. It returns an array which the information coupled to the checking of those checkboxes. Those checkboxes and the matching textboxes are dynamically created at runtime in that same function. I'm pausing the application to wait for a button to be pressed. I'm trying to find a way to use btnDone.Click event directly because the code always reloops my function once more recreating the controls.
Public Function GetArray(ByVal strDLFolder As String) As Array
If blnDone = False Then
Me.Show()
[CODE]..........
Right now I'm setting a create a boolean switch when btnSubDone is clicked. What I would like is for something along the lines of:
[CODE]...........
Is it possible to use events like this? If not is there a cleaner way for pausing the application to wait for a button click (one that doesn't run the entire function again)?
I have a Combobox1 and Label1 in a form. There are items in ComboBox1 which is integer from 1 to 9. I want the user select the number in the combobox, and the selected number will be * 2. The answer will be shown at Label1.Text without any Click Button Event.
I would like to know how to make a button click only so many times until it becomes disabled.
I would also like to know how to keep what is put in a RichTextBox there, without erasing the other text;
Example: Two buttons, the first puts "1" into the RTB, and the second puts "2" into the RTB. However when I press the second button, it over writes the first value.
How can I prevent this?
You Can Ignore this question below;
Old Question: I am working on a counter, and want to know how to make a button show itself if I hid it.
I have:
CODE:
And would like to know how to make one of the buttons visible again, with one big button.
I know it has something to do with an "If" statement.
I have a coding to let user select 2 files to import:
[Code]...
But if user click cancel button at Browse2 button, the system will paste the value from Browse 1 to Browse 2 text box. How to do nothing if user click cancel button at OpenFileDialog?
vb.net experts, I am new to vb.net but I have some programming background and some experience. What I want to do is this. As of right now I have a webpage with buttons on it and each button once clicked runs a script in DOS and a the DOS command windows appear.
I would like to make a vb.net form with buttons on it that each button when clicked executes the same program. However the kicker is I want the DOS output to be displayed within the form along with a scrolling bar to the right of the window so a person can scroll thru the outputted DOS window. Does that make sense?
So I need printing help about school now.Let's say I have a form shaped same as the printer paper size, and I put 4 textboxes in 4 corners of the form. Now I want to print those 4 textboxes in 4 corners of the paper.
To print the actual form in the paper, you know what Im saying?
Im wondering how can i execute this code properly.. it seems i need to click the tabpage twice before my 'Save_Set_' button will take prompt or action..
Private Sub TabPage1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabPage1.Click teleport_controller = 1 '<--- declared as integer End Sub[code]....
tabpage1 and tabpage2 are under in tabcontrol1 control.. the problem here is when i select to this tabpages my save_set button doesnt execute for the code.. but if i click the tabpage again its working... i dont like this kind of action at all..
i know how to toggle a button background color when i click on another button? That means i have two buttons on a window form and when i click on button A, button B will toggle its own background color based on the click event in button A.
i have 3 textboxes that they have the first the number 1 the second the number 2 and the third number 3 when i click the button the label show the addition 1+2+3=6 i want the third textbox with the help of a new button not to participate in the addition and the label to show 3 like this 1+2=3 and with the click of the button again to participate and the label will show again 6 like this 1+2+3=6
I am trying to write a program using Visual Basic 2008 Express Edition that will automaticlay generate multiple Command Buttons that have different Texts and perform different commands.For example I want to generate Button_1 and Button_2 where Button_1 when clicked enters the value "1" into a textbox and Button_2 enters the value "2" into the same textbox.I know this can be simple done by using the designer and wirting the code in the Button_1_Click, but what I want to eventually achieve is for various buttons to be generated across different Tabs in a TabControl.So far I can create a button on a windows form using code, but the button has no purpose so command is assigned to it. The code i've used is listed below:
1. Something similarly I want with another button - when I click button2, I want to remove specific object - let say panel2, not hide it.
2. The second thing is that I want to put text from my textbox into excel, but in specific row. I would like to do that with word file as well. I would like to put text form my textbox in specific table, or row, or line. I only know to put text into a file.