Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > need help! i'm a beginner


Reply
 
Thread Tools Display Modes
  #1  
Old 04-21-2003, 08:19 AM
geekool geekool is offline
Newcomer
 
Join Date: Apr 2003
Location: australia
Posts: 15
Default need help! i'm a beginner


hi! I found some VB codes in a site called vbcode.com
but I don't know how to add the script coz' I don't know what must i have on the form...hope you guys know what i mean... I'm a beginner with stupid questions... hope you all don't mind...
thankx
Reply With Quote
  #2  
Old 04-21-2003, 08:25 AM
clockworkorange clockworkorange is offline
Junior Contributor
 
Join Date: Mar 2003
Posts: 238
Default

Quote:
Originally Posted by geekool
hi! I found some VB codes in a site called vbcode.com
but I don't know how to add the script coz' I don't know what must i have on the form...hope you guys know what i mean... I'm a beginner with stupid questions... hope you all don't mind...
thankx



click on a command box from the tool bar
place it onto the form

like in the middle

then double click on the commandbutton then u just made and the code screen will come up

type

command1.caption = "Hello"
Reply With Quote
  #3  
Old 04-22-2003, 05:35 AM
geekool geekool is offline
Newcomer
 
Join Date: Apr 2003
Location: australia
Posts: 15
Default

Can you plz be more specific? What bout the codes? I can't function the whole program with just one button rite? I have got like so many different types of code but the problem is that I don't know what I'm suppose to have on the form... THus , the program won't function with an empty form... What I want to know now is how do i cope with this problem... having the codes which doens't tell me whati'm suppose to have on the form...

thankx
Reply With Quote
  #4  
Old 04-22-2003, 05:43 AM
Garmour's Avatar
Garmour Garmour is offline
Back for a little while..

Retired Leader
* Expert *
 
Join Date: Oct 2002
Location: Behind you.....Boo
Posts: 2,199
Default

You really need to do a bit of reading in the help files that come with VB, or even better get a book on vb.

You can tell what controls are needed usually by looking at the names and properties being used in the source code.
eg, if you see something like text1.text = "...... then you know you need a textbox called text1 (the default name).
I could go on but you really need to do some basic learning first
__________________

....but then, what would I know ?
Reply With Quote
  #5  
Old 04-23-2003, 08:12 PM
geekool geekool is offline
Newcomer
 
Join Date: Apr 2003
Location: australia
Posts: 15
Default

yeah i know bout that... it's just that I found these codes such as:


'Change The 1 To 6 To 2 To 9 For Character Length's Between 2 And 9
Randomize Timer
For i! = 1 To 6
110 Char = int(Rnd * 91)
If Char < 65 Then Goto 110
Password = Password + Chr(Char)
Next i!
Msgbox "Your New Password Is: " & Password

There is no those kinda text1.text thing u know.. .and there's another one

Option Explicit

Public Enum EErrorMath
eeBaseMath = 13520 ' Math
End Enum

' Derived math functions from language reference Appendix D

' Secant
Function Sec(x As Double) As Double
Sec = 1 / Cos(x)
End Function

' Cosecant
Function CoSec(x As Double) As Double
CoSec = 1 / Sin(x)
End Function

' Cotangent
Function CoTan(x As Double) As Double
CoTan = 1 / Tan(x)
End Function

' Inverse Sine
Function ArcSin(x As Double) As Double
ArcSin = Atn(x / Sqr(-x * x + 1))
End Function

' Inverse Cosine
Function ArcCos(x As Double) As Double
ArcCos = Atn(-x / Sqr(-x * x + 1)) + 2 * Atn(1)
End Function

' Inverse Secant
Function ArcSec(x As Double) As Double
ArcSec = Atn(x / Sqr(x * x - 1)) + Sgn(x - 1) * (2 * Atn(1))
End Function

' Inverse Cosecant
Function ArcCoSec(x As Double) As Double
ArcCoSec = Atn(x / Sqr(x * x - 1)) + (Sgn(x) - 1) * (2 * Atn(1))
End Function

' Inverse Cotangent
Function ArcCoTan(x As Double) As Double
ArcCoTan = Atn(x) + 2 * Atn(1)
End Function

' Hyperbolic Sine
Function HSin(x As Double) As Double
HSin = (Exp(x) - Exp(-x)) / 2
End Function

' Hyperbolic Cosine
Function HCos(x As Double) As Double
HCos = (Exp(x) + Exp(-x)) / 2
End Function

' Hyperbolic Tangent
Function HTan(x As Double) As Double
HTan = (Exp(x) - Exp(-x)) / (Exp(x) + Exp(-x))
End Function

' Hyperbolic Secant
Function HSec(x As Double) As Double
HSec = 2 / (Exp(x) + Exp(-x))
End Function

' Hyperbolic Cosecant
Function HCoSec(x As Double) As Double
HCoSec = 2 / (Exp(x) - Exp(-x))
End Function

' Hyperbolic Cotangent
Function HCotan(x As Double) As Double
HCotan = (Exp(x) + Exp(-x)) / (Exp(x) - Exp(-x))
End Function

' Inverse Hyperbolic Sine
Function HArcSin(x As Double) As Double
HArcSin = Log(x + Sqr(x * x + 1))
End Function

' Inverse Hyperbolic Cosine
Function HArcCos(x As Double) As Double
HArcCos = Log(x + Sqr(x * x - 1))
End Function

' Inverse Hyperbolic Tangent
Function HArcTan(x As Double) As Double
HArcTan = Log((1 + x) / (1 - x)) / 2
End Function

' Inverse Hyperbolic Secant
Function HArcSec(x As Double) As Double
HArcSec = Log((Sqr(-x * x + 1) + 1) / x)
End Function

' Inverse Hyperbolic Cosecant
Function HArcCoSec(x As Double) As Double
HArcCoSec = Log((Sgn(x) * Sqr(x * x + 1) + 1) / x)
End Function

' Inverse Hyperbolic Cotangent
Function HArcCoTan(x As Double) As Double
HArcCoTan = Log((x + 1) / (x - 1)) / 2
End Function

' Logarithm to base N
Function LogN(x As Double, n As Double) As Double
LogN = Log(x) / Log(n)
End Function



::: I seriously really need help man... these codes I've found is too hard for me, izzit?
Reply With Quote
  #6  
Old 04-23-2003, 08:26 PM
lebb's Avatar
lebb lebb is offline
Disillusioned Code Poet

Retired Moderator
* Guru *
 
Join Date: Apr 2002
Location: Tennessee, USA
Posts: 12,808
Default

1. Reread Garmour's post. Maybe several times.

2. What is it that you're trying to do? Those trigonometry functions look fine, but what are you trying to do with them?
__________________
Laura

Ita erat quando hic adveni.
Reply With Quote
  #7  
Old 04-23-2003, 08:39 PM
unclebill unclebill is offline
Junior Contributor
 
Join Date: Apr 2003
Location: San Diego, CA
Posts: 301
Default

This appears to be just a collection of functions. There is no form, no controls, nothing to display anything.

To make a program, you need to create the form and the tools required to provide entry of parameters to pass to the functions, the controls to cause the functions to be called and the means to display or apply the results of the functions.

If you need a program that does trig function manipulations, the functions are already written for you but that's all you have. You'll have to create the program for the functionality you need.
Reply With Quote
  #8  
Old 04-26-2003, 12:44 AM
clockworkorange clockworkorange is offline
Junior Contributor
 
Join Date: Mar 2003
Posts: 238
Default

just play around with the objects
see all the different options for an object, thats how i started, and to test the buttons put this in

print "hello"



if u still dont get it what u do is double click on a button or whatever that u have placed, then the code will come up, enter it there
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Total beginner in DX(graphics)... Please help! djerx DirectX 8 11-21-2002 09:29 AM
beginner and stuck on lesson 1, please help Radom Miscellaneous Languages 3 10-30-2002 09:46 AM
Ms SQL - VB 6.0 - how to get out the data [VB beginner :-(( ] new_one Database and Reporting 2 08-29-2002 07:53 AM
Beginner Client/Server questions Patriot General 8 08-18-2002 02:10 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->