VS 2008 - Program With Functions Only

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


ADVERTISEMENT

VS 2008 : Have A Class Where The Functions Of The Same Name Are Both Instance Functions And Shared Functions?

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

Use Left , Right And Mid Functions In Program 2008?

Mar 1, 2009

How to use the Left, Right and Mid functions in VB 2008?

View 3 Replies

Use Friend Functions In Program?

Jun 1, 2010

As far as c/c++ is concerned ,friend functions are defined outside the classes and they are accessed without object name.But in vb.net how can i create friend functions like that ? Is the concept same here or its bit different than what was in c/c++ ?

View 11 Replies

Right Click Over A Textbox And Add Some Functions To The Program?

Mar 18, 2009

what event do I add to right click over a textbox and add a function to and options list...

View 1 Replies

Hooking Another Program's Calls To Winapi Functions ?

Oct 22, 2010

I have been trying to build a game bot in vb.net.One of the main problems is getting access to the text the game prints on the screen so I have been trying to hook the games calls to the windows api drawtext and textout functions.I have been hunting for examples of how to set up a hook in vb.net for a long time without any luck.I have found it impossible to translate examples in old school vb, C++, and C#.For convenience's sake I would like to use the freely available deviare and/or easyhook libraries.

View 2 Replies

Launch Program Functions With Administrative Privileges?

Sep 22, 2011

how to elevate privileges when my program executes code through command prompt. My program will already prompt for administrator access when it is launched. This is the code from my manifest file that will allow it to prompt for UAC admin permissions/credentials (to elevate permissions)

VB .Net 2010

<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

[Code]....

View 5 Replies

Program To Deal With Sine/cosine Functions?

Jun 2, 2009

I am making a program to deal with sine/cosine functions

If rdbsideA.Checked = True Then
Do While AngleB > 0
SideA = (SideB * Math.Sin(txtAngleA.Text)) / Math.Sin(AngleB)
Loop
MsgBox("The Length of Side A is ", SideA)
End If

That is if the user seleects to find side a. When the messagebox pops up, it doesnt state the previous calculation, why is that?

View 10 Replies

Write Some Functions To Stop From Having To Use The Same Code Over And Over In Program

Feb 13, 2010

I have a program and the program works fine. The only thing is that I want to shorten it up and stop using the same code over and over. I use the same redudant code through out the code. I want to write some functions in order to stop from having to use the same code over and over in my program. I wanted to know if someone could help me with functions: Here is part of my code below.

[Code]...

View 3 Replies

Program Using Arrays And Functions - Highest / Lowest Number

Jun 14, 2012

I am new to using VB2010 (and coding in general). Also brand new to these forums . Okay so I am making a program that: allows the user enter the number of customers served for each of 12 months into an array. The application should calculate and display the following statistics: total number of customers for the year, the average monthly number of customers, and the months with the highest and lowest numbers of customers. Use inputBox to get user input. Do not accept non-numeric or negative numbers.

The problem that I am having is that I do not know how to display which was the best and worst month. I imagine I need something that targets the highest/lowest number and finds the text in the corresponding index but I'm not sure how to do this.

View 2 Replies

Use DirectX Audio Functions In Program For WinXP / Vista?

Apr 9, 2012

I've been fighting for weeks now to make a simple music playback program. It would function much like Windows Media Player without the visualisations and playlists. I'm writing this on a Win7 box, but it needs to work on XP and newer.

I say fighting because I'm severely annoyed at how MS has worked some items and it's taken many days to go through everything only to find that it doesn't work.

I started by using WMP in VB Express 2010 and having it play my music. Simple, but not portable. I copied my .exe to a WinXP machine and it blew up. I copied it to a different Win7 machine and it doesn't run (I can double-slick all day, nothing happens,
no log entries, nothing....)

Then I find that there is an issue with the GUID of media player on different computers, and it'll most likely fail to run when you try to use it on other machines than the one the program was built on.

So I gave up on that.

I then figured I'd use DirectX. It's on XP and newer already, and is supposed to be backwards compatibile so if I build my app on Win7 it should still run on XP and such. I did that, and it works fine on the machine I built it with (again). My shuffle works,loop/repeat works, got my own version of a playlist and it all works. I copy that to another Win7 box and it doesn't run at all. It's setup as .NET 3 so I can be sure of compatibilty with WinXP.

For grins, I gutted all the code in my VB app involving calls to Directx and built that. It runs fine on other computers, including my XP test box. So I know the problem revolves around DirectX somehow.[code]...

View 10 Replies

VB - Functions Of Word 2007 (in Vista 32) Hanged The Program

Mar 11, 2010

Suddenly some functions of Word 2007 (in Vista 32) hanged the program, such as Help or Search/Replace. When Word is reopen a message appears: microsoft visual basic. File not found. How can I solve this? I have uninstalled/reinstalled Word twice, but nothing happens.

View 1 Replies

Get Results From GenerateNumbers Outputted To The Main Program To Be Used In Other Functions/procedures?

Dec 10, 2011

I'm having trouble getting this program to work.. I just cant figure out how to get results from GenerateNumbers outputted to the main program to be used in other functions/procedures.I tried

Dim Result1 As String = ThreeResults(0)
Dim Result2 As String = ThreeResults(1)
Dim Result3 As String = ThreeResults(2)

but for some reason it sets the value of each ThreeResults(x) to " "[code]......

View 1 Replies

Operate Functions Based Off Of Hotkeys - Hit Escape At Any Time And End The Program?

Oct 14, 2009

I have a program that I need to operate functions based off of hotkeys.One of the most important things I need to be able to do, is hit Escape at any time and end the program.Remember, the program form will not be up, it will be a number of any other applications, I need like a global hotkey or something.

View 3 Replies

Unit Test Private Functions From A Separate Project In Program?

Mar 15, 2009

As I develop code, I often want to unit test some of the building blocks of a class even if they are normally private. If my unit tests are inside the project, I can use "Friend" to accomplish this and still keep the functions private for normal use. But I would rather move my NUnit tests into their own separate project(s).

View 3 Replies

CNC Control Program, Based On A DLL - Acces All Functions By Means Of Softkeys ( F-Keys At Top Of Our Keyboards )

Apr 8, 2009

I'm working on a CNC control program, based on a DLL that someone else wrote. No problems with that sofar, as i get good support from the writer.

The problem i do have to tackle is the following: I want to acces all the functions by means of softkeys ( the F-Keys at the top of our keyboards ) when the program starts it shows the Main menu softkeys ( F1-F12), and each F-key has a function assigned to it, some will make the machine move, others will show another menu, or a fileopen/save dialog, depending on the chosen keys.

All works fine and handy-dandy, except for the F10 key, it seems to be "Sticky", when i press it, the program will not react to any other key, only the F10 key can get it back in "normal state" accepting every key with a function assigned..

How to "unstick" the F10 after pressing it?.. because pressing F10 now, means no other key will do anything, and that may become dangerous, when the machine is moving and it must be stopped..

View 11 Replies

Forms :: Random Functions - When Start Program And Click Picturebox - Same Card Will Always Come Visible

Mar 30, 2011

Okay, so I'm doing a card game and I'm trying to set that when picturebox (PictureBox1) is clicked, a random card from 13 cards will come visible. Problem is, that when i start the program and click the picturebox, the same card will always come visible. As you can see i've put a button (Button1) which will hide every card. If I press Button2, then Button1 and then the PictureBox1 it will show differend card, but the cards which come visible are always the same.

e.g i press PictureBox1 (which will make card visible), then Button1 (which will make PictureBox1 non-enabled) and then Button2 (which will hide every card and make PictureBox1 pressable). Lets say i pressed the PictureBox1 four times and i got cards: 9, 6, 7, 3, then I close the program, start it again and press PictureBox1 again 4 times and it will show the same cards (9, 6, 7, 3). How can this be done that it will not show the same cards always?

Here's my code...
Public Class Form1

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
End

[CODE]....

View 3 Replies

VS 2005 : Make Program To Select A File, Create DataTables And Then Perform Some Other Functions?

Feb 9, 2011

I am attempting to have my program select a file, create DataTables and then perform some other functions. I want to be able to open another file and re-do the same steps.The problem I am having is that I add columns to my Datatables and when I try and to open another file while one is already open I get a message that a column of xyz is already added how do I properly "clear my datatable" or perhaps that isnt even the correct approach? Here is the code I have that Opens a File

HTML
Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click

[code]....

This was working at one time but after adding to my project I must have placed something in the wrong place inadvertantly or it has soemthing to do with adding columns,?

View 4 Replies

Excel Maths Functions And Calls To All DLL Functions Documentation?

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

VS 2008 VB Public Functions In SSIS 2008

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

Calling Functions In VB 2008?

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

Overload Functions 2008 EE?

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

Use Right And Left Functions In .NET 2008?

Jan 17, 2010

how to use Right and Left Functions in VB.NET 2008?

View 1 Replies

VS 2008 : Having A Button With 2 Functions?

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

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

VS 2008 Functions At Set Times

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

VS 2008 Importing .cs Functions?

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

VS 2008 Using MsgBox With If Functions?

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

VS 2008 Win 7 - Built With Several Functions?

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

[2008] Functions Not Working?

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







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