Yes its right...
Printable View
Yes its right...
Are you done already?
Sorry -- Me being an idiot... It is right.
Here is the project for you ....
I did it in my own form.. you can go through it and write your own in your form..
Enjoy....
Gremmy....
Gremmy, for some reason i cant open it, it is saying that i cant open it because it was made with a different visual basic program, can you post the form on here? so i can see it?
What ver. of VB are you Using.. I got VB6 Pro....Quote:
Originally Posted by sharib0816
Try by Dbl clicking on form1 instead of project1 to open it ..
im using 6.0 but when i click on it, it says error during load... it wont let em open it or do anyhting with it.
in the corner where it says form, there is a little lock icon on the form
oK, I copied what you did over to my visual basic form, but it said invalid property array.. what shoudl i do about that?
i've re attached the form...Quote:
Originally Posted by sharib0816
Try this one.
----Edit----
New attachement..
Form1.frx included....
Here's why you get that error:
Inputting values into a list from the IDE inserts the items into a Form1.frx file. That file isn't included, so the listboxes can't get the values, but the Form1.frm file itself references the Form1.frx file as to what is in the listbox.
Hence, the error, and hence the error message that comes on load, which says:
If you look at Form1.frm in a plain text editor at those lines, you'll see references to Form1.frx:Quote:
Line 32: Property ItemData in AM_PM had an invalid file reference.
Line 34: Property List in AM_PM had an invalid file reference.
Line 70: Property ItemData in AM_PM had an invalid file reference.
Line 72: Property List in AM_PM had an invalid file reference.
Line 80: Property ItemData in AM_PM had an invalid file reference.
Line 82: Property List in AM_PM had an invalid file reference.
You'd have to open it through the project, or have Gremmy upload the FRX separately.Code:'From Form1.frm
Begin VB.ListBox AM_PM
Enabled = 0 'False
Height = 255
Index = 2
ItemData = "Form1.frx":0000
Left = 1800
List = "Form1.frx":0007
TabIndex = 9
Top = 1320
Width = 615
End
'...
I don't get why it doesn't open for you. It did for me (VB6 Enterprise Edition).
But, in any case, you could just manually open the form by itself, then add AM and PM as list items in all three ListBoxes. That should get it working for you.
Thanks Chaos.... :thumb:Quote:
Originally Posted by ChaosTheEternal
added it to the upload..
Just thought I'd point out an easier way to do the calculation:
Code:Private Sub HighNoon()
Dim dRise As Date, dSet As Date, dNoon As Date
dRise = CDate("7:08 AM")
dSet = CDate("8:30 PM")
dNoon = dRise + ((dSet - dRise) / 2)
Debug.Print (dNoon)
End Sub