Develop A Method / Function

Jun 6, 2011

Need some help to develop a method/function. No problem if there is no code but I would like to start discussing the best way of doing this even in high level language. First of all would like to provide you with some information. The set that I use here is very small, but the data is on a table in mysql and there will be over a million rows. Its important because if I make a complex loop code, maybe there will be a lot of selects in there.[code]

View 9 Replies


ADVERTISEMENT

Method To Develop And Deploy A Multi-user Desktop Application?

Sep 17, 2009

I have developed an application using vb.net. This application will run on approximately 15 machines at the main office and also roughly 10 machines spread over 3 different locations. I am using SQL Server Express edition in the backend. I deployed the application on the network using caspol but it is extremely slow. The Company Manager's perception is that because a script will invariably have to be deployed on each client machine to configure CASPOL, that the solution is not viable.

What is the best method to develop and deploy a multi-user desktop application?

View 9 Replies

.net - Add Method Of The List Function?

Jan 2, 2010

I have a data structure (which is a class) called user_class and I want to load all the users data from a database.Currently I have

While SQLreader.Read()
Hold_user.username = SQLreader(0)
Hold_user.BlahBlahBlah = SQLreader(1)

[code]....

Where return_value is a List of user_class and hold_user is an instance of the same class.

Dim return_value As New List(Of user_class)
Dim Hold_user As New user_class

As the while statement loops through the read data, SQLreader(0),(1) and (2) are updated with new data, however they also appear to be updating the stored values held in return_value....

View 2 Replies

Format Function/Method?

Mar 24, 2009

i am trying to format a numeric variable so that zeros are appended to it in VB .Net.Basically i am trying to achieve the equivalence of format(variable,"00000") in vb6, so that if variable is say 15, it can be displayed as 00015. whats the way to do it in VB .Net.

View 4 Replies

Getting The Function/method/property Name?

Dec 19, 2009

I was wondering if there was a way to get the name of the property my statement is in, like I can get the name of a function in PHP with the magic constant __FUNCTION__. Is there a way to get that property name, and more in general, also for functions and methods?

View 1 Replies

.net - Extension Method For Anonymous Function?

Jul 13, 2011

I'm trying to create an extension method that returns an IEqualityComparer based on a lambda function. Heres the extension method:

<Extension()>
Public Function Comparer(Of T)(Func As Func(Of T, T, Boolean)) As IEqualityComparer(Of T)
Return New GenericComparer(Of T)(Func)
End Function

[Code]...

View 1 Replies

.net - Is An Extension Method The Only Way To Add A Function To An Enum

Oct 27, 2010

I have a Direction Enum:

Public Enum Direction
Left
Right
Top
Bottom
End Enum

And Sometimes I need to get the inverse, so it seems nice to write:

SomeDirection.Inverse()

But I can't put a method on an enum! However, I can add an Extension Method (VS2008+) to it.

In VB, Extension Methods must be inside Modules. I really don't like modules that much, and I'm trying to write a (moderately) simple class that I can share in a single file to be plugged into other projects.

Modules can only reside in the file/namespace level so I have one in the bottom of the file now:

Public Class MyClass
'...'
End Class

[Code]....

It works, and "if it ain't broke, don't fix it", but I'd love to know if I'm doing it wrong and there's a better way with less boilerplate. Maybe in .NET 4?

Finally, I know I could write a structure that behaves like an enum, but that seems even more backwards.

View 2 Replies

Resharper 4.5 Extract Method / Can't Get Function

Nov 24, 2009

I am using Resharper 4.5 in Visual Studio 2008. Whenever I try to extract a block of code into a method, it tries to create a subroutine and not a function. The return type option is disabled. Does anyone have any advice as to how I can get it to create a function and not a subroutine?

View 1 Replies

ToolTip - Function Of The Below GetTooltiptooltippopup Eventstoptimer Method

Oct 11, 2009

I need to know what is the funcion of the below GetTooltiptooltippopup eventstoptimer methodAlso i need to know how can i let the tooltip works after remove all i mean how can i restore the tooltip work after the below code ToolTip1.RemoveAll()

View 2 Replies

Call The Function And The Compiler Error Went Off When Get A Return Value From That Method?

Mar 11, 2009

I'm using VB6 and trying to get an instance of a Type Library object.After i retrieved the object and i'm trying to invoke a method. I'm getting this exception. However, i've checked with the parameters and its type. it is correct.I found something fishy, that method doesnt have return value. But it is throwing a compiler error whenever i'm trying to call the function and the compiler error went off when i get a return value from that method.I don't know,

View 1 Replies

Get List Of Table Fields When Using A Class (function Or Method) In Design Time?

Aug 2, 2010

Let say I have a function inside a class which require 4 parameter (table name,field name,field value, return field) When I use this function my form, such as

myclass.Search("customers", <-- after pressing the "," a popup list will be displayed that contain all the fields in "customers" table.

View 19 Replies

Visual Studio Documentation Should Have Examples For Every Method, Function, Event And Operator?

Dec 17, 2009

It is really too bad that Microsoft (who once had the best documentation in the business) has slipped so badly. Good documentation does not really require analysis, though, admittedly, it is a lot of work. To wit: for each and every single method, function, event and operator provide the following: a brief topical functional description including any parameters, a detailed description of how the object works, a workable example of the code needed to make this object do something useful and links to all possible associated objects (See Also).

I see pages upon pages of useless text and links to other pages full of links. This rapidly descends into a crevace of unbelievable complexity for the developer trying to find out something truly simple like filtering a DataGridView without changing the data connection. (As it turns out this is very simple to do but I could not find a single example of how to do it in the Visual Studio documentation.)

View 19 Replies

Strongly-typed Generic Method Invokes Its Argument's Base Class Method Instead Of A Shadowed Method In T?

Oct 19, 2010

Consider a MyForm class that contains a shadowed implementation of Show(). It also contains a CreateForm() method, which accepts an instance of the form and calls the shadowed sub:

[Code]....

View 3 Replies

Function - Method Or Routine That Converts Currency String In A Databound Textbox To Decimal And Ignores Empty Strings ""

Jun 12, 2011

As the title says I have a form with many databound textboxes. some of these boxes have data in them and some are empty. I need to add them altogether, so far all of the conversion methods I have tried err out when they run into an empty string, except Val, but then Val won't handle the string with a $ in it. I've tried decimal.parse which handles the $ but not the empty string. So I seem to be in circle that I can't get out of.

View 2 Replies

Use An Extension Method Instead Of Just Creating Non-extension Sub Or Function?

Dec 3, 2009

Why would I use an extension method instead of just creating non-extension sub or function?

For ex, I could have an extension function called IsNullOrEmptyOrAllSpaces on String, which does a check as its name implies. Or I can write a stand alone function that does the same thing. Other than having the extension show up in Intellisense, is there any advantage? Is a call to the extension quicker/more efficient than a call to a regular function?

View 8 Replies

How To Pass A Function To A Function Is Functors/function Objects Avaiable In VB2010

Oct 12, 2011

I want to make an numerical integration method with takes in an analytic function and integrate it over a specific interval. For the numerical integration procedure I want to use some procedures in nr.com. The problem is that these are programmed in C++ and they uses functors to pass a function to the integration method. How can I do this in VB 2010?

I want to initialize the function (i.e. set a=1,b=0 for function y(x)=a*x+b) and then pass the function to the integration method. Then when the integration method call the function it only calls the function with one parameter (i.e. x since a,b is already set)

What is the best way to do this in VB2010?I want to make a general integration method where I can pass any single valued function and integration limits.

I have just started using VB, and from what I have found so far it seems like the tools you have is

- to us a delegate for the function
- to use a lambda expression for the function
- send a pointer/adressOf
- to create a function class/structure and submit this to the function

As for now I am most inclined to create a function-class. But I am not really sure how.F.ex. I make different classes for each "uniqe function" I want to integrate, but how can I pass them to the integration function when I need to specify the argument type in the integration-function-call?This seems like a basic problem which applies to many Math operations, so I think it would be very useful to clarify this.

View 2 Replies

Does Calling The Dispose Method On A Windows.Forms.Timer Call It's Stop Method

Nov 12, 2009

Does calling the Dispose method on a Windows.Forms.Timer call it's Stop method? Or should I stop the timer before I dispose it?

View 5 Replies

Inheritance - Create A Method Called StartWorking() And Want FrmChild To Inherit - Method

Nov 25, 2011

I have a large problem with inheritance in vb.net. The problem is the following:

I have 2 forms => frmBase and frmChild

In frmBase i want to create a method Called StartWorking() and i want frmChild to inherit this method.

But here is the tricky thing: when frmChild.StartWorking is called i would like the following => without calling MyBase.StartWorking()

I want frmBase.StartWorking() to be executed first and after a test in frmBase.StartWorking if blnValue is true then frmChild.StartWorking has to be activated. if blnValue is false that frmChild.StartWorking cannot be activated.

View 2 Replies

Use The ToString Method And A Counter To Concatenate A File Name Into A String Variable From The Image.FromFile Method?

Dec 18, 2010

I have nine pictures that I need to animate -I need to use the ToString method and a counter to concatenate a file name into a string variable from the Image.FromFile method. Once the counter reaches its maximum value, and the last picture is displayed, the counter should be reset to zero or one depending on how the first image file has been name. Also a static counter variable should be incremented in the time routine. what I have so far -- I know what I have to do; however, I just do not know how to code this properly.. Right now I have this going thru a button procedure but it needs to go through a timer.

[code]....

View 2 Replies

Constrain A Generic Method / Extension Method To Numeric TYPEs Only?

Sep 16, 2010

Write an overload for every numeric type or if possible constrain a generic extension method to just numeric types.

View 2 Replies

Difference Between My.Computer.FileSystem.WriteAllText Method And The IO.StreamWriter Method?

Jun 2, 2011

I just need to know what is the slight difference between them so I know which one to use everytime.

View 5 Replies

Get The Name Of Parent Method/class/file Name Inside Other Method Call?

Feb 16, 2010

I will try to explain what I need.Let's say that I have a class like this:

Public Class Example1 Public Sub ToBeCalled()

[Code]...

View 5 Replies

Reflected Method From A Loaded Assembly Executes Before Calling Method?

Jun 9, 2009

When I am loading an Assembly dynamically, then calling a method from it, I appear to be getting the method from Assembly executing before the code in the method that is calling it.It does not appear to be executing in a Serial manner as I would expect. Can anyone shine some light on why this might be happening. Below is some code to illustrate what I am seeing, the code from the some.dll assembly calls a method named PerformLookup. For testing I put a similar MessageBox type output with "PerformLookup Time: " as the text. What I end up seeing is:

First: "PerformLookup Time: 40:842"
Second: "initIndex Time: 45:873"
Imports System

[code].....

View 9 Replies

Function Syntax - Call A Function With 2 Arguments When The Function Is Only Defined For One

Apr 1, 2010

I'm trying to undersatnd the syntax of calling a funciton and it seem confusing when I'm using a web service in ASP.net. Maybe this question should be in an ASP forum, but it is a VB question. This simple web service allows you to type in your name and it response with an alert box with you name.

My question is, How can you call a function with 2 arguments when the function is only defined for one. I understand that the second argument is actually a method that handling the respons, but how can you interchange function arguments for methods and how do you know that there are methods for

Here's my call:

<script type="text/javascript">

function HelloWorld()
{

var yourName = $get('txtYourName').value;

[CODE]...

View 7 Replies

Error: Statement Cannot Appear Within A Method Body. End Of Method Assumed

Jul 13, 2011

Why does my the declaration of my string in the code result in the following error? Is there a workaround?

Code:

<script runat="server">
Protected Sub form1_Load(sender As Object, e As System.EventArgs)
Dim x As String = "</script>"

[code]....

Error: Statement cannot appear within a method body. End of method assumed.

Note: The following page did not fix my issue and instead resulted in the string </script> being output in my page. ( VB.NET hates </script> tag in string literal )

View 1 Replies

First Method Draw() Is Affected By The Standing Property AND Not The Second Method?

Mar 31, 2010

I am not sure whether this is a trick question?One of the object i have has 2 boolean properties, Standing and Sitting.I have a class called student with the 2 methods stated below- Am I coorrect is assuming that the first method draw() is affected by the standing property AND not the second method?Also the way it affects is that it draws an image when the the stugent is standing?


[code]...

View 5 Replies

VS 2010 What's Equivalent Method In .NET Of Picture1.Scale Method In 6.0

Jun 12, 2011

What's the equivalent method in .NET of the Picture1.Scale (0,0)-(10,10) method in 6.0?

View 2 Replies

Develop A ASP.Net Web Application Using C# Or VB?

Jun 22, 2011

I am new to this forum and I would like some help from my respected seniors.I am trying to develop a ASP.Net Web Application using C# or VB. First of all prefer me whether C# would be easy or VB for the following scenario:Below are the requirements:

1. For All Users:

Text-chat feature will allow users to chat with the available online users.

2. For Registered User:Allow users to create new folders and sub-folders, to store (upload) files.Allow users to perform move/copy/delete operations on folders and files. The percentage of storage capacity remaining and used should be displayed on the top. Automatic versioning system will record the version/revision information when a file is replaced/overwritten Team management feature will allow users to work in teams (by inviting other existing registered users). The activities of the team include access to the password protected area for the team, uploading files, commenting on the uploaded files (discussion), polls, automatic and manual reminders to the team members.

3. For Administrator:

Approve/Reject new team requests; update/delete existing teams.View all the files and folders uploaded on the server.Allow to perform delete operation on any existing file/folder existing on the server.Delete account for any registered user.Define and Edit storage capacity and other limits such as Maximum file size allowed for uploading.

Queries:

1) As, every user will have his/her own PERSONAL profile page then how will the system redirect the user to his/her PERSONAL profile page after hitting Login?

2) How this chatting feature can be developed?

3) How this storage capacity would be assigned overall?

4) How Administrator will manage all this?

I am totally confused.I have developed SRS as well. but in coding I am totally stuck as I am not so good in coding. I thought Visual Studio 2010 would help me effectively in this case, and I am trying but couldn't find any way for this to be done.

View 4 Replies

Develop Apps For PC And Mac?

Mar 19, 2012

I need to develop some apps that will be accessed from both PC and macs. Can this be done with visual Studio 2010?

View 2 Replies

Develop For MonoTouch Using .NET Rather Than C#?

Dec 29, 2010

Is there any way to develop for MonoTouch using VB.NET, rather than C#?

View 2 Replies







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