Retrieve A Value From A Second Form?

Apr 12, 2009

I'm teaching myself VB.Net.

Here is a problem I have recently come across. Say I have a main Form1 in my application. Form1 calls a second LoginForm which (like the name suggests) is a login window with username/password type fields. Expected behaviour is that LoginForm will capture login details and pass them back to Form1.

In my mind, I was thinking along the lines of a function call like 'doLogin' that would 'show' the LoginForm, capture the data entered, dispose of the form and return the login details (probably in some kind of bean). Somehow I don't see this as being possible

What I have currently is less elegant. LoginForm is shown by Form1 modally (i.e. showDialog); a 'me' reference is passed to the second window. After user input has been received on LoginForm, I set a value on Form1, then dispose.

View 3 Replies


ADVERTISEMENT

Retrieve Data From Gridview In One Form In Another Form?

Jun 4, 2010

I have a form consisting of datagridview with as checkbox column. Now, when the user selects a row using checkbox, I want a new form to pop-up and the selected rows be displayed on that form..The rows in the table consist of quantity and cost of materials, so i also want that the total quantity be displayed in a textbox on the other form..Could anybody please suggest as to what should i use on the other form, as in, textbox, datagridview, table etc.

View 7 Replies

How To Retrieve The Value From One Form To Another

Dec 1, 2011

I have the problem to retreive the string from one form to another. here is my code: What's wrong with this? Public Class Form3

Dim unit As String
Public itmname As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

[code].....

View 1 Replies

Retrieve Database From Other Form To Another

Jun 10, 2011

I still cant think a way to get my database from the datagrid in form2 and display it on form3..my little program is like a schedule that you'll edit your students class hour,subject and teacher.. then after that when you view your schedule.. you'll see only what subject you'll be at in that student data schedule...i've tried dbgrid.columns(n).text = label1.caption, but i found out that it'll copy the data but only those on the 1st row >.<. ill upload my program here for you guys to have a hint what program exactly im making on.

Here's the link :[URL]

View 1 Replies

Retrieve Two Tables From Database To One Form?

Jan 15, 2012

I was just wondering if I can retrieve two tables from my database to one form? because i'm trying it but it doesn't seem to be working. just the first table i'm trying to retrieve is working.

View 7 Replies

Save And Retrieve Data In FORM?

Dec 4, 2009

im trying to make a basic Database

Its suppose to save the stuff written in the texbox for example

I have to input 255 students Name, address, age and Birthdays and save them all and then try to find all of the info stored by entering the Name.

Also i have to generate a student Id not just giving a Id to them so for example if the first student i enter his ID # should be 1 and so on as i enter the name

View 6 Replies

Retrieve Data From Database To Form Having Checkboxes?

Oct 10, 2011

[img]C:\Users\Vikas\Pictures\database.jpg[/img]
C:\Users\Vikas\Pictures\untitled.jpg

[code].....

View 3 Replies

IDE :: Design An Application In 2005 That Will Retrieve Pictures On A Form?

Aug 29, 2010

i need to design an application in visual basic 2005 that will retrieve pictures on a form. PS: All pictures should be located in a combo box! And the number of pictures are 2000.I've started with cmb.Items.Add("pic1") but that really tiresome to write 2000 codes.

View 9 Replies

How To Retrieve Or Set Data Programatically For Dynamically Added Textbox On A Form

Dec 27, 2009

I have successfully added textboxes to a form at runtime. I have also succesfully added an event handler to these same textboxes. What I'm having trouble understanding is how to refer to these textboxes programmatically after they have been added. Specifically, how do I;

1) Retrieve user data entered in those textboxes without an event handler

2) Find a specific one of those textboxex later (is looping thru all controls of type "textbox" the only way)?

purpose of find is so that I can set the value of the corresponding textbox programatically, based on some criteria Here is the code (all within in a for loop, where intvararycount is incrementing to a set limit) I have used to add the Textboxes to a Panel on a Form;

[Code]...

View 4 Replies

Submit A POST Form And Retrieve Result Page In A String?

May 30, 2011

I am trying to create a program that is able to submit post data for the page [URL] where it submits the request fields and then the resulting page is receiving in a string.

View 2 Replies

IDE :: Store And Retrieve Data From Excel Worksheet Using A Form Created In Vba Studio Express 2008?

Dec 4, 2009

am trying to store and retrieve data from a closed excel worksheet while in a form created in vba studio express 2008?

View 3 Replies

Datagrid Expansion - Datagrid In Form - Retrieve Data From My Sql

Jan 22, 2009

I placed a datagrid in my form which l retrive data from my sql. i am using oledb connection. if i run the form i can retrive the data but i am not getting the data in the grid at first ,there is a "+" sign, i have to clik that then it shows the table name and after clicking the table name i can view the data displays in the grid..

View 1 Replies

Select Data From Data Gridview And Retrieve To Another Form

Apr 11, 2011

i want 2 select data from data gridview and want retrive that data into another form in to the textbox ...is it possible ? i 'm doing like this for that

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.[code...]

View 2 Replies

How To Retrieve DNS IP

Jan 29, 2009

I need help in retriving the DNS server ip of my computer. But with my codes i only manage to the IP address of my computer. [code]

View 2 Replies

Retrieve Value From Exe?

Feb 12, 2008

Not sure how to word this right as I've never done it before. Also not sure which language I should code it in..

How would I go about getting a value from an exe if I already know what address it's located at?

For example..in the app I'm making that calculates the current xp per hour, I need to be able to retrieve the total xp on my char from the game exe. I already know that the xp is located at 0080B910 and can see it with my debugger.

View 5 Replies

.net - Retrieve Ip Address Through Lan?

May 18, 2011

How I can retrieve the IP address for a client when this client is connected to the server through Lan network and show it as a string in textbox?

[Code]...

View 1 Replies

How To Retrieve ComboBox Value

May 9, 2010

I have a combobox (dropdownstyle=dropdownlist) with 4 items in it (defined in design time). The items are the following:
1;0,1;0,01;0,001
I read a row from a database (which contains a field with one of the 4 items) and I want to display this value in the combobox.

I use this method:
cmbtizedesh.SelectedIndex = cmbtizedesh.FindStringExact(pgreader(4))
But it works only, when the field value is 0,001. In any other cases the combobox value remains empty (the result of the FindStringExact function is -1). The pgreader is a NpgsqlDataReader object and retrieves the right values.

View 2 Replies

How To Retrieve Records

Nov 1, 2010

I'm using vb.net. Usually I used the SQL Server SQLComamnd but here I need to use an ADO. I have this but I'm stuck at the end of it how to get the data? [code] How do I actually retrieve this record?Is there something akin to the SQLCommand that has Reader?

View 1 Replies

How To Retrieve Selected Value

Sep 3, 2009

cboName.DataSource = Me.CustomersTableAdapter.GetDataByFullName
cboName.DisplayMember = "FullName"
cboName.ValueMember = "CWID"
'cboname.SelectedValue =
How do I retrieve the selected value.

View 4 Replies

Retrieve All Usernames?

Oct 12, 2009

I have been working on a project in which I need to get all usernames.

Add to form
Public Function GetUserId() As String
Dim lUserName As String
Dim lSuccess As Boolean

[Code].....

Unfortunately, this only gets the username of the user logged on. I was wondering if there is a way to modify this to get all user names.

View 2 Replies

Retrieve CLR DLL From SQL Server?

Nov 22, 2010

Is it possible to rebuild or retrieve a VB CLR dll file which you've imported into SQL some time ago?I've gotten to the point where I was able to find the contents of this DLL by doing:

SELECT * FROM sys.assembly_files

but I don't how if it's possible to rebuild the dll with the contents found there.

View 3 Replies

Retrieve Column Name With The Value?

Oct 9, 2010

I am trying to retrieve column name with the value which it have. I did many try but only i am able to get column name.

a
Dim schemaTable As DataTable = reader.GetSchemaTable()
Dim myRow As DataRow
Dim myCol As DataColumn

[Code].....

View 3 Replies

Retrieve Name For An Id Used In Different Table

Jun 18, 2012

I am using vs2005 with access database.Developing a new application. I am the new one to the application development.This is what my situation which takes my time towards searching a reference but no where it is found:There is 2 tables named tblbill(contains VendorID & TruckID) and tblvendor (contains VendorID & VendorName) Where my user wants to display the vendorname against what he selected the TruckID..I know how to catch the VendorID in selection of the TruckID..But doesn't know how to retrieve the Vendorname based on the vendorID.

View 3 Replies

Retrieve Name Of Sub/Function?

Aug 31, 2008

In an errorhandling messagebox inside my own Sub/Function procedures I want to refer to the NAME of the Sub/Function, so I will know where the problem is located when the error messagebox pops up.How do I retrieve the name of the particular Sub/Function that I am in at the time (in the Editor)?

View 2 Replies

Retrieve Records For Each Day?

Jul 2, 2009

I wish to retrieve all records for a particular day. The user can choose a date from a calendar and once click on ENTER,all the records for that day will be display out. I am able to choose the date using MonthCalendar and display it onto a label. But the sql statement of displaying it onto a datagridview shows no result.

This is my sql statement:

HTML
MyCommand = New OleDbCommand("SELECT * FROM cable WHERE 'Date_Time' = "& Label6.Text,MyConnection)
My records in MS Access is in this format:
mm/dd/yyyy xx:xx:xx AM/PM

View 5 Replies

Retrieve TEXT From The Web?

Feb 20, 2009

Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim myBrowser As New WebBrowser

[Code].....

I can get this to work, but I am trying to get text only from a text file on a website. The above code gives me html code along with the text. Are there a way to get text only from a text file?

View 1 Replies

Retrieve Username From SID?

May 5, 2010

Im trying to convert a SID to a username. Could i use the DirectoryServices to convert it from SID to a username if yes how would i go about getting started with it please? Or i have read to use the "advapi32.dll" ConvertStringToSID to do this but 1. Wouldnt this be going back to old programming techniques? 2

View 1 Replies

Retrieve Value From INI File?

Jun 10, 2011

I found that vista OS is malfunction to retrieve value from INI file. When set at vista scheduler. After I test few method, I get the solution to solve is copy the INI file to system32 to get it work. But that exe file can be worked perfectly by using manually double click the EXE file. Except copy INI file to system32?

View 6 Replies

Retrieve Value From Other Function?

Mar 18, 2009

i want to call a function that can convert code key-in by user into a set of code..i call function convertCode(coop,portal) in another private sub call SEMAK.. after the function executed, how can i get the latest value for portal to use it in sub SEMAK? after i convert coop n portal, i want to use the latest value in portal. but in sub SEMAk it still take the value that i declare in sub SEMAK that is Dim portal As String = ""

the function is
Private Sub convertCoop(ByVal coop As String, ByVal portal As String)
Dim conn1 As New SqlClient.SqlConnection("Data Source=10.0.0.70;User ID= sysadm;Password=sysadm;Initial Catalog=SPGA_Latihan;Persist Security Info=True;")

[code]....

View 1 Replies

Retrieve Which Directory I Am Into?

Jun 11, 2011

I want to know that which folder or drive i'm in and my program will automatically write the status on the list box . i mean, i want to get the current status of the drive and directory of each visit.

View 2 Replies







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