vb5prgrmr 143 Posting Virtuoso

As for tutorials for either vb6 or any of the flavors of vb.net, you can use your friends (yahoo, google, ask, answers, bing) to find them. So you keywords would be vb6 read write consol.

Then in this thread, is just a small sample of sites I have collected up to that point that have code, tips, tricks, and tutorials...

http://www.daniweb.com/forums/thread214396.html

Good Luck

vb5prgrmr 143 Posting Virtuoso

VB's IDE Menu>Project>Add Module

Good Luck

vb5prgrmr 143 Posting Virtuoso

Search for automating outlook for the actual email part. Then search for ADO Tutorial and see http://www.connectionstrings.com

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well it might be because you are in the wrong forum. This forum is for classic vb and not .net so it might be wise of you to PM a mod and have this thread moved to the correct forum.

Good Luck

vb5prgrmr 143 Posting Virtuoso
If Val(Text1.Text) < 0 Then
  Text1.Text = "-" & Text1.Text
Else
  '...

Good Luck

vb5prgrmr 143 Posting Virtuoso

And you problem is??? What piece of code? What are you trying to accomplish???

vb5prgrmr 143 Posting Virtuoso

But that was not what the OP was asking there elkhartlynn...

vb5prgrmr 143 Posting Virtuoso

Once again this is not a SMS site, which means you can expand all those abreviations into full words so we don't have to decode your short hand.

So you will also need to use SendMessage.

Good Luck

vb5prgrmr 143 Posting Virtuoso
vb5prgrmr 143 Posting Virtuoso

This is not an SMS site...

EnumWindows, EnumChildWindows API's

Good Luck

vb5prgrmr 143 Posting Virtuoso

Huh? How do you record the infinite? You can't! That is why it is infinite. As soon as you come up with a measure of the infinite you find it is larger and thus unquantifiable.

Perhaps you should try to explain in detail what you are wanting to accomplish especially if english is a second language as I think you may have used the wrong word in your description.

Good Luck

vb5prgrmr 143 Posting Virtuoso

rs.addnew
rs.fields("somefield") = somevalue
rs.update

Good Luck

vb5prgrmr 143 Posting Virtuoso

Don't know what to tell you abu, your original problem "form2.show" being highlighted was more than likely because form2 did not exist. Look in the object window (Project window) on the right and see what you have named your forms. Do you have a form or forms showing like this... formTest(Form1)... if so, the name within the parenthesis () is the file name and the name before the parens is the name you should use in code.

Good Luck

vb5prgrmr 143 Posting Virtuoso

:-) Don't feel bad. I'm ashamed myself that I could not remember the read command from QB but hey that is the way things go.

Okay, is this data static? Never changes? Then in a bas module this might be the easiest...

Option Explicit
Public Org(1 to 5, 1 to 4) As String 'integer, long, double...

Public Sub InitializeOrgArray()
Org(1, 1) = "Some value"
Org(1, 2) = "Some Value"
'...
Org(2, 1) = "Some Value"
'...
Org(5, 4) = "Some Value"
End Sub

However, if this data is not static... Then how do you plan on getting the data?

Good Luck

vb5prgrmr 143 Posting Virtuoso

Just noticed something, you have typed the word "from" and not "form". Did you happen to misspell this?

Second, in design view, are you sure that the form you want to open is named form2?

Third, try...

If Form1.WindowState = vbMaximized Then
  Load Form2
  Form2.WindowState = vbNormal
  Form2.Visible = True
End If

Good Luck

vb5prgrmr 143 Posting Virtuoso

The shortest easiest way as mentioned above is through creating a menu with a shortcut key...

Use the menu editor and create the shortcut you need.

Good Luck

vb5prgrmr 143 Posting Virtuoso

There are several ways in which to add data to an array...

Dim S As String, MyArray() As String
S = "test1,test2,test3,test4"
MyArray = Split(S, ",")
Dim MyArray() As Integer
ReDim MyArray(3) As Integer
MyArray(0) = 0
MyArray(1) = 12
MyArray(2) = 34
MyArray(3) = 43
Dim I As Integer, MyArray() As String

For I = 0 To 10
  ReDim Preserve MyArray(I) As String
  MyArray(I) = CStr(I)
Next I

So, from what I can see is that you are using a two dimensional array and you are also populating this information from a file or some source. I'm guessing it is a file as I don't quite remember what the read statement is for in qbasic.

The following is for a file in the following format...
Data1Line1,Data2Line1,Data3Line1,Data4Line1
Data1Line2,Data2Line2,Data3Line2,Data4Line2
'...
Data1Line5,...

Dim FName As String, FNumb As Integer
Dim LineContents As String, PiecesOfData() As String, ForLoopCounter As Integer
Dim CapturedData(0 To 4, 0 To 3) As String, LineCnt As Integer 'or 1 to 5, 1 to 4

FNumb = FreeFile
FName = "Path File Name"

Open FName For Input As #FNumb
Do While Not EOF(FNumb)
  Line Input #FNumb, LineContents
  PiecesOfData = Split(LineContents, ",")
  For ForLoopCounter = 0 to 3 'or 1 to 4
    CaptureData(LineCnt, ForLoopCounter) = PiecesOfData(ForLoopCounter)
  Next ForLoopCounter
Loop

Close #FNumb

Good Luck

vb5prgrmr 143 Posting Virtuoso

should it not be...

Adodc1.Recordset.fields("name") = txtname.text

Good Luck

vb5prgrmr 143 Posting Virtuoso
vb5prgrmr 143 Posting Virtuoso

So it seems shashanderson, that you are making a fully independent database and front end. And I have to ask why?

Accounting department of most large firms that do inhouse accounting will have this information and, hr will have access to some of this information already. Also, HR normally has the ability to enter new employee and ex employee information.

So why duplicate the efforts of either the HR or accounting team when you can pull/poll some of this information from the existing accounting database? Then once this is done, you only need to have your new database keep track of the information that is not kept in the accounting database. That way, no ones effort is duplicated.

Good Luck

vb5prgrmr 143 Posting Virtuoso

maheshsayani has it...

For variables delclared publically within a form the variable must be qualified by the form name it was declared in...

Form1.MyForm1Var = SomeValue
SomeVariable = Form2.MyForm2Variable

Good Luck

vb5prgrmr 143 Posting Virtuoso

No, but if you search Nextag.com or ebay you should be able to find full versions for real cheap.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well reading the help file on this it says that for better performance that you should use a query with a where clause...

so...

strSQL = "SELECT * FROM SomeTable WHERE SomeField = somevalue
Set Rs = Db.OpenRecordset(strSQL,...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Look at the dateadd function....

Dim LastDayOfMonth As Integer
LastDayOfMonth = Day(DateAdd("d", -1, Month(Now) + 1 & "/1/" & Year(Now)))

Good Luck

PoisonedHeart commented: Thank you for your time and effort for solving my problem! :) +1
vb5prgrmr 143 Posting Virtuoso

Add list box to form.
Double click it. (makes code window appear with default event for list box).
Type in the controls name and then the period symbol ".".
A list will/should pop up. Select the AddItem method and press F1.
Read about it in help.
Now select something else and press F1
Review the list of properties and methods and see if there is something like selected that you can read about.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Result = Left(String, Len(String) - 1)

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well if that is where you saved them, you should find a single *.VBG and two or more *.VBP files plus other files like, *.FRM, *.FRX, *.BAS, *.CLS and so on.


BTW: I did not say remove, just double click on the proper *.VBP file

Good Luck

vb5prgrmr 143 Posting Virtuoso

Look at where you have saved your files. You should see a *.vpg, and one or more *.vbp files. the *.vpg is the group while the *.vbp are the project files. To access just the project, double click the *.vbp file.

Good Luck

vb5prgrmr 143 Posting Virtuoso

RegDeleteValue and RegDeleteKey API's are what you are looking for.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Start new project, add text box, make sure text box has focus when you run it, scan something...

Good Luck

vb5prgrmr 143 Posting Virtuoso

For almost any scheme that can be thought of to protect files on a drive, usb or otherwise, there are ways in which to get around that scheme.

One of the simplest ways is to either try and hide the files or encrypt them or to setup your program with side by side execution and autorun info http://www.codeguru.com/print.php/c14935__4/ but once again any of these can be side stepped by the user.

Also search for side by side or make my manifest.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Usually periphials like these come with SDK's or at least a program that installs a few dlls that allow you or the program to access the device. I would suggest that you contact the manufacturer for the SDK if the device did not come with one but I'm betting it did. Hence the suggestion to read the SDK documentation and help files.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Wrong forum, please PM a mod to have your thread moved...

Good Luck

vb5prgrmr 143 Posting Virtuoso

Time to use your friends (yahoo, google, ask, answers, bing) and do some searching as you will find many an example. Also MS or the disks you installed from and/or the MSDN CD's have examples (not sure what you need but they are still there).

Good Luck

vb5prgrmr 143 Posting Virtuoso
vb5prgrmr 143 Posting Virtuoso

Well first, you are going to have to impersonate a user that has the rights to the folder...

http://support.microsoft.com/default.aspx?scid=kb;en-us;285879

Then see http://www.connectionstrings.com for proper formatting of your connection string.

Good Luck

vb5prgrmr 143 Posting Virtuoso

Well that really depends upon the manufacturer and the software they provide, the OS, and if there is a prog that allows for drag-n-drop to the CD. It could be as easy as filecopy or the use of API's that are provided by the specific OS or program.

Nowadays however, it should be simplier than the old days where we just had tape drives to backup to...

http://search.yahoo.com/search;_ylt=A0oGkiwIG9BKdZIAD7ZXNyoA?p=vb6+backup+cdr&fr2=sb-top&fr=yfp-t-701&sao=1

http://search.yahoo.com/search;_ylt=A0oGkmjHHNBKn84AFANXNyoA?p=vb6+API+open+close+cdr&fr2=sb-top&fr=yfp-t-701&sao=1

and check out the first link of the second one above!!!!

http://vbaccelerator.com/home/VB/Code/Libraries/Writing_CDs/IMAPI/article.asp

and while you are on that page look on the left side as there are other ways to accomplish what you want.

Good Luck

vb5prgrmr 143 Posting Virtuoso

As with any database and how you view the data contained therein, it is all in the options...

When you open your recordset, whether it be ADO, DAO, or RDO, you have the options of static or dynamic, and client or server side cursors. However, the use of these cursors will not only affect how your application behaves but it will also have adverse effects on your network.

So what does this mean (if you have not already gone Huh?) you ask?

Well first, lets make sure I have the problem you are trying to describe down.

CompA requests/recieves a recordset
CompB requests/recieves a recordset which is the same as CompA
CompA changes this data being viewed by both of these computers...
and your question is how to reflect those changes on CompB as soon as this happens...

If this is correct then so far so good on my end and the above does apply so read up on the cursors of the data access method that you are using.

Now for some other options as how to notify other computers that the data has changed.

A datetime field of last edit that can be checked against.
A system of messaging, whether it be with winsock, MSMQ, or other.
Perodic refreshing of recordset.

And probably a half dozen more ways, but each way, no matter which, will also increase network traffic. So, there is no easy answer …

vb5prgrmr 143 Posting Virtuoso
vb5prgrmr 143 Posting Virtuoso

A sequential file, text file, whatever, would be easy enough to search for contents so yes. As for copying a file from a CD to the hard drive is as simple as using FileCopy but going the other way will not be so easy.

Good Luck

vb5prgrmr 143 Posting Virtuoso

So, you first read the value in from a text file, right? So at that point you have "30.5". Then somewhere it gets changed, right?

Dim SomeVariable As Double
SomeVariable = CDbl("30.5")

Good Luck

vb5prgrmr 143 Posting Virtuoso

You have two choices. The first is make your program a service (search for NTSVC.OCX). The second is to enter your program in the "run at startup" list (those are your keywords to search with).

Good Luck

vb5prgrmr 143 Posting Virtuoso

It may also depend upon your local settings on your computer. I don't know about brazil but some countries use the decimal/period character as a thousands seperator and since you have 30.5 and not 30.500 it may be stripping it.

So to perhaps solve this you may want to read the value into a string and then convert to a double.

Good Luck

vb5prgrmr 143 Posting Virtuoso

If you are talking about the title bar buttons (minimize, maximize, close) then in the forms property you can set the controlbox=false and this will remove all three. If you are talking about a command button then its .visible=false.

Good Luck

vb5prgrmr 143 Posting Virtuoso

EnumWindows API should work for you.

Good Luck

vb5prgrmr 143 Posting Virtuoso

If you are just trying to keep user on website abc.com then when you retrieve the text of the controls/window you are monitoring, do you not only need to be able to check http://www.abc.com/somepage.asp?somequeryvalue=somethingoranother ?

Good Luck

vb5prgrmr 143 Posting Virtuoso

1.) FindWindow API
2a.) EnumChildWindows
2b.) Huh?

Good Luck

vb5prgrmr 143 Posting Virtuoso

To create a *.CSV (Comma Seperated Values) file...

Print "some value,somevalue,somevalue,somevalue"
Print SomeVariable & "," & SomeOtherVariable & "," & AnotherVariable

as for your .offset that is .net code and this is the classic forum. Next time, copy the url if you need to and please post in the correct forum without resurrecting the dead.

Good Luck

vb5prgrmr 143 Posting Virtuoso

have you searched/looked at http://www.connectionstrings.com ?

Good Luck

vb5prgrmr 143 Posting Virtuoso

Use the printer object...

Printer.Print "Some String"
Printer.Line 'look it up in help
Printer.CurrentX 'see help
Printer.CurrentY 'see help

Good Luck