vb5prgrmr 143 Posting Virtuoso

Okay, changed my mind on the solved part as there is one last thing I forgot about... and that is the "Permalink" vs the Post # being displayed as the Permalink is not so intuitive when you need to point a poster to a previous link... However, I also thought that the permalink would only take you to a specific reply but it takes you to the page that the reply is on (see vbforums for example)

vb5prgrmr 143 Posting Virtuoso

Maybe as a sub forum of Java...

vb5prgrmr 143 Posting Virtuoso

>I feel like it's more appropriate to sit next to the time of the last post in the thread, since it is an indication that new posts have been made since your last time there.

See your old site, see your sister site, see anyone of the other sites in the top pinned thread in the VB4/5/6 forum. You will see that the NEW indicator is prior to the thread title to let the user know with a quick glance that there has been new posts and so the user does not have to search the page/line to see if there has been any new posts. It is in the psychology/biology/physics of the way we read... (You will notice one difference in that list and that would be tek-tips that uses a bold title line to indicate new posts)

>Threads that you have posted in have a "bulls eye" look that mimics the User Online icon in your posts. (Click on Threads I've Posted In in the bottom menubar to see what it looks like.)

Yes, I saw the bullseye previously, but only after I viewed the thread when it had a NEW icon, of which, that is what I though would be the link to take you to the newest post (and here I was waiting for the mouse cursor to change into a hand to indicate a link and no amount of clicking on that graphic did me any good...). But I digress, yes, saw …

vb5prgrmr 143 Posting Virtuoso

http://lmgtfy.com/?q=vb6+password+strength+verification

BTW: the pound symbol (#) will create havoc...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well, currently I am happy with the go to newest post button but I think it should go to the left of the title... (yeah a nitpick but most other forums have that location identified for such a purpose..). Next up is the how to ID which threads a person has posted in as I see the link at the top to take a person to newest thread also (but I meant the page navigation but the link will more than suffice)


Edit: Ok, a couple of other nitpicks... I see the number of posts, but what of solved and kudos recieved?


Good Luck Dani!

vb5prgrmr 143 Posting Virtuoso

NOW YOUR HIGHJACKING!!!! Please start your own thread for your questions...

vb5prgrmr 143 Posting Virtuoso

Well if you are actually using M$'$ SQL Server of any version since 6.5, you will need to rollback your database and rebuild it from the log table up until the point of where that first record is entered. On how to do this exactly? Look in the help files for SQL Server or visit a M$ SQL Server forum.

IF using access, compact and repair database prior to attempting to delete records as what you may be seeing is ghost records (*) due to running low on memory. A reboot might be in order also.

(*) Don't exactly know what to call them, but when those funny things happen right before your machine looks like it wants to crash... if you know what I mean...

Perhaps a picture of what you are talking about might be in order...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Yes, both versions contain those... Get the enterprise!

vb5prgrmr 143 Posting Virtuoso

When you start a new standard exe program, you start out with form1. Press F5 and it runs. Use the X in the upper right corner, and it ends, but what happens in the backgound is what you need to be aware of...

So to figure this out, place debug.print "procedure name" in every event of the form...

Private Sub Form_Initialize()
Debug.Print "Form_Initialize"
End Sub

and form load and so on...

now run this program once you have all the debug.print s in there. Use ALT+Tab to change to another program and switch back, resize the form, minimize the form, then close the form with the X.

Then place a command button on the form and put unload me in its click event...

Now, what Unload Me refers to, is the current form (Me) and the command is to Unload. So unload the current form... Rerun the expermental program and instead of using the X to close the form, click the button...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Andre, the line that generates the error is in the form unload event (w.quit)...

Okay neosonic, lets take this one at a time...

>First, if the user still open the word document (opened by the program), the user is forced to close it when the form unloaded. How can I avoid this?

Hide your form, use a timer with an interval set to at least 1000 (1 second) and use the FindWindow API to check to see if the specific word application you opened is still opened. If not, unload your form to end your program, else, continue to wait.

>I want to give the user flexibility to close the document whenever they want, even after the form unloaded. I want the program to know that those word documents are still opened, so it doesn't need to call W.Quit

Prompt the user with a message box...

>Second, if the user has closed the word document (opened by the program), the program will produce run time error "the remote server machine does not exist or is unavailable" How can I avoid this? I want the program to know that those word documents have been closed, so it doesn't need to call W.Quit

Two ways, trap the error and ignore it or use the FindWindow API...

Good Luck

vb5prgrmr 143 Posting Virtuoso

First, you should never use End to end your program. You should use unload me...
Second, for readability you should use the built in constants (vbKeyUp, vbKeyLeft, vbKeyRight, vbKeyDown)...
Third, does your code work as it is??? Use the forms KeyDown event in conjunction with setting the forms keypreview property equal to True

Then there are these codes...

this one makes your picture box stay to the left...
picgoomba1.Move picgoomba1.Left - -10 = False

and this is the same as saying +
picgoomba1.Move picgoomba1.Left - -10
(picgoomba1.Move picgoomba1.Left + 10)

and then why the use of the left and top properties of the control when you are already using the move statement, which is faster as you can set all its properties (left, top, width, height) at once...

So to answer your question, when you detect a collision or "collision detection" (hint: keyword search...), you want your program to end. So as I said previously, use Unload Me

Good Luck

vb5prgrmr 143 Posting Virtuoso

and if one cannot fix the take me to the latest post in the thread, why must I wait for the entire page to load, hit end just so I can get to the next page link. Put it at the top also...

vb5prgrmr 143 Posting Virtuoso

Ah yes... One of the funny (or not so) undocumented things about VB... Your call to the procedure with the parens wrapped around the variable forces the value to be passed byvalue instead of byref...

Convert_NumAbbreviations_to_Numbers (Amount) 'forced byval
Convert_NumAbbreviations_to_Numbers Amount 'normal byref

Good Luck

vb5prgrmr 143 Posting Virtuoso

But when referencing someone to a previous post... a "permalink" is not intuitive...

vb5prgrmr 143 Posting Virtuoso

Bashire, look at dajaci's post above mine, which is above yours, and you will see that dajaci's post has two queries that are executed to get the last/newest record entered. The first to get that ID and the second to get the records that belong with that ID...

ALSO: YOU ARE GUILTY OF NECROPOSTING! Please do not revive old threads. It just creeps people out! :)

vb5prgrmr 143 Posting Virtuoso

Where are the post numbers so one can easily reference a previous post within the thread???

vb5prgrmr 143 Posting Virtuoso

Also, when those shiney "New" buttons are displayed to show that there has been activity since my last visit, how can we tell if we have replied to this thread before?

vb5prgrmr 143 Posting Virtuoso

don't know what to tell you... Perhaps contacting segate via their forums may prove to be useful...

Good Luck

vb5prgrmr 143 Posting Virtuoso

...take me to the newest replies since I last visited this thread gone, where oh where can it be... *

Prapble, really prapble (purple), oh well, I guess she thinks "it's pretty, all nice and shiney and new..." (ref kayle firefly)

BTW: Mr. Wonka called and he wants his umpa lumpa's back :)

Okay, so here I am looking how to get to the latest posts in a thread, and I have to GoTo Pg.1 and then click on the last page link. Not very conducive to being able to read only the latest...

:) *Yeah I know, a whole lot more than "little dog" but I really don't want to click on a link that only takes me to the first page


Two more thinggs,, when the textbox window is partially behind the bottom footer, you can see the cursor blink through it but as I type right know, I cannot see what I am typing. Yeah I know, this only takes a simple little scroll, but why should I have to alter my posting habbits? (also, if there are any misspellings in this get used to it because I cannot see what I am typing...)

The other thing... How about a color scheme options page so if we want to view something not so "pretty", we have the option, and if your are really creative, as I have read a dozen posts in this forum (except for all of the …

vb5prgrmr 143 Posting Virtuoso

Don't save data with file if such an option exists (used to). To make your project load faster, close all the code windows before you exit and when asked, if asked, yes, save the project. Create another program to remove all the temp files if you need to...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Why two select statements? Where is vbKeyDown? Then, when intellisence comes up for your vbKeyUp, why are you trying to set the left property and not the top property, which if you have read the intellisence is the next arguement...

Good Luck

vb5prgrmr 143 Posting Virtuoso

So in form load you have...

Private Sub Form_Load()
Me.Data1.DatabaseName = App.Path & "\EmployeeListlog.mdb"
End Sub

and you are still having problems? What version of access?

Good Luck

vb5prgrmr 143 Posting Virtuoso

Which means your data control is not connected to the database. You must set its connect property and its databasename property before you set its recordsource property...

And not that I look over your code I see your problem... It is in your form load... remove the "strSQL = " and everything should be fine...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Your welcome stuhawk, now if you don't mind, please mark this thread as solved...

Good Luck

vb5prgrmr 143 Posting Virtuoso

On which line? ... Run, hit debug, line should be highlighted. Also, include description of error as the error number 3011 is pretty much useless to people unless they know how to look up the error...

BTW: For those wanting to know how to look up an error, use the immediate window and type in err.raise 3011 and hit enter.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Set a break point on the line above, run, when the program breaks, activate the locals window. Now, with the locals window activated, find the control (not your doc reference to the document contained within the control) and drill down to the document level (what your doc variable is set against). Then drill down on that to see if you have access to each iframe (look at their index numbers because I'll almost bet index starts at 1 (going from memory here)). Now with that drilled down to, can you see any further properties? If so, good. If not, then you may need another variable or two to set to each document contained within the frame...

Okay, drill down on the doc variable and see if you have the same information and once again look for the index number...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Have no idea why without seeing code but I can help you out in how to figure it out for yourself.

First, make sure Option Explicit is at the top of each code window.
2nd, place proper error handling in each and every sub, which means getting rid of any on error resume next statements...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Did you look at http://www.connectionstrings.com ?

Good Luck

vb5prgrmr 143 Posting Virtuoso

Shame to have to use a loop because...

Private Function IsPalindrome(TheWord As String) As Boolean
If TheWord = strRev(TheWord) Then IsPalindrome = True
End Function

Good Luck

vb5prgrmr 143 Posting Virtuoso

What you are talking about there Al, may I call you Al, is decompiling a program. Now, if you use your friends (yahoo, google, ask, answers, bing) and search for decompile vb6 programs, you will find a bunch of various programs out there from free to commercial grade that will decompile programs into Visual Basic 6.0 code. However, and let me state that loudly. HOWEVER, what you will get back from those decompilers will look nothing like what you are used to seeing. You will NOT get your original code back. What you will get is a bunch of gobble-de-gook that will actually compile but will be very hard to read (actually some will return code that will not compile back into the orignial program).

Now for a word of warning. I hope you are being honest that this is your program because if it is not, you will be violating I don't know how many laws and there is not a legitimate forum out there that will knowingly support this activity. So be careful as some forums will not even support or allow the discussion of decompilation even if you can prove it is your own program.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Then post your question in the correct forum!

vb5prgrmr 143 Posting Virtuoso

cKey is a string variable declared in the sub there jemz, and it holds the string character that is the result of the chr functions conversion of the keyascii value. Then it is used in the if statement for string comparison to see if the character is acceptable or not...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Ya know Walt, if you look closely at my first example (that does not work without a piece of your code) you will see I was trying to get there... :) Oh well, I guess that is what I get for posting so late...

vb5prgrmr 143 Posting Virtuoso

Ah ya beat me to it... :)

vb5prgrmr 143 Posting Virtuoso

You are probably just missing the keyword you need to search for leviathan... DateAdd is the keyword you are looking for...

Good Luck

vb5prgrmr 143 Posting Virtuoso

To seperate a word into each character you can do it a couple of different ways.

Dim I As Integer, MyCharacters() As String
ReDim MyCharacters(0 To Len("ThisWord") - 1) As String
For I = 0 To UBound(MyCharacters)
  MsgBox MyCharacters(I)
Next I

Or

Dim MyChar() As Byte, I As Integer
MyChar = StrConv("ThisWord", vbFromUnicode)
For I = 0 To UBound(MyChar)
  MsgBox Chr(MyChar(I))
Next I

Good Luck

vb5prgrmr 143 Posting Virtuoso

Welcome to the forum Steve... Did you by chance notice the posting date of the OP's original post? 2k6 there Steve... Just a bit of necroposting there Steve...

vb5prgrmr 143 Posting Virtuoso

Bob, welcome to the forum and as you seem to be new to forums let me pass along a bit of advice. If you need to reference an older post like this, please don't highjack it or necropost in it as you have. Instead, please create your own thread and if need be, copy the url into your new thread posting...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well you message box says only to input alpha or numeric (0-9, a-z, A-Z) and you are allowing a whole lot more characters than that in your code.

And while I don't normally post in threads that I think have the proper answer and should soon be marked as solved but I could not resist in not only pointing the above out, but in also giving a little lesson in readability (Jemz, Andre... Although KingWang, while yours is easier to read, the conversion from integer to string and then comparing strings takes more processing power and thus is just a bit slower than comparing numbers...)

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii >= vbKey0 And KeyAscii <= vbKey9 Then 'numbers 0-9
ElseIf KeyAscii >= vbKeyA And KeyAscii <= vbKeyZ Then 'uppercase A-Z
ElseIf KeyAscii >= 97 And KeyAscii <= 122 Then 'lower case a-z
ElseIf KeyAscii = vbKeyBack Then 'just in case user makes a mistak
Else
  KeyAscii = 0
End If
End Sub

PS. There is a good reason VB has all those constants... because it makes the code easier to read...

Good Luck

vb5prgrmr 143 Posting Virtuoso

check out the ZOrder Property or you could play around with the Visible Property...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, in your sub Average_Click(), you declare the variables, then set the variables equal to that of a text box but then the sub ends and those variables go out of scope, which means they cannot be used any place else.

Also, in the future, when assigning variables that are numeric in nature to that of the contents of a text box, you will want to first check to see if the value in the text box is a numeric value. After that, you will want to convert the text value to the appropriate data type of the variable...

If IsNumeric(Text1.Text) = True Then 
  iValue1 = CInt(Text1.Text)
Else
  MsgBox "oops"
  Text1.SetFocus
  Exit Sub
End If

Now, do you see where this is going? No? Well I'll show you here in a bit but first, lets talk about operator precidence...

In visual basic, multiplication before division, multiplication and division before addition and subtraction, and addition before substraction, which means, your textbox # 6 is divided by 6 before being added with the rest of the values in the other textboxes. Which equates to...

6+6+6+6+6+6/6 = 33
6+6+6+6+6+1 = 33

So to change this, you would need to use parentheses to change the operator precedence. (This is just your basic math stuff...)

(6+6+6+6+6+6)/6=6

TextAverage.Text = (CInt(Text1.Text) + CInt(Text2.Text) + CInt(Text3.Text)) / 3

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, so where did you find that info? Just in case somebody wants to go that route...

vb5prgrmr 143 Posting Virtuoso

>My name is Karla, I'm seeking help for my friend who is a programmer. He created a Mp3 player, but he can't get it to browse files and directories in the same browsing window.

Okay, Karla, from what I can see from your screenshots, the dialog displayed is called "the browse for folder dialog". Hence, not being able to select a single file...

Now, with the rest of you question, your friend could also add the drive list box, dir list box, and file list box controls and then have no need for the browse for folder dialog or the common dialog control. OR, they could use the treeview control, and the ListView control along with the Dir Function (or API FindFirst and FindNext, or FSO, or the controls I listed earlier but hidden), if they wanted to jazz things up a little.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well, if all else fails, you can either drop back to 11 or learn just enough .BLOAT to read command line arguements to display the report you want. Although, I still wonder if you can redistribute and automate the viewer. Not the control of the viewer, the viewer application itself...

Perhaps after all of this, you will become the goto man/guru on this subject... :)

Good Luck

vb5prgrmr 143 Posting Virtuoso

Not that this is going to help much but have you checked over at seagate? And, I'm not sure, but I believe clients would now have to have the viewer, and you would have to automate that instead of the old OCX control, but to be sure, you might want to ask around at some of the CR forums. http://search.yahoo.com/search;_ylt=AivjlEnOON7kw03Nza.E5PKbvZx4?p=crystal+report+forum&toggle=1&cop=mss&ei=UTF-8&fr=yfp-t-701

Then again, it now might be a reference you need to add instead of a control. Have you checked that?

Good Luck

vb5prgrmr 143 Posting Virtuoso

And while you are sitting down with your fellow classmates, don't forget to bring along the ole Mark I recording device, a pencil and paper so you can document your database design and program flow...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Gotcha now, at least I think I do, and I think you have it!

Good Luck

vb5prgrmr 143 Posting Virtuoso

As it is an interview question, one that I have read before in another forum, I wonder if it was the OP that posted it in the other forum because the answers there were pretty good...

vb5prgrmr 143 Posting Virtuoso

Thank you Andre. ...

Jemz, in your posted code I do not see where you are opening the recordset (could be you did not post it and it goes where line 9 or 10 is...). Also your insert statement looks good but if any of those fields in your database are numbers, then you will want to remove those single ticks (') from around the value to be entered. Then I have a question about this part...

... txtuprice.Text & "','" & 1 & "')"

If that is a boolean field, then use...

... txtuprice.Text & "'," & True & ")"

If not and it is a numeric field, then as I previous stated, remove the single ticks from around it...

... txtuprice.Text & "',1)"

but if it is a text field...

txtuprice.Text & "','1')"

And if you have not figured it out yet, what I am trying to say is that you do not need to seperate out "constant" values (hard coded values) you want to insert.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Andre, I think you need to reread the OP's post, as neosonic stated...

>My problem is, after running my program several times (by using "start" command in vb6)... maybe around 100 times or so... I have got out of memory error.

Which means to me that neosonic is not releasing memory between each debugging session.

So NS, you are using the LoadPicture Function to load an image into the picture box, and then into an image list? Let me guess. You are using the image list with a ListView control to display thumbnails...

(Well if not, the following should apply anyways)

In form unload, clear the picture box by use the LoadPicture Function with no arguements...

Picture1.Picture = LoadPicture()

Then since the ListView is tied to the ImageList, you will need to "Clear" the contents of the ListView prior to clearing the contents of the ImageList...

ListView1.ListItems.Clear
ImageList1.ListImages.Clear

But all of this means that you cannot use the "Stop" button in the IDE but instead allow you form to close naturally. Meaning the code needs to run to completion in form unload.

Good Luck