VS 2008 Commonly Used Functions
Aug 7, 2009
I'm taking a class in VB, so I have numerous projects. I have a lot of useful functions and code, and I'd like for them to all be included in on piece of code that all my projects can use. The problem with DLLs is that when I build, the EXE needs the DLL to be in the same folder. I want a standalone EXE file. Is there any way I can have a DLL in a different folder than the EXE and still use it? Or is there some better solution to having useful code somewhere so when I update that code, it will affect all of my projects?
View 2 Replies
ADVERTISEMENT
Dec 6, 2010
What I am trying to do is have a class where the functions of the same name are both instance functions and shared functions.
Public Shared Function Get...(byval xx as xx)
and
Public Function Get...
The Public Function uses a Property xx created in the constructor, whereas the Shared Function has the parameters (byval xx as xx).
View 1 Replies
Aug 18, 2010
I am not a program designer by any means but I would really like to start getting a better grasp of how to do it and a better understanding of the .NET languages in general (VB, C#). I was reading a book by Wrox - Professional Visual Basic 2008. In it I believed it mentioned that Modules are slowly going out of existence. I can see why most coding would go into a class object but I would assume modules would always be necessary to at least keep the code clean.
Also, I have been searching for a good source on software design but I can't seem to find any recent books published. I might be searching in the wrong places but I would really like to get my hands on one.
View 4 Replies
Jul 15, 2010
What are the variables for The system drive (most commonly "C:") and system directory (Most commonly "C:WINDOWS")
View 4 Replies
Aug 22, 2009
I am very new to microsoft visual basic express editionm, and I wanted to know a little more about writing code and the different "commonly used" parts of it.
View 10 Replies
Jan 29, 2007
1) Is it possible to access the Excel mathematical functions without actually opening Excel?
I was thinking of through a DLL WinAPI call or maybe a delegate function or smaller program?
2) Does anyone know of a MS link or area that gives instruction on "how to" use every function of every Windows DLL at all?
Or for all those that Microsoft have chosen to document online at least.
View 1 Replies
Nov 29, 2009
I used to develop applications in VBA, but now I'm using SQL Server 2008 Integration Services for a lot of the functionality, and using VB.NET as the scripting language where needed - all of which are new to me. I need to do the same string manipulation in several different SSIS tasks. With VBA, I'd simply write a function and declare it Public, and I could use it from any module. E.g.
Public Function MakeId(ByVal Country As String, ByVal Postcode As String) As String
....
End Function
' later...
Dim MyId as String
MyId = MakeId(County, Postcode)
But when I do that in a Script Task or Script Component, I find I can't call the function from VB in any other Script Task or Component; it says MakeId is undeclared. It works within its own 'box', but not from anywhere else.
View 3 Replies
Oct 26, 2010
I am using Visual Studio 2008 to try and create a calculator program that can convert binary to decimal. I have some code but I'm having problems figuring out what to write as an "argument" when I was to call the function.
Here is the code I have so far.
Public Class Form1
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
[Code]....
View 4 Replies
Mar 1, 2009
I am trying to pass multiple signature calls to an overloaded function. My understanding is that VB can recognize the different signatures and use the appropriate function.[code]...
View 2 Replies
Jan 17, 2010
how to use Right and Left Functions in VB.NET 2008?
View 1 Replies
Mar 3, 2010
I was curious if anyone has heard of writing a program with functions only. It is part of my current assignment but all the examples I have seen all over have at least subs for the click events. SO I am a little confused to say the least.
View 3 Replies
Apr 3, 2009
Is it possible to have a button do one action the first time it is clicked and a different action the next time it is clicked?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Button1.Hide()
Button2.Show()
[code]....
View 13 Replies
Apr 17, 2009
I have a countdown timer, I want to make a sound every two minutes at the moment i've got it set to if timer.txt = "00:08:00" minutes then play the sound but it stutters..
View 2 Replies
May 21, 2010
I have this script that reads the accelerometer on my m200 tablet pc but I don't know how to use it in a windows form, how to import or declare it it would be nice.
The .cs script is
using System;
using System.Runtime.InteropServices;
class Accel
[Code].....
View 10 Replies
Oct 10, 2009
I am trying to learn how to use message boxes. I am just starting out but really enjoy it. My basic structure is to have seven yes/no questions that change a variable(x) by adding + 1 to everytime you get the question right. My question lies within the message box and getting my variable to change with every question (or not if wrong button is pushed). Heres what I have coded so far...
HTML
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClick.Click
Dim x As Integer
Car(x)
[code]....
I have been getting no output and when i debug All values of x are 0. I only have one return and it is at the very end of the Car Function (Return x).
View 6 Replies
May 14, 2010
i have an application that's in development, but some modules of the application are already built, so the application it's installed in several computers. In my code, i call an external class that i built with several functions that i use in multiple applications, in this class i have a small piece of code that checks in the network (internal), if a new version of the application (Msi File), of the current application it's available, and if it's available, it runs the Msi file.
msiexec /package MSIPackage.msi That worked fine in windows XP, but now some machines have been upgraded to windows 7, and the user need other credentials to run the package. (Elevate Privileges). Other problem it's that in my application i create several folders in the installation and the user doesn't get any permissions to write in the folders.For example i have one Log folder, and i can't write any logs to it.
View 1 Replies
Jan 8, 2009
This was sort of discussed in another topic i made, but it went a little off topic, so i'm making a new thread. Anyways
vb
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim archiveHandle As IntPtr
Dim archiveName As String = "C:Users#DesktopWarcraft IIIwar3.mpq"
[code]....
Notes:I Also have a feeling it has to do with the flags on MpqAddFileToArchive, because i'm using 0 but the documentation has flags like MAFA_COMPRESS, though i have no idea how to use them?
View 6 Replies
Feb 19, 2009
While converting types, I have found myself using both VB functions and BCL Convert.To* methods.
E.g.)
Cstr() vs. Convert.ToString()
CInt() vs. Convert.ToInt32()
CDbl() vs. Convert.ToInt64()
etc...
Are there any subtle differences that should be noted?
View 1 Replies
Mar 4, 2009
Is there a way to see exactly what the functions are doing. What i mean is there a way to see the class? I know what it does, i just want to know the code.
For example the function: Membership.FindUsersByName()
View 1 Replies
Mar 1, 2009
How to use the Left, Right and Mid functions in VB 2008?
View 3 Replies
Jul 6, 2010
Does someone know what api funtion to use for getting remote host name right now i use System.Net.Dns.GetHostName and the nbtstat -a function, but still have some computers that i dont get their host name but i do get their mac with send arp...so how cna i get their host names with an API call..
This is my code for dns.hostname ..
vb.net Dim myIPs3 As System.Net.IPHostEntry = Dns.GetHostEntry(hello)
Dim newhost3 As String = myIPs3.HostName
View 2 Replies
Oct 19, 2010
I got a situation where I need to update the details of an order. So there is an order, and there are many products in that order, and the way I am updating that bit at the moment is simply 'delete and save'. But what happens is that it deletes first and them saves products which would be fair enough but if anything in save function goes wrong the order leaves with no products. So how would I know if I will get an error?
View 1 Replies
Sep 18, 2009
The login process to one of my sites can get fairly long code wise, so i have decided to cut the process up into maybe 3 or 4 functions, instead of all the code on 1 page.
vb.net
Function functionNavigate1(ByVal POST1 As String)
Try
[Code]....
View 4 Replies
Jul 1, 2011
i am having a query in access 07 which uses 2 functions (PUBLIC function)how can i run it from the front end (vb.net)
View 2 Replies
Feb 4, 2010
is there any option in callstack or any third party tools to get all the list of functions and procedures executed in vb.net project. on callstack, while when goes to different class method and returns, the tracking information loss. so after fulll of excution of project, do we get the list of all executed members in order of execution ..
View 2 Replies
Mar 10, 2010
I'm using ZedGraph to draw functions.I want it so, that the user can input a function.Eg:
txtFunction.text = x ^ 2 - 3
Graphs are drawn with this code
For x = 0 To 100
y = x ^ 2 - 3
list.Add(x, y)
Next x
This doesn't work
For x = 0 To 100
y = txtFunction.text
list.Add(x, y)
Next x
as the x can't be replaced.Is there an other way to draw graphs, by reading the function from a textbox?
View 2 Replies
Aug 21, 2009
What exactly does a System File Watcher do? And what can you do with it?
View 10 Replies
Aug 8, 2010
I'm familiar with Throw New Exception(), and how this causes an application to "break" with an error at the Throw line itself.But what I'm after is a way to throw the exception within a function, and for the application to break at the line which called the function - not at the Throw statement itself.Is there a way of doing this, but without having to wrap the function call within a Try-Catch?
For example:
1. Main code calls function "DoThis()"
2. DoThis() runs and throws an exception
3. Code breaks at "Call DoThis()"
View 11 Replies
May 6, 2009
Ok. I just took my final for VB and the last chapter we did was on procedures and functions. Functions was the only thing out of this whole semester that I was just completely lost. I'm trying to work on this cause I'm taking Advanced VB next so I wanna know what I'm doing. So I'm trying another tutorial in the book and I'm really lost. Here is what the it wants you to do.
Retail Price Calculator
Write an application that accepts from the user the wholesale cost of an item and its markup percentage. (For example, if an item's wholesale cost is $5 and its retail price is $10, then the markup is 100%)
The program should contain a function named CalculateRetail that receives the wholesale cost and markup percentage as arguments, and returns the retail price of the item.
When the user clicks the Get Retail button, the program should do the following:Verify that the values entered by the user for the wholesale cost and the markup percent are numeric and not negative. Call the CalculateRetail function Display the retail cost as returned from the function.
Here's what the calculator looks like and my code so far.
Public Class Form1
Private Sub btnRetail_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRetail.Click
[Code].....
View 4 Replies
Apr 23, 2010
I know this is a very basic question, but when you declare a function As a data type, I'm assuming that it's based on the return value...
What if you're not returning a value? Does it matter? What should I declare it as?
View 4 Replies