248 Posted Topics
Re: [QUOTE]I am using the InValidateRect to erase the temp fill[/QUOTE] InvalidateRect just defines the coordinates of one Rect Structure. The next API you should use is the BeginPaint API which should reference that rectangle. [QUOTE]The invalidated areas accumulate in the update region until the region is processed when the next … | |
Re: [QUOTE]I developed a programme in vb6. It refuses to open on Vista. I do not experience any problems with XP.[/QUOTE] Like he said, be specific. But check your installation paths. Do not add any of your files to the system path: e.g. c:\windows\ .......... Finally, Microsoft is becoming wise and … | |
Re: Hangman. I always thought you guessed letters and not words. Have they come up with a new way of playing the game? I would say that you need to set up a string array that matches the word that you are guessing. And then I would create a string array … | |
Re: [code="VB"] Option Explicit Private Sub Form_Load() If App.PrevInstance = True Then MsgBox "Program already running.", vbInformation, "Program status" ' End the program End End If End Sub [/code] | |
Re: It would appear that your problem is that every time your brute force loop finds an item it adds it to the list. Instead of adding the item to the list in the nested if end if, count the occurences that it are found in that Nested If structure. [code] … | |
Re: [QUOTE][B]Preserve[/B] Optional. [I]Keyword[/I] used to preserve the data in an existing array when you change the size of the last dimension. (MSDN)[/QUOTE] I think the key word is [I]preserve[/I]. The whole purpose of the [B]Preserve[/B] key word is to preserve data. It's intended use is when increasing the size of … | |
Re: [QUOTE]we already have the thumbprint scanner[/QUOTE] Ok. (1) Who is the manufacturer, and (2) what is the model number. We should be able to help you from there. If not, do you have the manual? If all else fails, read the manual. | |
Re: [QUOTE]I DONT KNOW HOW TO SHOW ALL THE INFORMATION FROM FORM 2 IN FORM 3. I GOT 1 LIST BOX AND THREE LABELS IN FORM 3[/QUOTE] It might be a good idea to add a module to your program and declare some Public Arrays there in that module. [code] Public … | |
Re: [code="VB"] Option Explicit Private Const RGB_R = 1 Private Const RGB_G = 2 Private Const RGB_B = 3 Private Sub cmdFindColor_Click() Dim lngColor as Long, intRGB as Integer, lngRGBValue as Long ' Code to find RGB value ' Blah, Blah, Blah ' intRGB would be RGB_R, RGB_B, etc. ' lngRGBValue … | |
Re: [QUOTE]Id like it so that when you click the 'x' button to close the program it doesnt just end.[/QUOTE] Use the Form_Unload() event [code="VB"] Private Sub cmdX_Click() unload Me End Sub Private Sub Form_Unload(Cancel As Integer) Dim intReturn As Integer intReturn = MsgBox("Ready to Exit", vbOKCancel, "Exit?") If intReturn = … | |
Re: [QUOTE]any site for the some learning[/QUOTE] You can learn here. But you need to list what types of hardware you have. There are several types of cash drawers: serial port connection, those that connect to a receipt printer, etc. The Typical Card Swipe outputs ASCII Data and mimics a keyboard. … | |
Re: [QUOTE]Iam working in setup creation using VB6[/QUOTE] I take it you're trying to write a program that will install or setup your program? That's pretty difficult to achieve with vb6 language alone and probably the easiest route is to use some Window APIs to achieve your goals. Use the ShellExecuteEx … | |
Re: [code]Private Sub Form_Load() 'Disables password box Call Disable_Passwordbox Dim varUsername As String Dim varPassword As String varUsername = txtUsername.Text varPassword = txtPassword.Text End Sub[/code] In the first place, your variables varUserName and varPassword only have scope or a lifetime during the Form_load() procedure. As soon as the form is finished … | |
Re: [code] Private Sub cmdString_Click() Dim lngPlace As Long Dim strText As String If IsNumeric(txtDecimal) Then strText = txtDecimal ' Search for position of Decimal point lngPlace = InStr(1, strText, ".", vbTextCompare) txtPlaces = vbNullString If lngPlace > 0 Then txtPlaces = CStr(Len(strText) - lngPlace) Else txtPlaces = CStr(lngPlace) End If … | |
Re: [QUOTE]I want to link my program in vb6 to the system calendar in windows XP by using shell but to be able to do that i need to know the default path or file location of the system calendar ( i was searching all day and still didnt find out … | |
Re: In the first place, I would say you should be using functions and not subs for your APIs. That way you can deal with errors. You can't deal with any errors, if you don't have a function that returns a value. [code]Private Declare Function OffsetRect Lib "user32" _ (lpRect As … | |
Re: [I]MessageBox.Show[/I] You're in the wrong forum. But that's ok, VB.Net is about the same as VB6. [code]Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load MessageBox.Show("Welcome, to my Calculator", "Welcome", MessageBoxButtons.OK) End Sub[/code] | |
Re: In a form_resize event your form will resize. What will not resize and relocate automatically are your controls. They will remain at the locations originally specified in the design view. So your problem is how do I write code to resize and relocate my controls? Use ratios. Use ratios. Use … | |
Re: Sounds like you have an ActiveX control that was updated or unregistered by VS2008. You can try this tool to isolate the problem. It should give you the exact answer. [URL="http://www.dependencywalker.com/"]http://www.dependencywalker.com/[/URL] Or just try reinstalling VB6. | |
Re: [QUOTE]thanks. but, dear tell me about my computer. it works with control panel. [/QUOTE] Press the Power Button. That's a good one :) I like that one. Well, you weren't very explicit. But I think this is what you want. Add the [I]Shell Controls and Automation[/I] reference in the Projects/Reference … | |
Re: This code is just for one of the aspects: the left position. But the principle is the same for the top position. And if you want, the height and the width. Use ratios to find the value that you need. In each situation, you need 4 values. One value has … | |
Re: I assume you have Operating System/Hardware networking connection solved. If not, go to the Networking forum first for advice and take care of that first But for the VB6 part, you can reference the Microsoft Jet Database 3.51, or 3.6 libraries in conjunction with the Microsoft ActiveX Data Objects 2.8 … | |
Re: [QUOTE=LindseyV;822465]Hello there. I am witting a program in vba/access and I have a string coming in. I need to go through the string and look for specific tags and return the rest of the line. So lets say: "I went" "to the" "park" I need to tell the program to … | |
Re: [QUOTE]OS will always print to the Default printer. [/QUOTE] Debasisdas is absolutely right, as usual. But I take it when you're saying the app is determining which printer to print, you feel that your user is hemmed in and has no choice of his own to choose which printer? Good … | |
Re: I would use a do until loop. That way the code will only be executed only when there is a line in the text file. That should avoid the error that you mentioned. [code] Dim IntCounter as integer Open "Incorrect.txt" For Input As #2 Do until EOF(2) Line Input #2, … | |
Re: [QUOTE]MsgBox("requistion no is already exists") [/QUOTE] That line of code shouldn't work, period. You should leave out the parenthesis. [code]MsgBox "Requisition number already exists", vbInformation, "Requisition Status"[/code] Or [code] dim intMessage as integer intMessage = MsgBox("Requisition number already exists.")[/code] Other than that, if you could put a break point at … | |
Re: [QUOTE]Input Output name_123 Valid name123 Valid 123name invalid 123_name invalid[/QUOTE] Don't really know what you're criteria for a valid filename is since you didn't mention the criteria: that might be helpful. But it appears that you 're not allowed to start the name with a number? [code]Private sub CheckName() dim … | |
Re: You probably want to use the KeyUp event on the particular form on which the Ctl+C event occurs. You use this event to test for a combination of keys. You also need to enable the KeyPreview property on the form. [code] Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer) Dim … | |
Re: If you want to run another thread in VB6 that's independent of your main program, you should write an ActiveX exe file that will take on its own independent thread. Microsoft in their MSDN documentation recommends using an out of process ActiveX exe. [QUOTE][I]The fact that an out-of-process component runs … | |
Re: Your Sequel code should look something like this [code] Dim strSQL as string strSQL = _ "SELECT MyDates.* " & _ "FROM YearlyDates " & _ "WHERE MyDates " & _ "BETWEEN DateOne AND DateTwo" [/code] You might have to monkey with setting up the date format: e.g. cDate("3/1/2009") But … | |
Re: [QUOTE]rs.Fields("Material_ID") = CLng(Grd.TextMatrix(CLng(row), 1)) [/QUOTE] Check the value of that TextMatrix. I would guess that it's a Null value. Put a break at that line of code and use your immediate pane to determine the error. It would probably be a good idea to include error checking in that procedure … | |
Re: [QUOTE]("SELECT * from tblLecture where arlNumber = '" & lblLECNUM & "' ")[/QUOTE] SELECT * from tblLecture WHERE alrNumber=" & cstr(lblLECNUM) Don't think that will make much difference. But it's a little clearer. [QUOTE]there's my code, im having a error "DATA TYPE MISMATCH IN CRITERIA EXPRESSION " but i cnt … | |
Re: [QUOTE=Tamir09;796898] I would prefer to have the feature to be able to save the table as an excel sheet or a table in Wordpad. [/QUOTE] Tamir: Just convert your data to an excel format. To do this you need to have installed the Indexed Sequential Access Methods (ISAM) during the … | |
Re: [QUOTE]Any suggestions on how to improve my code and make it more robust is extremly welcome [/QUOTE] [CODE]arrayNumber = Left(strData, InStr(1, strData, "\") - 1)[/CODE] You're pulling an array number based on the position of the "\?" I don't understand that. Explain, if you would. And you declared arrayNumber as … | |
Re: [QUOTE=jaasaria;801304]hi guyzz... is their a third party software were can i install/register all the vb dll files need in my visual basic project. im having hard time in my installer setup. im using setup factory. and before im making the setup up factory wizard, im using the Package & Deployment … | |
Re: In a flat file a comma, a space, or a tab is usually used to separate the fields in a record. You have one record per line. So, your file--if indeed it is a flat file--should look something like this in Notepad: 1, George, Jungle, #02/05/07#, 800-Jungle 2, Jane, WildWoman, … | |
Re: [QUOTE]Any help / guidance will be appreciated[/QUOTE] Well, this is a complicated request. And that on more than 1 level. You have a couple of problems. Maybe three. First, you want to do this without being noticed. And you're asking to basically search a whole hard drive. This would require … | |
Re: [QUOTE]Basically I am struggling with the code to display the records on ListView from the Database. Can anyone please give me some hints.[/QUOTE] Basically you just use the Add method of list view [ICODE]Listview.listItems.Add Index, Key, Text, Icon, SmallIcon as ListItem[/ICODE] If you're using a database recordset, you might try … | |
Re: Ok. You need help. You're stuck on this error. Ok. But what is the error you're stuck on. You failed to mention the error. | |
Re: [QUOTE=pardeep3dec;663199]Dear Friends, I got two problem related to Data Report. 1. I got more than 20 temporary file with extention .tmp in my project folder. 2. My report unable to show effect after deletion of any record. It only takes effect when i close the program and then restart program. … | |
Re: [QUOTE=rajeshkhanna_in;664745] Is there a way in which this can be automated via vb 6.0? [/QUOTE] I would look at your situation and determine where the variables will occur in making your data source. If the only thing that is changing is the address of your data source, then you should … | |
Re: Use the Text Change event provided by the textbox control [code] Private Sub Text1_Change() End sub [/code] I won't write your code for you. But you should check the position of the current letter. Since the text change event is fired every time you enter a different letter or change … | |
Re: [QUOTE]Please tell me how can i remove "Invalid use of null" problem . Coding given below[/QUOTE] [code] Private Sub On Error goto ErrorFix ' Code .... .... ' Exit sub ErrorFix: Select case err.Number case 13 ' Invalid use of null resume next case else msgbox err.description & " Error … | |
Re: [QUOTE]is there anyway i can get hold of Ocx for free....or can anyone just help me to make my own Ocx for video conferencing...plzzz rep.....am eager to find out...[/QUOTE] Well, to answer your first question. Can I do it for free? Anyway you get it, it's going to cost you … | |
Re: You should try using the form name first when using it from form2: e.g. form1.MyRs It's best to use class modules instead of regular modules. Class modules have better support for Data Objects. Hank | |
Re: [QUOTE]Is there anyother to achieve this[/QUOTE] You can remove the quotes using if statements before you insert the string into the SEQUEL statement: [CODE] Dim strInsert as String Dim intLength as integer if Mid(strInsert, 1,1) = "'" then strInsert = right(strInsert, len(strInsert) -1) end if intLength = len(strInsert) if Mid(strInsert, … | |
Re: In the first place, there's no need to drop a document onto your project, form, or whatever. All you need to know is where the location of the file is. And then you need to establish some process with a command button, a click event (on a form), etc. to … | |
Re: [QUOTE]I have this problem recently when I change my OS from winxp to suse linux 10.2. I want to run my visual basic 6[/QUOTE] Visual Basic was made to code programs for Windows. If you're developing programs for Windows, use Windows. You're going to have to debug them in a … | |
Re: Module Main [CODE] Public EmployeeID as Integer [/CODE] Form1 [CODE] Private Sub Command1_Click EmployeeID = rs.Employees("EmployeeID") Unload Me form2.show End sub [/CODE] Some good advice by debassidas. But that should get you started. Hank | |
Re: [QUOTE]This application has failed to start because MSVBVM50.DLL was not found.[/QUOTE] I can't remember back that far:VB5. But if there's a Package and Deployment Wizard, package your application into an installer using it and install the program using the Package and Deployment Wizard. That should take care of your dependencies. … |
The End.