Sockets - VB9 .Net 3.5 (2008) Code Works On The First Pass.Then Second Pass It Just Hangs On

Jun 19, 2009

This code was working consistently, but now...This code works on the first pass.Then second pass it just hangs on Code:Dim tcpClient As TcpClient = tcpListener.AcceptTcpClient() for about 2 minutesThen the code will fork for another pass, then fail.....

Code:Imports SystemImports System.TextImports System.Collections.GenericImports System.XmlImports System.Xml.LinqImports System.Net.Sockets

[CODE]....

View 2 Replies


ADVERTISEMENT

VS 2005 Update Table - If All Results Is PASS Then The Table2 Should Be Updated As Pass

Jun 8, 2012

I have two tables:

table1

case_no flow result
tc_1 001 pass
tc_1 002 pass
tc_1 003 pass
tc_2 001 pass
tc_2 002 fail
tc_2 003 pass


table2"

case_no result
tc_1 pass
tc_2 fail

Table2 should be updates from table based on the results... If all results is PASS then the table2 should be updated as pass... if any result is FAIL then the entire case_no should be updates a s fail..

View 7 Replies

Pass Data To Dialog - Manipulate And Pass Back?

Jan 15, 2010

Just started VB programming this week and have found a wealth of information about what I'm trying to do. Problem is, some of it is more complete than others.Here's what I'm trying to do:In Form1 (my main form), I want to instantiate a class that contains a couple of properties (speed setpoint and position setpoint). When I click a button, I want to pass this data to Form2 and populate two textboxes on Form2 with the properties of this object. I want to manipulate the property values on Form2 and click an OK button which closes the dialog and returns the manipulated data, updating the property values of the object. Here's the algorithm I'm following:1) On Form1, instantiate the class2) On Form1's "Pass Data" button click event handler, instantiate a Form2 object and invoke the ShowDialog method, passing the object as a parameter.

3) On Form2, overload the ShowDialog method to accept the object as a parameter and modify the method so that it returns the manipulated class data.4) On Form2, in the ShowDialog method, populate the textboxes with the class data that was passed in.Here's where I get stuck. If I press the OK button on Form2 (DialogResult.OK), it returns me to Form1, but what hook do I have in Form1 to receive the manipulated class data that the ShowDialog method is returning?Here's an example of what I'm thinking about:

Code:
Public Class Form1
Dim clsController1 As New MotionController

[code].....

I'm sure it's probably a very elementary question, but every explanation I've found seems to be incomplete.

View 2 Replies

VS 2008 Copy File To Network Share With Username/pass Passed In The Code

Aug 4, 2010

I've been looking at accessing shared folders, read and write, via the network without being prompted by the OS for the username and password.

On this forum, and googling, I can find many things about accessing network shares, but none using code which also passes the username and password required.

What I'm basically looking for is to not have to map a drive on the users computer. Then using code, write or read files from a network share and at the same time pass the username / password required for that network share.

View 11 Replies

C# - How To Pass A Value To The Code Behind Asp

Jun 8, 2011

Erm i am new to this. How do i pass the value the user enters into a text box to the vb code behind?

<input type="text" runat="server" id="amount" name="amount" size="15" />

View 2 Replies

.net - Pass COM Array To Managed Code?

Apr 7, 2011

I have a .Net application (VB in particular, although I would this to be as language agnostic as possible) that uses a COM object (made in C++). I need to implement a event in COM that passes a char array from C++ to .Net. I guess I need to convert the array to a managed array; How can I do this?

View 2 Replies

Asp.net Pass Variable From Code Behind To .aspx?

Sep 25, 2010

I can't find a way to pass a simple variable from my code behind file to the .aspx page.

In code behind I have:

Dim test As String = "test"

and in my aspx page I try: <%=test %>

that gives me the following error: Error 2 'test' is not declared. It may be inaccessible due to its protection level

View 4 Replies

ASP.NET - Pass The Value Of The TextBox As The Value Of The Whole Control To Use In The Calling Code?

Apr 9, 2010

I created a DatePicker user control (ASP code below, no code behind) which is simply a textbox, image button, and a sometimes visible calendar.

[Code]...

Can I somehow tie or pass the value of the TextBox as the value of the whole control to use in the calling code? EDIT: My actual goal here is to be able to tie the SelectedDate as a parameter of a database query. I was able to select values for the other parameters in a controls dropdown list in a query parameter configuration window.

View 2 Replies

Pass A Variable To Hyperlink In Code Behind Using Program?

Jan 26, 2010

Would anyone happen to know how to pass a variable to a hyperlink? This is my code howver it gives me an error when I try to Pass the variable(irow("BarUrl")) as the hyperlink address link[code]...

View 2 Replies

Pass Code Blocks To A Method Or Class?

Apr 23, 2009

Is there a way to pass code blocks to a method or class?

I'm trying to write a number of exception handling methods.[cod]e...

View 5 Replies

Pass String Array To Unmanaged Code In A Dll?

May 10, 2009

First of all; I'm completely new to VB.

Pass a string array from Visual Basic Express 2008 to unmanaged code in a Dll.The array is Dimmed as in DIM myArray(11) as String

I'm developing the dll myself using Powerbasic.

The dll expect a 4 bytes pointer to a safearray's handle. As far as I have understood it; the array's string elements must be passed in ANSI format. The code in the dll will then use OLE Api to get the LBound and Ubound of the array and the address of the first element in array.

View 2 Replies

VS 2010 User:Pass Make Them In One Code?

Apr 26, 2011

I have two textbox, one loads username and the other passwords. Now my browser puts in the usernames from textbox one into the location and then textbox two puts the passwords into the location. Now I already did that.I just wanted to ask, if it is possible to make only one textbox, and make it like this format. Usernames:Passwords. Now, I want it to move the username into the location and the password into the other location and then delete the Collen

webbrowser1.document.getelementbyId("user").setattribut("value", textbox1.text)
webbrowser1.document.getelementbyId(pass").setattribut("value", textbox2.text)

[code].....

View 5 Replies

FTP Upload Works But Hangs

Jan 12, 2011

I have this code to upload to a ftp server. It works but the problem is it freezes the program and sometimes you can end up waiting for long time and not even know its working.
Code:
Dim clsRequest As System.Net.FtpWebRequest = _
DirectCast(System.Net.WebRequest.Create("ftp://" + txt_ftp_username.Text + ":" + txt_ftp_password.Text + "@" + txt_ftp_server.Text + ":" + txt_ftp_port.Value.ToString + "/" + txt_ftp_dir.Text + "/" + txt_ftp_name.Text), System.Net.FtpWebRequest)
[Code] .....
Can this code be modified so that it will run without freezing the program and then just add a button labelled "STOP" to stop the ftp connection/upload?

View 1 Replies

Asp.net - Pass Parameter As Text To JavaScript Function From .NET Code-behind

Mar 23, 2010

Basically, I have a gridview that is opened in a new window from the parent window. It has a bunch of records with a view button to view the details of each record (which stays in the same newly opened window). I have a calendar in the parent window that accepts a Date querystring parameter to set the current date on the calendar at page load. I'm just trying to refresh the calendar in the parent window to match the date of the label in the newly opened window.

All the code below is in the newly opened window. The .Net code-behind below refers to when that view button is clicked and everything is populated. At the end, I call the js to refresh the parent window and pass the value of the LabelScheduleDate as the querystring parameter. Now the label comes through as '03/25/2010' in the code-behind, but when I pass it to the js, it comes through as '0.00005970149253731343' in the end querystring. I'm not really sure what is making the value change, and I want to pass it as just text. Do I need to pass it as a string object? I tried but I don't think I was doing it right.

JavaScript Function
function RefreshParent(inputDate) {
window.opener.location = window.opener.location + "?Date=" + inputDate;
}

[Code]....

View 1 Replies

Pass A Reference To A Form To Dynamically Compiled Code?

Mar 6, 2011

I am trying to create a application scripting environment for my VB .Net application. I have a form type in the application called Project. What I want to do is dynamically compile (i.e Eval) VB .Net code on a Project form. This dynamic code always has a Main function. One of the arguments to Main is a reference to the calling Project form. Here is the Eval code:

Public Function Eval(ByVal vbCode As String, ByRef MyAssembly As System.Reflection.Assembly, ByRef ProjectForm As Project) As ArrayList
Dim Provider As VBCodeProvider = CodeDomProvider.CreateProvider("VisualBasic")

[code].....

View 1 Replies

VS 2005 To Pass Or Not To Pass?

Apr 16, 2009

I am looking for some input. I am helping with a web application that is fairly large. We have some logic factored out into classes, not a true business logic layer (yet ). The classes are setup to pull values directly from the QueryString or Session variables and I'm not sure that that mehtod is proper or even a

The reason I would like some input is, there may be a chance to rewrite or at least refactor the code.

[Code]...

View 2 Replies

Browser Compatible Code Which Take Values From Hidden Field And Pass It Through Query String On To Other Page

Jun 3, 2011

Right now I am using this code on client side.

[Code]...

The values for the hidden fields are already set. I want these value to open a window, in which the fields will be already filled using the values passed by this page. This code is working fine on Internet Explorer, but not on other browsers. Moreover, when I don't pass any value and just open the required window, it works on all browsers.

View 1 Replies

Pass Parameters To CR In VB 2008?

Oct 12, 2008

I've been trying to pass two parameters to my report using code the two parameters are DateTime type, my problem is crystal report viewer is still asking for the first parameter only and it accepts the second one?! in my report i've used two parameters ?firstDate and ?secondDate as dateTime parameters and used them in selctionformula where the date is between the two paramters.[code]...

View 4 Replies

VS 2008 Pass The ProductID To Another Sub?

Nov 3, 2009

I populate s combobox like this:

Private dbpath As String = My.Settings.SISQL2ConnectionString
Private con As New SqlConnection(dbpath)

[code]....

when I select an item from the combo i need to pass the ProductID to another sub.

View 8 Replies

[2008] Pass In A LISTVIEW - BY VAL Or BY REF?

Feb 22, 2009

I've got this sub

[Code]...

It works on a listview called vendorfilesLV I want to make this sub work on several different listviews. So I'm going to pass the listview in - do I make it BY REF or BY VAL?

[Code]...

View 7 Replies

VS 2008 - Pass Parameters To Other Console

Apr 26, 2010

I cant seem to find a solution on how to pass parameters to another exe like adding some parameters after path in shortcut, and then launching that shortcut, only I want to do it directly without making shortcuts. So ,how would I pass parameters needed to start another exe (console in my case)?

View 1 Replies

VS 2008 - Updater.exe - How To Pass Arguments

Oct 19, 2009

Ok im going to make a updater for a current program. And I found this code on this website.

Dim OnlineLocation As String = My.Application.CommandLineArgs(0)
Dim LocalLocation As String = My.Application.CommandLineArgs(1)
My.Computer.Network.DownloadFile(OnlineLocation, LocalLocation)
MessageBox.Show("Update Complete")

But i was wondering, once ive made it. How do u actually pass arguments to it.

View 7 Replies

VS 2008 : Pass RectangleShape To A Function?

May 14, 2009

I am making a collision detect function, and there are many similar objects which I need to make a collision detect for. I want to have a function where the ARGS is the rectangleshape on the screen. What would the arg type be?

EXAMPLE

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
collisiondetect(item1)
End Sub

[code]....

View 4 Replies

VS 2008 Pass Array To Thread

Nov 4, 2009

Further to:- [URL] I now need to pass an array thus:- HTML

[Code]....

Myarray can be redimentioned. Since I need to pass an OBJECT to the thread how do I get the thread to recognise the passed array?

View 5 Replies

VS 2008 Pass Form As Paramater?

Jun 22, 2009

Just ran into an issue with VB.net after years in VB6. I'm attempting to pass a form to a public sub without success.This worked in vb6

vb
Public Sub MySub(frm As Form)
MsgBox (Val(frm.Text1.Text) + Val(frm.Text2.Text))

[code].....

View 7 Replies

VS 2008 Pass Variable To Form?

Jul 16, 2009

I have a list in detail view that (obviously) lists information. I want to edit an Item if it is double-clicked on. I'm not sure what the best way to do this is. Currently I have this:

Private Sub SoundList_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SoundList.DoubleClick
index = SoundList.Items.Item(SoundList.FocusedItem.Index).Index

[code].....

View 12 Replies

VS 2008 Safety Of The Log And Pass In Application?

May 11, 2010

My application works with the sql database. It always connect to the databse using the same login and password written earlier in the application code.I just have a conncetion string with all that data inside.

I know that it is not the safiest way to do that. How to safely hold this thata inside of an application?

View 4 Replies

2008 Create Array And Pass It Using A Property

Apr 19, 2009

I am currently learning VB.net but for a project I need to create and array and pass it using a property. The data to be passed will be a train's destination, the time its due and the expected time of the train. I was wondering if someone could simplly explain how to first produce an array and then show how to pass it to a custom control

View 1 Replies

How To Pass Values From Textbox To Datagridview In VB 2008

Feb 23, 2009

i used a split container, in the 1st panel, i put the textbox for the user to input the values. In the 2nd panel, i put the datagridview to output the values that the user inputted. Now, i don't know and i cannot find way how to print the values into the datagridview from the textbox.

View 9 Replies

Pass Values From Textbox To Datagridview In VB 2008?

Feb 23, 2009

i used a split container, in the 1st panel, i put the textbox for the user to input the values. In the 2nd panel, i put the datagridview to output the values that the user inputted. Now, i don't know and i cannot find way how to print the values into the datagridview from the textbox.

View 5 Replies







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