Forum: Visual Basic 4 / 5 / 6 Nov 1st, 2008 |
| Replies: 5 Views: 998 ilasabba: At first read that suggestion sounds useless since the information is already coming from a database to begin with. It's usually a good idea to explain why someone ought to do something... |
Forum: Visual Basic 4 / 5 / 6 Oct 28th, 2008 |
| Replies: 5 Views: 998 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,... |
Forum: Visual Basic 4 / 5 / 6 Oct 24th, 2008 |
| Replies: 1 Views: 1,047 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... |
Forum: Visual Basic 4 / 5 / 6 Oct 11th, 2008 |
| Replies: 5 Views: 20,658 First off, you're absolutely right. String(0, 8) DOES return nothing. Or rather, it returns nothing VISIBLE. In reality, CartNum becomes an 8-byte string filled with zeroes. If you were to look... |
Forum: Visual Basic 4 / 5 / 6 Oct 10th, 2008 |
| Replies: 2 Views: 478 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... |
Forum: Visual Basic 4 / 5 / 6 Aug 21st, 2008 |
| Replies: 4 Views: 3,073 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... |
Forum: Visual Basic 4 / 5 / 6 May 3rd, 2008 |
| Replies: 3 Views: 1,754 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:
Form3.Show vbModal
This will show the form, with... |
Forum: Visual Basic 4 / 5 / 6 Feb 12th, 2007 |
| Replies: 4 Views: 1,494 However, upon further inspection of the Windows API, an Opacity value can be simulated. Imma write a small control and post it on my website, with a link from here, because this is a COOL feature to... |
Forum: Visual Basic 4 / 5 / 6 Feb 11th, 2007 |
| Replies: 4 Views: 1,494 Only problem with that is that it requires VB.NET... Good ole' VB6 doesn't have an opacity setting on the forms.
- Sen |
Forum: Visual Basic 4 / 5 / 6 Feb 11th, 2007 |
| Replies: 4 Views: 1,494 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... |
Forum: Visual Basic 4 / 5 / 6 Jan 5th, 2007 |
| Replies: 2 Views: 1,615 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... |
Forum: Visual Basic 4 / 5 / 6 Dec 27th, 2006 |
| Replies: 5 Views: 15,367 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... |
Forum: Visual Basic 4 / 5 / 6 Nov 21st, 2006 |
| Replies: 2 Views: 1,159 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... |
Forum: VB.NET Oct 24th, 2006 |
| Replies: 10 Views: 10,049 Somehow I got the idea that I was still on the VB4/5/6 board, so I gave you VB6 code. The good news is that the code works flawlessly in VB6 - I tested it before posting. The better news is, I know... |
Forum: Visual Basic 4 / 5 / 6 Oct 22nd, 2006 |
| Replies: 5 Views: 20,658 Here is a more complete and flexible example:
...
OutputFileIndex = 0
PageNum = 0
ThisPage = ""
InputFileIndex = FreeFile
Open InputFileName For Binary Access Read As... |
Forum: Visual Basic 4 / 5 / 6 Oct 20th, 2006 |
| Replies: 9 Views: 6,057 DoEvents allows the system to continue doing what it's doing as it connects. Without DoEvents, status indicators (such as Progress Bars) are not updated, and their code is not executed.
This is... |
Forum: Visual Basic 4 / 5 / 6 Oct 20th, 2006 |
| Replies: 9 Views: 6,057 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... |
Forum: VB.NET Oct 19th, 2006 |
| Replies: 10 Views: 10,049 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... |
Forum: PHP Oct 14th, 2006 |
| Replies: 8 Views: 1,872 Heh, PHP puts them in to protect your information from being misinterpreted. It's called escaping. Basically, strings are usually represented in your code with 'string' or "string". But what if you... |
Forum: PHP Oct 14th, 2006 |
| Replies: 8 Views: 1,872 $result_resource = mysql_query("SELECT field FROM table WHERE condition", $connection_resource);
$result_value = mysql_result($result_resource, "field", 0);
echo stripslashes($result_value); ... |
Forum: Visual Basic 4 / 5 / 6 Oct 14th, 2006 |
| Replies: 7 Views: 6,097 The above code is a great example, but there is a way to make it faster. Consider the following:
Input number: 100
100 / 2: 50
Sqr(100): 10
Once you hit the square root of a number,... |
Forum: Visual Basic 4 / 5 / 6 Oct 7th, 2006 |
| Replies: 8 Views: 6,038 As I suspected, I tried to answer this question before in another thread. What I didn't realize is that you're the one who asked the question!
However, I'd like to answer the question there, in... |
Forum: Visual Basic 4 / 5 / 6 Oct 5th, 2006 |
| Replies: 8 Views: 6,038 Increment the progress bar in the code that actually loads the program, then call DoEvents to refresh the progress bar's display. For the example I gave above:
Load frmProgress
With... |
Forum: Visual Basic 4 / 5 / 6 Oct 1st, 2006 |
| Replies: 6 Views: 32,807 Hrm... It looks like you're setting up the .bat file to pretend it's the script. In that case, my example code is worthless, because that's VB code - not a call to a batch file.
Judging by your... |
Forum: Visual Basic 4 / 5 / 6 Sep 30th, 2006 |
| Replies: 2 Views: 1,545 This might be done in a batch file:
@echo off # Don't tell what steps are involved
net stop eventlog # Shut off the event logger
copy... |
Forum: Visual Basic 4 / 5 / 6 Sep 30th, 2006 |
| Replies: 6 Views: 32,807 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 Shell "n:\aa.bat abc bcd"... |
Forum: Visual Basic 4 / 5 / 6 Sep 30th, 2006 |
| Replies: 7 Views: 8,866 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),... |
Forum: Visual Basic 4 / 5 / 6 Sep 30th, 2006 |
| Replies: 9 Views: 19,726 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... |
Forum: Visual Basic 4 / 5 / 6 Sep 30th, 2006 |
| Replies: 5 Views: 1,446 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... |
Forum: Visual Basic 4 / 5 / 6 Sep 30th, 2006 |
| Replies: 2 Views: 10,361 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... |
Forum: Visual Basic 4 / 5 / 6 Sep 30th, 2006 |
| Replies: 4 Views: 2,651 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 With ActiveSheet.QueryTables.Add..., you're telling Excel to put the data... |
Forum: Visual Basic 4 / 5 / 6 Sep 28th, 2006 |
| Replies: 6 Views: 1,605 Allow me introduce you to a part of the .Show method that will make this part much easier for you. Instead of
CheckForm = False
...
PassFail.Show
CheckForm = True
...
Do
Loop While... |
Forum: Visual Basic 4 / 5 / 6 Sep 28th, 2006 |
| Replies: 6 Views: 4,911 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... |
Forum: Visual Basic 4 / 5 / 6 Sep 28th, 2006 |
| Replies: 8 Views: 6,038 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... |
Forum: Visual Basic 4 / 5 / 6 Sep 27th, 2006 |
| Replies: 2 Views: 15,945 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... |
Forum: Visual Basic 4 / 5 / 6 Sep 25th, 2006 |
| Replies: 14 Views: 22,870 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... |