-
Re: i need help with this program i have no clue what to do
there is a lblcommission, it's right next to lblcom just nothing in the caption because i wanted to keep it blank, also tyvm for the working code i'll be sure and NOT copy/paste in the future
-
Re: i need help with this program i have no clue what to do
Looks like we cross posted examples. I included the Sub to Clear all the TextBoxes, Timeshifter Formats the calulation - so you need to see both I guess :)
-
Re: i need help with this program i have no clue what to do
Well, I guess it's all good then. At least everything works now... :lol:
-
Re: i need help with this program i have no clue what to do
Quote:
Originally Posted by Newtonx
i'll be sure and NOT copy/paste in the future
I wouldn't go that far, Control Arrays have a place. An example is if you have tons of TextBoxes and you want common code - say in the ClickEvent. You only have to code it once, and the refernce will be determined by the INDEX.
The only draw back is not being able to uniqly name each TextBox (althoug you can use the .Tag property)
There is a place for Control Arrays, you just havnt found it yet ;)
-
Re: i need help with this program i have no clue what to do
Quote:
Originally Posted by Bruce Fox
I wouldn't go that far, Control Arrays have a place. An example is if you have tons of TextBoxes and you want common code - say in the ClickEvent. You only have to code it once, and the refernce will be determined by the INDEX.
The only draw back is not being able to uniqly name each TextBox (althoug you can use the .Tag property)
There is a place for Control Arrays, you just havnt found it yet ;)
yeah i have no clue what a control array is, but hey i'm learning i just need to read more, now how about enableing a command button when another is pressed if succesfully got it to work in the past but forgot how i did it i think it was something like
cmdButton Enabled = True
but i don't remember
-
Re: i need help with this program i have no clue what to do
Your right ;) Set it's .Enabled proporty to True/False as required.
-
Re: i need help with this program i have no clue what to do
VB Code:
Private Sub cmdCalculate_Click(Index As Integer)
lblCommission.Caption = CStr(Val(txtSales.Text) - Val(txtCost.Text) * 0.2)
cmdPrint Enabled = True
End Sub
doesn't work
-
Re: i need help with this program i have no clue what to do
You need to use the proporty of the CommandButton - so a "." is required.
Do you have intellisense on you IDE (the area you type code)?
When you type "cmdPrint." (note the decimal) the intellisense should show you the available proporties etc.
In any event, tou need:
cmdPrint.Enabled = True
-
Re: i need help with this program i have no clue what to do
Do you have intellisense on you IDE (the area you type code)?
no clue what that is, but ty vm
-
Re: i need help with this program i have no clue what to do
Ok, just realised that yor cmdPrint is also part of a Control Array (intellisense still works tho)
Delete the Button, and add a new one.
-
Re: i need help with this program i have no clue what to do
nvm that didn't work either
-
Re: i need help with this program i have no clue what to do
ok will make a new button lol stupid arrays *in this case anyways*
-
Re: i need help with this program i have no clue what to do
ok the enable works but now the "Print Form" won't work
-
1 Attachment(s)
Re: i need help with this program i have no clue what to do
See the attached.
Actually, intellisense works when you type part of the word say "cmdp" and press Ctrl + Space bar and have the word completed
When I type the decimal, the intellisense popup appears.
-
Re: i need help with this program i have no clue what to do
This forum is one of the best places to learn at your own pace. I know I wouldn't be where I'm at right now if not for this place.
Anyway, until you have need for a control array, I'd stay away from copy-pasting anything on your form. Just create a new object and you'll never make an array unless you mess something up pretty badly.
And Intellisense is that fun little box that pops up when you enter an object name and a ".". For instance, on that program, when you type "cmdPrint.", a box should pop up wen you hit the period, and that box lists all the properties that you can change during runtime. Very useful when trying to discover new commands for stuff.
-
Re: i need help with this program i have no clue what to do
And Bruce, you and me seem to be double posting just about everything, except always in a different fashion... Kinda scary...
-
Re: i need help with this program i have no clue what to do
You know what they say; great minds...
-
Re: i need help with this program i have no clue what to do
okay ic about the intellisense now, as for the enable, it works, but when i press print form it gives me another compile error, all i have for code under the print command button is quite simply
Print Form
-
Re: i need help with this program i have no clue what to do
VB Code:
Private Sub cmdPrint_Click()
PrintForm
End Sub
-
Re: i need help with this program i have no clue what to do
Quote:
Originally Posted by Bruce Fox
VB Code:
Private Sub cmdPrint_Click()
PrintForm
End Sub
lol i feel stupid now i put a space
-
Re: i need help with this program i have no clue what to do
You didnt make a mistake, just that Print is a VB function. Used when writing out to Files.
PrintForm is as it says :)
Do you have MSDM library installed?
-
Re: i need help with this program i have no clue what to do
MSDM? idk i'm just taking an online vb high school course and the books don't tell the info very clearly when it comes to functions strings yada yada yada, i have no help files, VB 6 Working Model Edition but no help files..it's a pain in the arse sometimes
-
Re: i need help with this program i have no clue what to do
If you have web access make MSDN your friend:
Work your way down tru the left hand panel VB6 etc (it takes alot to root down)
Your looking for VB6 Properties etc
http://msdn.microsoft.com/library/de...rview.asp.aspx
Addistionaly, VB6 Programmers Reference Book is fantastic - for offline use. It lists all the Functions etc.
Also, use the Object Browser in the toolbar of VB6 (or, press F2) - give this a go, let us know how you wnet as you could do this right away :)
-
Re: i need help with this program i have no clue what to do
No kidding. MSDN: Microsoft Developer's Network, or something to that extent. The VS6 library is over a gig, but incredibly useful. Without it, this is the next best source, as we are (mostly) intelligent enough to piece together bits of information and figure out what's needed as a whole.
-
Re: i need help with this program i have no clue what to do
i'm downloading msdn atm didn't know it was in bits and pieces it will take a couple hours but it looks pretty nice, also how do i add tool tips and it wants me to put in an accumulator how do i do that and how should i show it? maybe to add up all of the total commissions into a label box would work...
-
Re: i need help with this program i have no clue what to do
Just to make sure, which version are you downloading?
Can you post the link ur using.
-
Re: i need help with this program i have no clue what to do
For Windows Development
Visual Basic 2005 Express Edition »
Productivity that is ideal for first time or casual Windows programming.
Download
Visual C# 2005 Express Edition »
A great combination of power and productivity for the Windows developer.
Download
Visual C++ 2005 Express Edition »
Horsepower with a finer degree of control than other Express Editions.
Download
Visual J# 2005 Express Edition »
Ideal for those with prior Java-language experience or learning the Java language.
Download
those 4 on this page http://msdn.microsoft.com/vstudio/express/
-
Re: i need help with this program i have no clue what to do
something wrong with that? i think i'm just gonna do the vb express edition, guess thats not the libraries....how the hell do i download the library?
-
Re: i need help with this program i have no clue what to do
-
Re: i need help with this program i have no clue what to do
then what am i supposed to download? be more specific lol
-
Re: i need help with this program i have no clue what to do
I don't think you can get the VB6 library from MSDN online anymore. Microsoft has cut off support for VS6 in favor of VS2005Express...
-
Re: i need help with this program i have no clue what to do
-
Re: i need help with this program i have no clue what to do
Private Sub cmdCalculate_Click()
lblCom.Caption = "Commision: $" & Round(0.2 * (Val(txtSales.Text) - Val(txtCost.Text)), 2)
cmdPrint.Enabled = True
End Sub
giving me an error again won't allow the cmdPrint.Enabled to work o.o wants to put it as .count/item/ubound/lbound again
-
Re: i need help with this program i have no clue what to do
i still haven't gotten that figured out anyways how do i add tooltips?
-
Re: i need help with this program i have no clue what to do
-
Re: [RESOLVED] i need help with this program i have no clue what to do
You can buy and OEM Version of MSDN Library October 2001 CD on Ebay - I found it yesterday :)
-
Re: [RESOLVED] i need help with this program i have no clue what to do
I don't know if its the COMPLETE documentation, but the VB6 section of the MSDN still exists.
http://msdn2.microsoft.com/en-us/library/ms950408.aspx
-
Re: [RESOLVED] i need help with this program i have no clue what to do
Quote:
Originally Posted by kleinma
Doh, I'm an idiot - I new it existed... I was there yesterday when I got the URL to add in post #64 above ...
Use the left hand panel and work your way down: Product Documentation / Reference - from here you can select Objects/Properties etc..