Forms :: Adding Or Drawing Boxes?
May 23, 2011
I have to make a lot of retangular boxes to make my program neat but i'm having a problem of adding boxes. I tried using the draw event in the tab page but everytime i scroll it will draw the lines again and messes up everything. Also when making a line greater that the tab page, autoscroll won't work.Is there a way to make lines or boxes in design time?
View 4 Replies
ADVERTISEMENT
Jan 19, 2011
what I am trying to do, is loop through a datagridview get the values from there for "RectangleF(5, 25, 0.5, 4)" how can i best do that.... I've tried several different ways, but nothing is working like i want it too
Public Class Form1
Dim WithEvents PB As New PictureBox
Dim Ratios As PointF
[code]....
View 6 Replies
Jul 5, 2011
Im trying to make a program that allows the user to view additional information via moving the cursor over the label to view (make visble) additional information, in the form of text boxes and/or picture boxes. How will i go about doing this?
View 6 Replies
Oct 19, 2011
I'm doing a web application in which the user must make a series of figures such as rectangles, text boxes and lines, Is something like like google docs draw
View 2 Replies
Dec 25, 2011
I'm looking forward to reading and adding more to the community here. I've created a text based rpg. Next semester we are learning Visual Basic. I'm on winter break and I would like to get a head start on my learning. I've been working on creating some forms and message boxes. What is throwing me off, is that I have a good feel for doing coding so that I get functionality the will produce effects in a console. Coding the forms is a bit confusing for me. Is this something that others have run into? Is their some good primers for VB? I don't have my text books yet.
View 10 Replies
Mar 22, 2010
am having a big problem trying to make a program that will add multiple text boxes together.What I need to do is add all the text boxes together. If it is less then three leave it alone, if it is more then three then put a 10% discount on it. There are also other charges but the main thing I'm struggling with is adding the text boxes.
Here is some of my code:
Private Sub TotalButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TotalButton.Click
[code]......
View 4 Replies
Aug 17, 2010
I am writing an application that is talking to a PMAC card control servo motors. The motors run in an x,y plane where 0,0 is lower left. I would like to be able to draw what I am about to send the card on the screen. All I have are lines and arcs. I have had no luck getting the top left origin to change, or my arcs to draw correctly. Is there any libraries out there that would help with what I want to do.
View 5 Replies
Oct 19, 2010
I'm using the free version on Visual Basic 2008 (through school).The assignment is to populate a list box from user input text. The textbook only talks about populating a list of known items.ex animalListBox.Items.Add("dog") Which works just fine, however, we don't know what the user will input.
So, how should I be thinking about this?
View 2 Replies
Jul 30, 2011
Adding text boxes to a form
View 2 Replies
Mar 21, 2012
If I'm trying to output to a listbox, what is the easiest way I can enter a string and then a variable on the same line? I'm trying to use listbox1.Items.Add(...). Obviously outputting a string is no problem and outputting a variable is no problem, but I want to add a string and then a variable after the string. For instance:
name = "Joe Smith"
listbox1.Items.Add("Name: ", name) [or something like this]
[Output] Name: Joe Smith
View 4 Replies
May 19, 2009
I am building a very basic calculator which adds and subtracts various numbers from various text boxes when I click on the 'button'. This works fine with:
TextBox3.Text = TextBox2.Text + (TextBox1.Text * 1000)
etc but when it comes to adding or subtracting time I get completely lost.Say I want to add 50 minutes in one text box to 12 minutes in another to display 1:02 in a third text box by clicking the same 'button'I am using Visual Basic (in visual studio 2005) to program a Windows Mobile Classic 6 PDA?
View 7 Replies
May 11, 2009
Basically im trying to add 4 new picture boxes everytime a specific text changes. This is a picture developer based off the binary of a number 1 - 10 I can get 4 to change everytime the text changes but i have no idea how to add 4 everytime the text changes. here is the coding i have so far.
Imports System.Drawing
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
[Code]......
View 5 Replies
Sep 12, 2010
I have 4 checkboxes available, what I want is the user to be able to select as many of the four checkboxes.Each of the four checkboxes have a value, but when i set the code it only selects the first checkbox and only adds the first checkbox i select to the totals, rather then all selected checkboxes.The values have been set in the module and all the values appear correctly, they are just not adding all together when i select more than one checkboxHere is what I have in the calculate button.
Dim PriceDecimal, DiscountDecimal As Decimal
'Find Price of Service
If MakeoverCheck
[code].....
View 3 Replies
Dec 21, 2011
Dim ds_Details_all1 As New DataSet
Dim dgv_newtbcolumn As New DataGridViewTextBoxColumn
Dim dgv_newcbocolumn As New DataGridViewComboBoxColumn
Try
If ds_AEGM.Tables(0).Rows.Count <> 0 Then
[Code]...
View 3 Replies
Aug 8, 2011
How can I create a class so that I'll just call it to my form:This is the code of my Add Text box button that adds multiple text boxes.
Public Class Form3
[Code]...
View 4 Replies
Oct 15, 2008
I'm writing a database program that will take various information from the user via text boxes, then save them as a *.txt file. I've already figured out the majority of that business. However, I'm having trouble programming a ListBox.
The ListBox needs to accept three pieces of information from 3 Text Boxes, then concantenate them when a button labeled 'Add' is pressed and scoot them to the ListBox (lstshowresults) while clearing the three boxes at the same time.
View 3 Replies
May 4, 2011
Form1 has 2 public string variables defined and initialized to "" (an empty string).Form2 has 2 text boxes and a button. When the button is clicked the public variables on Form1 get set to the values in the text boxes.This works fine.I recently had to add a module to my project so that I could use Main as the startup item. Ever since doing that the above no longer works.The variables never get set to the values in the text boxes. They just stay empty.My Main code is simply this for now:
Dim f As New Form1
Application.Run(f)
View 1 Replies
Mar 29, 2009
i have a problem that wants to display a random series of coin tosses(coins flipped per each user click)i can't get the picture box to display the coins
Public Class CoinToss
Dim randomObject As New Random() 'creates random object
'display results of coin toss
[code].....
it should count the number of time the "toss" button is pressed and display that number as welli also need to add a flip module that doesn't take arguments and displays false for tails and true for heads, but i'm stuck
View 3 Replies
Jul 28, 2009
just wondering if it is possible to add a method to all forms in my project without having to do it on one form and Inherit all my other forms from that one
View 3 Replies
Jul 19, 2010
I have a VB.NET Windows Forms app with a logo image on the form as a System.Drawing.Bitmap inside a PictureBox.I used the Visual Studio Designer to add the logo .bmp image so I don't currently have any VB code doing anything with it.I'd like to make the current logo a clickable object/button so when I click on it a file browser dialog opens and I can select a new image to replace the current image.The current image is a local resource and is set in a PictureBox as a System.Drawing.Bitmap.How would I replace that System.Drawing.Bitmap with a file selected from the file browser dialog?
View 1 Replies
Feb 28, 2012
I have a listview control that contains 2 items, ProdCode and ProdName. When the user clicks on the Prodcode, I would like the Prodcode to be entered into a field on the form. at the same time, the ProdName should populate the ProdName field on the form. Below is the code to get the data for the ListView.
Dim objListViewItem As ListViewItem
'Initialise a new instance of the data access base class
Using objData As New DABase
[Code].....
View 4 Replies
Jun 12, 2009
I have a list box which is containning diffrent groups from database. On the form i have multiple controls like checkboxes, text boxes and so on. Wht i have to do when some one selects a entry from list box the others controsl should be populated from that value. User can edit the data , delete the data and so on.
View 1 Replies
Apr 12, 2011
Ok, Im having trouble passing a value from one form back to another using a listbox... The user clicks a button in the main form to bring up an instance of another form (form2.show). In that form, the user then then selects a number 1-5 and then presses done:
Code:
Private Sub frmPlayer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim x As Integer
If lboNumber.Items.Count = 0 Then 'list box is empty
For x = 1 To 5
[Code]...
How do I pass that value back to the main form as a value when the user clicks done?
View 2 Replies
Apr 6, 2011
I'm currently trying to make a beat generator, which allows you to add several labels (boxes) onto a panel, and then sound will be played when the "play slider" reaches the same x-value. However, i can't make the slider find the boxes. OK, so this is what I've got so far! Clicking my button, a label named sound0, sound1, sound2 is added to my panel_back (which is the background of the player) Private Sub btn_addkick_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_addkick.Click
[Code]....
View 3 Replies
Apr 7, 2010
I have 7 textbox's.
Names are
textbox1
textbox2
[code]....
I need to do
For i = 1 to MyVar
textbox(i).enabled
next
View 6 Replies
Aug 29, 2010
Am currently piecing my programm together and working on structure. My plans will have me running multiple forms,and my question is this. When I have ,say ,on form1, a "TextBox1" and on another form a TextBox with the same name,will I have conflicts when I access data across forms. Should I be taking care to make sure textboxes and buttons names aren't being repeated,or will VB know what I want?
View 11 Replies
Feb 20, 2011
I am new to programming just started school for it and i started playing in VB Which is what my class is i have Visual Studio 2008. okay here is what i need help on. I am making a simple windows forms program it has 3 forms and on form 2 i have 6 text boxes and on form 3 i have 6 labels. I am trying to get the user entered data in the 6 text boxes to transfer to the 6 labels on form 3.
View 5 Replies
Nov 2, 2009
I need to assign code to a button, that when clicked on, validates an ISBN code, and displays a message that it is either Valid or Invalid. I basically need help transforming code used in a console application that will now be used in a windows form application, so no more writeline stuff, now message boxes. [code]
View 2 Replies
Apr 16, 2010
I've got a big database driven project...15 forms 50+ input boxes and im wondering how to do it effieciently. I've got code to connect to the mysql databse but i dont want to put it inside each form over and over for every form. How can i do it so that i only have to clal one method to connect to the db or leave the db connected constantly from the start of the app. here is the code that i got to put in every form -_-
Dim conn = New MySqlConnection()
conn.ConnectionString = "server=localhost;" & "user id=root;" & "password=;" & "database=project"
Try
conn.Open()
[CODE]...
View 3 Replies
Apr 10, 2011
I want to create a grid of checkboxes dynamically on my form for example the user may key in 16 which is a 4x4 grid of checkboxes or 81 which is a 9x9 grid.my code seems to be generating the correct values but the checkboxes dont go to the correct location on the form
Public Class Form1
Public NumberOfInputs As Integer = 81
Public CheckBoxArray() As Control
[code]....
View 3 Replies