I have made some modifications to the code I posted last night. I got some real good feedback from Martin Liss and Bruce Fox whom I want to thank.
I just used the app to create two completely new apps in under 30 minutes. In that time I also added code to read quotes from an Access database into a data file. The Access database was almost 0.5 MB. The quote file is 143 KB. Major size difference.
Anyway, I would really appreciate feedback from someone who uses it.
I am uploading three versions of it. In this post is the master from which you can make whatever you want.
The next post will have the Quote Creator utility. It is used for the developer to create a Quote of the Day data file and has the database functionality.
My third post will be the applet which is stripped of all editing functionality as it would be included in another app. In other words, the user can scroll through the quotes, but they can't edit them.
Instructions are in the ReadMe file in the zip file attached to this post.
PLEASE PLEASE PLEASE.... I need feedback from you as to what problems you had implementing this. Somebody try to make an address book or something and let me know what problems you run into. You should be able to take this app and have a fully functional address book in less than an hour. It's really that simple.
NOTE: DO NOT unzip files from these three zips into the same folder. Many files have the same name, but have been modified so overwriting files will be bad.
Last edited by cafeenman; May 28th, 2002 at 10:19 PM.
when you click on the "-" sign under the "Double Array" list box, if nothing is selected you will get a runtime error. And it would be nice to ask the user to see if they REALLY REALLY want to delete the entery
ANOTHER IMPORTANT THING I ALWAYS NOTICE!!!!
all the people use the isNumeric function, I say dont use it!! NEVER!!!
do this:
from Programming Microsoft Visual Basic 6
You should be aware that this function isn't robust enough for most real-world applications. For example, the IsNumeric function incorrectly considers these strings as valid numbers:
123,,,123
345-
$1234 ' What if it isn't a currency field?
2.4E10 ' What if I don't want to support scientific notation?
here's the code you can use to be 100% sure that the user enters a number:
VB Code:
Function CheckNumeric(text As String, DecValue As Boolean) As Boolean
Dim i As Integer
For i = 1 To Len(text)
Select Case Mid$(text, i, 1)
Case "0" To "9"
Case "-", "+"
' Minus/plus signs are only allowed as leading chars.
If i > 1 Then Exit Function
Case "."
' Exit if decimal values not allowed.
If Not DecValue Then Exit Function
' Only one decimal separator is allowed.
If InStr(text, ".") < i Then Exit Function
Case Else
' Reject all other characters.
Exit Function
End Select
Next
CheckNumeric = True
End Function
that function is from the same book btw
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB ) VB.NET to C# conversion tips!!
That code looks pretty good to me. But it looks like it will allow more than one decimal. I'll have to try it and see what happens. It may need a counter added to prevent more than one decimal in the string. Thanks for the feedback.
Originally posted by cafeenman That code looks pretty good to me. But it looks like it will allow more than one decimal. I'll have to try it and see what happens. It may need a counter added to prevent more than one decimal in the string. Thanks for the feedback.
actually I think it works correctly. otherwise you have to blame the author Francesco Balena for it
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB ) VB.NET to C# conversion tips!!
OK, I'm not saying it doesn't work. I just don't see where it only allows one decimal. But it doesn't matter how it looks to me since I haven't tried it yet. If you say it works, I believe you.
I'm trying to add a Find function to the cTable class. That involves parsing again which I suck at. Anyone who would like to give me a hand writing the code for parsing strings like:
ID = 1
ID <> 1
ID >= 1
etc, I would be most appreciative. I don't plan to include Like functionality. Just <, > and =
I noticed that when I had added a few records, and deleted one
of them, the (deleted Records) "String" remained behind in the
dropdown combo in the ToolBar.
Originally posted by Bruce Fox I noticed that when I had added a few records, and deleted one
of them, the (deleted Records) "String" remained behind in the
dropdown combo in the ToolBar.
Bruce.
Thanks Bruce. Here's the fix:
VB Code:
Dim iReturn As Long
iReturn = MsgBox("Are you sure you want to delete this record?", vbYesNo + vbQuestion, APP_TITLE)
If iReturn = vbNo Then Exit Sub
Reposition DELETE_RECORD
' Add the next two lines of code to take care of the combobox problem
TBL.PopulateCombo cmbField
SetMenus
Changed = False
What I really want to know about is can you use this code to create data files for your projects easily by just dropping it in and making modifications to the field names. That's the intent of this code.
The interface I created was rough and dirty and not really what I'm looking for feedback on. I hope I don't sound ungrateful, because I do appreciate the feedback I'm getting. But what I'm not getting is the feedback that I really want.
What I'd like to see is someone take my code and use it to create their own data file with different fields than supplied.
Thanks for all your help though. I really do appreciate it.
Could not dl the quote file from this site - winzip reported errors...
What is the filename of the library :Microsoft Connection Designer Instance? This is not referenced on my machine...
Hey cafeenman - I know this is an old post but I am really suprised that by now that a group of cooperative VB programmers have not clubbed in to create a freeware VB database with SQL support.
I never intended for this code to be that kind of database. Almost all my apps write a file for something or other that doesn't need the support or overhead of a "real" db system.
In the past I had simply regurgitated the same code and made changes as necessary. I wrote VB DB to give me an easy framework and simplify the process.
Originally posted by cafeenman This is the last version of the app. I think it was as finished as I was going to make it, but it's been a long time since I've looked at it.
If there are any problems with it, you'll have to work them out. I'm not doing any coding in the near to distant future.
You just might come back to a bit of coding for your flying-plane-thing... categorizing all those planes with the weird names and whatnot.
Thanks for your reply cafeenman (cool alias and most appropriate!!!)
I have an urgent winsock post that needs to be resolved and I will be back onto this one soon.
The app that I have currently only has two tables and so your help here might just do the trick... I am using access right now in some of the apps I redistribute but this is going to be a problem when the database file grows. Really appreciate your help!! Cool man!!
Hey I used to fly planes as well!!! Here is SA we fly in the sugar cane fields. When your plane goes down in the fields somewhere it is quite an adventure trying to find it!!. The one time my glider went down and I could only get to it the next day. My dad was there holding up a long pole so I could see him from the opposite facing hill. marhing through the fields. Was a real jol!!!