VS 2005 Calculate The Volume Of A Cube With Classes?

Mar 20, 2009

I already have this code in my class file:

Public Class Cube
Private sngLenght, sngWidth, sngDepth As Single
Public Property Lenght() As Single

[Code].....

View 11 Replies


ADVERTISEMENT

Adjust The Volume In The Code Of A Visual Basic 2005 Program?

Sep 13, 2011

I have Visual Basic 2005. I want to be able to adjust the Master Volume programmatically. In the recent versions of Visual Basic it is much easier but in VB2005 it is a little more involved from what I have read on previous posts. Is there a way to adjust the volume in the code of a Visual Basic 2005 program?

View 8 Replies

3D Cube Ignores Timer?

Mar 10, 2011

Attached is a file that creates a 3D cube, I did not make this but found it here at this site.Playing around with it I found out how to, on pressing of any key change the distance of the camera, thus changing the shade of the cube.So if you held a key down it got darker and darker.I want this to happen, but on a timer. So i created a timer, set the interval to 1 and did the same exact code. Set the timer to true, and nothing happens. Ever. I tried doing messagebox.show to show me a message every tick, and that didn't work either. So I went and broke the timer class?

[Code]...

Now i made a new application file, because I use timers all the time and it works. I copy pasted the code, and added the directx stuff, and it ..breaks my timer to do nothing at all ever.. Even if it is unrelated to my cube.

View 13 Replies

Any Way To Find Cube Root?

Apr 23, 2009

Math.Sqrt is used to find square root but if I want to find cube root or 4 or 5, how I can do?

View 10 Replies

C# - Building A Local Cube?

Apr 29, 2009

I need to build a local .cub file for my Excel-using clients.

I have scrounged together some VB code but it fails :

ConnLocation = "LOCATION=C: est.cub;"
ConnDSN = "SOURCE_DSN=DSN=TEST;UID=test;PWD=pass;"
ConnCreateCube = _
"CREATECUBE=CREATE CUBE [TestCube] (" & _
"DIMENSION [account_code]);"

[Code]...

I have trimmed this down to the above code and am getting a mysterious OLE DB error: OLE DB or ODBC error." when I try to run it.

View 1 Replies

How To Make 3D Animation Of Cube

Sep 8, 2009

I'm making this rubik's cube program, and I wanted to make a 3d animation of the cube doing the moves, and I figured the best option for that was using the XNA extension. However, doing that brings up a problem. I want to have lots of different options in the Mdi parent form that will interact with the moving 3d cube. The problem with this and using XNA is I can't use both the normal form and the XNA game in the same project. How would I go about having the 2 different projects interact? Just like a txt file or something?

View 1 Replies

Create A Simple Controllable 3d Cube?

Jun 3, 2010

how to create a simple controllable 3d cube? I think the code should go in the form.paint area, but i dont know what exactly to put..

View 2 Replies

VS 2008 Cube Root Error?

Feb 27, 2010

Much to my disappointment I recently discovered that VB can not calculate the cube root (or any odd root) of a negative number even though it is a real answer.For instance if you tryMsgBox((-1)^(1/3))You should get -1 because -1*-1*-1 = -1. But no, VB will return NaN, not a number.Anyways, my problem is that I'm making a graph program and the user needs to be allowed to enter any formula they want and have it evaluated so the program can graph it. But if the user enters anything with x^(1/3) or like it, it will fail.So I was wondering if anyone knows of a way around this problem, such as an extension or patch or something that will fix the issue in Visual Basic. I haven't tried VB 2010 but does anyone know if they have they fixed it yet in that version?

View 15 Replies

VS 2005 Calculate Exact Age?

Oct 7, 2010

I need to calculate the age in Years,Months and Days for which i am using the following code, but it give inappropriate result

[Code]...

View 5 Replies

VS 2005 Referencing Classes In Another Project?

Jun 30, 2010

I'm making an application that will be available as both a Windows App and an ASP.Net App. The web app has a much scaled-down version of the functionality of the window app. I want to reference the classes contained with the windows app from my web app. The thing is, my classes in the windows app may have some modifications: if I reference them in my web app, will this pick up the changes made automatically? Also, referencing the project is for development work, when I go to deploy the web app, I will probably need to reference the classes as dll's. So the next questions are: 1. Is this the right way to go about doing this?
2. How do I make the Classes I have into self-contained dll files?

View 2 Replies

Can Still Get Safearray And Bitmap STRUCTURES (not Classes) In .NET 2005

Sep 27, 2009

I have tried this question several times, sometimes a little in the face of MS VB teams but with no constructive answers. Perhaps with too much rant. I suspect that VB.NET does not allow me to do what I can easly do in VB5.0. The VB team should easily be able to supply the information I need, but have not yet answered the questions. I want to do a lot of work on very large bitmaps (20 Mp or more; 80Mb or more ARGB) using arrays for access. This I used to do in VB5.0 using the SAFEARRAY and BITMAP STRUCTURES. NOT the corresponding .NET CLASSES. But I now need to use an SDK requiring .NET. However, through lack of wisdom, the VB team dropped 5 critical resources on the move to VB.NET - VarPtr, VarPtrArray, the 2 structures and CopyMemory. The SAFEARRAY CLASS seems to lack a set method for array data and the BITMAP CLASS seems to lack both get and set methods for data. On building a .NET solution using VB.NET, c#.NET and C++.NET projects I could not locate the set and get methods. Interop could not upgrade my VB5.0 to VB2005 - presumably on account of these 5 problems. I was surprised that even C++ suffered too. .NET hurts. So, first off, two critcal simple questions: A) Bearing in mind that much of the .NET is tinsel-wrapped APIs, does a pointer to an array still point to a defining SAFEARRAY STRUCTURE of the original format (NOT of course to a first element of an array). If that is so, I am lucky for I can then fill and use (perhaps) my own SAFEARRAY STRUCTURE by memory manipulation in C++. B) If the same applies to a bitmap pointer I can then perhaps do the same with BITMAP STRUCTURES. If that can be done I can hopefully work in a .NET solution containing C++ (for the pointer and mmory work) and VB2005 (for the rest of the work). I can then 1) in VB define two empty byte-arrays GLOBAL in VB.NET- Pic1() and Pic2(). They do not need to be dimensioned. SAFE FROM GC 2) in VB define two GLOBAL SAFEARRAYS to match the arrays, one with one and another with 2 dims matching the bitmap in size. SAFE FROM GC 3) move ByRef the 4 objects to VC++. STILL SAFE FROM GC, LEFT EXACTLY WHERE THEY WERE. 3) copy the BITMAP data pointers to the data pointers of the SAFEARRAYS. DOES NOT MOVE ANYTHING. 4) copy the addresses of the SAFEARRAYS to the corresponding arrays STILL DOES NOT MOVE ANYTHING, BUT JOB DONE. And then I will be able to process the images in seconds rather than minutes after moving only 4 4-byte numbers. I would welcome alternative sequences, provided they DO NOT involve put and set pixels or array elements on the trivial side and do not involve moving 80Mb of image data between "safe" and "unsafe" memory on the Herculian side. Else, as the Pic() ans Safearrays MUST point somehow to structures, WHAT EXACTLY ARE THEY, AND WHERE? I want to access them. If I can't overcome these 5 silly MS blunders I'll just have to build two uncoupled projects - one in VB5.0 and the other in VB/VC++ .NET. I'm not going to get involved myself with tinsel and gladwrap workarounds.

View 4 Replies

VS 2005 Encryption/Decryption With Crytography Classes?

Aug 25, 2009

I'm using the cryptography classes in .net to encrypt and decrypt files. When I encrypt a txt file, then decrypt in my code it works fine. But when I encrypt an xml file and try to decrypt it within my code I get an error saying "padding is invalid and cannot be removed." I am setting the padding during both the encryption and decryption as:

PaddingMode.PKCS7. Do you think the file being an xml file has something to do with the error that's occuring? Also, should I or should I not be setting the padding for both encryption and decryption?

View 5 Replies

VS 2005 Incorporate Maps & Calculate Distance?

Dec 18, 2009

I have a small database program, the the user uses to select 6 different Homes from and compares them to a home the user inputs(Base Home)

I want to add a form with a Map and have the map display the location of all 6 homes and distance of each home to the home the user inputs(base home)

Now trying to be able to add the 6 other locations and retrive distance

View 3 Replies

VS 2005 Modules Vs Private Classes With Shared Members

Mar 28, 2011

I've read that modules are basically shared classes. For a module though, you can call a method directly without prefixing the module name. So I can do this: methodTest("abc", mod1Enum.enum2)But for a class with shared members I have to fully qualify the method call, and in this case fully qualify the enum:[code]In our conversion from VB6 to .NET the need to fully qualify all calls like this might be an argument for us to bring our VB6 modules over as modules instead of converting them to classes.

View 7 Replies

VS 2005 OOP Classes - Can't Clear List Of Data Saved

Dec 3, 2009

bare with me here ok I posted on here a while back, like month to 2 months ago about creating an array of data (user inputed data). But was suggested to go the class route. After weeks of lengthly reading came up with a list collection class.

[Code]...

View 4 Replies

VS 2005 - How To Make Custom Base Classes Available To Future Programs

Oct 22, 2010

I have written multiple programs in the past that deal with cad data. Points, lines, arcs, etc. For each program I ended up creating slightly different versions of some really base classes like a class that defines a point:

<Serializable()> Public Class Point
Public x As Double = 0
Public y As Double = 0
Public z As Double = 0
End Class

My question is how would I use that class in such a way that it could be in a namespace and imported into any future project that I write?

View 2 Replies

VS 2005 Make The Calculate Funtion Work Up Selection Change In Combobox?

Nov 21, 2009

I have a calculate function that adds twenty text boxes together a+b, etc... 20 +20, B changes value when a selection in combobx is changed, how can i make the calculate funtion work up selection change in combobox ? You would think the selection change or index change , but that doesnt work because the tetbox doesnt actually get the new value till after the combo selection is made, so you actually have to go and make the selection twice I know i can put the code in the textbox value change , but i dont want to do that for 20 text boxes and i am assuming there must be a BETTER way?

View 1 Replies

Use LINQ To Filter Collection Of Nested Classes To Yield Dictionary Of Unique Properties Of Those Classes?

Jan 23, 2012

I have two classes, one nested in the other. [code]Neither "Name" or "ID" are unique between operations and records.I wish to construct a dictionary using LINQ = Dictionary(Of String, Of List(Of Integer), whereby the keys are uniqe examples of Names in my collection and the values are the collective set of distinct IDs that are associated with those names.

View 2 Replies

VS 2010 Structure Classes So That The User Interfaces Though A Single Class While The Supporting Classes Are Hidden From Their View?

Jun 13, 2012

How can I structure my classes so that the user interfaces though a single class while the supporting classes are hidden from their view? I think its best understood in an example:

Public Class MyInterface
Public Economic as EconomicClass
Public Sub New()
MyBase.New()

[code].....

So you might ask why am I even separating them? It's strictly for others who will be working with this interface. I need to funnel them though a logical structure:

interface.Economic.MyMethod
interface.Currency.MyMethod
etc

This way everything is already handled for them in the background and they only need to run the method they need. I don't know if I can have it both ways in VB.NET.

View 23 Replies

VS 2010 Calling Subs And Functions Within Classes That Are Within Classes?

Oct 24, 2009

Here is some example code of what I mean:

vb
Public Class Form1
Private Sub Button1_Click(ByVal sender as Object, e as systemEventArgs) Handles Button1.Click

[Code]....

View 5 Replies

Date Method - Calculate The Number Of Years For My Calculate Age Event Handler

Mar 30, 2009

I am trying to calculate the number of years for my calculate age event handler, however i am apparently missing a method or whatnot because im trying to calculate the age , can anyone suggest help on this. I need to subtract years to get my age but when i try the birthdate.Subtract (currentDate) method i get an error about not able to convert from LONG?

So below is what I have.

Private Sub btnCalculateAge_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculateAge.Click
Dim currentDate As Date
Dim BirthDate As Date
Dim Age As Long

[CODE]

View 7 Replies

Derived Classes Cannot Raise Base Classes

Jul 10, 2009

I m trying to raise Click event of Textbox explictly but I m getting "Derived classes cannot raise base classes" error.[code]....

View 1 Replies

'calculate' Date In Vb2005 With Date (VB 2005)?

Jun 25, 2009

there, im doing a leave management system with vb 2005..and here's my problem -how do i 'find' the expiry date?? eg: from the datetimepicker in my form, if the date i select is 1st january 2009.....how do i type the code to find the expiry date 1 year later (which is 1st january 2010) and display the date in a textbox in my form???

View 1 Replies

Loop And Enumerate Properties Of Nested Classes In Nested Classes?

Sep 24, 2010

so far i got

code
For Each item As Reflection.FieldInfo In GetType(NameSpace.ClassWithNestedClasses).GetFields
rtfAppend(item.Name & ":" & Tab & item.GetValue(Me))
Next
For Each item As Reflection.PropertyInfo In GetType(NameSpace.ClassWithNestedClasses).GetProperties()

[code]...

which gets me the simple string vars and properties of my top class, but how can i apply this to loop through all sub classes and get there vars and props?

View 1 Replies

VB XML Classes Vs String Classes?

Oct 13, 2011

Searching the internet finds no less than 700 different ways and opinions to accomplish what I'm trying to do, and I would just like to know the simplest, most bullet-proof way possible.

[Code]...

I simply want to extract the string "bar," which is inside <hostName></hostName>I can do this easily enough with simple string functions, but I'd like to do it with one of the .NET XML classes/methods.

View 2 Replies

Find The Root Of A Number Such As The Square Root, Cube Root 5th Root Or Whatever

Sep 23, 2011

For those of you interestested in mathematics you can find a root of a number in two different ways. Lets say you want to find the 5th root of 27.

[Code]...

View 2 Replies

How To Control Volume

Apr 11, 2012

How can I control the volume of only the sound coming from my program rather than the system sound with a track bar? If this isn't possible, how can I control the system volume with the track bar?Bgeo99

View 2 Replies

Set The WAV File Volume

Feb 23, 2009

I've been looking online for almost two hours now, is it possible to set the volume level of a WAV file that a program you are designing plays? For example, you have a button on a form and when pressing button it plays sound but at a specific volume. I tried to find volume control tutorials but that seems to be a difficult one for coders.

View 2 Replies

Vb Volume Meter

Jul 8, 2010

look what i found : [URL]

View 1 Replies

Change The Computers Volume Up And Down?

Jul 1, 2010

How do i change the computers volume up and down? or mute it all together?

View 2 Replies







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