vb5prgrmr 143 Posting Virtuoso

It seems that you are using a 3rd party component. It is that component that needs to be installed upon the computer in question to be of use in the design environment. "Well I have it on my computer, why can't I use it?" Well, there is a difference between a developers license and a user license and presently you have a users license on the computer in question, hence the error.

Good Luck

vb5prgrmr 143 Posting Virtuoso

You need to create an install package and install your program on the other computer! To install, you could use the PDW, Visual Studio Installer 1.1 (the replacement for the PDW), Inno, Wise, or several other free and not so free installation applications BECAUSE YOU CANNOT JUST COPY A VB EXE OVER TO ANOTHER MACHINE AND EXPECT IT TO WORK!

It does not matter that you copied all your source files!!!! YOU NEED TO CREATE AN INSTALL PACKAGE AND INSTALL YOUR PROGRAM ON THE OTHER COMPUTER!!!!!!!

VB source files are nothing but text files! Add a control to your form and you also need to add its ocx/dll and the PDW or VSI will do this for you. Same goes for user controls and other controls or references that you add to your project!!! Those libraries need to be installed properly and just coping the exe over will leave all those controls and references behind!!! Thus "IT DON'T WORK!!!"

vb5prgrmr 143 Posting Virtuoso

Allowing teachers to have the address of the student could get you into trouble. Also, more than one student could live at the same address. So best bet is to move the address information to another table all by itself. Same can be said for semester information, classes, and so on.

Course information and staff information should be in seperate tables

Course information and year/semester course if offered should be two different tables

Registration to a course should at least have the student ID... (student ID, Class Offering ID (combination of course id and year/semester class offered(3rd table between the two)), Staff ID)


Best bet is to use the old Mark I recording devices (Pencil and Paper) and design yor database to 3rd normal form. Then design in security whether that is going to be front end or back end compliance. After that, for a system like this, you may also want to build in audit tracking so someone can make sure those users are not getting to where they should not be.

Then go into your program design functionality and how it works or will work with your database design.

Good Luck

vb5prgrmr 143 Posting Virtuoso

GetSetting at form load and SaveSetting at form query unload or form unload.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Time to use your frinds (yahoo, google, ask, answers, bing) and search for vb6 ado tutorial...

Good Luck

debasisdas commented: don't you get tired of writing the same silly message every where -3
vb5prgrmr 143 Posting Virtuoso

1. Combo1.Enabled = False
2. Use another control...

Good Luck

vb5prgrmr 143 Posting Virtuoso
vb5prgrmr 143 Posting Virtuoso

Read about GetDiskFreeSpace no ex...(Hint: you can find it in help...)

Good Luck

vb5prgrmr 143 Posting Virtuoso

You need to create an install package and install your program on the other computer! To install, you could use the PDW, Visual Studio Installer 1.1 (the replacement for the PDW), Inno, Wise, or several other free and not so free installation applications BECAUSE YOU CANNOT JUST COPY A VB EXE OVER TO ANOTHER MACHINE AND EXPECT IT TO WORK!

Good Luck

vb5prgrmr 143 Posting Virtuoso

>As I told you before, you will have to figure out a way to know how many lines are in the file to begin with and until that time that you do, of course you are going to overwrite informaiton between instances of your form being activated. You could use GetSetting and SaveSetting if you wish or you could figure out how to calculate the number of records there are based upon file size (that is a big hint there!!!).

To calculate how many records are in the file by filesize, you would need to know the size of the file (FileLen Function) divided by the record size you are storing (Hint: You know this...).

See the green words above... Look them up!

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, lets make this simple and use a CSV format instead of this because you have constantly ignored my advise to you in that you would have to get a count of records that are already in the file...

1. assemble your string to print like so...
strStringToPrint = text1.text & "," & text2.text & "," & text3.text

2. check to see if record has already been entered (see below)
3. open file for Append...
4. use print #FNumb, strStingToPrint

Then to retrieve

Dim FName As String, FNumb As Integer
Dim FCont As String, LineArray() As String, ElementArray() As String

FName = "C:\z\test.txt"
FNumb = FreeFile

Open FName For Binary As #FNumb
FCont = Input(FileLen(FName), #FNumb)
Close #FNumb

LineArray = Split(FCont, vbNewLine)
MsgBox UBound(LineArray) + 1 & " number of lines in file"

ElementArray = Split(LineArray(0), ",")
MsgBox "number of fields in line = " & UBound(ElementArray) + 1

After that, if you edit a record you will need to edit the array that holds the line (LineArray) and then rewrite the whole file by opening for output and using print #FNumb, Join(LineArray, vbNewLine)

If you add a record, you can open for append and just write the append information or you can redim preserve LineArray(0 To UBound(LineArray) + 1) and save the information into the last element of the LineArray. Then Open For Output to overwrite as mentioned just above.

To delete a line, you would need to move any …

vb5prgrmr 143 Posting Virtuoso

Then if your problem is solved, please mark you thread as solved and give any posts that were helpful to you a positive rating if you think that post deserves it...

Good Luck

vb5prgrmr 143 Posting Virtuoso

GoTo http://www.rentacoder.com or http://www.odesk.com and put it up for bid...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Once again, see my post...

Good Luck

vb5prgrmr 143 Posting Virtuoso

That is because the rs.fields("fieldname") = picture1.picture is only saving a long integer to the database that at one time pointed to a memory location where the picture itself was stored. Use debasisdas links above andreret's post or see these...

save http://www.vbforums.com/showthread.php?t=335207
retrieve http://www.vbforums.com/showthread.php?t=346752

and here is a post with a link to a zip that allows you to retrieve a picture from a database without having to go to disk...

http://www.vbforums.com/showpost.php?p=2975462&postcount=35

Good Luck

vb5prgrmr 143 Posting Virtuoso

There are many places to sell domains including on your home page. See register.com or use your friends (yahoo, google, ask, answers, bing) and give a search for sell/buy a domain...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Read while scrolling??? End gets you there without the need to read and once a user knows that, well... just think about human nature... (same can be said for page navigation which should also be available at the top of the page...

vb5prgrmr 143 Posting Virtuoso

Not much of a scripter but I do know there is a lot of code out there for VB6.0 and I would normally say something like it is time to use your friends (yahoo, google, ask, answers, bing) to search for vb6 rs232, but since you are using VBS, you might want to also try vbs rs232...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, so you have finally answered a question but there are other questions like in my previous post. The post prior to the one you answered... Did you create an install package and install your program on the other machine?

Good Luck

vb5prgrmr 143 Posting Virtuoso

What OS? Vista or above? If so, then see this faq...

http://www.vbforums.com/showthread.php?t=456795

because the application directory is read only and I know sometimes CR wants to create tempory files...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, I remember now. The size on disk is calculated by using the GetDiskFreeSpace API that returns bytes per sector as a sector is the smallest portion of addressable space on a disk. Meaning, if a disk has 4kb per sector and you save a 1kb file, it will take up an entire sector (4kb). On the other hand if you save a 5kb file, it will take up 2 sectors or 8kb...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Adobe as a windows print to pdf print driver that you can download, install, and print to just as you would a regular printer and I believe, if I remember correctly, that you can use an INI file to specify name and directory settings...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Your dim rustysword as new weapon done inside of the class is causing a circular reference... Think about it. That declaration would be done out side of the class to instantiate the class. Then you seem to be missing the public procedures (let/get) to assign and retrieve the values. Next up is the Dim type declaration as the word type is a keyword as is the word value and the word name.

Now this is an example of using a UDT (User Defined Type)...(as if it was declared in a form)

Option Explicit

Private Type Weapons
  WeaponName As String
  WeaponType As String
  WeaponDmg As Integer
  WeaponSpeed As Double
  WeaponDur As Integer
  WeaponVal As Integer
End Type

Dim Weapon() As Weapons

So now you would have an array of the type weapons that you can redimension just as you would a regular array.

No, I'm not suggesting you change your code to this, I'm just trying to make a point, which is going to be pretty much mute once I make my next one...

Time to use your friends (yahoo, google, ask, answers, bing) to search for VB6 ADO Tutorial. This information will allow you to access a database and retrieve a recordset that will also act like the type example above or your proposed class and depending upon how you design your database, you could pull up all of the weapons or just a subset of them for the character in question...

Good Luck

vb5prgrmr 143 Posting Virtuoso

You need to look up the For Loop structure in help and or your book...

For VariableName = 1 To 6
  'do search here (use if statement)
Next VariableName

Good Luck

vb5prgrmr 143 Posting Virtuoso

You can do this via com or automation, or you can use ado... use friends (yahoo, google, ask, answers, bing) to search for vb6 automating excel tutorial or vb6 ado excel...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, same ole song from me... use your friends (yahoo, google, ask, answers, bing) to search for vb6 ado excel and you will find examples like this one http://www.thescarms.com/VBasic/ExcelImport.aspx then see http://www.connectionstrings.com for the correct DNS Less connection string...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Most fingerprint readers come with a SDK or a dll that you can hook into with nearly any programming language. You best bet is to do some searching online for various makes, models, and manufactures and to see what kind of online support they have along with what kind of programming languages are supported as some of the newer ones are only usable by .NET tech...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Abu, Abu, Abu. Did you first try your friends (yahoo, google, ask, answers, bing) to search for vb6 automating word tutorial? A lot of your questions will be answered in them...

Good Luck

vb5prgrmr 143 Posting Virtuoso
Option Explicit

Private Sub Form_Load()
Picture1.AutoRedraw = True
End Sub

Don't turn it on and off like you are doing as it will disappear...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Let me introduce you to your new best friends (yahoo, google, ask, answers, bing) and when you search for information like you want, prepend it with vb6 so you don't get so much .net stuff.

this search used vb6 search listview tutorial and the first 3 or 4 links should get you started...

http://search.yahoo.com/search;_ylt=AnnSSuxOEPuqFzSR166uD4qbvZx4?p=vb6+search+listview+tutorial&toggle=1&cop=mss&ei=UTF-8&fr=yfp-t-701

Good Luck

vb5prgrmr 143 Posting Virtuoso

I myself would use the RTB (RichTextBox) and this article from msdn http://support.microsoft.com/kb/146022/EN-US/

Good Luck

vb5prgrmr 143 Posting Virtuoso

BTW santosh5471 and pasido, in santosh's example only the V2 variable is declared as long while the V1 variable is a varient... Just so you know...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Set autoredraw=true...

Good Luck

vb5prgrmr 143 Posting Virtuoso

So... Are you saying that you cannot compile the program? If so, then you should be recieving an error message that tells you what is wrong, or some vague representation of a helpful message. What is this Err.Number and Err.Description?

vb5prgrmr 143 Posting Virtuoso
vb5prgrmr 143 Posting Virtuoso

Not having used that control before I don't know what to tell you but I have plotted data before using line, circle, and pset methods of a picture box and while this is probably a bit harder to do than using a control, it does give you the ultimate control...

Just a thought

Good Luck

vb5prgrmr 143 Posting Virtuoso

Did you create an install package with the PDW or some other installer? If not, you need to as you cannot just copy an exe over to another machine...

Good Luck

vb5prgrmr 143 Posting Virtuoso

There are several mario like clones out there, search on those (vb6 mario game) returned some interesting results from my friend yahoo as did vb6 calculating gravity in game and vb6 collision detection...

Good Luck

vb5prgrmr 143 Posting Virtuoso

As I told you before, you will have to figure out a way to know how many lines are in the file to begin with and until that time that you do, of course you are going to overwrite informaiton between instances of your form being activated. You could use GetSetting and SaveSetting if you wish or you could figure out how to calculate the number of records there are based upon file size (that is a big hint there!!!). Then don't forget if you go with the calculation, if you ever delete a record from the file, you will have to move your records so you don't have any extra bytes hanging around...

To make it so that it goes line by line add a member to your type as the last entry of the type...

Private Type student
  idno As String * 6
  stdage As String * 4
  lastname As String * 10
  firstname As String * 10
  stdadd As String * 20
  NewLine As String * 2
End Type

then...

With studentrecord
  .idno = stdidno
  .lastname = lname
  .firstname = fname
  .stdage = age
  .stdadd = address
  .NewLine = vbNewLine
End With

Another way, instead of adding the vbnewline is to not use a UDT (User Defined Type) but instead use a string variable and you concatinate onto that string all the formatting you want and use print instead...

Good Luck

vb5prgrmr 143 Posting Virtuoso

The native GetAttr function will return some of the information you are looking for (read only, archive, hidden, and system) while the GetFileAttributes API will return a bit more information as will the GetFileAttributesEx API. Then there is the GetFileInformationByHandle API but for finding the size on disk, I cannot remember right off the top of my head.

Good Luck

vb5prgrmr 143 Posting Virtuoso

How about you actually earn your payraise by doing the work yourself!!!

We just don't hand out code!!! You want someone to code this for you??? Go over to http://www.rentacoder.com or http://www.odesk.com and put your project up for bid!!!

vb5prgrmr 143 Posting Virtuoso

Andre, I think you had better check the value of the picture property because If I remember correctly, it is just a handle to a memory location, so in short, you will be saving a long value to the database and not the bits of the picture...

Good Luck

vb5prgrmr 143 Posting Virtuoso

If you are actually using VB6.0 you could do any of the following...

this code creates multiple instances of the same form...

Dim F As New Form1
F.Show

This first loads a form and then shows it...

Load Form1
Form1.Show

this simply loads and shows a form

Form1.Show

To make a variable "global" add a module to your project and declare it publicly...

Scope: A variable declared in a procedure like Form_Load is only available within form load. A variable dimensioned in the general declarations section of the form (Dim/Private) can only be seen by those procedures within the form, however, declared as Public, other forms and modules can access its value if it is preceded by the forms name (Form.MyPublicStringVariable = "This is a test"). The same thing can be said for variables (Dim/Private/Public) declared in the general declarations section of a standard module, however, to access a publically declared variable from a module you do not need to prepend the module name...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Because you set stdcount = 1 on line 32 which should be line 27...

Good Luck

vb5prgrmr 143 Posting Virtuoso

From the sounds of it, you need an array, a two dimensional array, but if you must know how to create a table at runtime, you will need to use a create table sql statement...

Good Luck

vb5prgrmr 143 Posting Virtuoso

When you start a new program and place a command button, label, text box, or one of the hundreds of other controls available to you onto your form, you are using an activex control. So in reality there is nothing mysterious about using an activex control. Then there are suites of activex controls like when you add Microsoft Common Controls 1,2,3 to your project, or like the common dialog control. As for creating one, when you start VB, you have the choice of several different types of projects and one of those projects is an activex control...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well first off, since you are wanting to match patterns that are already seperated into groups I would use the Split Function based upon a space character " " to put each group into an array. Once that is done you can loop through the array passing each group to various functions that will check to make sure what is passed is correct and format the output for you. This way it will be easy for you to not only keep track of where you are at or should be, but when you will need to call a special function to handle certain situations.

But then again, if what you have shown in the quote is a single line (or even two) it might be easier to change you reading of the file into one that leaves the vbNewLines in it so you can first split on it...

StringVariable = Input(FileLen(FileName), #FileNumber)
MyArray = Split(StringVariable, vbNewLine)

Now it looks like this file may be in a specific order and if so then you would split on the spaces...

MyWordArray = Split(MyArray(ForLoopCounter), " ")

From here you should know that in MyWordArray(0) is the first thing that needs to be verified and formatted and in the second (MyWordArray(1)) element you know that it has its own so you could do something like...

OutPutString = OutPutString & Validate1stPart(MyWordArray(0))
OutPutString = OutPutString & Validate2ndPart(MyWordArray(1))
OutPutString = OutPutString & Validate3rdPart(MyWordArray(2))
OutPutString = OutPutString & Validate4thPart(MyWordArray(3))
'...
OutPutString = OutPutString & …
vb5prgrmr 143 Posting Virtuoso

amar, welcome to the forums...

I must first warn you that necroposting and highjacking like you have done is frowned upon in most forums. Next time, if you need to reference an older thread, please copy its url into your new thread...

As for you question, use the Chr Function to convert each byte to its representative string character or you could use the StrConv function to convert a bunch of bytes in an array to a string...

BTW: I have reported your post and hopefully a mod will come along an move your post into a thread of its own along with my reply to you...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Return it and go with another company...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Is the combo box connected to the ADODC? Have a seperate ADODC just for the combobox? Using the combobox for data entry? Must be disconnected...if so then you would use a For Loop from 0 To Combo1.ListCount - 1 to loop through the contents of the combobox while you use that .AddNew/Update methods...

Good Luck