Button To Use Multiple Function?

Feb 19, 2012

if possible a button to use multiple function? in visual basic means

first i am click the button then add record click again the same button then save record

View 6 Replies


ADVERTISEMENT

Multiple Button Click - Insert Induvisual Record Of Each Button ?

May 20, 2010

i have 5 buttons in row (btn1,btn2,btn3,btn4,btn5) and 1 OK button when i click indivisually to each button of 5 buttons its color changes to red and after click on OK button the color of buttons which are red turns green the problem is that i don't know how to insert induvisual record of each button of which color is green in access database

View 1 Replies

Make A Button That Change Function Of Another Button?

Aug 30, 2009

I have a button that will type a message saying 'hello' in a message box, (if clicked on). And I want to know how to make another one that will change it to say 'Hello Word' (when clicked on ).[code]...

View 11 Replies

Multiple Variable From One Function?

Nov 22, 2006

Is it possible to get more than one variable from a function? In my attempt below currmiles is simply being displayed in both labels instead of _currmiles to Currmiles.Text and _currdays to Currdays.Text. I created a separate function for _currdays and that works but it seemed like too much code to get 2 variables

Public Function Getmiles(ByVal journal As String) As String
Dim conn As New Data.SqlClient.SqlConnection

[code]......

View 8 Replies

Same Function For Multiple Buttons?

Aug 22, 2011

I have exactly 88 buttons and they all do the same function. So the function is.
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
Dim sr As New System.IO.StreamReader(OpenFileDialog1.FileName)
button1.text = sr
And I need to do that to all 88 button how can i do this without having to do it manually. and how can i just get the name of the file not the path.

View 6 Replies

Making A Calculator With Multiple Function?

Nov 30, 2010

im making a calculator with multiple function but im stuck on two main parts on it. i wrote a big chunk of code for the total calculator. it adds, sub., multi., or divide the amount of numbers the user puts in and then it ask them to enter them in individually using a loops, radio buttons and a listbox. im stuck on the loop because it will as for the 1st number and the last number heres the [code]......

View 5 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

Return Multiple Arrays From A Function

Mar 13, 2009

I want to go to a class.vb file that has a function from an aspx page and I want to return mutiple arrays. Is that possible? If so, how would I call it from the aspx page and how would I return it?

View 1 Replies

Return Multiple Ilists From A Dal Function In Asp.net

Nov 10, 2009

I modified a function that returns a strongly typed Ilist of products (from a web search form) from a stored procedure. Because of the complexity of the stored procedure I have changed it to return productcategories as well using the product results. I can get this into another strongly typed ilist but for the life of me I cannot return the two ilists.

Unfotunatley I ran out of talent, after reading hundreds of posts, It seems it's possible with linq, but I would rather not go that way as I have even less knowledge there. Is it possible put the ilists into a collection of some sort and return them for use as ilists?

[Code]...

View 5 Replies

Return Multiple Types In A .Net Function?

Feb 17, 2012

So you know how PHP internal functions usually return a boolean FALSE when a function fails, or some other data type when the function succeeds? Is this possible in VB .Net?For instance, lets say this simple code here Public Function TrySomething(ByVal Param As String) \what would go here??

[Code]...

You see I want to return a BOOLEAN false when a function fails, and a string when the function works. I've looked everywhere, and when I search for "return multiple types" all i find is Tuple.

View 4 Replies

Return Multiple Values From A Function?

Mar 30, 2011

Is it possible to make a function that returns both a datatable AND a list(of custom class) at the same?In my GUI layer, the main form (the application is MDI) calls this function and it has to fill the datagrid on one of its child forms and it also has to fill lot of other child forms with various information that is calculated from my custom class properties.Both the datatable and the class properties are created from the same external database and that's why I don't want to have two separate functions.

View 3 Replies

Return Multiple Values From Function?

Mar 15, 2011

I have created a function that takes a Car Registation as its argument and I want it to return 3 values (Make, Model, Price and of course True).The code itself works fine (it returning each Individual value but can't find a way to get ALL of them from 1 function) However I need to actually return all 3 values, and I cannot see how to do this with a simple function.

View 8 Replies

Returning Multiple Values From Function

Mar 17, 2009

I am working on a project I would like to use a function in a class I created to return multiple values in order to populate a listbox. I wanted to use a do until loop to achieve this. I will just post a simplified example of what I am doing :

Public Function Listboxfiller
Dim astring As String = "This is a string"
Dim Counter as integer = 0
Do until Counter = 5
return astring
Counter += 1
Loop

Then on the form I would do something like :
lstListbox.Items.Add(Myclass.Listboxfiller)

What happens right now is that the listbox only gets the first value, when I ran through in debug mode I found the loop only runs once, even though it should go multiple times.

View 4 Replies

Sync Multiple WebRequests In Function?

Feb 27, 2012

I'm just wondering how to sync multiple WebRequests in function? I'm using this now, but sometimes the requests dont go through...

For i = 1 to 10
Dim request As Net.HttpWebRequest = Net.WebRequest.Create("http://www.site.com/test.php?w=" & "TEST")
request.Method = "POST"

[code]....

View 1 Replies

VS 2010 - Same Function For Multiple CheckBoxes?

Mar 9, 2011

I have a group box which contains 40 checkboxes, when a checkbox is selected its content is added to a list and removed if already checked. Now I could write 40 functions one for each event (lots of code) each containing a add to the list function and a remove on uncheck, or I could use multiple handles (confusing multiple line declaration) is there another way? say my list of chkboxes had 100 checkboxes or more? can I for example use the container in some way?

View 10 Replies

Form With Multiple Tab Pages - Clear And Add Function

Jun 2, 2010

I guess, I am in some kind of trivial problem. Here is the scenario, I have a Form which has 3 main control two buttons "Button1" and "Button2" and 1 tab page control with two tab pages "Tab1" & "Tab2". Now Tab1 has one textbox controlled say "TextBox1" and one check box "chkBOX". What I am trying to do is, when I click Button1, only one tab page i.e Tab1 should be visible. Which I done using ".Clear" and ".Add" and is working fine. And now when I click on Button2, it should display the text in TextBox1, for this I have used:
msgbox(TextBox1.Tex)
Till now it is working fine. But when ever I use msgbox (chkBOX.checkstate), it displays 0, irrespective of control being checked or not.

View 1 Replies

Function Call Spanning Multiple Lines?

Jan 27, 2010

I have a C# function call which looks something like this:

var res = function ("arg1", // argument# 1
"arg2", // argument# 2
"arg3" // argument# 3

[code].....

View 4 Replies

Returning Multiple Values From A Function Call?

Apr 1, 2010

I have an active directory search function:

Function GetAdInfo(ByVal ADDN As String, ByVal ADCommonName As String, ByVal ADGivenName As String, ByVal ADStaffNum As String, ByVal ADEmail As String, ByVal ADDescription As String, ByVal ADTelephone As String, ByVal ADOffice As String, ByVal ADEmployeeID As String) As

[code].....

View 1 Replies

VS 2005 Replace Function With Multiple Criteria?

Jun 28, 2010

how can i get the illegal character in a string

for example
dim Strto_check as string = "1+2-2"
dim Listof_Illegalstrings = "~!@#$%^&*()_-+=-?/.,><|" ""

now i want a function to find out which is the invalid character available in the strto_check variable and then replace it with a standard place holder

View 7 Replies

Map Button To Function Key?

Feb 28, 2009

how do I use a function key (F1-F12) as a mnemonic accelerator key for a form button?I have a button that I would like to perform the click event when the user presses F1 (and not Alt-F1).

View 1 Replies

.NET Shared Function If Called Multiple Times Simultaneously?

Mar 25, 2010

Consider I have a shared function:Public Shared Function CalculateAreaFromRadius(ByVal radius As Double) As Double

[Code]...

If I have two or more threads in the same vb .net app and each of them calls the shared function at the same time with different RADIUS, will they each get their own AREA? I want to know for each call to the function if it is using same local variables or each call creates new instances of local variables?Will the answers to above questions be same If I have multiple (2+) single threaded apps and they all call the function at the same time with different RADIUS value?

View 2 Replies

Asp.net - Returning Multiple Values From A Function In An Parcial Class In VB?

Sep 6, 2011

show me how to return multiple values from a function? I have my function in a seperate file within App_Code and here it is:Public Function GetQuoteStatus(ByVal QuoteID As String) As String

Dim quoteStatus As String
Dim con As New SqlConnection
Dim cmd As New SqlCommand
Try
con.ConnectionString = ConfigurationManager.AppSettings("quotingSystemConnectionString")
con.Open()

[Code]...

However this is all good and well for one returned value but what If I wanted to return multiple values.How do I access them?

View 3 Replies

Create Multiple Threads To Improve A Function On Program

Sep 7, 2011

i need to create multiple threads to improve a function on my program. it is a simple thing really but it's slow and if multithreaded it can improve the speed some thousand times. my program uses a dll to check the MX record of an e-mail from a textbox called emails if the mx record is correct then it validates that domain, if not, it sends to an error textbox with that mail my problem is that im reading a lot on multithreading and i dont have an idea how to make something like this: for x=0 to emails.lines.count -1' start a thread that runs my function next if i can limit the number of threads to avoid crashing it would be good.

View 5 Replies

Instr Function Handle Multiple Strings To Find?

Aug 1, 2010

I'm using this for a single value to search for.

intPositionOfApartment = InStr(StrConv(pStringToParse, vbUpperCase), "APT") Is it possible to search for more then one value such as "APT", "UNIT" ?

If yes please show me an example of how it should be coded.

View 4 Replies

Multiple Namespaces Causing Conflict With Calling A Function

Jan 19, 2009

For a project I am working on there are two namespaces. Currently,[code]...

The problem is that when I have the button click inside the ScreenCapture Namespace, it gives me an error with the Handles Button1.Click saying " Handles clause requires a With Events Variable defined in the containing type or one of its base types". If I move it out of the namespace however, it tells me that Function1 is not defined.

View 2 Replies

Prevent A Sub / Function From Firing Multiple Times On The Same Event?

Apr 1, 2009

I'm trying to prevent a sub / function from firing multiple times on the same event.My app is for handling inbound phone calls (tapi).The app is supposed to route calls based on the callerid number.

aircode below:

Code:

Private Sub OnNewCall(ByVal sender As Object, ByVal e As NewCallEventArgs) Handles tapiManager.NewCall
if newcall.callerid = "5551001" then
redirect(newcall)

[code]....

If callA.callerid = "5551001" then redirect(callA)but, once it is redirected to the new extension, do not then grab the call from the new extension and try to redirect again (resulting in infinite loop).I realize I could use an integer as a counter, but the problem is, I might actually get more than 1 call at the same time from the same callerid number. And, all the calls would need to be redirected (once).the calls do have properties like (which are unique identifiers to each call):

Code:

phcall.id and phcall.hashcode

I'm thinking I need to put that unique id into a temp var / array to run a check against to see if it has been redirected, if it has then skip, if it has not then redirect.The app would run 24x7, and I don't want the temp var / array to get too big, and would want to have it clean automatically (up on a timer maybe?)(I'm guessing it would be a dynamically growing array.)

View 10 Replies

Replace Multiple Substrings Within A String - Error In Function?

Jun 16, 2010

I found this function that replaces multiple substrings within a string on the internet but it gives an error on one of the parameters.It doesn't like this one:

ByVal ParamArray FindChars()) As String

Can you look at the code and correct the error since I don't yet know about explicitly typed parameters?

Emad
Public Function ReplaceMultiple(ByVal OrigString As String, _
ByVal ReplaceString As String, ByVal ParamArray FindChars()) _[code]......

View 5 Replies

Can Not Get New Order Button To Function

Nov 9, 2011

I am doing a project that multiplies quantities and prices, while keeping a running total, also will be able to click a new order button and start over. I can not get the new order button to function, we using functions and private classes. Here is the code, thank you for any input.[code]

View 6 Replies

Getting Summary Button Function?

Mar 7, 2012

In my program the whole thing works minus one integral part the summary option needs to be gray or disabled until values are entered into the NAME, AND PIECES part is entered. Any suggestions? willing to submit my code in Private message to get a second more experienced look at it.

View 6 Replies

Xml - VB Add Button That Has Removechild() Function?

Feb 15, 2012

I just want to know how to add a button that has a removechild() or replacechild() function on my XML. Been searching for this for a week now.This is my xml file content

<?xml version="1.0" encoding="utf-8"?>
<theNews>
<news>
<contents>News3 Contents</contents>
<title>News3 Title</title>

[Code]...

I want to add another button that has a function of remove or replace the last/latest entry to the xml.

View 1 Replies







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