I've been coding in VBA and now I would like to start learning Visual Studio 2008. The problem is that it is very easy to find solutions to vba questions, but in my first Visual Studio application, I've hit a wall first thing and not so easy to find a solution. In VBA I used the all powerful dlookup function. It seems this function is not available in Visual Studio code.
I created a data source table Vendors.sdf in My Documents with 3 columns VendorID, VendorName, and VendshrtID. my goal is to enter the vendorID in Textbox1 and have the code return the VendorName in Label1 or if I enter the VendShrtID in textbox1 the code return the VendorName in Label1 as well. can someone tell me how to accomplish a dlookup equivalent in Visual Basic?
i am trying to assign the value from a combo box in a form as a variable using dlookup..... it works fine for the first record but am unable to get it to look at the last. i have tried to use a query but then get the null field at the end of the table
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..
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.
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
I am trying to convert a DLL function call which has the Callback function routine called within the DLL function call.The DLL function call signature is like this:
i wanted to ask how to make picturebox1 ,to which functions are already assigned, perform the same function as picturebox2 ,to which no functions are assigned.For example:I have already made picturebox1 and have assigned it alot of function like when play button is pressed then picturebox1.visible = true and when we press pause button picturebox1.visible = false. So now i decided to make a theme and have to remove the picturebox1 and want to allow the picturebox2 to havefunction of picturebox1.But when i disable the theme the function of picturebox1 should go back to picturebox1.
how to use the FV function in Visual Basic 2008? When using a button's click event procedure, am I supposed to put a formula in there? I get confused when other examples use different names in their procedures. All I know so far is that the code starts out like this:
Function FV( _ ByVal Rate As Double, _ ByVal NPer As Double, _
I've written C# class library and included it to my VB project. Everything works ok, unless I can't use my unsafe function... It's really important to have this unsafe function, through I wrote it to increase bitmap processing speed. So, how can I use it? When I try to type its name, IDE tells me, that it isn't member of that class.
I am getting records in my dataTable that have nullvalues and need to pass each of those through a function that gets the missing value. In this case my records are address's that are missing the "Latitude" and or "Longitude" Field
I need to be able to retrieve the values and place them in the missing column and row
Nulladdress Public Function GetNullAddress() As Address() Dim Addresss = (From row In dtsold.AsEnumerable() _ Where row.IsNull("Latitude") OrElse row.IsNull("Longitude") _
in my calculator script I'm trying to build I have a putton for pi, named Pi. The text on the button is pi. This is where the problem is. Up until now I've just been adding the value of the button to what I call the DisplayScreen (The textbox that outputs your answers), but Pi is not a number. And I want the value of the button to be Pi, not 3.14 whatever. This is what I have for the Pi
While reading about Visual Studio 2010 I`ve read that it has a possibility to begug only small pieces of code (eg. Functions, Subs). Is it possible to debug only one function in VS 2008?
I use Express Editions of VS2008, but maybe standard or Pro version has such functions?
Function THRoller(ByVal Swings As Integer) As Integer Dim Hits, Misses As Integer 'variables for attack results Do Until RollCount = 0 'RollCount taken from initiative winners AttacksBox THRollVal = CInt(Int((6 * Rnd()) + 1)) If THRollVal >= THN Then
[Code]...
I'm sending the function a user determined value from another section. My problem is, it only seems to be generating one number, and listing each roll as a hit. How can I get a new roll(repeating values are fine) for each loop iteration? My apologies if the answer is obvious. I've only been programming for a week or so.
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 .
vb.net Function GetSerial() As Boolean Dim myConnection As New SqlConnection Dim myCommand As New SqlCommand
[code]....
When I put the code into the onbutton click it seems to work fine. But when i put it in the above fuction and start the function i get this error:
Error:System.IndexOutOfRangeException: Serials at System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName) at System.Data.SqlClient.SqlDataReader.GetOrdinal(String name)
I have a replace function in text files where it replaces all the vbTab with ';' betweens the columns. Sometimes it may be that some fields have more vbTabs and then there is lot of empty fields.How do I via a smart and simple way to replace all vbTab with ';'. That is, the field has more than one vbTab will they just be replaced by a
vb.net Dim Fs As FileStream = New FileStream(my_filename, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite)
I'm attempting to create a function that will get the User Accounts from the registry. I then need to loop through those users and commit specific actions on each one.Here's my function:
VB .NET ublic Function UserAccounts() As String Dim userskey As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWAREMicrosoftWindows
I have the following code that will post variables to a file, and the file will return a value, and the vb application will read that. Here is the code;
If (proxyListView.Items.Count > 0) Then Dim ProxyArray As Array = Split(proxyListView.Items.Item(proxyListView.SelectedIndices), ":") Dim ProxyServer As String = ProxyArray(0)
[code]....
to split a bunch of proxies in a listView, but i'm not sure the proper syntaxt to use at: proxyListView.SelectedIndices, i thought it was SelectedIndex but that doesn't seem to be an option in VS2008?
I have a question about the WeekDay and WeekDayName functions:
[Code]....
The parameter "FirstDayOfWeekValue" is supposed to represent "the first day of the week", but I don't understand how it's used. I mean, if the date is 16th March, then it's a Tuesday. That's true everywhere in the world and under any condition, isn't it? If that's so, what is the relevance of "FirstDayOfWeekValue", which apparently lets you change the weekday of a given date? And what is the "proper" value I should use, in order to get the correct result (ie. 16th March = Tue)?
How can I use the Evaluate function in VB.net in Visual Studio 2008 so that to evaluate a string which consist of 2 variables to be evaluated.[code]...
actually im new with VB 2008. i need some help to solve my project.i create table at excel 2007. in that table, i insert function so that when i key in some value, there will be some result at that table. my problem is how to import table with that function that i create in excel 2007 to VB 2008 so that the table with function appear at VB 2008? please help me..i really need help to solve my problem..