vb5prgrmr 143 Posting Virtuoso

Easy way would be to use the ADODC (Activex Data Object Data Control) and bind the data grid to it but if you wanted more flexibility you could always use the ADODB (Activex Data Objects DataBase), which you will find under references and bind the datagrid to it. Then of course you could use one of the other grids that are not data aware but you would have to populate the grid yourself.

Any which way you go, there are examples and tutorials out there, all you need to do is use your friends (yahoo, google, ask, answers, bing) and use the correct keywords like "vb6 datagrid control tutorial".

Good Luck

vb5prgrmr 143 Posting Virtuoso

Ah once again... Okay, you will need to use a couple of loops, for loops exactly. The first from 1 to 7 Step 2 and inside that loop you will need to use the Space Function and String Function along with some simple math so you know how many spaces to add. Then, your second loop would go from 5 to 1 Step -2. You would also need to use the Space and String Functions inside of this loop. Also, I would suggest for the best output that you use a mono spaced font like courier new to do your printing...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Time to use your friends (yahoo, google, ask, answers, bing) and search for vb6 loan calculator. You should find many examples out there.

Good Luck

vb5prgrmr 143 Posting Virtuoso

It is real simple to call a function and once you see how you will slap your own head and make the homer simpson sound of DOH!

Consider the following function...

Public Function MyStringFunction() As String
MyString = "This Is A Test!"
End Function

Now, this function placed in a standard code module is visible throughout the program because it is "Public" and to simpily call it you could go something like so...

Dim MyString As String
MyString = MyStringFunction
MsgBox MyString

or simply...

MsgBox MyStringFunction

However, if you place that code in a form, say Form1, and you want to call it from Form2, then you will need to qualify it by using the "dot" syntax. Meaning, in Form2 you would call it like so...

MsgBox Form1.MyStringFunction

And the same goes for placing it in a class, however, you must instantiate the class. Meaning, you must declare it...

Dim C As New Class1
MsgBox C.MyStringFunction

Now, if you place this function in a standard module and make it "Private", then only procedures within that same module will be able to call the function. The same goes for forms and classes.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well lets see... First off you should know that there are several ways in which to do this. One way would be to use loops. Two of them as a matter of fact, and to be more precise, for loops. Now from your example it seems you will need a for loop that goes from 1 to 5 and then one that goes from 4 to 1 step -1. Then you should also take a look at the String Function for printing out your characters with the Print Statement.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well if it is a text field then...

strSQL = "SELECT * FROM tablename WHERE fieldname = ''"

Good Luck

vb5prgrmr 143 Posting Virtuoso

Did you dimension P first as a stdPicture object?
Are the first four references under Project>References the following?
Visual Basic For Applications
Visual Basic runtime objects and procedures
Visual Basic objects and procedures
OLE Automation

Good Luck

vb5prgrmr 143 Posting Virtuoso

Yes it is possible with the Printer object, i.e. Printer.Print "Hello World" Printer.EndDoc and then you could control the positioning of where "Hello World" gets printed by using the currentx/y properties.

Printer.CurrentX = 100
Printer.CurrentY = 200
Printer.Print "Hello World"
Printer.EndDoc

Good Luck

vb5prgrmr 143 Posting Virtuoso

If you want to talk directly to the printer, you will need to use the API. On the index tab type in OpenPrinter and hit enter. Scroll down to the bottom and click on Printing and Print Spooler Functions to see the other API's you will need.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Once again, you cannot insert a picture into a standard picture box! It can only be a rich text box!

Now, where are you recieving the error at? Which line? Have you even tried to debug?

Good Luck

vb5prgrmr 143 Posting Virtuoso

What kind of errors? Are the errors hardware or software? If software, is it returning errors to you? And if it is returning errors to you what are the err.number and err.description? Or is it a system error that is popping up? What is its message? Because telling us that the thermal printer just starts printing out gobbledygook and no errors raised tells us that it is a driver or printer issue, which means you may need to reinstall the printer driver...

Good Luck

vb5prgrmr 143 Posting Virtuoso

To do what you are wanting to do, I believe you will need to delve into the API...

See this yahoo search for some hints on where to get started...

http://search.yahoo.com/search?fr=yfp-t-701-s&toggle=1&cop=mss&ei=UTF8&rd=r2&p=vb6%20parallel%20port

Good Luck

vb5prgrmr 143 Posting Virtuoso

Don't know as I have never tried but an API to look at for doing such a thing would be SetWindowPos...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Ahhh!!!! Necromancer! Necromonger! Necrophiliac! Ahhh!!! It raises the dead!!!

mani00711,

It's not nice to raise the dead! It gives people the willies around here and gives you a bad name. Tsk, tsk! Shame on you! :)

In all seriousness, please, next time create your own thread and if need be, copy the url of the post you want to reference into your new thread.

To answer your question. A pay roll or payroll system is a system that calculates how much a person is to get paid depending upon either their salary or hours worked multiplied by hourly pay rate. Then that would be the gross pay. From there, the system would then deduct those pre tax payouts and apply taxes upon the remaining amount and then deduct those taxes leaving the net pay. From there the system would deduct any other withholdings and this would leave the system for how much is to be transfered into or for how much the payroll check is to be.

Good Luck

vb5prgrmr 143 Posting Virtuoso

To begin with, it looks like you are trying to insert a picture into a standard textbox and this code will not work for that. You will need a rich text box (Right Click on toolbox>Components>Microsoft Rich Textbox control>ok).

Dim P As stdPicture
P = LoadPicture(StringVariableThatContainsThePathFileNameToAPictureFIle)
'or P = LoadPicture("PathFileNameToPictureFile")
InsertPicture RTB, P

Good Luck

vb5prgrmr 143 Posting Virtuoso

Yes, we probably could but we will not make it for you, but here are some hints to get started.

Step #1
Get out the old Mark I recording device and jot down your ideas. Those ideas being how you want the program to work, what fields or data will you need to capture, how you will capture them, and how you will store them.

Step #2
Now organize those ideas as you answer these questions. Will there be security? Will there be multiple users? How many?

Step #3
Start drilling down on the exact functionality of each form, module, and class that you will need.

Step #4
Create your database and start coding.

Step #5
If you have problems with your code, post the relavant code here with the problem you are having and/or the error you are recieving, number and description, and we will try and help you.

(Mark I recording device = pad and pen/pencil)

Good Luck

vb5prgrmr 143 Posting Virtuoso

Please post the relevant within code tags and we will see what we can do for you...

Good Luck

vb5prgrmr 143 Posting Virtuoso

How much are you willing to pay? I ask this because you must think that those that visit here just hand out code all willy-nilly like they have nothing better to do. Where is your effort? What have you tried? Where is your code and what problems are you having with it?

If you just want a solution handed to you, why don't you go over to http://www.rentacoder.com and post your job up for bid. Until then, look up the Update Statement, ADO, Select Into Statement, Where Clause, and ListCount.

vb5prgrmr 143 Posting Virtuoso

The SavePicture function can only save pictures as bitmaps. You will need to look into GDI+ (see strongm's post at the bottom of this thread http://www.tek-tips.com/viewthread.cfm?qid=760856 ) or perhaps one of the dll's out there ( http://www.vbaccelerator.com/home/resources/Babbage/JPG_DLL_for_VB/JPGWrite.asp ) and then there is WIA (see strongm's post in this thread http://www.tek-tips.com/viewthread.cfm?qid=787961 )

Good Luck

vb5prgrmr 143 Posting Virtuoso

Okay, you can use the split function to split apart the contents of the multiline textbox on vbnewline, and since it will create a zero based array you would need to set the simple textbox to the second indexed element of the array...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Time to user your friends (yahoo, google, ask, answers, bing) and search for ADO tutorial...

Good Luck

vb5prgrmr 143 Posting Virtuoso

No, you do not need to install the VB IDE on the client. What you need to do is to create an installable package. You can use the PDW but it is well out dated for installing on Vista or 7. Inno has a free installer for VB6 and MS has Windows Installer 1.1. However, with Windows Installer you will have to search for the SDK...

http://www.microsoft.com/downloads/details.aspx?FamilyID=E96F8ABC-62C3-4CC3-93AD-BFC98E3AE4A3&displayLang=en

Good Luck

vb5prgrmr 143 Posting Virtuoso

(hint) The small picture box has the same events as the large picture box...

Good Luck

vb5prgrmr 143 Posting Virtuoso

There are a few examples out there on all of these api's you will just need to use your friends (yahoo, google, ask, answers, bing).

vb5prgrmr 143 Posting Virtuoso

ratheeshpranava,

It is not nice to raise the dead... You might be labeled a necrophiliac, necromonger, or a necromancer...

As for your question the button will need to have its style set to graphical and then you can use command1.picture = loadpicture(pathtopic) to load your graphic (you might need to use the set keyword).

Good Luck

vb5prgrmr 143 Posting Virtuoso

ansar.vb,

Welcome to the forums. Just so you know and so you are not labeled a necrophiliac, necromonger, or a necromancer. It is not polite to raise the dead. If you need to reference an old thread like this, please copy its url into your new thread posting.

As for your question, if you are using ADO see http://www.connectionstrings.com for some of your answers to a properly formated connection string.

Now, if you are using RDO the answer is pretty simple as you will need to place the database on a machine that has a public share. Then you will need to configure your ODBC DSN's to point to that database.

The same goes if you are using DAO ODBC Direct.

Now, if you are using DAO, you will need to either map to the share from each machine or use a UNC path from each machine that points to the share and db.

As for ADO, the above applies whether you are using an ODBC DSN or an ODBC DNS Less connection.

Good Luck

vb5prgrmr 143 Posting Virtuoso

The only way in which to accomplish this is a self deleting install program, of which, does not exist at the moment. So good luck in creating it and in the future, you are not posting a code snippet, you are posting a question....

Good Luck

vb5prgrmr 143 Posting Virtuoso

You might be able to use the following API's in conjunction with your access code.

FindWindow (to find outlook's hwnd)
EnumChildWindows (to find outlooks dialog and to find the ok buttons hwnd)
SendMessage with a WM_BUTTONDOW/WM_BUTTONUP messages to click the button...

There are a few examples out there on all of these api's you will just need to use your friends (yahoo, google, ask, answers, bing).

Good Luck

vb5prgrmr 143 Posting Virtuoso

Most any tutorial for visual basic 6 could also work for visual basic 5.0 but I'm betting that you are actually talking about visual basic.net version 2005, and if so you are in the wrong forum but don't fear as MS and may other sites out there have tutorials. You just need to use your friends (yahoo, google, ask, answers, bing) and do a search with the correct version and the keyword tutorial.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well there is the Microsoft Chart Control and if you search the web with your friends (yahoo, google, ask, answers, bing) you should be able to find more than one tutorial out there.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Please try and come up with something you have created yourself and if you have problems with it post the relevant code here or goto http://www.rentacoder.com put your project up for bid if you want someone to do the work for you.

Good Luck

vb5prgrmr 143 Posting Virtuoso

There are plenty of them around here. Just post your code, your error message (if you have one) and a description of your error or what you are trying to do and one of use should have a solution or at least be able to point you in the right direction.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Check with the manufacture to see if they have some sort of SDK, if not, time to use your friends (yahoo, google, ask, answers, bing) for a search on vb6 comm communications, or vb6 rs232, or other various other keywords.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Time to use your friends (yahoo, google, ask, answers, bing) and search for vb6 hill cypher. I used yahoo and found a couple of hits and one of them was in pascal...

Good Luck

vb5prgrmr 143 Posting Virtuoso

aka_amboy,

Your code is not simplier as it will take up more resources because it fires every second. Mine, while based upon the same principle only fires once a minute. Now, your solution may be the correct one if the user wants to view the count down but unfortunatly you have not done the calculation to show the minutes and seconds correctly, you only show a total of 2400 seconds being incremented/decremented.

Good Luck

vb5prgrmr 143 Posting Virtuoso

In VB6.0, to easily create an array of command buttons, or any control for that matter, place a command button on the form, name it, and set whatever other properties you want. Then select the command button on the form in the design environment and just like you would copy and paste some text, press CTRL+C and CTRL+V. Answer yes to the msgbox and continue for as many buttons as you want.

Now, for accessing the code window, double click on one of the buttons and the code pane will come up and you should see something like...

Private Sub Command1_Click(Index As Integer)

End Sub

From there you could use either a select case statement to tell the difference between which button was pushed, like so...

Select Case Index
Case 0 'first button (could be move first if coding for recordset navigation)
Case 1 'second button (move previous (recordset naviation))
Case 2 '(Move next in reference to recordset navigation)
Case 3 '(Move last...)
End Select

Or you could use the if elseif structure...

If Index = 0 Then
ElseIf Index =1 Then
'...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Do you know how to read and write to a text file? If not please look up the following in VB's help files...

FreeFile Function
Open Statement
Input Function
Line Input Function
Print Statement
Close Statement

Okay, once you know how to read and write to a text file then what you will need to do is use a for loop to go from 0 to listcount-1 printing the combo boxes list(index) values.

Then if you want to read the text file into to the combo box you would use the line input function and the additem method.

Good Luck

vb5prgrmr 143 Posting Virtuoso

skateatvu,

I'm sure that none of us would have a problem helping you with your problems in programming and I'm sure that you will recieve more than one reply at your email address that you have posted. But, I'm also betting that not all those replies will be for offering help as there are bots that comb these forums looking for email address so they can spam you. Then there are those who post requests like this so that they can collect email addresses from those who do respond and falling victim to this once was more than enough for me. So, if you have an idea for a program and need help with it. Post your question and the code you are having problems with here and I'm sure that we will be able to help you.

Good Luck

vb5prgrmr 143 Posting Virtuoso

If someone doesn't come along here, then there are several other sites that have specific vba forums. Please see this thread http://www.daniweb.com/forums/thread214396.html and scroll down to where I have given a list of forums. I know the first one http://www.tek-tips.com has several (Word, excel, access, general etc.)

Good Luck

vb5prgrmr 143 Posting Virtuoso
vb5prgrmr 143 Posting Virtuoso

You need the development environment for windows CE or mobile for VB6. Here is a getting started guide you can download and check out the related resources and what others are downloading.

http://www.microsoft.com/downloads/details.aspx?FamilyID=81460842-47cc-4ff2-9a19-4db96e212d32&displaylang=en

Good Luck in finding the CE toolkit for VB...

vb5prgrmr 143 Posting Virtuoso

You will need a for loop from zero (0) to listcount-1 to retireve the strings from the list box.
THen you will need a for loop from 1 to len of the string returned, and in this loop you will need to use the Isnumeric Function to test each character by retrieving that character with the Mid Function.
Once you have found IsNumeric to be true, then you know this entry has a number but if you reach the end of the string then you know it does not have a number in it.

NOTE: if you are wanting to remove one or the other items from the list box then I would suggest the first or outer loop should go from listcount - 1 to 0 step -1...

Good Luck

vb5prgrmr 143 Posting Virtuoso

So then only 7...

If Shift = vbAltMask Then
  If KeyCode = vbKeyQ Then KeyCode = vbKey7
End If

However, I don't see how this code helps you as I did a simple test with a text box and even though I changed the keycode with the above, it did not input it into the text box. I even tried...

If Shift = vbAltMask Then
  If KeyCode = vbKeyQ Then
    KeyCode = vbKey7
    Shift = 0
  End If
End If

and still did not help with resetting shift key. However, text1.text = text1.text & "7" did work but I'll warn you now. Only use the down or up and not both :)...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Text1 would be a control you would add to your form with the buttons and was only there as an example, because as I understand it you want to put these number into a cell directly so that would be .cell(referencetospecificcell) = .cel(ref...) or something like that. As I said before, don't play with VBA all that much and so memory fuzzy on subject.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Read my reply line by line, sentence by sentence and you will have your answer as you code it up. Then as debasisdas said, if you have any problems with what you have created, then post it with where and what the error is.

Good Luck

vb5prgrmr 143 Posting Virtuoso

So you want to have it seem like you are pressing ALT+Q+7??? Or just 7?

If just 7 then KeyCode = vbKey7

Good Luck

vb5prgrmr 143 Posting Virtuoso

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

vb5prgrmr 143 Posting Virtuoso

Well since I don't play with VBA all that much, I can only say that you need to make the recieving field = recieving field & new information, AKA text1.text = text1.text & newvalue

Good Luck

vb5prgrmr 143 Posting Virtuoso

Use the Mod Function to determine if input number is odd or not.
If not, add 1 to number.
Use for loop from 1 to 15 and a variable that is incremented by two with each iteration of the loop.
Take the value from the variable and concatinate into a string variable or textbox, or use the additem method of a list box to display.

Good Luck

vb5prgrmr 143 Posting Virtuoso
somestringvariable = inputbox(...
strSQL = "SELECT * FROM tablename WHERE fieldname = '" & somestringvariable & "'" 'or no single quotes if field is numeric
Set Rs = db.OpenRecordset(strSQL, dbOpenDynaset)

Good Luck