VS 2008 How To Create A Function

Aug 27, 2011

how to create a function.I've seen recently that creating functions is pretty easy and useful, rather than using each time plenty of code . However, now I want to create a function with two variables , BUT in some case I'd like to able to omit the second one..[code](that is by supplying only the 1st variable in the argument) I'd like it to round the value to its integer value .

View 2 Replies


ADVERTISEMENT

VS 2008 CrossThread Operation - Create A Thread That Load A Function?

Mar 27, 2010

i create a thread that load a function, in this function i need to read from txtbox into the same form and during the function write into another textbox the call to function is done in this way Dim t As Thread t = New Thread(AddressOf Me.myFunction) t.Start() from myFunction i read info in this way myInfo = textbox1.text and i write into textbox during the execution of myFunction in this way textInfo.text = myInfo but in debug time i have an error of crossthread.. how can i solve this problem??

View 4 Replies

Asp.net - Create Function To Create Thambnails Of Available Images In A Folder

Aug 28, 2009

I have create a CMS to upload all image to a folder using ed all my images to a folder using,

file.SaveAs(Server.MapPath("../images/") + advertID.ToString + "_" + i.ToString + fileExt)

Now, all images are saved and i forgot it create thumbnails. :(

I need to read all images at once and create thumbnails,

myimg = System.Drawing.Image.FromFile(imgFileName)
myimg = myimg.GetThumbnailImage(154, 94, Nothing, IntPtr.Zero)
myimg.Save(Server.MapPath("../Content/") + "Thumb_" + imgFileName, myimg.RawFormat)

I need this to function fast. I don't seems to know how to read these image names one by one.

View 1 Replies

VS 2008 Difference Of Sleep Function And Pause Function (using Timer) Between A Loop

Aug 20, 2009

Hi. what is the difference of sleep function and pause function (using timer) between a loop.

View 12 Replies

VS 2008 What Will Happen When 3 Function Calls Same Function At A Time

Apr 27, 2009

What will happen when 3 function calls same function at a time? I have 3 Function, f1,f2,f3.. Those function after completing their task will call finish() function. What will happen if Finish is Called morethan once..

View 9 Replies

Create Function In VB?

Apr 5, 2010

I have a snip of coding I need to use 4 or 5 times on my windows form and rather than coping and pasting the same code how do I create a public function where I define the code once and then just call the function name?

View 17 Replies

How To Create Function

Mar 18, 2010

show me how to create a function from the following code?

[Code]...

View 4 Replies

Best Way To Create ValidInteger Function

Oct 15, 2009

Given the following, what is the best way to create this function (I think the function declaration should make clear the purpose of the function...)

[code]...

View 2 Replies

Create 2 Users And They Have Different Function?

Mar 15, 2012

Can I create 2 users and they have different function??Database base using is MS Access.For example I have "staff" and "admin".Staff can insert,edit and delete data only.Admin can check the total sales of the day.Can I do that in VB.Net and can somebody give me some idea or example??

View 3 Replies

Create A Global Function?

Jul 12, 2009

If there's a way to have a function, that i can call from any code-behind on my website.

for example, i want to be on any page of my website, and be able to call this function[code]...

View 17 Replies

Create A New Sub Or Function In Code?

Dec 27, 2010

I remember that C# editor has a powerful option that when we are developing in code and type a new method (operation) name for a class, we can create its body by clicking on ALT+Shift+F10 and immediately, it will be created for it's own class.

what about in VB.NET 2008 editor?

View 1 Replies

Create A Print Function?

Jul 28, 2009

how to create a print function ....

View 3 Replies

Create A Replace Function

Apr 1, 2010

Their is a alfanumeric value of any lenght (string) and i want to replace its all characters with 'X' except right four characters.[code]I have created a function but got stuck:[code]please tell me a better fuction to perform such a operation

View 4 Replies

Create Random Function?

Apr 17, 2009

I'm working on my graduation project and within it i need a function gives me random ID numbers and random dates since 2008,01,01 untill now .. I'm done with the ID numbers but i couldnt find a solution for the dates

View 5 Replies

C# - Create Mustoveride Function With Code In It?

May 27, 2011

I have a MustInherit class with some MustOveride Methods in it. When i inherit form that class, I automatically get the MustOveride Methods or properties. My question is, I want to be able, to inherit from a class, get my MustOveride functions and methods, but then with some code already in it. I've once seen a .net class that did it, when I inherited from that class, I got the methods, with some comments in it.

View 4 Replies

Create A Function That Uses A Generic Structure?

Apr 1, 2009

I am attempting to create a generic function that the students in my introductory VB .NET course can use to search a single dimension array of a structure.[code]...

My question is: Is there a way to reference the individual structure fields in the array from inside the function? I was trying to make it generic so that the student could simply pass their array into the function - their structure may be named differently than mine and the field names may be different.

I suspect there are other ways to deal with this situation, but I was trying to keep it to just a simple single-dimension array of a structure. I don't think it is possible to do what I want, but I wondered what others thought.

View 5 Replies

Create A Function That Will Verify A Password?

May 4, 2011

I need to create a function that will verify a password.The function will be named IsValid.

View 1 Replies

Create A Global Function To Use Throughout The Application?

Jul 7, 2011

I want to create a global function to use throughout my application. Let say it's about the connection to the database.My code that i plan to use in my global function is:

myConnection = New SqlConnection("...........")
myConnection.Open()

So that I can call it to use in every form throughout my application. This can make me easy to edit the connection later.how to define this global function and how to call this function in the form.

View 2 Replies

Create A License Key Function For Application?

Apr 24, 2010

I want to create a license key function for my application.

For example I want in this key to contact 2 values: registered_to, expiry_date.

I want the licence key to be some sort of large string like: 2349ASDGKLASD87ASDGALSDK8ASD80972K.

I would need to create some way to create keys use some sort of algorhithm that decrypts the key and grabs the registered_to and expiry_date values. It also needs to check that the key string has some sort of check digit like credit cards have, so no-one can just type in a few random letters/numbers and it accepts.

View 2 Replies

Create A New Thread Using An Anonymous Function?

Apr 16, 2012

I am trying to create a new thread using an anonymous function but I keep getting errors. Here is my code:

New Thread(Function()
// Do something here
End Function).Start

Here are the errors I get:

New - Syntax Error

End Function - 'End Function' must be preceded by a matching 'Function'.

View 3 Replies

Create Function With Multiple Outputs?

Dec 8, 2010

Is it possible to create a VB function with multiple outputs. Note: I am not looking for an array containing me three outputs or a variable using delimitters

View 3 Replies

Forms :: Create An Undo Function?

Nov 8, 2011

I am working on a Notepad like text editor and I'm trying to put an Undo function in it. When you click the undo menu, I want to simply undo the last action (added char, removed char, paste, delete...). It doesn't have do remember all the past actions, I just want it to undo the last action even if the last one was undo... For now I have a button in a tool strip menu (tsmAnnuler) and my richtextbox (rtbZoneTexte).

View 2 Replies

How To Create Save Game Function

Oct 17, 2011

I am trying to create a game using vb but don't know how to create a "save game" function. I was told something about saving to files but don't really understand it.

View 2 Replies

Add A Block Of Xml Comment And Create A Try-catch To A Function?

Jul 7, 2011

We've created a little plugin to add a block of xml comment and create a try-catch to a function. (we simply add this to each and every function we write).But with the latest devexpress update I'm having a problem with the following code.[code].........

View 1 Replies

.net - Create And Pass Custom Function As A Delegate?

Aug 5, 2009

I have a function Process(data, f) where data is a normal parameter and f is a function needed to process the data (passed as a delegate to Process)

The signature of f is int f(a,b,c), with a, b, c supplied by Process when it calls the delegate.

Up until here, standard delegate usage.

Now, I have a special but common case where I would like to call Process with a constant f function. So I would like to write SimpleProcess(data, k) so that the caller does not need to create a delegate in this case, just pass the constant k (the only information needed).

So I need to dynamically create a constant function, g(a,b,c) which takes 3 parameters (which are ignored) and always returns k. This has to be done within the SimpleProcess function, so that I can then simply call Process(data, g) from within that function, without the need to rewrite the whole Process function for this special case.

View 3 Replies

Create A Function That Checks If A Number Is A Prime?

May 10, 2011

I've been trying to create a function that checks if a number is a prime. according to [URL]..I have created a function although It doesn't work as expected.

[Code]...

It sometimes returns true for composite numbers. oh and I know if you google it you get functions that do this, but most of them look inefficient so i'm trying to make my own.

View 4 Replies

Create A Function That Checks To See What Button Has Been Clicked?

Apr 29, 2009

I wanted to create a function that checks to see what button has been clicked on the windows form. For example If I had 10 generic buttons that open up different audio files. I would I create one Sub that can verify which button has been selected. I was either going to use a case statement or an if else. I did not want to create one sub for each button since it would be a lot of duplication in code.

View 2 Replies

Create A Function That Parses The Input From A Textinput?

Apr 5, 2010

how to create a function that parses the input from a textinput.Text into an array of named reading, as string, and returns the number of arrays, or perhaps a negative number if there is an error in the input.

i am looking for the answer in vb6 and vb.net.

View 4 Replies

Create A Function To Return One Database Row In A Collection

Mar 4, 2011

How would I create a function to return one database row in a collection, such that the rows column name & value are stored as key/value pairs in the collection?

View 5 Replies

Create A Unit Test For The The Page_Load Function In ASP.net?

Apr 11, 2011

How can create a unit test for the the Page_Load function in ASP.net?

I am using build in Visual Studio Unit test frame work. I want to create a unit test that check the Elements of the web page and their values.

I know about selenium and its abilities in unit testing.

This is the web Page to test WebPageControl.ascx.vb:

Public Class WebPageControl
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

[Code].....

View 3 Replies







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