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
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
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
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
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 …
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
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
Dim Cmd As New ADODB.Command
Set Cmd.ActiveConnection = Con 'your connection object
strSQL = ...
Cmd.Execute strSQL
Good Luck
StretchBlt API is one thought, as is using your friends (yahoo, google, ask, asnwers, bing) to search for vb6 rotate bitmap...
Good Luck
No, with mine, all rows are updated with the information from each row. (If I remember my syntax correctly, just give it a try and see what happens.)
Good Luck
A list box with its multiselect property set to 1 - Simple or 2 - Extended will do fine, so no need to learn about a new control just yet, but it does raise the question, why a list box and not check boxes? Since you only have three options, it would be just a little bit easier to test check boxes versus items in a list box.
If Check1(0).Value = vbChecked And Check1(1).Value = vbUnchecked And Check1(2).Value = vbUnchecked then
'do stuff here...
'0, 1, 0
'0, 0, 1...
ElseIf Check1(0).Value = vbChecked And Check1(1).Value = vbChecked And Check1(2).Value = vbUnchecked Then
'do stuff here...
'1, 0, 1
'0, 1, 1
'1, 1, 1
'0, 0, 0...
End If
Good Luck
Or if you are lucky enough, you could use multiple lines and have their dashes line up. Just change the point of where it starts and ends at (one pixel).
Good Luck
See my post...
here is a one shot deal that you can use with the command object...
strSQL = "UPDATE cooperatesubs SET [cooperatesubs].[copiesremaining]=[cooperatesubs].[numberofcopies]-[cooperatesubs].[copiesout]"
Cmd.Execute strSQL
and if you open your connection to the database with pessimistic locking, the whole table will be updated in one shot without errors from other people accessing the data in a multi user environment.
Good Luck
There is always the masked edit control....
Good Luck
Show us what you have as there are so many different ways in which to do this, we would not want to lead you down a different road unless we had to...
Good Luck
You need to use the CurrentX and CurrentY to set the position of where you want the text to be drawn...
Me.CurrentX = 1000
Me.CurrentY = 1000
Me.Print "This is a test"
Good Luck
Okay, it has been awhile sinced I attempted to answer a VBA question, but my mind sort-clicked as the dark recesses of it stired... I believe there are two ways in which to do this. One is to declare a varible public in this workbook and the other is something like x=sheet1:range("fred").value as called from sheet two. If the syntax is wrong, sorry, the dust in the corners is quite deep now... :)
Good Luck
glad I could help, now if you don't mind, could you please mark this thread as solved...
Thanks
Well for somthing that happens only once a day and only after midnight, you could increase the interval to its max, 65535, which is just over a minute...
Good Luck
scalemode the same for all? because this works (as a test)
Picture2.PaintPicture Picture1.Picture, 0, 0, Picture2.ScaleWidth, Picture2.ScaleHeight, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight
and picture2 is set at double the size of picture1...
Properties changed at design time
AutoRedraw
ScaleMode = vbPixels
Picture1.AutoSize = True 'while picture2.autosize = false
Good Luck
Oh okay! You want to search on vb drag and drop tutorials and on vb6 resizing controls at runtime...
http://search.yahoo.com/search?p=vb6+drag+and+drop&toggle=1&cop=mss&ei=UTF-8&fr=yfp-t-701
http://www.tek-tips.com/viewthread.cfm?qid=501202
Good Luck
Sounds like you want to create a modified paint program. Meaning, besides line and circle you have predefined shapes like square, rectangle, rhombus, trapaziod, a graphic for computer, server, router, and hub, etc...
here are some possible solutions for you...
and if they don't inspire you, please come back...
Good Luck
Well first off, how would you tell if this program is done? If you know the answer to that, switch your code to ShellExecute API and WaitForSingleObject API...
Good Luck
Now, I want you to think about the FLAGS constant. I want you to look at how it is declared and then read the uFlags arguement in the help file for SetWindowPos...
Good Luck
API time... FindWindow to get the handle to the window, and SetWindowPos... If you search the web you should be able to find at least a few examples.
Good Luck
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
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
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
Please post the relevant within code tags and we will see what we can do for you...
Good Luck
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
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
Your welcome rav, now if you don't mind, could you please mark this thread as solved. Thanks
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
Okay, if you want to see if a file or directory exists, you can use the Dir Function (see vb's help files for full description). So, what you would do, is something like...
Dim ForLoopCounter As Integer
For ForLoopCounter = 0 To Combo1.ListCount - 1
If Dir(App.Path & "\Ordinance\" & Combo.List(ForLoopCounter) & "\" & txtFind.Text & ".txt") <> vbNullString Then
'Found
Else
'Not Found
End If
Next ForLoopCounter
Good Luck
Look at the split function and dynamic arrays. Also, see the val function and the join function...
Dim MyDynamicArray() As String
MyDynamicArray = Split(Text1.Text, " ")
MyDynamicArray(1) = CStr(Val(MyDynamicArray(1)) + 1)
Text2.Text = Join(MyDynamicArray, " ")
You also may want to look at IsNumeric to make your code more flexible.
Good Luck
You can read about cursors in VB's help files. As for connection string help see http://www.connectionstrings.com
Good Luck
Some simple calculations...
20 * 60 = 1200 * 60 = 72000 * 24 = 1728000 * 365 = 630720000 / 1024 = 615937.5Kb / 1000 = 615.9375Mb / 1000 = .6159375Gb
25 * 60 = 1500 * 60 = 90000 * 24 = 2160000 * 365 = 788400000 / 1034 = 769921.875Kb / 1000 = 769.921875Mb / 1000 = .769921875Gb
Which means that if you will be capturing a minimum of .615 to .769 Giga bytes of information. That is if each of your 20 to 25 fields are bytes and only bytes. This does not account for any unique fields like identity/autonumber fields which are a minum of four bytes for each record. Then there is your datetime stamp which is going to be eight bytes per record.
So what does all this mean? Well, you are going to have to figure out what each field is going to be and how much data that type takes up. Then once you have your record size, you can simply do the above calculations to figure out the minimum amount of disk space you need. Once you have that, you will then have a better idea of what kind of database you can use.
But that/this is not your only consideration when it comes to performance. Since you are going to be adding records every second, your machine will need a decent amount of ram because of the lag time between OS/server and hard drive …
Yes, you have code something like this...
Dim F As New Form1
F.Show
somewhere in your code. Find it, change it to Form1.Show. Should fix it.
Good Luck
Time to see your friends (yahoo, google, ask, answers, bing)...
http://search.yahoo.com/search?p=vb6+rs485&toggle=1&cop=mss&ei=UTF-8&fr=yfp-t-701
Good Luck
If you are using ADO (not Data1 or ADODC1) then see http://www.connectionstrings.com for you ODBC DSN Less connection string that you would use to connect to anything from text files to oracle, progress, SQL, and so on.
Good Luck
Wrong forum!!!
Actually, you don't need to declare a variable. You can use the tag property for something like this...
Option Explicit
Private Sub Command1_Click()
Text1.Tag = Text2.Text
Text2.Text = Text1.Text
Text1.Text = Text1.Tag
End Sub
Read up on it...
Good Luck
Look at the strConv function....
Good Luck
Okay, sounds like you want to do a map editor where you can drag various objects like the terrain, buildings, and other features onto the map and then save the resulting image.
Have a look at this search on PSC where you will find more code than than you need...
Good Luck
No have not heard of this but a possible remedy might be to download and install the redistributable service pack. This is version SP5...
not sure if there is a SP6 as I have not seen one but hey it is an idea...
Good Luck
While, I would suggest using a menu with a key combination shortcut, the suggestion by SCBWV does work...
Start a new standard exe project and add in this order, text box (text1), label (label1), text box (text2). Now set the caption of the label to &Focus. You should see Focus in the labels caption. Now, just to make sure that the tab orders are correct, lets check.
Text1 TabIndex = 0
Label1 TabIndex = 1
Text2 TabIndex = 2
Run the program and press ALT+F. You should see the carat jump from text1 to text2.
Good Luck
A couple of different ways...
Hooking like this example... http://vbnet.mvps.org/index.html?code/subclass/aspectratio.htm which you would have to modify to fit your needs
or like this example http://vbaccelerator.com/home/VB/Code/Libraries/Subclassing/SSubTimer/VB6_Minimum_Form_Size_Demonstration.asp
and I though there was an example around the web using the SetWindowRgn API but I can't seem to find it now...
And finally you could use the forms resize event to force/keep the minimum size...
If Me.Width < SomeValue Then Me.Width = SomeValue
However, you will notice that this last method gives you some undesirable redrawing artifacts.
Good Luck
Use a for loop to run through from one to count or 0 to count-1 (I forget) and use text1.text= text1.text & ... & vbnewline
Good Luck