Sending Data To Unknown Form
Sep 26, 2009
I am building an class library in VB.NET that i can use in other projects.I want a function in this class library that opens a form that is in the other project.[code]This works, the form is shown in the other project application.But now i want to send some content to the form from my class library.In the other project i have a public sub _getContentPackage(ByVal content as String)How can i send data to that public sub from my Class Library.What i have try is CallByName, but i do not understand that function yet. I only get error messages.
View 4 Replies
ADVERTISEMENT
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
Jan 22, 2009
I have a requirements in "Windows form exe" that when we click on the exe, the data from the Oracle database should be exported to another Oracle database and also the data that has been exported should be emailed with excel attachments to intended recipents.
I searched but couldn't get the code as such and also i am not able to implement the functionality.
View 1 Replies
Apr 26, 2012
i havent had problems in visual basic all the ay up to this point. I have been given a shopping cart program that I must use: a MainForm, MP3From, AlbumForm, and a module
I finally got my program to send data from the listbox on my MP3Form to the listbox on my MainForm but something isnt right still. I need to be able to click an an item from the lstMP3(listbox on MP3Form) to lstShoppingCart(listbox on MainForm) multiple times without having to close the MP3Form everytime to add the items to lstShoppingCart. Here is what I got so far on my MainForm:
[code...]
This assignment makes me mad cause we have not even covered half the stuff I am having to use in this form at all this semester. If i can get a little explanation on instantiate, inheritance, and declaring and object variable and how its used to transfer data from one to the other.
View 3 Replies
Oct 22, 2009
Using Access 2003 and VB code, I have created a form with a number of labels. The labels will display an employee's names. I have named the labels name1, name2, name3...etc. Using an ADO data set and DCount I have determined the number of names in an Access table (the number of names can vary). What I want to do is for each record in succession to pick the first name and surname from the data set , combine them into a full name (this part has been successful), and then set the full name into the label caption in succession. Example: full name 1 into name1, full name 2 into name2, full name 3 into name3... until all names appear as labels on the form.
I created a counter to and a variable to increment the label number but when I address the caption property of the variable containing the new label (e.g. name1, name2..etc.) it throws an errer at runtime. Here is the code:
[Code]....
View 8 Replies
Apr 4, 2010
Consider the following code which foires on a button click:
Dim newform as new myform
newform.show
Pretty straightforward...
but let's say that I do not know (at run time) exactly which form should be instantiated. It will depend on other actions which the user has previously taken.
instead of nominating a specific form (myform) I want to leave it open at design time[code]...
View 5 Replies
Mar 3, 2010
I never thought I'd say this, but I am getting pissed at how easy it is to just plop down a variable in python without any declaration. I have an existing python script which interfaces with a server, and it builds its own messages to be communicated via sockets. What I am trying to do is take the command line python script and convert it into a VB GUI app that is more user friendly.
[Code]...
View 11 Replies
Jun 6, 2012
I have problem in my application when updating 3 items otherwise it is as good as work. The problem is when updating the username to the access database an error showing that "Datatype mismatch" when updating the date and time field an error occurs and tells that the "Unknown field type". This is my code where bold faced lines have errors:
Dim objCmd As OleDb.OleDbCommand = New OleDb.OleDbCommand()
objCmd.Connection = con.con
'Make a command to insert data
[Code].....
View 3 Replies
Jan 15, 2010
I have a piece of code written in Visual Basic:
Dim n As Double, i As Integer
n = 4
Dim Ramp_length(1 To 4) As Double
For i = 1 To n
Ramp_length(i) = Cells(13 + i, 5)
'Cells(65 + i, 7) = Ramp_length(i)'
Next i
Is there a way I can reproduce the result without declaring the array with a "fixed" length? I eventually want the code to read off a column of data with unknown length and store it in an array of equal or smaller length so it can be altered.
View 3 Replies
Mar 7, 2011
How can I get some random unknown data off a website.It's a score on a hiscores.How can I do this?
View 7 Replies
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
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
Apr 23, 2012
I have a form in my project with a textbox that contains a unique computer ID number for the user. I want the user to click a button, which will open my website, and then populate the value from my software into a corresponding computerID form on my website.
The form on my website is just a paypal form that I built using paypal's website builder. It has a buy it now button and a textfield for computer ID. I need to know the computerID so that I can send the user the correct activation code.
Is there any way for me to accomplish this? All I have so far is just opening my site:
Private Sub btnpurchase_Click(sender As System.Object, e As System.EventArgs) Handles btnpurchase.Click
Process.Start("mywebsite")
End Sub
View 1 Replies
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
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
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
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
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
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
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
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
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
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
Mar 29, 2012
I am working on a little project and have had great success, that is until I came upon a slight glitch in programming. Here is the glitch:I have Form1 and Form2. Form1 contains an array, which I need to send to form2 to precess and send on. Is this possible? I have tried sever ideas and none have worked. sending an array from one form to another is possible?
View 5 Replies
Feb 15, 2009
I am trying to send an e-mail from a web form. I am using Visual Basic in Visual Studio 2008. I am also using ASP.NET and a SQL Server 2005 database. I have found some code for this but it seems to be always for a Windows form and I keep coming across errors saying the code is "obsolete".[code]
View 7 Replies
Feb 15, 2009
I am trying to send an e-mail from a web form. I am using Visual Basic in Visual Studio 2008. I am also using ASP.NET and a SQL Server 2005 database. I have found some code for this but it seems to be always for a Windows form and I keep coming across errors saying the code is "obsolete". Here is sample code I have been trying to use:
Imports System.Web.Mail
Partial Class QueryPage
Inherits System.Web.UI.Page
[Code].....
View 2 Replies
Dec 15, 2010
I've searched. I tried this from another post. Didn't work. Second form listbox was blank. Apparently it only sends selected items but I need it to send all.
1Public Sub buyBicyclesListBox_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles buyBicyclesListBox.DoubleClick
2'Sends items from buyBicyclesListBox to cartListBox when double clicked
[Code].....
View 1 Replies
Nov 9, 2011
have gps constantly sending data but can read it from the com port
View 5 Replies
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
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