vb5prgrmr 143 Posting Virtuoso
vb5prgrmr 143 Posting Virtuoso

Well, you could do a couple of things...

If you want to keep the graphical look of the grid and the form then it is time to search with your friends (yahoo, google, ask, answers, bing) for vb6 screenshot, vb6 printing screenshot.

However, if you just want to print directly to the printer without all the graphics showing up on the paper and thus using up more ink/toner, then you can use the printer.print method after you loop through the grid while building your string that you are going to print. Then after the .print method, you would want to use the .EndDoc method...

Good Luck

vb5prgrmr 143 Posting Virtuoso

In the code window, type in DateDiff and press F1 to read all about it and how to use it....

Good Luck

vb5prgrmr 143 Posting Virtuoso

Is there not a RTB.SaveAs or SaveFile or Save property? And if so, why have you not pressed F1 to read all about it? :)

Good Luck

vb5prgrmr 143 Posting Virtuoso

No, an ASP application would not be able to "send" the data over the internet. It can however be requested to display the information on a html form that is sent over the network. Do you understand the difference?

Several possible solutions and it depends upon who or what is requesting the information.

1) You could link to the file (double check to see if you can use the FileCopy Command while the db is open and that the resulting file can be read), or an ASP function that could copy the file and even zip it up for you if you wanted to transfer the mdb itself.

2) Slight variation, the ASP function could read the data from the database and put it into another file. That file could be a mdb, xls, doc, rtf, txt, and so on. Then, optionally as noted above, the resulting file could be zipped up and sent to end user.

3) Standard ASP application that just displays the information in the browser...

4) Now, if you are creating a fat client for users to use and for them to retrieve this information, you could use option 3 above along with the webbrowser control. This way you could do the navigation for them, read the resulting html, and create a local mdb, xls, etc. Thus transfering the bulk of the work from the server to the client.

5) And finally, if you are creating a fat client for …

vb5prgrmr 143 Posting Virtuoso

Okay, you want to trap letters and how do you want to do this? Are you talking about trapping letters that are types into a text box? If so, you can use the keydown, keypress, and keyup events. Are you talking in general? If so, then you will need to search with your friends (yahoo, google, ask, answers, bing) on vb6 keyboard hook.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Don't forget the...

Printer.EndDoc

Good Luck

vb5prgrmr 143 Posting Virtuoso

Not likely nor is nextag.com and your search string for both would be Visual Studio 6.0 Enterprise...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well, without seeing the actual code that calls this function it is kind of hard to tell but I'm guessing that you are getting you error because you are not passing a cChain variable or not passing actual arrays...

Good Luck

vb5prgrmr 143 Posting Virtuoso

I believe you have to specify the ip address, the port, and the path or the fully qualified url/path to the mdb. I know it can be done with SQL server but SQL server has an advantage over Access in that it runs as a service while Access does not. If that does not work, you could always create an ASP application that does the work for you and with VB you could read that output or upgrade to SQL Server Express.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Technically sidnie, Access the application is a DBMS just as SQL server is while the *.mdb and *.mdf (access and sql server) are the data files in question and an ASP application could use the *.mdb but I would suggest that you upgrade your DBMS to a better one because...

60 x 60 x 24 = 86400 entries and if that is nothing but longs x 4 = 345600 / 1024 = 337.5 Kb * 7 = 2362.5 Kb which is not much but I doubt you are just storing a long value.

Good Luck

pankaj.garg commented: thanks...but more help needed :) +1
vb5prgrmr 143 Posting Virtuoso

The runtimes for VB6.0 are the supporting files for when you install programs. It is NOT the design environment and for the most part, all MS's OS's already come with a version of that installable...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well you are going to have to come up with some scheme that can decode the "license key" to set your expiry date so you will not have to have your users instal a new program because of hardcoded values...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Welcome ReefPicker,

I must say well said in several areas but I also must say...

AHHH!!! Necrophiliac! It raises the DEAAAAD! AHHHH!!! :)

Meaning the thread is over a year old and some people will get the willys with you doing your thing with the dead... :)

vb5prgrmr 143 Posting Virtuoso

You can however find legal copies at ebay and at nextag.com. I would suggest in actually getting the enterprise version of studio (not just vb but the whole suite of programming languages.).

Good Luck

vb5prgrmr 143 Posting Virtuoso
vb5prgrmr 143 Posting Virtuoso

The short answer is... (drum roll please...).... Yes!

The long but simplistic answer is there are three graphical layers when it comes to VB6.0 forms. The first or lowest are methods done to the form itself. Meaning Me.Print and the forms backcolor and picture properties. The next layer are the controls that do not contain a hWnd property like labels and image controls. Then of course the top layer is those controls that do have a hWnd property and that is why you cannot place a label or image control above other controls.

Good Luck

vb5prgrmr 143 Posting Virtuoso

codefixer,

You have a few incorrect statements in your explanation...

To begin with...

>for the above variable to be accessible by all functions within a form(module) declare it in the 'General Declaration' section in the code window-this will qualify to be local variable but accessible only by functions created in the form.

is incorrect...

For a variable to be available to the entire form or module for that matter all you need to do is Dim it or Private it in the general declarations section of the form or module. If you declare a variable as Public in a form, say in form one as you have, then other forms and modules can access that variable by using the form as a reference in the dot notation we enjoy so much...(this code in form2 will reference the form1 variable you have declared in your post)...

Form2.Text1.Text = Form1.strString
Form1.strString = Form2.Text2.Text

Good Luck

vb5prgrmr 143 Posting Virtuoso

What you may want/need to do is to capture the currentx/y of the printer object, use the textwidth property of the form, and calculate where you want to have the right side of the text to line up minus the textwidth. After that you would set the currentx/y as needed, do your print of your last piece of information and move on to the next line...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Just a note of warning, doing a select * and then using variable = rs.recordcount may return undesirable results. To be more specific, it may return a -1, which means it returned records (not zero (0)), but the amount of records are larger than the page size. So to fix this possible result, I suggest that you do...

Rs.MoveLast
NoOfRecords = Rs.RecordCount
Rs.MoveFirst

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well this can be done one of two ways... The first is to use an ORDER BY statement when you retrieve the records from the oracle table or you can set the sorted property of the listbox to true...

Now, if you need help in retrieving records from an oracle database. Use your friends (yahoo, google, ask, answers, bing) and search for vb6 ado tutorial and see http://www.connectionstrings.com if you want to go with a DNS Less connection...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Perhaps if you asked this question in the correct forum, as this forum is NOT for .NET...

vb5prgrmr 143 Posting Virtuoso

Break what I wrote down into its individual parts starting with the first sentence...

Okay,
so I take it you have the filling of the second listbox figured out?
even if user changes mind and unselects say MS Word ?
what you need to figure out is how to launch such software while using those options?

Well if they are command line arguements, you can use the intrinsic Shell Function, or the API ShellExecute or ShellExecuteEx. Now, if they are things like you would do through automation then you could use createobject...

Note: Things in bold can be looked up in VB's help and on the web with your friends (yahoo, google, ask, answers, bing)


So, what is it that you do not understand? Which part? Did you answer my questions???

vb5prgrmr 143 Posting Virtuoso

Not quite sure what you are asking but for ascii codes you can look on the web with your friends (yahoo, google, ask, answers, bing) or in vb's help file on the index tab by typeing in ascii

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, robbed part of this from vipin saxena's post in http://www.daniweb.com/forums/thread254613.html

Private Sub Form_Load()
Dim I As Integer, SI As ListItem

LV.Move 30, 30, 4500, 5000
LV.Checkboxes = True
LV.HideColumnHeaders = False
LV.View = lvwReport

LV.ColumnHeaders.Add 1, "Check", "Select", 1500
LV.ColumnHeaders.Add 2, "Field1", "Field1", 1500, vbCenter
LV.ColumnHeaders.Add 3, "Field2", "Field2", 1500, vbCenter

For I = 1 To 10
  Set SI = LV.ListItems.Add()
  SI.SubItems(1) = "Subitem 1"
  SI.SubItems(2) = "Subitem 2"
Next I

End Sub

Good Luck

vb5prgrmr 143 Posting Virtuoso

Not sure how to do it through code, but I do know that you can set up check boxes and number of colums through the property pages (Custom), above the name property. It has been such a long time since I have used that control, but I also know that it will allow you to also add icons if you have an imagelist control associated with it.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, so I take it you have the filling of the second listbox figured out, even if user changes mind and unselects say MS Word and what you need to figure out is how to launch such software while using those options...

Well if they are command line arguements, you can use the intrinsic Shell Function, or the API ShellExecute or ShellExecuteEx. Now, if they are things like you would do through automation then you could use createobject...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Use printer.print to print the standard aligned text, and take a snapshot (use friends (yahoo, google, ask, answers, bing)) of what you want to be rotated and use printer.paintpicture...

Good Luck

vb5prgrmr 143 Posting Virtuoso

The ListView control, found in common controls 6.0, has the ability to display checkboxes...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well with the code I have provided, you should be able to figure it out...

Good Luck

vb5prgrmr 143 Posting Virtuoso

CodeFixer and ankush,

What are you doing replying to an old thread??? Don't you know that resurrecting the dead around here will get you labeled a necrophiliac. (Look it up over at dictionary.com to know just how bad of a label it is) :)

Please stop this practice...

vb5prgrmr 143 Posting Virtuoso

You will have to enumerate through the nodes to find out which ones have been selected and if they have then retrieve the information you want from them...

Option Explicit

Private Sub Form_Load()
Dim N As Node
Set N = TV.Nodes.Add(, , "Root1", "Root1")
Set N = TV.Nodes.Add(, , "Root2", "Root2")
Set N = TV.Nodes.Add(, , "Root3", "Root3")
Set N = TV.Nodes.Add(, , "Root4", "Root4")

End Sub

Private Sub Command1_Click()
Dim N As Node, ForLoopCounter As Integer

For ForLoopCounter = 1 To TV.Nodes.Count
  If TV.Nodes(ForLoopCounter).Selected = True Then
    MsgBox TV.Nodes(ForLoopCounter).Key
  End If
Next ForLoopCounter

For Each N In TV.Nodes
  If N.Checked = True Then
    MsgBox N.Text
  End If
Next N
End Sub

Now, as you can see, if you are using check boxes (as I set mine up to have), the checked property is different than the selected propert and as you can see, I have shown you two different ways in which to enumerate through the items in a treeview control...

Good Luck

vb5prgrmr 143 Posting Virtuoso

ankush.mukherje,

You got it from the post directly preceeding yours!!!!

Once again, the masked edit box will work if you set up its mask properly, but if you don't want to use it, then use this...

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyBack Then Exit Sub 'allow user to correct mistakes
If KeyAscii >= 48 And KeyAscii <= 57 Then 'numbers 0 to 9
ElseIf KeyAscii = 45 Or KeyAscii = 43 Then '+ and - keys
Else
  KeyAscii = 0
End If
End Sub

But as you can see this verification does not allow for decimal points or commas, and it also allows for entry like this... "-123+345", which is why the masked edit control is so nice...

Good Luck

vb5prgrmr 143 Posting Virtuoso

murdock68,

Raising the dead around here will get you labeled a necrophiliac. So next time you need to reference an older/dead thread in your NEW thread, copy its URL into your post.

As for you question, you will need to build a public procedure to pass instructions to. Meaning, lets say that everything you have built is in form1, so you use the above code to instantiate a second copy of form1 but only want to show the time display in this new form1. So you would make a call to this public procedure when you create the form...

Private Sub Command1_Click()
Dim F As Form
Set F = New Form1
F.PublicProcedureName("TIMEONLY")
F.Show
End Sub

and inside this public procedure you would set up the form to show only the timer you want.

However, doing it this way will cause you problems because of the single threaded nature of classic Visual Basic 6.0 because only one timer event will fire at a time. So while your main forms time may change from 5:58 to 5:57, the second form will not change until the main form is done processing. So you could end up with one form with a time of 5:57 and the other form displaying a time of 5:58 for a brief moment and depending upon how much processing goes on, that difference could grow from a moment to a few seconds if not more.

So, how would you rectify this you might ask? …

vb5prgrmr 143 Posting Virtuoso

Well, you will need to type them in, or if you are willing, you could create another program to OCR digital scans of each page of the book. Which means you will need a scanner or at least access to one.

Now if I remember correctly, your target OS is XP and above, so you will need to download MS's WIA SDK if you create this scanning program yourself.

You will also need to search the web for OCR SDK's if you decide to go this route. Lead has a nice set of tools but they are quite pricey. There are a few OCR engines out there that are free trialware and if I remember correctly there are a couple that are free to develop with but not distribute.

Back to typeing them in. You said multiple languages, well that could confuse OCR engines so you will need to check their language support or you could use a RTB (Rich Text Box) control (or wordpad) to type them in with.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Is there an actual question in there? As for creating an OS in VB,... Not happening! For creating an interface to an OS, well that sounds exactly like what you are doing...

vb5prgrmr 143 Posting Virtuoso

Okay then, you will need the ADO tutorial for accessing a database, that is if that is the route you want to go, or you could use a bunch of text files, which on one had would be easier but on another hand would be harder to keep track of.

So, I suggest an ADO tutorial, with an access database as your back end. You could also use the data form wizard, which can be found under add-ins>add-in manager if you have pro or enterprise editions.

Good Luck

vb5prgrmr 143 Posting Virtuoso

For sending e-mails with vb, it is possible, but because of all the spammers that were created using MS products, MS has clamped down on the technology to automate that technology. So if you search the web with your friends, you may run across some solutions that worked years ago but are no longer viable today so you will need to test it before you release it.

As for the rest,… Well that all depends upon current processes and the amount of integration you are able to achieve with those current processes....

Previously, I showed you how to pull records based upon how many issues they have left (see above post) and those should be done prior to the update so they/you act upon current status of your subscriptions.

Now, as for how to notify your customers of the status of their account....

Do you use VB to print the mailing labels? If so, you could also use VB to switch printers and print out a reminder card that could be stuffed/inserted into package.

Another way would be to send the customer an instruction card on how to decode the seemingly meaningless numbers that appear on their mailing label, that is if you are doing the printing of the mailing label, and those numbers would be something like 1/12, which would mean this is the first of 12 issues. Or in reverse 12/1, which would mean the last of 12 issues. (Meaning, you would put …

vb5prgrmr 143 Posting Virtuoso

Well first off lets make sure you are using Visual Basic 6.0 AKA Classic VB and not any of the .NET versions, which are 2002, 2003, 2005, 2008, and coming soon 2010.

Now, if you actually have the Classic Version of Visual Basic, the next question is what is your targeted OS's. XP, Vista, 7?

Next question is,... The hymn book, does it contain sheet music also or just the words and if it does contain the sheet music, do you want to display that?

Okay, if it does contain sheet music and you want to display it, then you will need a scanner to scan the pages in, and to do this with VB on XP and new systems you will need to goto Microsofts web site and search for WIA SDK (Windows Image Acquisition Software Development Kit). This will allow you to interface with the scanner and save the images as tiff or jpeg.

Lets see,... You will also need an ADO tutorial, which if you search the web with your friends (yahoo, google, ask, answers, bing) you will fine more than one.


Now, if you don't have classic visual basic 6.0 and you are learning one of the .NET versions then I would suggest you goto the .NET forum and ask your question or PM a mod to have this thread moved.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well lets see,... Using the first of my friends (yahoo, google, ask, answers, bing) I searched on your first phrase and this are the results...

http://search.yahoo.com/search;_ylt=A0oGki0ppVJLndwA4JRXNyoA?p=vb6+ado+database+connection&fr2=sb-top&fr=yfp-t-701&sao=1

and loooook.... the first one covers most of what you are asking...

http://www.vb6.us/tutorials/database-access-ado-vb6-tutorial

but just to be on the safe side, you had better search with the rest of your phrases but I suggest you make sure you put vb6 infront of the rest of them like you have for the first two...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well, from your language here, I can see why you might have been banned. Please remember that these are public forums and as such your language could offend. You should also remember that because some of these higher level languages are so easy to learn, like classic vb and vba, that these forums are not only populated by college age, but also high school and even middle school children. In fact, I'm surprised this site's filter did not catch some of your language and replace those letters with asterisks or some other character.

Also sir, from your reaction to my post, I'm thinking, and I don't know you from adam, but I'm thinking that you are easily baited and that might be part of your problem. It's a wonderful thing these forums. They allow us to type in what we are feeling and then stop before we hit that submit button, so that we can go back with calmer heads and rewrite what we want to say in a much more/less eloquent way. And sir, not knowing you from adam, I would suggest that you learn/start to practice some restraint in your posts.

Good Luck with your defense on your position and good luck on your search...

vb5prgrmr 143 Posting Virtuoso

Okay, if you are talking about subscriptions, i.e. magazine subscriptions or something of the like. Would you not want to warn the customer a couple of issues prior to recieving their last issue that their subscription is running out???

If so, then you might want to do something like this...

strSQL = "SELECT * FROM tablename WHERE fieldname <= 3"
'or
strSQL = "SELECT * FROM tablename WHERE fieldname = 3"
strSQL = "SELECT * FROM tablename WHERE fieldname = 2"
strSQL = "SELECT * FROM tablename WHERE fieldname = 1"

Where 3 equals the first notification to the customer to say something like "Hey, your subscription is running out! You will only recieve two more issues! RENEW NOW for the discounted price of ..."

Where 2 equals the second notification... "Only one issue left!"

And where 1 equals "This is your last issue..."


Then on your side, not only have you recieved these three notices, you would also recieve the final notice, i.e. WHERE fieldname = 0. Then when it comes to your update, you would want to modify your update command with a where clause... WHERE fieldname > 0, thus no negative numbers...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well not being a member of that site I can only give you the views of other sites...

1) It is considered impolite to bump your own threads prior to a day or two having elapsed.

Reason: In general, with forums, when you ask a question, a person will either know the answer, know where the answer might be found, or is clueless. Now, when someone replies to your question to what the other knowledgeable people consider to be the correct answer, more than likely they will leave the thread alone. However, if your question is convoluted with a bunch of vague questions, i.e. help, codeless, or just unreadable/understandable most will pass it by and maybe even be miffed at you having wasted their time/bandwidth. Then there are those sites that nearly demand that you show the code you are having problems with.


2) It is downright rude to resurrect dead threads to ask your own question.

Reason: Most of these sites offer e-mail notification not only for the OP (Original Poster), but for all others that have replied to the thread. Thus, resurrecting a thread, sends an email to the OP and all those who have replied or opted to "subscribe" to the thread.

3) Hijacking someone else’s thread to ask your own question, whether on topic or not is down right rude.

Reason: Do I really need to answer this one???

4) Asking or re-asking the same question from …

vb5prgrmr 143 Posting Virtuoso

Ya know Queen, not that I have ever tried it, but would not a disconnected ado recordset be sufficient as a data source?


Just a thought from left field, if not from beyond... :)

Good Luck

vb5prgrmr 143 Posting Virtuoso

Kumar,.... It is not nice to raise the dead threads and in the future if you need to reference an old dead thread, please copy its url into your new thread.

As for you question, the finger print reader should come with some software and if you are lucky, there should be a SDK. If not, contact the manufacture or see their website to see if they offer the SDK (Software Development Kit), which should contain all the documentation you will need to achieve your objective.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well I do not see where you have the procedure Wait defined but it should be a doevents/sleep loop that is long enough to allow the first operation from the sendkeys to execute before the second sendkeys is sent...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Not that I know of as I believe it is not a container for OCX's, but then again I could be wrong. Have you tried to add the control while in the designer? Unable to do so. I thought so but if someone can come along and prove to me otherwise, well I will have learned my lesson for the day. :)

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, this should be pretty simple and will not take much alteration to your code...

In design view, form view, click on the image control that holds the mole graphic, press CTRL+C, CTRL+V and when prompted if you want to create an array of controls, answer yes.

Okay, now double click on the image control and it should take you to a new Private Sub imgMole_Click(Index As Integer) sub but if it does not, then insert the Index As Integer into your old sub.

Now, you will have to modify you code so that it reflects these changes as you cannot refer to a image control like this anymore (imgMole.Left), but instead, you will have to refer to the individual image control by their index (imgMole(0).Width or imgMole(1).Width)

Then you might want to add a rnd to randomly pick an image control to make it visible.

And one last thing about the Randomize statement. You only need it once in the form load event.

Good Luck

vb5prgrmr 143 Posting Virtuoso
Dim Cmd As New ADODB.Command
Set Cmd.ActiveConnection = Con 'your connection object
strSQL = ...
Cmd.Execute strSQL

Good Luck

vb5prgrmr 143 Posting Virtuoso

StretchBlt API is one thought, as is using your friends (yahoo, google, ask, asnwers, bing) to search for vb6 rotate bitmap...

Good Luck