Sending Data Between Forms

Dec 1, 2010

i have a similar question so i thought i might post it here rather than clutter the place with a new thread, if that's okay.first off, i'm using VB 2010 Express, if that makes any difference.second, i'm trying to send data to form2 from form3 rather than the other way around. i'm still pretty much new to VB, but have a lot of experience in PHP and some in java. i'm making a basic program that creates critters on form3 and then adds them to a table on form2.[code]then adds a value of 1 to the progress bar (i still am trying to figure out how that works) on form2.

View 3 Replies


ADVERTISEMENT

VS 2008 - Sending Data / Passing Value Between Forms

Dec 15, 2009

Imagine a project with couple of forms and a module. Now as per my knowledge if i want to send some data from one form to another then :

- If I declare variable friend/public in a module then it can be accessed in the entire project (thus also between forms).
- If I just have to send data from one form to another, then I can call the other form's sub/function and pass value.
- If the pass value by reference then I can get new value only if its changed in that function.

Now what the issue is, I need to pass a variable to a form and in that form when user types contents in a textbox or makes other selection and presses OK button then it should return some values back to the calling form. Now how can I achieve this (without declaring global variables which will be accessible everywhere) ?

View 14 Replies

GPIB Communication - Sending Data - Receiving Data - Saving Data

Sep 19, 2010

I need to control a device with a GPIB port. I have the commands that I need to use to do this; but I don't know which is the sintaxis in Visual Basic.

For example if I need to send a instruction like "START:0.01" to the external device which are the libraries that I have to include?, how should I write the programming line to do this?

The main tasks that I need to program are sending data, receiving data, and saving data

View 5 Replies

VS 2010 Sending Imput To Other Forms?

Feb 23, 2011

I have looked at a ton of tutorials and still don't seem to understand how to do this.I want the information that was typed into the text box to show up in this listbox

View 2 Replies

C# - Sending Emails From A Windows Forms Application?

Jun 7, 2012

I'm building a windows forms application that's supposed to run on a remote/isolated machine and send error notifications by email to the admins. I've tried employing System.Net.Mail classes to achieve this but I'm running into a strange problem:

1. I get an error message:

System.IO.IOException: Unable to read data from the transport connection:
An existing connection was forcibly closed by the remote host.--->
System.Net.Sockets.SocketException: An existing connection was forcibly closed by
the remote host at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset,

[code]....

View 2 Replies

Sending Irc Commands From Multiple Forms & Classes?

Feb 13, 2012

while making my irc bot i need to send many different irc commands such as join channel, change mode, kick user message, topic channel message and so on. All these commands are currently process individually in a public sub on the irc connection thread.

Public Sub Write(ByVal command As String)
_streamWriter.WriteLine(command)
_streamWriter.Flush()

[Code]....

Would you have a load of public sub's to handle each or maybe something else?

View 2 Replies

VS 2008 Sending Data To A Webpage Via POST, Data Not Getting There

Jun 16, 2010

I've code this code below:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim hwrRequest As HttpWebRequest = HttpWebRequest.Create("http://www.example.com/web-service.php")

[Code]....

The MsgBox() at the end shows the response, which as I've added to my script, echos the result from the $user and $pass variables which are supposed to retrieve those details being written to the stream above, but they show up empty.

I'm retrieving those values by doing: $user = $_POST["user"]; $pass = $_POST["pass"];

View 9 Replies

Forms :: Sending Bulk Messages To Yahoo Answers?

Jun 28, 2010

I'd like to create one as I am an affiliate marketer who wants to reach customers based on key words. I don't regard this as spamming since I'm not randomly sending out links its based on key words like I said. Y!A might regard this as spamming anyways but so what. In Yahoo Answers you click the question you want to answer, type in the answer, it takes you to a preview screen, and then you click submit. I suppose the script/program could involve automating this task.

Its not that I need everything to be done when I'm away from the computer, I don't mind working the program at all each time I send a mass amount of messages. Someone created a program a while back that was *supposed* to send bulk messages as they stated in the description but as it turned out this was not an option you could only comment on resolved questions. When I did send mass comments to questions which related to my key words, I clicked the link to confirm my comments went through and they did not! This program was a waste of my time and energy but that's life.

View 1 Replies

Forms :: Sending Mouse Clicks And Test To A Window

May 10, 2011

I am new to VB.net, i did a course in it about 5 years ago, and could do simple programs, but lost most of my knowledge, because i have not used it in such a long time, now i want to do something and cant seem to get it right, i have this game that i a play online, and i have a few accounts for it, so i would like to make a account logger, wher the usernames and passwords will be saved in a text file, and then i just open the vb program, select the username and the vb program will automatically set focus to the game window (which is windowed, not full screen).

Problem is just, the game client has 4 buttons, New Account, Play Game, About and Credits, i want to get a way for the VB program to set focus to the program(bring it to front, and then move the mouse to the coordinates of the play game button, goto coordinates of the username text box, click and write the username, same for password and then move to login button coordinates and click logon, wait a sec or two and move to either character 1, 2, 3's login button and click)

[Code]...

View 3 Replies

VS 2008 - Sending Stuff From Window Forms To Remote SQL Server

Mar 2, 2012

I want a quick and easy way of sending stuff from my window forms to my remote SQL server, my remote sql server allows remote connections to my IP address. How can I do this? I also need to return a result, either true of false.

View 6 Replies

Forms :: Share Data Between Forms (as Opposed To Passing Data)

Nov 26, 2011

Quite a few threads on passing data from one form to another, but I'm struggling to work out how to share data between the two - back and forth.

For example:

Class1 is a class with 10 string properties

Form1 has 10 labels ("Label1", "Label2" etc) and a [Configure] button.
Form2 has 10 textboxes and a [Apply] button.

I want to load with Form1, and create an instance of Class1. Click the Configure button and load Form2, passing Class1. On Form2 I want to manually fill in the 10 textboxes and hit Apply. The Apply should update the Class1 instance and close the form.

Form1's Label controls should then be updated with the data from the Class1 instance.

I'm fine creating the forms and classes, as well as passing the class into Form2 with a custom Sub New(EmptyClass as Class1) constructor. This gets the empty class into Form2, but how can I get the populated class back to Form1?

As Form1 already exists I don't want to create a new instance with another custom Sub New(PopulatedClass as Class1)

It's also key to be able to use the Form2 multiple times, basically ending up with a Data class being displayed as part of Form1 but updated using Form2? (For example if the Class has already been created and populated with data when it's passed back to Form2 for the second time I would pre-load the Textboxes with the values already in the class).

View 3 Replies

TCP Receiving / Sending Data

Nov 11, 2009

Im woundering how does Receiving/Sending data work in a TCPClient/Server that is connected in the same networkstream.

View 4 Replies

.net - Sending Data From VC++ To VB In A .NET Framework?

Mar 2, 2010

I'm having a heck of a time figuring this out, the tutorials I found on the web are not complete or are for VB 6.0 (obsolete in some cases). On the C++ side I have the following ::

hwndExternalApplication = FindWindow(NULL, L"Dromocast Client");
SendMessage(hwndExternalApplication, WM_SETTEXT, NULL, (LPARAM)"Hello");

"Dromocast Client" is my visual basic application, and I checked to make sure it's not NULL. In fact I get made sure I'm getting some data on the VB side. On my Visual Basic side I have the following

[Code]...

When I send the data over it's garbage, meaning strTemp comes out as all these chinese characters, and my title bar on the visual basic program gets garbled with a bunch of chinese characters as well. My guess is my "SendMessage" is written wrong, or I'm doing something silly, but I have no idea what. I'm not a windows programmer so I'm kinda trying to figure this stuff out by googling.

View 3 Replies

Determine Whether Data Is Sending In?

Jan 5, 2010

I am currently writing a visual basic program that gets data from a serial port. everything is connected up but the data is not received until my device on the other side is turned on on the other side. which condition can i use in my loop to ensure that i only start comparing when i have started to receive so that my loop will not hang as there is no data input?

View 1 Replies

Sending And Receiving Data To Or From PIC Through RS-232?

Nov 14, 2011

Currently I had write a simple VB code, my aim is when i click "Forward" button then the vb will send a character "A" to PIC, "Reverse" button will send "B" so I write my vb code for sending as below:

Dim Forward As Char = "A"

SerialPort1.Open()

SerialPort1.Write(Forward)

For the receiving part, after I received the data from PIC then I will show it at the label which act it as a screen. the receiving code as below:

SerialPort1.Open()
receive = SerialPort1.ReadChar()
If receive = "A" Then[code]....

View 14 Replies

Sending And Receiving Data Via USB?

Dec 4, 2011

I am working on system support for an electronics project wherein I have to receive an 8 bit (binary) data through a USB port and store either the binary or the corresponding decimal into a variable. How can I implement this in visual basic 2010?

View 11 Replies

Sending Data From VB App To SQL Table

Jun 11, 2011

how to connect and view data in a sql databse table. Does anyone know how to send data from say two textboxes to the table [Code]

View 3 Replies

Sending Data To Access Db?

Apr 7, 2012

i have created a MDI form and i have a child form that collects data and inserts it into access 2010 DB however it does not work .my code is odd and i am trying to use mysql syntax here is the names and opject types used in the sql code

intID = a text field that is autogenerated with a number
txtFirstname.text (text field)
myDOB is a DATE variable which is collected using a date picker (myDOB = dpDOB.Value.ToShortDateString)

same goes for mysubs

SQL

metag

INSERT INTO members (ID, FirstName, surname, DOB, SubsDate, HouseNo, Street, Town)VALUES ('" & intID & "','" & txtFirstName.Text & "','" & txtSurname.Text & "','" & myDOB & "','" & mySubs & "'" & txtHouseNo.Text & "'" & txtStreet.Text & "'" & txtCity.Text

i then get nothing but errors

View 6 Replies

Sending Some Data Over A Networkstream

Jul 31, 2009

I am sending some data over a networkstream. The datasize is 97 The buffersize is 1. Data is a list of bytes. When the bytecount reaches 94 the do while loop exist itself.

[Code]...

View 2 Replies

VS 2008 Sending Out Data From One Pc To Another?

Dec 10, 2009

I have a program that I collect data using a com port. I display that using special visual controls - no problem here.

What I would like to do is to send this same information out over the network via ethernet to another PC located in another room.

I presume I would have to have another copy of the program on the second pc as the information is simply duplicated but I am not sure how to get the data out of one to the other

View 2 Replies

Access Com Port And Sending Data

Nov 9, 2011

have gps constantly sending data but can read it from the com port

View 5 Replies

Asp.net - Sending VB Data To Another Page In Javascript?

May 28, 2010

I'm creating a search form using an asp:button control with the urlpostback set to a results page. The problem is, the asp:button uses Visual Basic and the search results from Google require Javascript.

Is there a way to take the data from an asp: textbox in VB and then send it to another page that uses Javascript and use the data?

View 3 Replies

BitConverter - Sending Data Across TCP Socket

Apr 9, 2010

Given the following information
Public Enum Request As Byte
None = 0
Identity = 1
License = 2
End Enum
Protected mType As Communication.Request
mType = Communication.Request.Identity
Debug.Print (BitConverter.GetBytes(mType).Length.tostring)
2

Why does bitconverter report that mType is a length of 2. I would have thought that passing a Byte into BitConverter.GetBytes would just return the Byte. I mean it's no big deal because it's only sending a very small block of data across a TCP Socket, but I'm just intrigued why it thinks it's 2 bytes.

View 1 Replies

Sending Asymmetric Encrypted Data Over To An FTP

Sep 9, 2011

I have been using RSACryptoServiceProvider and was using the template code provided from the MSDN resource page.url...I wanted to encrypt the data on my computer and transfer the data to the FTP server and have it decrypted there. I have the encryption and decryption code but it is in the same program and only work during the instance it is open. The intention is to have a program that will encrypt and send the data to the FTP Server. There will also be a VB Script on the server to decrypt the data and store it in a separate location. How do I get it to store the public key on my computer and the private key on the server? Also, how to I transfer the encrypted data over to the FTP and have it saved there?The purpose of this project is that we have people located over the globe and are sending sensitive information to an FTP server at the home office. My boss has insisted on the data being encrypted before sending anything. But, on the server it will be decrypted so that a select few can go through the information.

View 2 Replies

Sending Data From A VB Program To USB Port?

Apr 23, 2009

I'm working on a project that involves sending information through a GSM module, this module is connected to the system through a USB port. the information to be sent is gathered from a database using VB, now I need to send the information from my VB program to the USB port for onward delivery to the GSM module.

View 2 Replies

Sending Data To Access 2007?

May 19, 2010

problem is when i enter any letter in the alphabet in textbox1 it gives me an error but when i enter any number on it, it goes perfectly to the database. i set the data type into text(all 3 of them). the other two textbox work just fine. textbox1 is the only problem.

i just want the textbox1 to accept any input not just a number like the other 2 textbox work..

heres the code:

Imports System.Data.OleDb
Public Class Form2
Dim cn As OleDbConnection

[Code]....

View 2 Replies

Sending Data To Another Form In A Network ?

Jul 30, 2010

How i can send data from one form to another form through a network? i'm not asking for the codes, i just want to know what i should do to accomplish this task. i'm conceptualizing a game with the following details:

1.) there are two players, connected through a network
2.) they take turns looking for words from a puzzle of randomized letters
3.) after the given time has elapsed their words are checked and if both players has the same word, the word is removed
4.) the score is tallied

My question is, how do i get the words from the other form? specifically, how can the server form get the words from the client form? is it possible if i use xml? or can the server form access the variables of the client form? (i don't think it can, though)

View 4 Replies

Sending Data To Clients From A Server In Vb?

Aug 27, 2010

Actually I have created a chat application is it possible to send data to particular client only?

View 1 Replies

Sending Data To One Point, From Many Other Places

Aug 13, 2009

What I need is, a program will be distributed and the customer fills it out and such, clicks submit, and the data is sent to the company. I want to avoid using SMTP since not all consumers will have it set up. Is there anyway where this could be done, for the general user? I've spent the day thinking, but have no come up with anything.

The code, to send the info out, will just take the data from text fields, and sent it to either an email (hopefully not) or a place where the company can view it.

View 8 Replies

Sending Data To Serial Port?

May 1, 2010

i am doing a project in vb 2008 .net.during execution of the code, a different number is generated every second. the numbers are either 0,1,2,3,4, or 5. how do i send this number every second to the serial port. at the serial port i have a microcontroller connected which should accept this number and light up an LED coresponding to the number received.

View 1 Replies







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