Asp.net - Finding A .net Code To Add Existing Buttons/text Boxes/drop Down Lists, Etc To A Container Or Holder?

Jun 17, 2012

I'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 Replies


ADVERTISEMENT

Forms :: Capturing Values From Two Lists Boxes During Drag And Drop?

Oct 5, 2011

I have two list boxes. A users selects a value from each, clicks a button and the application creates a relationship between the two selected items by saving them in an array and displaying the relationship in a third list box.

What I want to allow is for users to be able to drag a value from one list box and drop it on top of another value. I have the code to capture the value of the item dragged but I don't see how to capture the item that the data is dropped onto.

Is there a way to capture the targeted selected item?

View 2 Replies

Drop Down And Also A Code That Clears All Text Boxes?

Jan 17, 2012

am designing a project in vb 2008 but i would like you to help me a code that adds items in a combobox with a drop down and also a code that clears all text boxes in a form if i click a refresh button.

View 1 Replies

Write A Short Code To Clear All Text Boxes And Radio Buttons Within Each Box

Jul 14, 2009

I 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 Replies

Unable To Make Own Buttons Drop Down Boxes?

Oct 13, 2011

I bet you all know DotNetFrameWork 4 needed for VB 2010 applications to work...

Any idea how i make my own framework?

I want to be able to make my own buttons drop down boxes...

And after i make it how to i put it into a dll so i can reload it in another app and use it...

View 9 Replies

VS 2008 : Drag/Drop To ALL Text Boxes On Form?

Jul 10, 2009

I have a pop up form that contains a listbox. Right now I am telling it exactly which text boxes I want to be able to drag and drop to, but I was just told to have it drag and drop to every text box on the main form.The main form with the text boxes has a bunch of tabs on it that hold each section. Each section has text boxes, so how would I code it so they are all capable of allowing drag/drop without specifying each one separately?

This is the code from my pop up form:

vb
Private Sub txtDropIn_DragDrop(ByVal sender As Object, _ ByVal e As System.Windows.Forms.DragEventArgs) Dim DropInTextbox As TextBox = CType(sender, TextBox) Dim TextToDrop As String = CStr(e.Data.GetData(GetType(String))) 'get rid of leading " - " if there isn't 'anything in the textbox If String.IsNullOrEmpty(MainWin.TextBox1.Text) Then TextToDrop = TextToDrop.TrimStart(CChar(" -

[code]....

View 16 Replies

Login Form With Two Text Boxes And Two Buttons?

Sep 10, 2010

I've coded a Login form with two text boxes and two buttons goes to a Users database to validate the userid and password. When I click the OK button (button1) I get an error message on the highlighted line below(Dim Reader).

It states that no value is given for one or more required parameters. What parameters are they talking about?[code...]

View 8 Replies

Can Whip Up A Program That Deals With Text Boxes, Buttons, Checkboxes

Apr 21, 2009

I can whip up a program that deals with text boxes, buttons, checkboxes, etc. fairly easily. I know how to deal with arrays and stuff like that, and I am just barely able to open/write to files (I don't quite have it down, but almost). However, when it comes to drawing graphics. Right now all I'm looking to do is create a function that will draw a pixel or really tiny rectangle at my command to use as the building block of drawing images. I saw some example code here:

Of how to have it draw a rectangle upon opening a form, and I was able to do that. But I guess I'm not quite sure how to make a function like that be performed when I do something like press a button (or just anywhere in a segment of code).It's probably because I don't understand this line:

[code...]

I understand that it makes a non-public sub called Form1_Paint, but I'm not quite sure about the arguments passed and what "Handles Me.Paint" really means. I'm not sure how to make this (if I can make it) into a function that I can call anywhere (in the button1.click code, for example) to make it display a pixel.

how I could do that? Either that, or just explain what the piece of code above is actually saying?

View 4 Replies

Customize Own Message Boxes / Can Rename Yes / No Buttons To Any Text Like Delete / Discard

Dec 17, 2009

I understand that currently vb.net message boxes support buttons like ok,cancel,yes,no,abort,retry.but i am wondering how do i customize my own message boxes such that i can rename the yes,no buttons to any text like delete or discard.

View 1 Replies

Interface And Graphics :: Special Characters In Multiple Text Boxes Via Buttons

Nov 14, 2008

I need to be able to add (specific) special characters to text boxes. Problem is, there are five of them spread across two forms and three tabpages. What I'd like to do is bring up a form when the user presses something like "F2" while the text boxes are focused, then on that form would be a grid of buttons. When the user pushes a button, the character is added to the box. How do I get this form to reference the box that called it without passing a global variable or calling a public function? I tried Form3.Parent.Name, but that always seems to refer to nothing. Also, once this is done how can I get it to just insert a character where the cursor on the calling box is? It probably shouldn't even be on a form either since that will take the focus when it's called (which I don't want)

View 3 Replies

VS 2008 - Create A Form With Radio Buttons - Text Boxes - Labels

Jun 22, 2009

I need to create a form with radio buttons, text boxes, labels, etc.. This information needs to be pulled from a database. For instance, I have a form that displays information that needs to be inputed to a database, based on what test is being done for a specific product. Each product requires different tests. So each product may or may not have the same information that needs to be inputed..

What I have done is made a database and filled a table with each product and what tests apply. I then call that database after the product has been selected for the tests. It will then fill an array for that products information for what texts boxes and labels need to be shown. I wanna take this further and have it create a form through code and align all the controls to specific spots so that it will look nice. For example I wouldn't wanna create a control and have it be cut out of the form, or have other controls overlapping others.

[Code]...

View 19 Replies

Populate Drop Down Lists?

Apr 5, 2011

I am fairly new to VB (have done some VB in excell, but its a bit different)

I have a couple of questions:

1) How do I populate a dropdown list from a Database Row 2?

2) When I create a Database from Acess, where do I save the database? and If I build the exe program later on, will it include the database, or how does it work? I feel completely stupid, but one of the best ways to learn is to try over and over again

View 2 Replies

Finding Equality In Items In Two Lists Of Differing Types?

Jun 9, 2009

I have two objects that are derived from same the base class. ets say ObjA is the base class, and ClassB and ClassC inherits ObjA. f I have a dim lst1 as List(Of ClassB) im list2 as List(Of ClassA)nd and I want to check for the existence of something being in lst1 that it is in list2, now I am only interested in comparing against one key bit of information that it is declared in the base class and is a string. How can I iterate through the lst1 comparing against list2? I thought I could I overload/override the Equals method but I am having no joy for either of the classes and say some thing similar to

Public Overloads Overrides Function Equals(ByVal obj As Object) As Boolean
Dim temp As ClassA = TryCast(obj, ClassA)
If temp.Id = Me.Id Then

[code].....

View 1 Replies

.net - Use LINQ To Count The Number Of Combinations Existing In Two Lists?

Jun 17, 2010

I'm trying to create a LINQ query (or queries) that count the total number of occurences of a combinations of items in one list that exist in a different list. For example, take the following lists:

CartItems DiscountItems
========= =============
AAA AAA

[code]....

The result of the query operation should be 2 since I can find two combinations of AAA and BBB (from DiscountItems) within the contents of CartItems.My thinking in approaching the query is to join the lists together to shorten CartItems to only include items from DiscountItems. The solution would be to find the CartItem in the resulting query that occurs the least amount of times, thus indicating how many combinations of items exist in CartItems.When CartItems is filtered to only the items in DiscountItems, it can be visually displayed like this:

CartItems that get a discount
=============================
AAA BBB <= This combination is eligible for a discount
AAA BBB <= This combination is eligible for a discount
AAA <= Not eligible

Thus, because there are 2 combinations of the discount in the Cart, the result is 2.Here's the query I already have, but it's not working. query results in an enumeration with 100 items, far more than I expected.

Dim query = From cartItem In Cart.CartItems
Group Join discountItem
In DiscountGroup.DiscountItems

[code]....

View 2 Replies

Asp.net - SQL String Adjustment For Drop Down Lists?

Oct 31, 2011

I'll try to clarify by using the following example. In here I have two Drop down lists (ddlInsertEmployee + ddlInsertCustomer) which should both be bound to fetch data from tables [Employee.EmployeeID] and [Customer.CustomerID] and insert it into table [Task].

The problem is that it inserts data from Employee.Fullname and Customer.Fullname into resp.Employee.EmployeeID and Customer. CustomerID.If I would change the Drop down lists to textboxes, and manually insert the IDs, it works like a charm, but this is not very efficient, I want to be able to see the entire Fullname.how to change my Sqlstring in order to make this work correctly.

Imports System
Imports System.Collections.Generic
Imports System.Data[code].......

View 1 Replies

Drop Downbox Only Lists One Item?

Nov 20, 2010

I'm using Visual Studio for the first time and VB. I have programed for awhile, but mostly new to windows related softwares. I have an access database connected to my test application and I am trying to display a drop down box with a listing of the item names in my table and the value that is sent off to my database is the actual item id. I can figure out the database part in terms of adding and editing, but I haven't been able to figure out how to display the full list. If I click the next button the list that is generated it displays the next item, but I would rather just list all items in the drop down box and remove that toolbar all together.

View 1 Replies

When Does DataBinding Occur For Drop Down Lists

Jun 12, 2012

Here is my drop down list and data source. My question is.. when is it possible to set a defaulted selected option for the drop down list, aka when have all the dropdownlists been databound and their ListItems populated? I have tried Page_PreRender, age_PreRenderComplete, Page_Load.I have read over MSDN's Page Life cycle event which suggest Page_PreRender.

<asp:DropDownList ID="ddlRampStandard" runat="server"
DataSourceID="RampStandardDataSource" DataTextField="StandardName"
DataValueField="StandardName" RepeatDirection="Horizontal"

[code].....

View 1 Replies

Asp.net - Dynamically Add Drop Down Lists And Remember Them Through Postbacks?

Aug 10, 2009

I need to show a drop down list when the page loads, the default selected value is nothing, or an empty element (such as "-"). When the user selects one value from the list, another drop down list is added below the first one, and so on.My problem with this is how you make the page to remember the drop down lists created through postbacks and the values they have selected?

EDIT: I did this example for dynamically add drop down lists and suscribe them to an event handler but the event won't fire.

EDIT 2: Changed the code because I labelled for VB.Net and posted something in C#. I update the code with some trivial improvements, but still won't fire the event :(

Private myDdlArray As New List(Of DropDownList)
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If (Session("ddl") Is Nothing) Then

[code]....

View 4 Replies

Asp.net - Editing A Gridview Row With Drop-down Lists Gets Too Wide?

Apr 16, 2010

I have a series of GridViews in a Tab Panel - databound to a generic List of Business Objects.

The columns in the Gridview are all similar to the following:

<asp:TemplateField HeaderText="Company" SortExpression="Company.ShortName">
<ItemTemplate>
<asp:Label ID="lblCompany" runat="server" Text='<%# Bind("Company.ShortName")

[Code].....

View 1 Replies

Drop Down Lists Connecting To An Access Database?

Dec 1, 2010

I have a couple drop down lists connecting to an Access database. I can get the first drop down list to populate with the departments I have listed under "dept" in my access file. After someone selected a "dept" i want the second drop down list to populate with the names ("name"). Right now the second dropdown list is showing up but isn't poplulating. What am I doing wrong?!? I would like to include a third dropdown list for another selection with a button to then show things from the specific selections. Right now, I just need to figure out how to populate a list upon another lists' selections.

View 1 Replies

Make Mulitple Drop Down Lists On Form?

Oct 20, 2010

ok, I'm basically trying to make mulitple drop down lists on my form. When the page loads, I can get my main dropdown list, called makelist, to fill in with the items that I want from a txt file.

What I'm trying to do is whenever the selectedindex is changed in makelist, it has to load a different dropdown list, called modellist with items from a different txt file.

[Code]...

View 13 Replies

Drag And Drop A Button Onto A Split Container In Program 2010?

Mar 3, 2011

I have a button that if a user clicks on the button it creates a new button without the user knowing, and they can drag it to a split container, drop it and edit the button. I am having an issue where I cannot drag or drop the button onto the split container.[code]...

View 3 Replies

VS 2008 : Having The Values For Each City Selected Via Two Drop Down Lists?

Apr 15, 2009

I've written a program to work out the flight distance between a set of seven cities around the world using a 2D array but was wondering how I would if possible go about having the values for each city selected via two drop down lists (say start city and destination city).

Public Class frmDistance
Private Sub Flightdist_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim rowcolumn(7, 7) As Integer
Dim sr As IO.StreamReader = IO.File.OpenText("Distance1.Txt")

[code]....

View 1 Replies

C# - Finding RTF Code Associated With Selected Text In RichTextBox

Mar 7, 2011

I am using winform RichTextBox and I wonder if we can find the corresponding rtf code (or at least whereabouts of it) when selecting text?

View 1 Replies

VS 2008 Creating Events For Lists Of Buttons?

May 21, 2010

i have created a list of buttons using the following

Dim Butt(20) As Button
Dim i As Integer = 0
While (i <= 20)
Butt(i) = New Button
Me.Controls.Add(Butt(i))
i = i + 1
End While

this means that buttons are created in the code and not on the form to begin with, so I don't know how to create an event for the click of a button in a list. Is it possible to do it with a parameter for i so that there is only 1event for all buttons in the list, and i is the button index array clicked?

View 1 Replies

Use Same Code In Several Text-boxes?

Jun 18, 2010

I am working on converting an excel spreadsheet I use everyday at work into a VB program.The problem I am running into is that i don't know how to handle a current issue.I have a set of text boxes that accept values, these values are then used to calculate an answer and that answer populates another text-box.The problem I have is that I need at least 10-15 rows of these text-boxes and they all need to use the same code.Each row of text boxes will have to be named different but the code to perform the calculations will be the same they just need to use the data from each row.Does that make sense?I know there is a way to do this but I have no idea where to start looking.I am using Microsoft VB2008 Express edition by the way.

View 6 Replies

VS 2008 Bound - Source Data Of Drop Down Lists Be Separate Queries / Datatables?

Jun 2, 2009

I've got a couple of drop down lists for languages. I bind them to a language list that comes from a query. Then the fields are also bound to the row in the DB they relate to. I have several panels with the language drop down - each "tied" to a different table in my DB. When I call up different records on the same panel the drop downs immediately "set to the position" of that rows language in the list. But when I call up another panel - tied to another database table - I see that language in the drop down.

[Code]...

View 9 Replies

Code 3 Buttons To Get Same Text?

Jan 24, 2012

I 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 Replies

Finding Value In Drop Down List?

May 31, 2012

I am trying to compare a calculated date with a value in a dropdown list. The value is a date.toString.This is what I have so far:

Dim sched = scheduleDateVal.toString("d"
If Holidays.Items.Contains(New ListItem(sched.ToString("d"))) Then
ScheduleDate.Text = scheduleDateVal.AddDays(1).toString("d")
End If

Holidays is a dropdown list bound to a database so that I can add a day to a scheduledate if it happens to fall on a holiday. This works if I add a string value to sched rather than converting scheduledateval to a string.

View 2 Replies

VS 2008 Create The Form With A Button And Two Text Boxes - Move Text Between The Two Boxes

Oct 7, 2010

I am trying to follow the book 'Sams teach yourself VB 2008'. It was going well until the end of hour 4. For exercise 1 I have created the form with a button and two text boxes, but cannot work out the code I need to move text between the two boxes. The Object Browser does not seem to help - am I reading it wrong?

View 14 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved