BrianHawley - you made it quite clear - and be honest I can not
understand the fass about this copyright here in a Forum. This
does not include whole pieces of Software. I put a copyright on
my SW as well.
But for snipplets or small routines here in the forum I think we
should not be so picky.
As you mentioned If I realy would develop a new (and deffenitly the best) sorting algo. I think I would not release the code before
I have the proper copyright on it.
Interesting is actualy the point you mentioned that MS has allready
testes most thinks - therfore the copyright should actually with them. So if we go this rouad further actually everey peace of SW
written with there development tools are belonging to them????
Originally posted by Bongo So if we go this rouad further actually everey peace of SW
written with there development tools are belonging to them????
I would not go that far. But if you write a trivial routine that just calls a MS API, it's hardly worth trying to copyright it. The main benefit of the code is to execute the API, and that's all MS code, not yours - so your copyright is trivial.
A lawyer friend of mine has just read my earlier posting and says I'm not quite right. In a trivial copyright case, the court may find that you DO technically own the copyright on the code, but they will only give you small damages (maybe one penny) to punish you for wasting everybody's time, even though you are technically in the right.
Brian
(Fighting with the RightToLeft bugs in VS 2005)
In a trivial copyright case, the court may find that you DO technically own the copyright on the code, but they will only give you small damages (maybe one penny) to punish you for wasting everybody's time, even though you are technically in the right.
I like this scenario.
ok in the end of the day most of my work is owned by my clients (contracter) and the few Apps I wrote are so specific so there are not on the market for sell.
ok in the end of the day most of my work is owned by my clients (contracter) and the few Apps I wrote are so specific so there are not on the market for sell.
What can I say? Life's a bummer.
Better knock it off with this discussion or we will be in trouble for thread degeneration.
Brian
(Fighting with the RightToLeft bugs in VS 2005)
I bet u need a fusion powered shuttle to reach my place...
Posts
963
Let's not tied by all these copyright stuffs.
Use it freely. What's more this is a tips thread.
We came here to learn new stuffs.
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
I like the idea of letting members maintain the FAQ, but I would have to trust the moderators explicitly before I let them fark around on me web site
If anyone is willing to be a guinea pig -- erm, volunteer -- for the moderating position, just speak up.
I know you kicked the idea around earlier in this thread, but if you are serious about moderating the FAQ, please PM or email me using the coooool little buttons below this post.
There are no perks for moderating the FAQ, except you might get a little fame and glory by having your name on the Moderators list. No cars, no cash, no women, nothing -- those are all for me (j/k)
Also someone asked earlier how much it costs to register a copyright. Technically, $25 US per entry. Thats per entry tho -- if you want to copy code AND interface, you have to pay for 2 entries (last time I checked.) However, if you copyright 30 different windows for your interface, its only one entry as long as your screeen shots are all together in the package.
Of course, you also have to pay for shipping/postage, for the CDs/floppies that your copyrighted material is on (so they can test it out and never send it back) and all that good stuff. But its worth it -- for $200 at the MOST you can have the full legal rights to sue the living crap out of anyone that violates your copyright
Anyway, I am still on my @%$#@^%$#^@%$ trip so I won't be able to do anything on the site, but as soon as I get back to my beloved workstation I will get that moderation stuff going. Priviledged users will be able to:
Post news items on the site
Post items to the FAQ
other cool stuff later in life
The main problem here is that I will have to reconfigure the site to quit storing HTML and start storing the FAQ in the database. I suppose I was a bit of an idiot for not doing that at the very beginning, but oh well
Look for all these updates ... uh.... sometime. I have 2 days to do those changes (which will be busy as heck) and then ANOTHER trip, this time longer. Crap. Hopefully I will have more free time on the next one...
Better go before my timesheet starts looking suspicious
Originally posted by agent 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)
Agreed, but the IIf statement is 3 times slower! Not recommended if you require your program to be as fast as possible. It's also the same as:
VB Code:
Select Case a
Case "Hello"
b = "Hi!"
Case Else
b = "Bye"
End Select
But again, this is slower than the If Then command.
Here's a bench test program I wrote for Vb to work out which commands are the fastest...You will have to replace the Connection string for ADO if you want to bench test it
I appologies for the programming code, I was very hungover, tired and had someone pestering me while I wrote it, so yes I know, it's bad, but it still gives you an idea of speeds.
Last edited by Wokawidget; Feb 18th, 2002 at 11:15 AM.
Originally posted by mlewis ROFL this thread got WAY off topic
Back to the FAQ. (gee what a [corny] rhyme! wow!)
I like the idea of letting members maintain the FAQ, but I would have to trust the moderators explicitly before I let them fark around on me web site
If anyone is willing to be a guinea pig -- erm, volunteer -- for the moderating position, just speak up.
I know you kicked the idea around earlier in this thread, but if you are serious about moderating the FAQ, please PM or email me using the coooool little buttons below this post.
There are no perks for moderating the FAQ, except you might get a little fame and glory by having your name on the Moderators list. No cars, no cash, no women, nothing -- those are all for me (j/k)
Also someone asked earlier how much it costs to register a copyright. Technically, $25 US per entry. Thats per entry tho -- if you want to copy code AND interface, you have to pay for 2 entries (last time I checked.) However, if you copyright 30 different windows for your interface, its only one entry as long as your screeen shots are all together in the package.
Of course, you also have to pay for shipping/postage, for the CDs/floppies that your copyrighted material is on (so they can test it out and never send it back) and all that good stuff. But its worth it -- for $200 at the MOST you can have the full legal rights to sue the living crap out of anyone that violates your copyright
Anyway, I am still on my @%$#@^%$#^@%$ trip so I won't be able to do anything on the site, but as soon as I get back to my beloved workstation I will get that moderation stuff going. Priviledged users will be able to:
Post news items on the site
Post items to the FAQ
other cool stuff later in life
The main problem here is that I will have to reconfigure the site to quit storing HTML and start storing the FAQ in the database. I suppose I was a bit of an idiot for not doing that at the very beginning, but oh well
Look for all these updates ... uh.... sometime. I have 2 days to do those changes (which will be busy as heck) and then ANOTHER trip, this time longer. Crap. Hopefully I will have more free time on the next one...
Better go before my timesheet starts looking suspicious
Yeah ok I be a guinea pig for your site. Thanx for the info on the copright rights.
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
I bet u need a fusion powered shuttle to reach my place...
Posts
963
I would like to share my vb's source codes gathered from
everywhere - vbworld,PSC,... with others
It's categorized. And every code is seperated by 4 lines
And every code has a remark on top to tell what it does
Later on I'll post source on DirectX7 and DirectX8...
Hope it helps.
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
I bet u need a fusion powered shuttle to reach my place...
Posts
963
Nope! I actually dont use .NET and wont forever!(Er...Perhaps
I may have exception later when XP is really popular and when
I get new PC:P120Mhz cant use XP!
The VB tips I posted does has lots of advance cool tips!
If nobody d/l it it's fine, I'll delete the post rightaway!
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
Originally posted by jian2587 Nope! I actually dont use .NET and wont forever!(Er...Perhaps
I may have exception later when XP is really popular and when
I get new PC:P120Mhz cant use XP!
The VB tips I posted does has lots of advance cool tips!
If nobody d/l it it's fine, I'll delete the post rightaway!
Hey, don't take it too seriously. I meant the whole thread, not just your last post.
I'm just trying to get more people interested in .net.
I agree that VB6 wil be around for a long time, because of hardware limitations if nothing else. But .net WILL take over at some point (how many people are still using vb4?) and we should all start getting ready as soon as we can.
Also a lot of VB6 tips also work in .net with a few small changes.
Brian
(Fighting with the RightToLeft bugs in VS 2005)
I bet u need a fusion powered shuttle to reach my place...
Posts
963
Same to you too, pls dont take so seriously on my previous
post. I just put a couplar of !...
I'll stick to VB6. Unless .NET is really popular.
Hey,BTW, I dont know why everybody hates Microsoft,
and yet use their products, it looks like everybody
desperated...Me too, I use their products, just because:
1.Most popular PC games platform
2.Most popular software development target platform
3.Most users use.
4.Get it for A few dollars(pirated) :just kidding
5.Most familiar
6.Most unstable OS ever used(I like the BSOD and illegal
operation ,I've chance to hit my CPU like a mad cow
7.Compatibilty with others
(Or is it others try to compatible with it?!!)
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
This might sound amateurish,but i'm writing it anyway.
To set the font and font size of all controls on a form to values other then the default values, change the font and font size of the form itself(instead of changing it for every control). Any control placed on the form now will have the form's font and font size
Smoking Kills Slowly!!!!!!!!...........So who's in HURRY????????
Originally posted by yak77 This might sound amateurish,but i'm writing it anyway.
To set the font and font size of all controls on a form to values other then the default values, change the font and font size of the form itself(instead of changing it for every control). Any control placed on the form now will have the form's font and font size
cool
Confucious say, "Man standing naked in biscuit barrel not necessarily ****ing crackers."
Originally posted by mlewis Actually that's a very useful trick that most programmer's aren't aware of. It will make a good addition to the FAQ
I found it out by playing with the controls and forms one day.
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
Nice tips, but tips can suits everyone more if all this tips are copied into a file .doc or .txt form in zip format and re post it. No one have time to go through all 14 pages. With Index is better one.
I usually copy some tips or solution to a particular problems into a word file and refer it later if I encounter that problems.
Originally posted by srvb Nice tips, but tips can suits everyone more if all this tips are copied into a file .doc or .txt form in zip format and re post it. No one have time to go through all 14 pages. With Index is better one.
I usually copy some tips or solution to a particular problems into a word file and refer it later if I encounter that problems.
Any suggestions guys / gals.
You can't copy the FAQ because you don't have Mr. Lewis promission to do so.
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
I bet u need a fusion powered shuttle to reach my place...
Posts
963
How's my vb_src.zip?
The files are in .diz file.
Just use the folder options to make it be able to displayed
using notepad.
Are my tips good?
Should I make a database program and put all these nice tips
into it? So searching for it would be easy.
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
Well, there are several uses for getting a random file. Like someone mentioned above, if you want to load a random picture file from a given folder, that code is highly useful. It also works well for other cases where you need to randomly select something that for some reason needs to be stored in a separate file.
Regarding the FAQ: the code in the FAQ is provided free of charge. Users may copy, use, modify, and/or redistribute the code portion of the FAQ. All other materials are technically mine, and I wouldn't appreciate people copying things that I wrote (e.g. tutorials on file I/O).
I will be adding a copyright notice to the FAQ soon, to alert people to this fact.
Here is a Sub i wrote that will Fade the Background of any control with an hDC property. Such as Forms, PictureBoxes etc... Will fade either Vertically or horizontaly using any 2 RGB colors you specify. Paste all this into a Module.
VB Code:
Public Declare Function GradientFillRect Lib "msimg32" Alias "GradientFill" (ByVal hdc As Long, pVertex As TRIVERTEX, ByVal dwNumVertex As Long, pMesh As GRADIENT_RECT, ByVal dwNumMesh As Long, ByVal dwMode As Long) As Long
Public Declare Function SetRect Lib "user32" (lpRect As RECT, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Public Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As Long
Public Type TRIVERTEX
X As Long
Y As Long
R As Integer
G As Integer
B As Integer
Alpha As Integer
End Type
Type LOGBRUSH
lbStyle As Long
lbColor As Long
lbHatch As Long
End Type
Public Type GRADIENT_RECT
UpperLeft As Long
LowerRight As Long '
End Type
Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Public Type RGB
R As Integer
G As Integer
B As Integer
End Type
Public Const GRADIENT_FILL_RECT_H As Long = &H0
Public Const GRADIENT_FILL_RECT_V As Long = &H1
Dim ItemRct As RECT
Public Sub LongToRGB(ByVal Color As Long, Optional ByRef red As Long, Optional ByRef green As Long, Optional ByRef blue As Long)
red = Color And &HFF&
green = (Color And &HFF00&) / &H100
blue = (Color And &HFF0000) / &H10000
End Sub
Public Sub DrawBackGrad(ByVal hdc As Long, R As RECT, _
Color1 As RGB, _
Color2 As RGB, _
Direction As Long)
Dim V(1) As TRIVERTEX
Dim GRct As GRADIENT_RECT
With V(0)
.X = R.Left
.Y = R.Top
.R = Color1.R
.G = Color1.G
.B = Color1.B
.Alpha = 0
End With
With V(1)
.X = R.Right
.Y = R.Bottom
.R = Color2.R
.G = Color2.G
.B = Color2.B
.Alpha = 0
End With
GRct.UpperLeft = 0
GRct.LowerRight = 1
GradientFillRect hdc, V(0), 2, GRct, 1, Direction
End Sub
Sub FadeBackGround(obj As Object, Color1 As Long, Color2 As Long, Vertical As Boolean)
Josh
Get these: MozillaOperaOpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
I bet u need a fusion powered shuttle to reach my place...
Posts
963
Well, the gradient fill seems to be complicated, how about this?
Put a picturebox in a form, set it's Autoredraw property to True
VB Code:
Private Sub Picture1_Click()
Dim FR, FG, FB, LR, LG, LB
Dim SR, SG, SB
'Any value between 0 and 255 will do for these variables
'They determine ur first color and last color
FR = 255: FG = 0: FB = 255
LR = 0: LG = 255: LB = 0
With Picture1
SR = (LR - FR) / .Width
SG = (LG - FG) / .Width
SB = (LB - FB) / .Width
For X = 0 To .Width
.Line (X,0) - (X, .Height), RGB(FR, FG, FB)
FR = FR + SR: FG = FG + SG: FB = FB + SB
Next
End With
End Sub
Now, this would be too slow, How about this?
This is a few thousand times faster...
VB Code:
Prinvate Sub Picture1_Click()
Dim FR, FG, FB, LR, LG, LB, PCol, Col, PX
'Any value between 0 and 255 will do for these variables
'They determine ur first color and last color
FR = 255: FG = 0: FB = 255
LR = 0: LG = 255: LB = 0
PCol = RGB(FR, FG, FB): PX = 0
With Picture1
SR = (LR - FR) / .Width
SG = (LG - FG) / .Width
SB = (LB - FB) / .Width
Do Until X >= .Width
Col = RGB(FR, FG, FB)
If PCol <> Col Then
.Line (PX, 0) - (X, .Height), PCol, BF
PCol = Col
PX = X
End If
X = X + 1
FR = FR + SR: FG = FG + SG: FB = FB + SB
Loop
End With
End Sub
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
The Gradient fill code I provided is not complicated at all. To use anyway. All you have to do is paste the code into a .bas and then call the Function.
It is quite a bit longer then your code but then again it looks ALOT smoother. It doesnt have those bars of color... like you can see lines everytime the colors changes a little. My Code gives a very smooth fade with not blockyness or lines.
Also my code provides both horizontal and vertical fading.
So it is a bit more code but well worth it imo.
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.
Here's some code that will print the Form. Since it uses PaintPicture, it's more flexible than the PrintForm method.
VB Code:
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long