- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 3
- Posts with Upvotes
- 2
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re: Saving images as .jpg, .png, .gif, etc. from within VB is possible with GDI+, but since GDI+ is a technology that came around after VB6, you either have to upgrade to .NET (which I'm avoiding ATM), or get something which will allow you to access the GDI+ library. You're in … | |
Re: While both of those links are useful, the problem here doesn't seem to be Access related. I wonder, did you upgrade (or downgrade?) your copy of Visual Basic between the time you wrote the program and now? For example, a switch from VB5 to VB6 (or vice-versa)? If so, that … | |
Re: Another thing you ought to look at is whether or not you have the Word Wrap feature turned on in Notepad. Sounds like you want it off. However, using the Trim() function, as jireh suggested, would probably help, too. Trim() will remove any leading (before the text) and trailing (after … | |
Re: Sounds to me as though your program isn't actually exiting. Task manager's processes tab show programs that are running. If your program shows up there, it hasn't properly exited. Look through your code and find the section where you tell it to exit (This is usually in [icode]Form_Unload()[/icode]). If you … | |
Re: Here is a more complete and flexible example: [code]... OutputFileIndex = 0 PageNum = 0 ThisPage = "" InputFileIndex = FreeFile Open InputFileName For Binary Access Read As InputFileIndex CartNum = String(Chr(0), 8) ' This will make sure we grab 8 bytes. Get InputFileIndex, 56, CartNum ' Get Len(CartNum) bytes … | |
Re: You can use any text editor you like to write VB code. It's just easier in the VB6 IDE. Just as you can write ASP code in any text editor you like, but FrontPage makes it easier. The difference is merely preference. The reason that ASP is covered in your … | |
Re: I'll tackle these in order, then summarize... 1. VB and VB.NET are very similar. They have their roots in BASIC, a programming language used on nearly every architecture since the language's inception. Even the classic Commodores used it. Of course, VisualBasic is a long way from the Beginners All-purpose Symbolic … | |
Re: Another approach, and probably more along the lines of what you're looking for in this case, is to take advantage of Form.Show's Modal argument: [code=visualbasic]Form3.Show vbModal[/code] This will show the form, with the added effect that all other forms in the application are automatically disabled. This not only prevents the … | |
Re: Why are you using CreateObject at all? Do you have multiple connections to set a timeout for? Unless you need more than one timer, you can dispense with CreateObject altogether and just use the Timer control directly. Even if you do require mulitple instances of the Timer, CreateObject won't work. … | |
Re: Is the .bat file set up to take the arguments? Assuming it is, there might be another thing you need to change. You said "abc" and "bcd" are string variables. Using [inlinecode]Shell "n:\aa.bat abc bcd"[/inlinecode] passes the [I]values[/I] "abc" and "bcd" to the batch file. Using [inlinecode]Shell "n:\aa.bat " & … | |
Re: There are a few ways to do what you're referring to. Perhaps the most reliable method is to save the time you started the countdown in a variable, then calculate the values for the clock display in your code. I made a small example project to help illustrate my answer. … | |
I suppose it's about time I ASKED a question for a change. I'm attempting to write a program that records the location of the mouse cursor every time it is clicked. Getting the location of the cursor at any given moment is simple. However, knowing WHEN to get that location … | |
Re: Since VB's Shell statement starts the outside program and then passes control to the next line of code right away, the outside program probably doesn't have a chance to finish running before you try to attach the file to the email message. You'll get the error because the outside program … | |
Re: Aside from the handful of Windows API functions (mentioned above) that might serve your INI-handling needs without the need to write your own parsing engine (which is why those functions exist), you do have another option: the Windows Registry. VB6 (at least) provides a few functions for using the registry … | |
Re: Well, Arvin2006, it all depends on the application in question, and the code in its Form_Load or Sub Main (depending on which you use to load the application). I'm assuming you mean a progress bar on something like a splash screen. The trick to setting up a progress bar to … | |
Re: Have you created the controls referred to in your code? Unless you have a text box that is named txtPrice and another named txtCost, plus the lblCommissionDisplay and lblNameDisplay labels, that code will be unable to run. Something to check. - Sen | |
Re: [php]$result_resource = mysql_query("SELECT field FROM table WHERE condition", $connection_resource); $result_value = mysql_result($result_resource, "field", 0); echo stripslashes($result_value);[/php] Something like that, though hopefully your variables are named a bit better than mine. ^.=.^ The important part is the [B]stripslashes()[/B] function. This is what will clean those pesky extra slashes from your submitted … | |
Re: Allow me introduce you to a part of the .Show method that will make this part much easier for you. Instead of [code] CheckForm = False ... PassFail.Show CheckForm = True ... Do Loop While CheckForm = True [/code] you would use [code] PassFail.Show vbModal [/code] This has the effect … | |
Re: The above code is a great example, but there is a way to make it faster. Consider the following: [code]Input number: 100 100 / 2: 50 Sqr(100): 10[/code] Once you hit the [I]square root[/I] of a number, you can stop, as it is likely to be a great deal smaller … | |
Re: This might be done in a batch file: [code]@echo off # Don't tell what steps are involved net stop eventlog # Shut off the event logger copy <logfilesource> <logfiledest> # Be sure to insert the actual source and dest paths del <logfilesource> # Again, insert the actual path net start … | |
Re: The problem lies not in the code you use to set the timer, but in the code you use to pull data from the web. Where you use [inlinecode]With ActiveSheet.QueryTables.Add...[/inlinecode], you're telling Excel to put the data in the currently active spreadsheet - whichever one you happen to be working … | |
Re: What you'd need to do is disable the Windows key altogether. This requires a bit of spelunking into Windows' guts with an API call or four. However, help is not far away! CodeGuru.com has an excellent article on "hooking" the keyboard for both [URL="http://www.codeguru.com/vb/gen/vb_system/keyboard/article.php/c4829"]VB6[/URL] and [URL="http://www.codeguru.com/vb/gen/vb_system/keyboard/article.php/c4831/"]VB.NET[/URL]. All you have to … | |
Re: I noticed that you used xDoc in your Dim and Set statements, but used xmlDoc instead to try to load the file. Unless the code in your project is different from what you posted here, you'll either want to change xDoc to xmlDoc, or xmlDoc to xDoc - whichever is … | |
Re: Sams is really good with their "...in 24 hours" and "...in 21 days" series. Always recommended to get a good grasp on the basics of whatever you're trying to learn. For more advanced stuff, the stuff from Microsoft Press ("Learn Visual Basic 6.0 NOW!") will often cover a bit more … | |
Re: Depending on your coding style, there might be a magic reset button after all. But it all depends on how you code your game. If all of the variables and controls etc. that you need to reset the values of are contained in forms, a full reset is easy. To … | |
Re: Not to bump an old thread, but the problem in question is caused by a limitation of Visual Basic 6.0 where it only supports .ico files with up to 256 colors. The ICO format, it seems, didn't have support for more than 256 colors until after 1998, when VB6 was … |