vb5prgrmr 143 Posting Virtuoso

Okay, since we have this part solved, please mark this thread as solved and use a new thread for the reading...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Thanks Nick :)

vb5prgrmr 143 Posting Virtuoso

See http://www.connectionstrings.com for a DSN Less connection string that you can use with ADO. As for examples, use your friends (yahoo, google, ask, answers, bing) and search for vb6 ado tutorial...

BTW:sanjkadam, necroposting and highjacking are frowned upon. I have reported your post and asked for you post to be put into a thread of its own.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, the reason it is overwriting your record is because you have left an arguement out on this line...

Put #rndnum, [b]missing arguement[/b], studentrecord

That missing arguement is the record number you are writing. So to fix, you will need an integer declared in the general declarations section and in form load set it + 1 of the number of records in the file. If the file does not exist (See Dir Function) then you would set to 0 + 1. If it has one record in it 1 + 1 and so on (number of records + 1).

The reason for changing the integers to strings is because you said what you see in the file is not what you want and the reason for that is because if you start off with a 2 byte integer, which is what vb uses, and the value of that integer is less than 255, the first byte will be a zero (0), which tells notepad that you may be reading a unicode file. Changing it to a string and that first byte, even it is a "0", its ascii value is acually equal to 48 and thus notepad knows it is an ascii file.

Good Luck

vb5prgrmr 143 Posting Virtuoso

The way you have it now, it will delete all settings in the section when you do your change and if you only have one, then it will work, but if you have multiple, then it could cause some problems.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Looks good to me and it looks like it should work. Does it?

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, you have a lot of error checking to add so you don't add a duplicate record with the same ID number (and what did I tell you about End!!!).

Alrighty then, lines 36 through 50 need to be above line 33 and your type contains two integers. Change those to strings and define their length like the rest of the elements in the student type. You should also set the MaxLength of your text boxes to the same length of the elements in the type.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, first start a new standard exe project and then press F1. When help comes up, click on the index tab and type in the following...

FreeFile Function
Open Statement
Get Function
Input Function
Line Input Function 'for future as with what you have described this cannot be used
Close Statement

Don't forget to click on Example when there is one. Then if you need more examples, you could always use your friends (yahoo, google, ask, answers, bing) and search for the above.

Now, once you have that digested and are starting to understand what code you will need to write, you will have to make a decision on which method you use to read the file in. The choice I am talking about is between the Get Function and the Input Function. Now, if the size of the file is quite large then the Get Function may have to do, but if the file is smaller, you may be able to use the Input Function and read the whole file in, as this would be faster to process the contents of the file.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Talking about text markup colors...

vb5prgrmr 143 Posting Virtuoso

Using ADO? Know ADO? Use friends (yahoo, google, ask, answers, bing) to search for vb6 ado tutorial...

strSQL = "SELECT [std name], [roll no], marks, category, FROM tablename WHERE [roll no] = " & Text1.Text & " AND marks >=" & somevalue

Now, if roll no is a text field you will need to do...
] '" & Text1.Text & "' AND

see the single ticks (') ? Same goes for marks but marks should be a numeric field.


Future hint for you. If you have M$ Access, you can create a dummy representative database in it to represent neary any kind of database. Fill it will some dummy data and then use the query designer to create your SQL statements. When in the designer, and you have finally figured out that you are getting the right information, you can goto view>SQL and with very little changes to that SQL statement, you can drop it right in to your program...

Good Luck

vb5prgrmr 143 Posting Virtuoso
vb5prgrmr 143 Posting Virtuoso

Yes, that is one of the things implemented with ADO and the ADODC. You do not need to call the edit method like you need to with DAO or the DATA control as it does not exist. Just remove it, the edit line that causes the error, and everything should work fine.

Good Luck

vb5prgrmr 143 Posting Virtuoso

No, that would be spoiler text...

vb5prgrmr 143 Posting Virtuoso

Ahhh... I see... I think I do anyways... Okay, as far as I know, you cannot set the reference to a cell to a picture box or a picture...

You will need to have a form and we will call it UserForm2 for now... Then on UserForm2 you have a picture/image box/control (In vba it would be a image control). So we will call this Image1

(BTW: Don't forget to use the code tags like I have below...)

Private Sub CommandButton1_Click()
Dim F As New UserForm2
Load F
F.Image1.Picture = LoadPicture("PathFileName") 'or is that image???
F.Show
End Sub

Now the above code will create a new instance of form2, load it, load the picture into the image control, and finally show it...

Good Luck

vb5prgrmr 143 Posting Virtuoso

>Surely, this isn't the way it's supposed to work? Also, how intuitive is a blank search to enable you to go to 'advanced search'/'forum search'? Would not a little 'Advanced Search' link below the search input box be useful?


Here, Here!

vb5prgrmr 143 Posting Virtuoso

>I notice on thing that bad: I CANT SLIP TO THE END OF A THREAD IF ITS MORE THAN 1 PAGE LONG!! (I have to click on the thread then click LAST (I could go directly to the end on the older design))

The big button left of the title will take you to the latest post, the handle of the last poster will take you to the last post...

vb5prgrmr 143 Posting Virtuoso

Necro from the latin-dead, posting... got it? Well here it is again.... dead thread posting...

vb5prgrmr 143 Posting Virtuoso

I THE MIGHTY NECROPOSTER COMMAND THIS OLD DEAD THREAD TO RISE!!!! Rise I Say! Rise to the top of this forum and become relevant again! Rise! Rise! RISE!!! I COMMAND YOU TO RISE!!!! :) :) :)

(Hey, since I am the OP I have a right to raise this old dead thread!!!) :) :) :)

Okay, new design and we still only have two colors, red and green! Yucky!!! :) Hey, we need at least blue and black to be added to the selection of colors to be able to overwrite the incorrect syntax coloring when we use the code tags.

I think with those four colors and the ability of those colors to override the incorrect syntax coloring it will be a compromise between present and a hex/rgb solution. That, and add spoiler tags so text is the background color for those off beat forums and I think everyone could be happy... :) :) :)

vb5prgrmr 143 Posting Virtuoso

Just a thought or a suggestion for you Dani et. al. If the last post is older than X number of days old (say 30), remove the reply box and in its place, put a button/link that says something like "Would you like to start a new thread that references this one?", and of course they would be taken to the post new thread page for the forum and the first line in the edit box would be, In reference to "This Thread:Thread Title Name", which of course would actually be the BB code for the link back to the thread being referenced.

Bonus... Only the OP can resurrect the thread... (like I'm about to do... that is if I can find it...)


Just a thought...

EDIT: During my search I see that this has been brought up before... http://www.daniweb.com/forums/thread265375.html

vb5prgrmr 143 Posting Virtuoso

I think I'm going to have to second the fontsize/fontcolor/backcolor arguement. As I hope I still have near 20/20 vision but I find myself sometimes leaning my head forward to read it. How about this... Keep the background color, fontcolor=black, and size = normal post size and keep current padding of the quote... Just a thought...

vb5prgrmr 143 Posting Virtuoso

Speaking of searches... I don't know if this has been mentioned before or in this way, but, search forum, just the forum, not the site, and/or perhaps a selection of forums to search but exclude all the others... just a thought...

vb5prgrmr 143 Posting Virtuoso

See the Dir Function in the help files to check for the existence of a file...

If Dir(FilePathName) <> "" Then
  'file found
End If

Good Luck

vb5prgrmr 143 Posting Virtuoso

10e12,

Welcome to the forums. Hope you can become a valued member but I must inform you that you are GUILTY OF NECROPOSTING!!! :) Not a nice thing to do in any formum as most people who have replied to the thread recieve an email...

Also: a much faster version would be...

MyByteArr = StrConv(s, vbFromUnicode)
vb5prgrmr 143 Posting Virtuoso

Okay, where does your code startup? Sub Main? Form1? Well wherever it does, you can clean your form load up to something as simple as...

Option Explicit

Public Sub Form_Load()

On Error GoTo Form_LoadError

Dim SplashSetting As String

SplashSetting = GetSetting("ProjectName", "Startup", "ShowSplash", "T") 'T/F

If SplashSetting = "T" Then
  
  Me.Visible = True 'force this form to become visible
  formSplash.Show vbModal, Me 'show splash screen modally/vbModeless=default
  
End If

Exit Sub
Form_LoadError:

MsgBox "Form1.Form_Load " & Err.Number & ":" & Err.Description 'for debug and beta

End Sub

Then the rest of that code can go into your splash screen form load and form unload.

As for when your program is installed, the savesetting will not have been executed yet so the setting retrieved by the getsetting function will be the default value as I have shown in my little snippet. As for allowing the user to be able to change the splash screen value, you could add that to the options form (formOptions) of your program.

Good Luck

vb5prgrmr 143 Posting Virtuoso

See the SQL documentation for the commands, then issue them from VB via a connection object.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Yes, by issuing the correct commands...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Jemz, by now I would have thought you would have known that a lot of these things that you can look up in help already have examples, not only in the help files, but at msdn, psc, and many other places on the web, you just need to use your friends (yahoo, google, ask, answers, bing).

Good Luck

vb5prgrmr 143 Posting Virtuoso

You should actully convert your help file over to the new HTML file format and that way you will not need to distribute or shell out the package for the old format...

Good Luck

vb5prgrmr 143 Posting Virtuoso

frozie, frozie, frozie.... I know you only have four posts, but if you have been reading these forums, I'm sure by now, you know not to necropost like this!!! Shame, shame, shame on you...

Now, there are a couple of ways you can do this under one button...

If Timer1.Enable = True Then
  Timer1.Enabled = False
Else
  Timer1.Enabled = True
End If

or

Timer1.Enabled = Not Timer1.Enabled

Good Luck

vb5prgrmr 143 Posting Virtuoso
jephthah commented: boo +0
iamthwee commented: hoo +0
vb5prgrmr 143 Posting Virtuoso

There are a few ways in which to do this. You can "automate excel" (hint: keywords for your search with your friends (yahoo, google, ask, answers, bing)), you can use "excel as a database" (also see "vb6 ado tutorial" and http://www.connectionstrings.com ), or you can use standard CSV files.

Good Luck

vb5prgrmr 143 Posting Virtuoso

You will need to know ADO. Do you know ADO? If not, use your friends (yahoo, google, ask, answers, bing) and search for vb6 ado tutorial. Once you have digested that, see http://www.connectionstrings.com for the ADO DNS Less connection string you will need to connect to your version of SQL Server...

Good Luck

vb5prgrmr 143 Posting Virtuoso

In VB's help files, look up the following...

FreeFile Function
Open Statement 'especially this one
Input Function
Line Input Function
Get Statement (under Get Keyword)
Put Statement (under see also)
Seek Function (under see also)
Close Statement

Good Luck

vb5prgrmr 143 Posting Virtuoso

Do you need to move the files, or copy the files?

If you need to move them and you were to use purplegerbil's code two posts above use the Name Statement...

Name OldFileName As NewFileName

If you need to copy them, use the FileCopy Statement

FileCopy Source, Destination

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well with all things considered, I think dani (and crew?) has done a fine job in fixing those bugs, problems, and complaints in most of these threads here lately. However with that said, I also presently believe that the last problem of this thread, post # vs permalink, will probably not be resolved even with my suggestion of putting the permalink behind the post #. Well that and the prapble (purple) coloring scheme...

BTW: Mr. Wonka is very dissapointed with you Dani. All of his umpa lumpa's are weak, tired and unable to work from the massive bleeding you gave them to color this site... :) :) :)

WE WANT OUR POST #'s BACK!!!

vb5prgrmr 143 Posting Virtuoso

reread that 3rd sentence...

vb5prgrmr 143 Posting Virtuoso

Restrict the user from entering those wildcard characters that you need to look up in M$ Access's help files in the keypress event, which I know you have seen before if you have been reading this forum...)

Good Luck

vb5prgrmr 143 Posting Virtuoso

Register the dll under the admin account and then right click>properties and give users of the system the rights needed and I think your problems will go away...

Good Luck

vb5prgrmr 143 Posting Virtuoso

[yoda voice]over complicate things, you do[/yoda voice]

Okay, well maybe not, but using the move method to navigate is your problem...(1+1=2 so move 2 will skip a record...)

You should use the movefirst, moveprevious, movenext, and movelast properties and things will be a lot easier for you (but keep the counter variable, add a recordcount variable for testing if you wish, and things should work out)...

Good Luck

vb5prgrmr 143 Posting Virtuoso

You might be able to use the "display" property??? "Format" Property??? of the field in question (i.e. table design view or the property of the textbox itself...). Can't quite remember as I don't normally work in VBA...

Good Luck

vb5prgrmr 143 Posting Virtuoso

I don't think you can connect 10 to VB6.0. I think it is .NET only... or was that CR11??? Best bet is to check the documentation as examples and instruction should be included in the help files for CR...

Good Luck

vb5prgrmr 143 Posting Virtuoso

I understand that,... that some teachers are lacking. My teacher published her own book that was only an inch thick that we had to buy for the class. Talking about conflicts of interest..., But while it did cover a lot of different topics, it did not go into much detail with explanations, so I had to buy my own book that was published by Que and it showed me the things I wanted to know...

Now, as for collision detection, there are a couple of different ways in which to accomplish what you want. There are a couple of different methods using the api but unless you really want to delve into it, you don't have to...

Okay, you have an object that has four properties. Left, Top, Width, Height, so we will start with checking collision with the borders of the form...

'here are the two obvious and easy detections...
If Object.Left <= 0 Then
  'we have collided with the left side of the form
ElseIf Object.Top = <= 0 Then
  'we have collided with the top edge of the form
  'next up is some simple math...
ElseIf (Object.Left + Object.Width) >= Me.ScaleWidth Then
  'collision with the right of the form
ElseIf (Object.Top + Object.Height) >= Me.ScaleHeight Then
  'collision with the bottom of the form
End If

Now, when it comes to decting two objects colliding, well this is where it can get interesting and quite complicated. So complicated in fact, you may want to write …

vb5prgrmr 143 Posting Virtuoso

Both versions have been out of support for some time now... I.E. .NET's arrival! But one can still find legal copies at ebay, or at nextag.com for both pro and ent versions of both VB and VS

vb5prgrmr 143 Posting Virtuoso

You will need to delve deep into the API... Friends time! (Yahoo, google, ask, answers, ask, bing) vb6 OpenPrinter... Also see your help files for the OpenPrinter API and all of its friends (Printing and Print Spooler Functions) so you can look them up on the web...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Havoc, mayhem, problems, trouble, frustration, and broken keyboards, monitors, or other various items around your office/home and could include your knuckles...

Why? Because the pound character (#) is a wildcard character so if someone entered a password like...

123#

and someone else added a password like...

1234

or

1235

you would get all three... (Havoc!) and other characters you should watch out for (!*%) as they are also wildcard characters (not for all databases, but enough to cause you trouble, see your specific database documentation under wildcard characters for more information...)


There are many ways in which to verify a password, but what you were asking for, originally, was the strength of the password and being able to display a message...

Good Luck

vb5prgrmr 143 Posting Virtuoso

I'll second that!

vb5prgrmr 143 Posting Virtuoso

>The link works for me?

Took me to a report error page... "Invalid Thread specified. If you followed a valid link, please notify the administrator"

so you must have followed my link, but not the link in ancient dragons 1st post... which would be http://www.daniweb.com/forums/post1221606.html#post1221606

>But I thought deleted posts weren't really deleted. So if post #3 was deleted, wouldn't the post numbers show 1,2,4,5,6? Or would they be renumbered? IMO, they should not be.
>Now really, how often does this happen? And if the post was deleted, it couldn't be that hard to display an "Inactive Post" or "Deleted Post" message. And I still say, post #5 should always be post #5. It's not like people study post numbers to catch discrepancies. And if there is no post #2, it's fairly obvious that it's been deleted, isn't it?

I agree WaltP.

>Personally I liked the post-numbers better, but I don't care enough to join the discussion

Ahhh, errr, uhmmm, I believe you have :) :) :)

vb5prgrmr 143 Posting Virtuoso

There are several different ways in which to do this...

http://lmgtfy.com/?q=vb6+test+internet+connection

Good Luck

vb5prgrmr 143 Posting Virtuoso

and here is the funny thing... Ancient Dragon's thread (bug or feature), POST #1 in this thread http://www.daniweb.com/forums/post1221627.html#post1221627 has a link that goes nowhere!!! :)

vb5prgrmr 143 Posting Virtuoso

On the note of "see post #5" in this thread, I have already referenced a previous post in another thread with something like...

username, please see otherusersname's post above my previous post, which is above your post...

Now if that ain't confusing enough...

>Permalink is a permanent link to the specific post (not just the page, but it jumps down to the specific post) regardless of whether the post has been merged with another thread, was a thread hijack and was split off from a different thread, etc.

>The post count # was removed because I don't want people referencing things like "Check out post number 5" because moderators see deleted posts, and posts can be split/merged, etc. so a post that is #5 today might not always be #5. Especially if individual posts in a thread get deleted

Which makes no sense... A permalink to a deleted post or a see post #5 equals the same thing... A reference to nowhere...

The simplest answer for both sides of the arguement is to make the post number a link that contains the same information as the "Permalink"