Sharing A Private Sub?

Jul 10, 2011

how to make projects which span multiple files and classes just fine. I've had big multi-file things working.I've been told explicity that my classes have to be private...yet at the same time I'm supposed to have a main method elsewhere and somehow call a menu in my main working file.I can get the program working perfectly when I do it in a logical manner but I just can't figure out how to call a private sub. I keep getting the error reference to a non-shared member requires an object reference.I've tried breaking the rules a bit and making one initial sub which is public, shared, etc... but all this does is delays the error until it tries to call its first private sub.

View 3 Replies


ADVERTISEMENT

VS 2008 Sharing Variables - Private Sub Could Use The Variable Created On Private Sub

Jul 23, 2010

if for example i have two private sub I declared a local variable on private sub a... is there a way that private sub b could use the variable created on private sub a? Im asking because im in a problem in my app were using global variable is not an option to make the long story short

View 5 Replies

What’s The Difference Between Private Sub And Private Function

Dec 14, 2011

I am completely lost on procedures. Whats the difference bewteen Private sub and private function?

View 1 Replies

Calling Private Subs In Another Private Subs?

Jun 15, 2009

I'm trying to call a private sub in another private sub. For example ;

[Code]....

View 13 Replies

File Sharing Without Using LAN

Jun 6, 2011

We are given a task to create a software that can share files between two computers without using lan (internet connection) but the presence of hardware devices can be used like cable, rs232, usb to usb or can be bluetooth to bluetooth file sharing. We searched about file sharing without using lan. The result was "socket programming". Is socket programming is applicable for vb.net? If yes, how is it program?

View 1 Replies

C# - Sharing Code Between 2 Projects Without A Dll

Dec 2, 2010

How can I have code-sharing between two projects without making a dll?

The issue is: I have a tool that syncs users & groups from LDAP to a database.

Now the tool is a windows service, but testing it as such is very difficult and time consuming.

Which is why I made a console application where I can test the LDAP syncing, and then just copy the respective sourcecode-files over to the service project.

But... keeping the common files in sync is a bit of a problem. I don't want to make a dll, because this probably creates me a problem with the 3rd project, a windows installer (for the service) where I have to use ExecutingAssembly path...

Is there a way to share the code without making a separate dll? Automagic statical linking, so to say ?

View 6 Replies

Can't Enable Net.tcp Port Sharing

Jul 13, 2011

I'm doing my dev work on a Window 7 x64 machine, deploying to a Windows 2008 x32 server. At the moment I'm adding WCF services to some internal apps so that we can build smaller clients using net.tcp bindings that report to the user what the server is doing without running multiple instances of the server. To cut back on how much administration the apps will require, I tried enabling port sharing on my first server app. I'm using the app to self-host the WCF service so they can be easily moved from one server to another if necessary. Here's the code starting the server:

Dim _service_host As ServiceHost
Dim active_server_address As Uri = New UriBuilder("net.tcp", "localhost", CInt(My.Settings.ServerPort)).Uri

[Code].....

I get the following error when I put a breakpoint at the last line: Unable to automatically step into the server. Connecting to the server machine 'nettcpportsharing' failed. The requested name is valid, but no data of the requested type was found. The Try...Catch block housing that code says the exception type is AddressAlreadyInUseException...but when I run netstat I don't see anything else listening on that address. There's no occurrence of 'nettcpportsharing' anywhere in my solution. I've checked to make sure that the Net.Tcp Port Sharing service is started.

View 1 Replies

P2P Chat And File Sharing?

Jun 10, 2011

I am working on developing p2p chat system and also file share system....But only thing is that ...i can't find out the way to find how to implement it...i have worked on client server programs but i m not able to get p2p...The concepts of P2P are:-

1. All nodes connected can act both as server and client depending on requirement....

2. They can connect to each other find file who is the owner of file and then ask for file....

View 1 Replies

Sharing Data Between Forms?

Nov 17, 2009

I am working with several RFID readers that perform different function in my vb.net program. Currently each reader port number is hard coded into the respective form. For example, reader 3 operates on COM1. However, this will be problematic when installing on different machines.

What I would like to do is have a "configuration" form where the user can select each reader and then select the COM port. Then all other code references these settings. What would be the best approach for this.

The only way I know to do it currently is to place this information in a small database and then have the forms reference that database, but it is a lot to do for such a seemingly trivial task.

View 3 Replies

Sharing Memory Between Applications?

May 11, 2009

I have to implement some way of communication between 2 applications:

Program 1 is receiving data at a relatively high rate (sometimes up to 100k in a second). This application receives the data, does only very few computations and saves the received data to disk for later in-depth-analysis or just recall.

Program 2 shall do some real-time analysis on the same data which may at some point become rather complicated.

It is necessary to split up the 2 tasks into separate programs because the data has to be saved under all circumstances and without losses. Program 2 is still in a development phase, it has to be improved, recompiled, debugged. This shall not disturb the data collection and archiving.

Since application 2 has to go through all the data that program 1 receives it would be slowing down everything very much if the programs had to communicate e.g. via TCP. Therefore I am looking for ways to have some shared memory or whatever else might make it possible for P2 to access the data collected by P1 without too much overhead.

View 12 Replies

Sharing Objects Across WCF Services

Aug 16, 2010

Problem with WCF and Multiple Namespaces.The major difference I am having is that I don't control both ends of the wire.My setup is similar to this:[code]The first thing you do is login via the login service and receive a security ticket. The ticket object is located in the My.Objects namespace. For each subsequent call in My.Service1 and My.Service2 you have to pass in the security ticket to authenticate the call. The issue I am having is that instead of the client (a .net one for now but Java and others in the future) seeing one My.Objects.Ticket the references are resolving as My.LoginService.Ticket, My.Service1.Ticket, and My.Service2.Ticket. When the client tries to pass the object retrieved during login to any other function it is receiving an object mismatch error.How can I make each service resolve objects to the My.Objects namespace?

View 3 Replies

Sharing Resources Between Forms?

Apr 12, 2010

I have some icons and images that are stored as embedded resources in my form1.resx file. Is there any way I can access these resources from my Form2 without adding the icons as project resources?

View 5 Replies

Sharing Text Between Forms?

Sep 9, 2008

How do I share text between forms?I want a box to popup exactly like a input box, but needs to be multiline, Is there any east way to do this or will I have to create a second form?If so, how do I share the string between forms to then output in a textbox on 1st form?

Also, I have VB 2008 Standard, and I want to build an application for a handheld, Is it possible to build an application and then pass it over to someone who has the professional version to make it work on pocket pc? Or does the entire build have to be on pro already?It's a very simple program...

View 4 Replies

Sharing UI Validation Between Forms?

Jan 25, 2012

I am trying to figure out how to seperate my business logic from my forms. This is my first attempt at doing this, but I would like to figure out how to handle events from multiple forms within a class. I have found myself routinely writing the same logic over and over in each form class and its time I figure out how to completly seperate out that logic in winforms so I can reuse the methods across all of my forms.

So basically I have this click event in form1:
Private Sub btnSubmit_Click(sender As System.Object, e As System.EventArgs) Handles btnSubmit.Click

[code].....

View 1 Replies

Sharing Variable Value Between Forms

Jul 31, 2009

When I declare a variable as public, shouldn't it be available in another form? I am trying to write a windows mobile prg with 12 static mileage points, form1 has the 12 buttons for start point, but when I call form2 with the destination points, my start variable value is not carried over. I intend to then assign a mileage based on the two points and write to file on mobile device. We support 12 schools, and I want my employees to track mileage easily.

Public Class main
Public start As String = "start"
Public dest As String = "dest"
Public miles As Decimal = 0
[Code] .....

View 4 Replies

Sharing Variables Between Forms?

Jun 16, 2010

i've almost completed my Yahtzee game except for the high scores function. I've got everything worked out except how to take the highscore variable from Form1, and share the data with Form 2

View 12 Replies

Two Datasources Sharing One Combobox?

Feb 11, 2011

I have two comboboxes. Depending on what is selected in the first combobox, I want the second combobox to display a different field from a different table within the same database (.mdb).Is this possible?I have the following code, but I get a "Complex DataBinding accepts as a data source either an IList or an IListSource." Error when running the code.

[Code]...

View 5 Replies

Two DatsSets Sharing One Combobox?

Feb 14, 2011

I have a database (.MDB) containing several tables. I also have two comboboxes on a form. I would like to populate the second combobox with a field from one of several tables in the database based on what the user picks in the first combobox.

So... if the user selects Option A in the first combobox, then the second combobox would be populated with contents from a field in table A. If the user picks Option B in the first combobox, then the second combobox is cleared of items from the table A, and repopulated with contents from a field in table B.

I basically created the comboboxes on the form and set the DataSource and Display member of the second combobox through the control's properties. The TableAdapter (is this the corrector terminology) was created automatically by the IDE. I have tried using the code below to switch the tables, but I get an error: "Complex DataBinding accepts as a data source either an IList or an IListSource."

Select Case strTagPrefixTable
Case "BLT"
cboBLTFmt2.DataSource = ECDT_C_V_BOLTSTableAdapter

[Code]....

View 4 Replies

VS 2008 Sharing Development?

Mar 5, 2010

I have been assigned to a project where an existing developer has been working on a web app on VS 2008 storing all files on his local workstation.I need to assist and eventually take over deveolpment of the web app development. My workstation only has VS 2005 but I will be installing VS 2008 in the coming days.

My question is: what is the best way to access all of his work, and make it so that it is acessible to other developers as neccesary.

View 4 Replies

WCF Service Sharing Types

Mar 26, 2012

I am writing a WCF service and code to consume it and I want to share data types between these services. I have a WCF library with the types I want to share defined in it. My WCF service and my WCF client both reference the assembly from the library. Classes look like this:[code]Right now when I do this the compiler gives me an error because it cannot implicitly convert type myclientnamespace.MySCF.Myclass to myclientnamespace.MyClass. I have read the posts here and the article here - which was referenced in another stackoverflow thread. These state that if my client code is referencing the same assembly as my service code and I have that assembly reference in before I create the service reference the client code should not create proxy classes and rather use the classes in the referenced entity assembly. I have tried this and it is not working. I even made sure that the "Reuse types in all referenced assemblies" radio button is checked when I create the service reference.can anyone see what I am doing wrong here? Should creating the service reference after the entities assembly reference was made not result in reusing the types?Is it possible to reuse types in this fashion?

View 1 Replies

Difference Between Public Sub And Private Sub And Private Function And Public Function And Sub And Shared Function?

May 31, 2011

explain me the difference between them? I'm new to visual basic, and I need to know the very basic things in Visual Basic allowing me to become a professional User

View 8 Replies

Best Practice For Sharing Variables Across Forms?

Mar 27, 2011

I need to share variables across two forms in vb.net. One of them is the main form and the other is a child form.

Create a static/shared variable in one of the forms and access it in the other forms via:
Form1 frm = new Form1(); //creating object of parent to access shared variable
frm.a = "abc"; // passing value

Send an instance of the main form to the child form when creating the child form. The variables can then be accessed via a property function. Create global variables in a module. This seems like the easiest option, but I doubt it is the best option.I also read something about delegates and events, but I don't know how to implement this.

View 4 Replies

C# - 2 Browser Windows Are Sharing Their Session?

Nov 3, 2009

Many of our users, internal and external, start our web application. Then at some later point, they open a new window from within the browser. They want to have 2 independent sessions of the application running. However, by doing it this way they are actually using the same session data.

Is there a way, in code, to determine if there is another browser window open with the same session?

We're using VS 2008, C# and/or VB.Net.

COMBINING MY RESPONSES FROM BELOW:

Maybe I'm saying this wrong. When they open a second window and change it to a different widget number, and then go back to the original window, on the next post-back it will be using the second window's widget number, not its own. We are using IE7.

View 5 Replies

Create File Sharing Software?

Aug 14, 2010

I want to create file sharing software in VB.NET.

We are two friend that want to access their computer hard drives through the internet. I mean when both of us connected to the internet then we both open a software and start access our hard drives remotely.

View 1 Replies

Datagridview Combobox Sharing A Datagridviewtextcell?

Sep 2, 2009

Is it possible to have a DataGridViewComboboxCell sharing a DataGridViewCell with text?I am looking to implement a layout where if a cell contains a predefined string, a combobox containing specific options is loaded into that cell.e.g if cell value is "CUT" add a combobox with the following items "KNIFE","SCISSORS" and if cell value is "DIG" add a combobox with the options "HOE",TRACTOR" I have though about adding a separate column to handle the comboboxes but looking to see whether my initial "wish idea" is implementable.

View 8 Replies

DB/Reporting :: Forms Sharing 1 Dataset?

Sep 21, 2008

What I mean is that when I make queries on a Parent Form. Child forms can also retrieves the datatable /datarows from its parent form.

View 3 Replies

How To Build Application Sharing Server

Jun 12, 2011

i want to know what i need to build an application like terminal services or xenapp ( citrix server)

View 3 Replies

IE8 Session Sharing Across Tabs And Windows?

Oct 29, 2009

Has anyone implemented any effective solutions to address the numerous issues that are caused by IE8's session sharing functionality? We've gotten very close by writing a custom http module that compares session and view state values, but our efforts are thwarted by things such as accelerator keys and unaccceptable copying of session objects.

View 1 Replies

Prevent People From Sharing Program?

Apr 16, 2009

I want to make it so my VB program can be registered to be used with only one computer & possibly be registered online.

(Yes i searched the site but i saw no useful program registering guides that i uderstood and worked with the newest version of Visual Basic .NET)

View 35 Replies

Project Networking - Sharing To Other Computer Possible?

Nov 3, 2010

I just made my project, I just wanna ask is possible to share your project to the other computer, like file sharing or networking, which you can access your project to the other computer, is that possible? If possible, how should I do that?

View 2 Replies







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