Page 1 of 4 1234 LastLast
Results 1 to 40 of 138

Thread: Programming FAQ -- show off your cool tips here!

  1. #1

    Thread Starter
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226

    Programming FAQ -- show off your cool tips here!

    I am wanting to start a programming FAQ ( http://www.piqsoftware.com/projects/apochfaq/ ).

    However, I do NOT want to cover the basic stuff like "how to make a command button" and that sort of junk.

    If you have a cool tip or trick that you'd like to share, just post it here and I'll put it up -- with whatever credits you like (name, email, website, whatever)



    Go for it!
    Last edited by mlewis; Feb 10th, 2002 at 03:14 PM.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  2. #2

    Thread Starter
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    I'll get you started:

    How to make a really cool shaped window
    Put this into a module:

    VB Code:
    1. Public Function GetTransparencyRgn(ByVal TheForm As Form) As Long
    2.   Dim hrgn As Long, hrgn2 As Long
    3.   Dim Temp As Long
    4.   Dim I As Integer, J As Integer
    5.   Dim BeginX As Integer
    6.   Dim PrevX As Integer
    7.   Dim PrevEX As Integer
    8.   Dim Rows As Integer
    9.   Dim Flag As Boolean
    10.   Dim BeginRow As Integer
    11.   Dim H As Long
    12.   Dim ht As Integer, wd As Integer
    13.  
    14.   hrgn = CreateRectRgn(0, 0, 0, 0)
    15.  
    16.   BeginX = -1
    17.   PrevX = -1
    18.   PrevEX = -2
    19.   Rows = 1
    20.  
    21.   With TheForm.PicMask
    22.     H = .hdc
    23.     ht = .ScaleHeight
    24.     wd = .ScaleWidth
    25.   End With
    26.  
    27.   For J = 0 To ht
    28.     Flag = False
    29.     For I = 0 To wd
    30.       ' change the RGB numbers here to change the transparent color
    31.       If GetPixel(H, I, J) <> RGB(255, 255, 0) Then
    32.         If BeginX = -1 Then
    33.           If PrevX <> I Then
    34.             Temp = CreateRectRgn(PrevX, J, PrevEX, J)
    35.             BeginX = -1
    36.             CombineRgn hrgn, hrgn, Temp, RGN_OR
    37.             DeleteObject Temp
    38.             Rows = 1
    39.           End If
    40.  
    41.           BeginX = I
    42.           If PrevX = I Then
    43.             If Not Flag Then BeginRow = J
    44.               Flag = True
    45.               Rows = Rows + 1
    46.             End If
    47.             PrevX = BeginX
    48.           End If
    49.         Else
    50.           If BeginX <> -1 Then
    51.             If Flag Then
    52.               Rows = Rows + 1
    53.             Else
    54.               BeginRow = J
    55.               Rows = 1
    56.               Temp = CreateRectRgn(BeginX, BeginRow, I, J + Rows)
    57.               BeginX = -1
    58.               CombineRgn hrgn, hrgn, Temp, RGN_OR
    59.               DeleteObject Temp
    60.             End If
    61.  
    62.             PrevEX = I
    63.           End If
    64.         End If
    65.       Next I
    66.       If BeginX >= (I - 1) Then
    67.         BeginRow = J
    68.         Rows = 1
    69.         Temp = CreateRectRgn(BeginX, BeginRow, I, J + Rows)
    70.         BeginX = -1
    71.         CombineRgn hrgn, hrgn, Temp, RGN_OR
    72.         DeleteObject Temp
    73.         PrevEX = I
    74.       End If
    75.   Next J
    76.  
    77.   GetTransparencyRgn = hrgn
    78. End Function

    And in the form:

    VB Code:
    1. Private Sub Form_Load()
    2.   Dim hrgn As Long
    3.   hrgn = GetTransparencyRgn(Me)
    4.   SetWindowRgn hwnd, hrgn, 1
    5. End Sub

    Put a PictureBox onto the form that is named PicMask. Set its Visible property to false, AutoRedraw to True, and ScaleMode to 3 - vbPixels.

    Next, make a BMP file that has the shape you want. The transparent color is yellow (RGB 255, 255, 0) but you can change it easily (see the code for details). Everything that is yellow (or whatever color you set) will be see-through.

    Note also that the form's ScaleMode property must be 3-vbPixels.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  3. #3
    Frenzied Member nishantp's Avatar
    Join Date
    Jan 2001
    Location
    Where you least expect me to be
    Posts
    1,375
    I think you forgot to include the API calls with that code...
    You just proved that sig advertisements work.

  4. #4

    Thread Starter
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    lol, so I did!
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  5. #5
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    -= a peet post =-

  6. #6
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    Lewis, this is a must for any FAQ out there

    VB Easter Bunny

    1. From VB's View Menu, select toolbar, then customize......
    2. In the resulting dialog, click On the Command Tab.
    3. In the Categories List, Select Help.
    4. Select "About Microsoft Visual Basic" In the Command List, And drag it To any menu Or the toolbar.
    5. Right-click On the Item you just dragged And rename it To "Show VB Credits" (without quotes).
    6. Then Close the "Customize" dialog And click On the
    "Show VB Credits"
    -= a peet post =-

  7. #7

    Thread Starter
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Yeah I open that every once in a while when I'm in the mood for some funky music
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  8. #8
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    Play a midi using API

    VB Code:
    1. Option Explicit
    2. Private Declare Function mciSendString Lib "winmm.dll" Alias _
    3.    "mciSendStringA" (ByVal lpstrCommand As String, ByVal _
    4.    lpstrReturnString As Any, ByVal uReturnLength As Long, ByVal _
    5.    hwndCallback As Long) As Long
    6.  
    7.  
    8. Private Sub Command1_Click()
    9.     Dim ret As Integer
    10.     Dim sSong As String
    11.     'start the song
    12.     sSong = App.Path & "\midisong.mid"
    13.     ret = mciSendString("open " & Chr(34) & sSong & Chr(34) & " type sequencer alias to_town", 0&, 0, 0)
    14.     ret = mciSendString("play to_town", 0&, 0, 0)
    15. End Sub
    16.  
    17. Private Sub Command2_Click()
    18.     Dim ret As Integer
    19.     'stop playing the song
    20.     ret = mciSendString("close to_town", 0&, 0, 0)
    21. End Sub

    want simple but often asked stuff like that?
    -= a peet post =-

  9. #9

    Thread Starter
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    That works, but I was thinking of little known let really cool stuff like the wacky-shaped window demo above...

    Give me a while and I'll update that stuff real quick.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  10. #10

    Thread Starter
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    All added



    Anyone else?
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  11. #11
    Fanatic Member
    Join Date
    Jun 1999
    Location
    California, USA
    Posts
    662
    haven't read through all the posts, but...

    this code
    Code:
    If a = "Hello" Then
        b = "Hi"
    Else
        b = "Bye"
    End If
    has the same effect as
    Code:
    b = Iif(a = "Hello", "Hi", "Bye)

  12. #12
    Staifour
    Guest
    Originally posted by mlewis



    Not true!

    Try this:

    If a = "Hello" Then
    MsgBox "hi"
    Else
    MsgBox "Bye"
    End if



    And then try:

    Dim a
    a = "goobl"
    IIf a = "Hello", MsgBox("Hi"), MsgBox("Bye")


    OOPS!
    well
    i'm not sure but i think that this will do it right
    VB Code:
    1. Msgbox Iif(A= "Hello, "Hii" , "Bye")
    what i know about Iif (i just knew it 3 minutes ago) is that it returns the first value given if the condition is tru and the second if none so that code should do it right

  13. #13
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    I use the ADO helper from M$. Here are 2 files

  14. #14
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    and this one

  15. #15

    Thread Starter
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Thank you! What an excellent tip!





    That's not a tip dude. Thats code. I don't want Microsoft code. I want real tips, real things that people have come up with.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  16. #16
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    Originally posted by mlewis
    Thank you! What an excellent tip!





    That's not a tip dude. Thats code. I don't want Microsoft code. I want real tips, real things that people have come up with.

    well.....you may not like it but it sure is efficient when using databases

  17. #17
    Armbruster
    Guest
    Cheesy but neat effect! (As Willard Scott used to say in the commercials, "Don't forget the cheese!")

    Make a form "scroll away" when closing.

    VB Code:
    1. Option Explicit
    2.  
    3. 'Written by Carl Armbruster
    4. 'Make a form "scoll away" at close
    5. '  May be used and distributed freely!
    6. '   no nasty copyrights here mlewis!
    7. Dim intStartWidth As Integer
    8. Dim intStartHeight As Integer
    9. Dim intUpperLimit As Integer
    10. Dim i As Integer
    11.  
    12. Private Sub Form_Unload(Cancel As Integer)
    13.     intStartWidth = Width
    14.     intStartHeight = Height
    15.     If intStartWidth > intStartHeight Then
    16.         intUpperLimit = intStartWidth
    17.     Else
    18.         intUpperLimit = intStartHeight
    19.     End If
    20.    
    21.     On Error Resume Next  'making the form
    22.                         'too small gives an error!
    23.     For i = intUpperLimit To 1 Step -1
    24.         Width = Width - 1
    25.         Height = Height - 1
    26.     Next i
    27. End Sub

  18. #18
    Hyperactive Member
    Join Date
    May 2001
    Location
    Köln
    Posts
    395

    mlewis - what do you think????

    Armbruster: Please take this msg not to serious

    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Form_Unload(Cancel As Integer)
    4. Dim intCounter As Integer
    5. Dim intMax As Integer
    6. Dim intHeight As Integer
    7. Dim intWidth As Integer
    8.  
    9.     intWidth = Me.Width
    10.     intHeight = Me.Height
    11.     If intWidth > intHeight Then
    12.         intMax = intWidth
    13.     Else
    14.         intMax = intHeight
    15.     End If
    16.    
    17.     On Error Resume Next
    18.  
    19.     For intCounter = intMax To 1 Step -1
    20.         Me.Width = Me.Width - 1
    21.         Me.Height = Me.Height - 1
    22.     Next intCounter
    23. End Sub


    This code was originally posted by Armbruster - I changed a few
    things - so if I would claim now I wrote this procedure first who
    is right??

    To make it clear again I DID NOT write this procedure I only
    wand to use it to show my point.

    Face it if I would ask 20 developers to write a procedure which
    close an app by "scrolling away" we would have at lease 2
    simelare procedures.

  19. #19

    Thread Starter
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Well you have a point, that all our procedures would be similar.

    That's kind of the idea of a FAQ isn't it? To provide common answers to common problems? Frequently asked Questions



    In this case, I have NO way to prove if you or arm wrote the code first. However, arm posted first so he would get credit in the FAQ.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  20. #20
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963

    Herk, how about this?

    This sure looks yummy! The form just go on circulating
    VB Code:
    1. 'In a form code...
    2.  
    3. Dim Degree as Integer
    4. Const Distance = 1000 ' twips
    5. Private Sub Form_Load()
    6. Timer1.Interval = 1
    7. Timer1.Enabled = True
    8. End Sub
    9.  
    10. Private Sub Timer1_Timer()
    11. Degree = Degree + 1
    12. If Degree > 360 Then Degree = 0
    13. Radian = Degree / 57.2958
    14. X = COS(Radian) * Distance
    15. Y = SIN(Radian) * Distance
    16. Me.Top = (Screen.Width \ 2) + X
    17. Me.Left = (Screen.Height \ 2) + Y
    18. End Sub
    Last edited by jian2587; Feb 15th, 2002 at 03:15 AM.
    ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
    Programming is fun, but only if you're not on a tight deadline
    So I consider all those working engineers sad people

    VB FTP class
    3 page PHP crash course
    Crash Course on DX9 Managed with VB.NET covering basics till terrain creation

  21. #21
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    Err...Could u put QBasic and Assembly section as well in ur
    Apoch site?
    That'll b great
    ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
    Programming is fun, but only if you're not on a tight deadline
    So I consider all those working engineers sad people

    VB FTP class
    3 page PHP crash course
    Crash Course on DX9 Managed with VB.NET covering basics till terrain creation

  22. #22

    Thread Starter
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    lol, I'd love to add those sections, but I'd need tips for them first. I have plenty of QBasic lore in my old shriveled brain, but I don't know if anyone is interested.


    Also, I will be gone on business until Wednesday, so please do not dispair if your tips aren't published for a while. I'll try to check up on this thread often while I'm away, but who knows
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  23. #23
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344
    Originally posted by mlewis
    lol, I'd love to add those sections, but I'd need tips for them first. I have plenty of QBasic lore in my old shriveled brain, but I don't know if anyone is interested.


    Also, I will be gone on business until Wednesday, so please do not dispair if your tips aren't published for a while. I'll try to check up on this thread often while I'm away, but who knows
    Why don't you let members on your site to publish the code and tips for you? It would give you more time to do the other thing you have to do. Why don't you give the member of your site jobs e.g someone (some ppl) to put the code up on the site.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  24. #24
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    yup, why don't u appoint some commitee members?
    Or atleast make a page which enable others to post
    tips and update it automatically.

    This is getting cool and cool and cool!
    ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
    Programming is fun, but only if you're not on a tight deadline
    So I consider all those working engineers sad people

    VB FTP class
    3 page PHP crash course
    Crash Course on DX9 Managed with VB.NET covering basics till terrain creation

  25. #25
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344
    Originally posted by jian2587
    yup, why don't u appoint some commitee members?
    Or atleast make a page which enable others to post
    tips and update it automatically.

    This is getting cool and cool and cool!
    Alright lets take a vote. who think commitee would be a good idea?

    I reckon it would work.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  26. #26
    Hyperactive Member
    Join Date
    May 2001
    Location
    Köln
    Posts
    395
    How much I can charge if I get member of this commite.

    Do I get a commite car?

    Are there any other benefits involved????



  27. #27
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344
    Originally posted by Bongo
    How much I can charge if I get member of this commite.

    Do I get a commite car?

    Are there any other benefits involved????


    HeHe I wish first we have to see if he will agree to the idea.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  28. #28
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344
    Originally posted by mlewis
    That's right!


    I've copyrighted my software before, and I know the penalties can be pretty stiff. Technically, you can only claim copyright "rights" if you register the thing, but you can still claim *Some* rights by putting a notice in it.

    However, since all the code submitted (except that example) did not have any copyright, and could very easily be re-written by any one of us so as not to be copyrightable, I don't lose any sleep over it
    I know it cost alot of money to get a program copy written by how much exactly are we talking?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  29. #29
    Fanatic Member BrianHawley's Avatar
    Join Date
    Aug 2001
    Location
    Saudi Arabia
    Posts
    796

    Grab handle

    Here's some short and easy code to put a grab handle (shangle) at the bottom right of a window for resizing:

    Pretty sure I wrote it all, but it's so long ago I couldn't swear to it.

    Anyway, I'm claiming the copyright and releasing it to you, so if I'm wrong it's only me who is in trouble, not you.
    Brian
    (Fighting with the RightToLeft bugs in VS 2005)

  30. #30
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    right, I vote yes.
    ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
    Programming is fun, but only if you're not on a tight deadline
    So I consider all those working engineers sad people

    VB FTP class
    3 page PHP crash course
    Crash Course on DX9 Managed with VB.NET covering basics till terrain creation

  31. #31
    New Member
    Join Date
    Feb 2002
    Posts
    1
    To reply on the copywrighting stuff if you put a disk into a envelope and send it to yourself it will have a time stamp on it proving you made it origanlly (if the time is right) it has worked before with people. hope this helped
    VB is powerful if you know how to use it!!!

  32. #32
    Hyperactive Member
    Join Date
    May 2001
    Location
    Köln
    Posts
    395
    Originally posted by SeizeTheDay
    To reply on the copywrighting stuff if you put a disk into a envelope and send it to yourself it will have a time stamp on it proving you made it origanlly (if the time is right) it has worked before with people. hope this helped
    I found an envelope at home dated 12.03.1981. Do you think I can now claimthe copyright of Windows?

  33. #33
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    To get the free memory, use the GlobalMemoryStatus API and the MEMORYSTATUS Type:
    VB Code:
    1. Option Explicit
    2. Public Declare Sub GlobalMemoryStatus Lib "kernel32" (lpBuffer As MEMORYSTATUS)
    3. Public Type MEMORYSTATUS
    4.     dwLength As Long
    5.     dwMemoryLoad As Long
    6.     dwTotalPhys As Long
    7.     dwAvailPhys As Long
    8.     dwTotalPageFile As Long
    9.     dwAvailPageFile As Long
    10.     dwTotalVirtual As Long
    11.     dwAvailVirtual As Long
    12. End Type
    13. Public Type Fraction 'UDT made by me, Copyrighted ;) hehe
    14.     fAmount As Long
    15.     fMax As Long
    16. End Type
    17. Function GetPhysicalMemory() As Fraction
    18. Dim Memory As MEMORYSTATUS
    19.     Call GlobalMemoryStatus(Memory)
    20.     GetPhysicalMemory.fAmount = Memory.dwAvailPhys
    21.     GetPhysicalMemory.fMax = Memory.dwTotalPhys
    22. End Function
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  34. #34
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344
    Originally posted by SeizeTheDay
    To reply on the copywrighting stuff if you put a disk into a envelope and send it to yourself it will have a time stamp on it proving you made it origanlly (if the time is right) it has worked before with people. hope this helped
    Wierd but funny.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  35. #35
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344
    Originally posted by Bongo


    I found an envelope at home dated 12.03.1981. Do you think I can now claimthe copyright of Windows?
    Yeah then sue Microsoft for billions.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  36. #36
    New Member
    Join Date
    Jan 2002
    Posts
    13
    anyone call show me how to call an application using VB. Thank you!!!!!

  37. #37
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344
    Originally posted by Everything
    anyone call show me how to call an application using VB. Thank you!!!!!
    Just using the shell command.

    i.e Shell ("c:\windows\explorer.exe")
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  38. #38
    Fanatic Member BrianHawley's Avatar
    Join Date
    Aug 2001
    Location
    Saudi Arabia
    Posts
    796
    Originally posted by SeizeTheDay
    To reply on the copywrighting stuff if you put a disk into a envelope and send it to yourself it will have a time stamp on it proving you made it origanlly (if the time is right) it has worked before with people. hope this helped
    If it arrived next day, what would the equivalent Baud rate be?

    What's the best speed you could manage? If you sent a stack of CD's from Amsterdam to London by UPS, would it be faster than transferring the data by modem? Would it be cheaper? What's the break-even point? Hey - I actually had to do this at one time. Never did figure out which was better. We used to use UPS for anything bigger than 50Mb, but that was more to do with getting to the pub on time than anything technical.

    Highest theoretical baudrate? It's the Space Shuttle in orbit with the cargo bay full of DVD's.
    Brian
    (Fighting with the RightToLeft bugs in VS 2005)

  39. #39
    Hyperactive Member
    Join Date
    May 2001
    Location
    Köln
    Posts
    395

    Re: Important!

    [QUOTE
    mxnmx -- that code is copyrighted; I'd rather not use it because I don't have permission from the author. Thanks anyway [/B]
    [/QUOTE]

    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ' Copyright ©1996-2002 VBnet, Randy Birch, All Rights Reserved.
    ' Some pages may also contain other copyrights by the author.
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ' You are free to use this code within your own applications,
    ' but you are expressly forbidden from selling or otherwise
    ' distributing this source code without prior written consent.
    ' This includes both posting free demo projects made from this
    ' code as well as reproducing the code in text or html format.
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

  40. #40
    Fanatic Member BrianHawley's Avatar
    Join Date
    Aug 2001
    Location
    Saudi Arabia
    Posts
    796

    Re: Re: Important!

    Originally posted by Bongo
    [QUOTE
    mxnmx -- that code is copyrighted; I'd rather not use it because I don't have permission from the author. Thanks anyway
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ' Copyright ©1996-2002 VBnet, Randy Birch, All Rights Reserved.
    ' Some pages may also contain other copyrights by the author.
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ' You are free to use this code within your own applications,
    ' but you are expressly forbidden from selling or otherwise
    ' distributing this source code without prior written consent.
    ' This includes both posting free demo projects made from this
    ' code as well as reproducing the code in text or html format.
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' [/B][/QUOTE]

    There is such a thing as triviality of copyright and the courts would take that into account in any copyright litigation.

    Just because you wrote something and put your 'copyright' on it does not mean you own the copyright. A court may decide against you if it was a trivial construction or an adaptation of a existing common construction.

    e.g. if you come up with a new and faster sort algo, then that's almost certainly covered. If you take something out of book, or out of MSDN, or you just type out a commonly used bit of code, then it's not your copyright, even if you hack it about and rearrange it, unless it includes some substantial new functionality.

    This probably covers almost anything under a few hundred lines of code - unless it is really unusual.

    You see lots of bits of short code, - e.g. API call wrappers to handle the registry etc. - that somebody has marked 'copyright'. I don't think so. If it came down to the wire, the earliest similar code was probably written by Microsoft when they were testing the API before it was even released. Any general routine, unless it's VERY unusual has almost certainly been written before. Don't even think of copyrighting a hex to dec converter. It was probably first written in the 60's.

    Now the above is not to say that people who have provided these routines have not put a lot of work in to them. They deserve some credit for it, even if it's just leaving their name in the header. Also, it would be wrong for a commercial site to SELL such code (or access to it) without due recompense - and that should be resisted.

    But legal protection? In most cases I think not. Who's going to go to pay a lawyer to fight over twenty lines of code anyway?

    It comes down to what's polite, rather than what's legal - and certainly you should ask the author's permission to quote his code unless it is explicitly given in the header (which of course somebody else could already have changed without permission!).

    I'd just follow your conscience and not worry too much about the outcome.
    Last edited by BrianHawley; Feb 18th, 2002 at 05:19 AM.
    Brian
    (Fighting with the RightToLeft bugs in VS 2005)

Page 1 of 4 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width