My Program

madpanda
02-16-2002, 10:02 AM
Heres the link to my program. Pls tell me what u think of it. I did not program it all by myself, i used code from various websites.

http://www.geocities.com/pandabean_y2k/MultiTasker.zip

Volte
02-16-2002, 10:12 AM
Hehehe, that's neat. I like your paint program, and the way the browser knows your homepage. :) Some bugs though:

1. In the browser, if you are typing in a web-address, and you move your mouse, the textbox reverts to the address of the page you're on. Sort of annoying.

2. The 'HD' window has a bit of a malfunction -- I think you're using Integers, not Longs. When I start it up, it's blank. I go to D:, it shows no free space (it's my CD ROM, so it's correct), then I go to C: and it crashes with overflow. The amount of free space is too big to fit in an integer

3. In the text editor, the 'search' function only finds whole words. You should make it so that's optional. Example, right now:

"TESTTESTTESTTEST" does not find "TEST", but it will in the string "TEST TEST TEST"

Everything else seems to be in order. Nice work. :)

madpanda
02-16-2002, 10:43 AM
he he Thanx :)

Could u possibly tell me how to sort those errors pls?

I have just did a quick site for the program

here it is


http://www.geocities.com/pandabean_y2k

Volte
02-16-2002, 10:47 AM
Not without seeing some source I can't. :) Don't know what's causing these problems.

madpanda
02-16-2002, 10:49 AM
The code i have for find:

Private Sub mnuEditFindItem_Click()
Dim SearchStr As String 'text used for search
Dim FoundPos As Integer 'location of found text
SearchStr = InputBox("Enter search word", "Find")
If SearchStr <> "" Then 'if search string not empty
'find the first occurrence of the whole word
FoundPos = txtMain.Find(SearchStr, , , _
rtfWholeWord)
'if the word is found (if not -1)
If FoundPos <> -1 Then
'use Span method to select word (forward direction)
txtMain.Span " ", True, True
Else
MsgBox "Search string not found", , "Find"
End If
End If
End Sub


Code for the HD form

Private Declare Function GetDiskFreeSpace Lib "kernel32" _
Alias "GetDiskFreeSpaceA" (ByVal lpRootPathName As String, _
lpSectorsPerCluster As Long, lpBytesPerSector As Long, _
lpNumberOfFreeClusters As Long, _
lpTotalNumberOfClusters As Long) As Long



Private Sub Drive1_Change()
Dim X As Long
Dim SperC As Long
Dim BPerS As Long
Dim NoFC As Long
Dim TNoC As Long
Dim BytesFree As Long
Dim Root As String

Root = Left(Drive1.Drive, 2) & "\"

X& = GetDiskFreeSpace(Root, SperC&, BPerS, NoFC&, TNoC&)

'Fill Labels
Label1.Caption = Format(SperC& * BPerS * NoFC&, "0,000") & " bytes"
Label2.Caption = Format(SperC& * BPerS * NoFC& / 1024000, "0.00") & " MB"

End Sub

Volte
02-16-2002, 10:55 AM
FoundPos = txtMain.Find(SearchStr, , , _
rtfWholeWord)Try taking out the 'rtfWholeWord' part of it.

Replace your Drive code with this:

Private Declare Function GetDiskFreeSpace Lib "kernel32" _
Alias "GetDiskFreeSpaceA" (ByVal lpRootPathName As String, _
lpSectorsPerCluster As Long, lpBytesPerSector As Long, _
lpNumberOfFreeClusters As Long, _
lpTotalNumberOfClusters As Long) As Long

Private Sub Drive1_Change()
Dim X As Long
Dim SperC As Long
Dim BPerS As Long
Dim NoFC As Long
Dim TNoC As Long
Dim BytesFree As Long
Dim Root As String

Dim dummy1 As Double
Dim dummy2 As Double
Dim dummy3 As Double

Root = Left(Drive1.Drive, 2) & "\"

X& = GetDiskFreeSpace(Root, SperC&, BPerS, NoFC&, TNoC&)

dummy1 = (SperC& * BPerS)
dummy2 = NoFC& * dummy1

'Fill Labels
Label1.Caption = Format(dummy2, "0,000") & " bytes"
Label2.Caption = Format(dummy2 / 1024000#, "0.00") & " MB"

End Sub

madpanda
02-16-2002, 11:00 AM
oh :( just changed it :-\

madpanda
02-16-2002, 11:05 AM
Ok done

madpanda
02-16-2002, 11:24 AM
Is it working any better now?

Volte
02-16-2002, 11:32 AM
Yep, that's working better now. Cool program! It's great for a first try :) My first try was an animated butterfly. :rolleyes:

madpanda
02-16-2002, 12:17 PM
As i said before I dont want to take all the credit likes, i did take the code from sites but I decided to piece it all together like one big jigsaw. the main form was my work, using books and that.

Is there any sites where i can send my program to for people to download and use?

orufet
02-16-2002, 12:21 PM
http://www.download.com/ if you really want to be professional. I've submitted a few things there, but I hid them for now, until I release the new version of my html editor.

http://www.planet-source-code.com/vb if you want to release the source.

madpanda
02-16-2002, 12:33 PM
Would anyone else want to try my program out and share your comments with us please.

madpanda
02-16-2002, 12:47 PM
Originally posted by VolteFace
Hehehe, that's neat. I like your paint program, and the way the browser knows your homepage. :) Some bugs though:

1. In the browser, if you are typing in a web-address, and you move your mouse, the textbox reverts to the address of the page you're on. Sort of annoying.




Heres the code I have for the address box. How can i stop it from changing back when u move the mouse?

Also how can i expancd that text box when the browser window is expanded?

Private Sub txtAddress_KeyPress(KeyAscii As Integer)
Dim strSearch1 As String
Dim strLocName As String

If KeyAscii = 13 Then
strSearch1 = txtAddress.Text
wWeb.Navigate strSearch1
End If
strLocName = wWeb.LocationName

End Sub

orufet
02-16-2002, 12:52 PM
In the frmBrowser_Resize() event, use the .Move method of the address bar to change with width so it's proportional to the width of the form.


Public Sub frmBrowser_Resize()
txtAddress.Move txtAddress.Left, txtAddress.Top, 'width/height properties here
End Sub


What's in the MouseMove event of the address bar?

madpanda
02-16-2002, 12:58 PM
there is no mousemove in the form.

orufet
02-16-2002, 01:07 PM
If your program is reacting the the movement of the mouse, then I think that there must be a MouseMove event somewhere. I don't know how else this could happen.

madpanda
02-16-2002, 01:17 PM
I have hecked and checked through the code and there is no mousemove event.

orufet
02-16-2002, 01:33 PM
Maybe it's something to do with the GetCursorPos (or related) API call?

ChiefRedBull
02-16-2002, 02:49 PM
One more fairly important bug.... its not unloading itself properly. I clicked the EXIT button on the main form, and it appeared to close, but was still running in my Task Manager.

Make sure you're unloading all the forms, and setting any class or object references = Nothing.

madpanda
02-17-2002, 02:43 AM
I just use the code End on the exit button.

ChiefRedBull
02-17-2002, 07:13 AM
Thats why its not finishing properly. Use this code in the exit button:
Dim frm As Form
For Each frm In Forms
Unload frm
Next frm

That way, all the forms are unloaded, all memory is freed, and your program is completely shutdown.

madpanda
02-18-2002, 08:55 AM
Ok I have updated my program. Its only the zip file version 1.3


http://www.geocities.com/pandabean_y2k

Can anyone suggest how to get the find dialog in the notepad?

Garrett Sever
02-18-2002, 11:51 AM
Originally posted by madpanda
Can anyone suggest how to get the find dialog in the notepad?

Look here (http://www.freevbcode.com/ShowCode.Asp?ID=3304) for an "anonymous" contribution courtesy of our very own Merrion.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum