Author Topic: Database.ocx  (Read 12804 times)

0 Members and 1 Guest are viewing this topic.

Offline mikeownage

  • Newbie
  • *
  • Posts: 7
  • I'm new here!
    • View Profile
Database.ocx
« on: September 30, 2007, 05:49:04 pm »
it's a battle.net database control. loads the database, saves the database, checks for basic commands and such.

http://www.clangdn.com/mike/dbOCX.rar

i will still add some more things to it! but i guess this is the first version Smiley

any ideas on how to improve what i have done so far?

 tested the code (in a simulated environment).

I am not asking for you to use it or if you think it's a good idea. I am asking for ways to make this "IDEA" better. not if it's valid to your stand points. why do i write a control to do this? because i don't ever want to have to write anything related to it again in the future for any of my projects. I released it here so other people could use it as well if they wished.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Database.ocx
« Reply #1 on: October 01, 2007, 12:42:13 am »
why do i write a control to do this? because i don't ever want to have to write anything related to it again in the future for any of my projects.

For the record, that's got to be one of the most horrible reasons. I don't mean to insult you personally, but making OCX requirements for that kind of functionality is poor programming. You've got part of the idea right in making your code reusable, but writing a Class to use the code and copy+pasting it to each of your projects is a better idea, thus keeping the code internal, instead of in a dependency. I'm not sure how it would work for efficiency, but I can only assume it'd improve.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: Database.ocx
« Reply #2 on: October 01, 2007, 03:06:46 am »
I already said this on the VL forums, but I might as well bring it up here as well: that argument doesn't hold much ground, Joe. I'm not saying it's a great approach, but depending on an OCX is roughly as boggy-downy as depending on a DLL (because OCX files are special cases of DLL files); it ultimately boils down to assembly calling other assembly, and there's nothing inherently inefficient about that. Sure, it degrades the optimizer's ability to do things like inline short functions, but come on, we're talking about VB here. You're better off spending your time finding and optimizing your O(n-squared) algorithms.

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline mikeownage

  • Newbie
  • *
  • Posts: 7
  • I'm new here!
    • View Profile
Re: Database.ocx
« Reply #3 on: October 01, 2007, 06:32:27 am »
Wow, do people have a problem with staying on topic? I asked for ideas to improve the code. not if the concept of the code was to your liking. the only one who gave any tips on 3 different forums was camel. and i thank you :)
« Last Edit: October 01, 2007, 06:35:33 am by mikeownage »

Offline mikeownage

  • Newbie
  • *
  • Posts: 7
  • I'm new here!
    • View Profile
Re: Database.ocx
« Reply #4 on: October 01, 2007, 06:36:43 am »
umm, crap stupid double post! well added basic winamp control.
« Last Edit: October 01, 2007, 08:46:04 am by mikeownage »

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Database.ocx
« Reply #5 on: October 01, 2007, 09:12:58 am »
My point, iago, (and it's already come true) is that he's going to get the same feedback here as he did at vL.

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Database.ocx
« Reply #6 on: October 01, 2007, 09:36:59 am »
My point, iago, (and it's already come true) is that he's going to get the same feedback here as he did at vL.
The vL thread turned into a bunch of crap, so I'll try to keep this one cleaner. :P

Offline warz

  • Hero Member
  • *****
  • Posts: 1134
    • View Profile
    • chyea.org
Re: Database.ocx
« Reply #7 on: October 01, 2007, 11:36:10 am »
why do i write a control to do this? because i don't ever want to have to write anything related to it again in the future for any of my projects.

For the record, that's got to be one of the most horrible reasons. I don't mean to insult you personally, but making OCX requirements for that kind of functionality is poor programming.

Sometimes you just have to wonder where, and how people learned to program. The OCX is for exactly the reason that he stated.
http://www.chyea.org/ - web based markup debugger

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Database.ocx
« Reply #8 on: October 01, 2007, 12:04:36 pm »
Wow, do people have a problem with staying on topic? I asked for ideas to improve the code. not if the concept of the code was to your liking.

I just told you how to improve your code. If you're that ignorant, I'll waste my time elsewhere.

For the record, that's got to be one of the most horrible reasons. I don't mean to insult you personally, but making OCX requirements for that kind of functionality is poor programming.

Sometimes you just have to wonder where, and how people learned to program. The OCX is for exactly the reason that he stated.

Yes, but for example, when I wrote my classes for manipulating RichTextBoxes, I could have exported them into a C# DLL. However, I elected to remove the extra DLL dependency and put them right inside my program, where I could simply import that class itself into a new program. As for an OCX, you have an extra dependency floating around.
« Last Edit: October 01, 2007, 07:16:39 pm by Joe[x86] »
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: Database.ocx
« Reply #9 on: October 01, 2007, 02:42:41 pm »
@Joe: You're not wrong, but consider this: Every time you use a built-in control in VB, you're importing that control out of a windows DLL similarly to the way OCX controls work. Even the winsock control (which I'd go out on a limb and say that 99% of people use in favor over raw api calls) is in an OCX.

If you were writing an application suite, and a lot of your code was re-used throughout, wouldn't you want to have one place that the code was imported from? It cuts down on the number of places you have to update when you find a bug in it, and it cuts down on the disk space used to store the application suite. If you fix a bug, it means you only have to re-distribute one file instead to ten.

There are cases where the strategy is an inappropriate solution, but this is not one of them!

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: Database.ocx
« Reply #10 on: October 01, 2007, 09:47:58 pm »
This needs to be looked at in the context to which it's being applied.
There is never a golden rule of when/where to reuse code, it's all about what you're doing in the project overall which is the deciding factor.

I think it's really great you're into code reuse, it's a nice mindset to get in. Perhaps you can invest your time into a more powerful language (you know I mean C#)
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: Database.ocx
« Reply #11 on: October 02, 2007, 01:47:29 am »
C# is cool, but I like Java because it's so portable. Its greatest benefit is what some consider it's greatest flaw. If you actually benchmark it, you might be surprised how slow it isn't.

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: Database.ocx
« Reply #12 on: October 02, 2007, 05:07:46 am »
C# is cool, but I like Java because it's so portable. Its greatest benefit is what some consider it's greatest flaw. If you actually benchmark it, you might be surprised how slow it isn't.

C# and the .NET Framework are just as portable as Java, considering that both of the specifications have been released (and C# is an EMCA Standard)

Mono reimplements C# and the .NET Framework pretty well.
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: Database.ocx
« Reply #13 on: October 02, 2007, 05:13:19 am »
Warrior: my battle.net bot works flawlessly on my phone. Don't feed me that crap.

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: Database.ocx
« Reply #14 on: October 02, 2007, 05:17:07 am »
Warrior: my battle.net bot works flawlessly on my phone. Don't feed me that crap.

And? You're mistaking the fact that something is NOT implemented with it being impossible to implement.
Ever hear of the .NET Compact Framework? Ever hear of XNA and Programming on the XBox 360? Mono? DotGnu?
Silverlight? Moonlight?

Silverlight 1.1 uses a portable .NET CLR and works on Mac, Windows, and with Moonlight it works on Linux.

How much more portability do you want?
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Database.ocx
« Reply #15 on: October 02, 2007, 07:43:42 am »
I want my toaster to be able to connect to Battle.net.

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Database.ocx
« Reply #16 on: October 02, 2007, 09:34:55 am »
Mono reimplements C# and the .NET Framework pretty well.
"pretty well" isn't good enough. Until it can implement it perfectly, it's not going to be stable enough for every day use.

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Database.ocx
« Reply #17 on: October 02, 2007, 11:04:45 am »
From what I've seen, Silverlight is crap compared to Flash. :|

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: Database.ocx
« Reply #18 on: October 02, 2007, 11:05:30 am »
How much more portability do you want?

I want it to work on my phone.

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: Database.ocx
« Reply #19 on: October 02, 2007, 07:33:01 pm »
Mono reimplements C# and the .NET Framework pretty well.
"pretty well" isn't good enough. Until it can implement it perfectly, it's not going to be stable enough for every day use.

That's not the fault of Microsoft, C# is an EMCA standard. They have the documents, it's up to them to implement it.

@Sidoh: I have not messed with Silverlight personally (Myndfyre has), but I can already tell you it's better for the Web. It's an open platform, as opposed to Flash which has yet to deliver a Linux 64 Bit player.

Silverlight1.1 also is way more powerful than Flash could ever dream of becoming, due to it being powered by the .NET Framework.


@Camel:

What part of ".NET Compact Framework" escapes you? It is certainly possible to develop .NET Applications on Windows Mobile phones, and it has been done with great success.

Microsoft has even released portions of the .NET Framework (All you need to get started on the road to implementation when used in conjunction with C# EMCA Standard) downloadable under a Microsoft Shared Source License.

You know, just so we're clear it's the lack of initiative by third parties and not the fault of Microsoft.
Honestly, Java was religiously closed source until recently what's with the change of heart and opinion about them all of a sudden? .NET has been portable for the beginning.

It's a flawed argument, if you're going to blame .NET/C# for Portability issues, they all apply to Java as well.
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Database.ocx
« Reply #20 on: October 02, 2007, 07:53:35 pm »
What part of ".NET Compact Framework" escapes you? It is certainly possible to develop .NET Applications on Windows Mobile phones, and it has been done with great success.
So if you take code you've already written, and re-write parts of it, it'll work fine. That's no good for the "write once run everywhere" style that Java tries to go for.

You know, just so we're clear it's the lack of initiative by third parties and not the fault of Microsoft.
Honestly, Java was religiously closed source until recently what's with the change of heart and opinion about them all of a sudden? .NET has been portable for the beginning.

It's a flawed argument, if you're going to blame .NET/C# for Portability issues, they all apply to Java as well.
Speaking of flawed arguments, you say that Java was closed source and .NET was portable. Why compare apples to oranges?

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: Database.ocx
« Reply #21 on: October 02, 2007, 08:20:24 pm »
What part of ".NET Compact Framework" escapes you? It is certainly possible to develop .NET Applications on Windows Mobile phones, and it has been done with great success.
So if you take code you've already written, and re-write parts of it, it'll work fine. That's no good for the "write once run everywhere" style that Java tries to go for.

I'm not sure of the differences between the two, but I don't think they're that ground breaking. Obviously some unneeded features (full extent of Windows.Forms) were excluded from the Compact Framework but all of the language is still there.

Speaking of flawed arguments, you say that Java was closed source and .NET was portable. Why compare apples to oranges?

I'm questioning that myself, why would Java be called portable? It's only availible on other platforms through extensive reverse engineering (except maybe Cellphones). If it were truely portable, Hobbyist OSes (SkyOS, Haiku, etc.) would probably already have implemented. On the flip side, I see a complete Mono Implementation (With System.Windows.Forms) on SkyOS.

What gives?
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Database.ocx
« Reply #22 on: October 02, 2007, 08:26:52 pm »
What part of ".NET Compact Framework" escapes you? It is certainly possible to develop .NET Applications on Windows Mobile phones, and it has been done with great success.
So if you take code you've already written, and re-write parts of it, it'll work fine. That's no good for the "write once run everywhere" style that Java tries to go for.

I'm not sure of the differences between the two, but I don't think they're that ground breaking. Obviously some unneeded features (full extent of Windows.Forms) were excluded from the Compact Framework but all of the language is still there.

Speaking of flawed arguments, you say that Java was closed source and .NET was portable. Why compare apples to oranges?

I'm questioning that myself, why would Java be called portable? It's only availible on other platforms through extensive reverse engineering (except maybe Cellphones). If it were truely portable, Hobbyist OSes (SkyOS, Haiku, etc.) would probably already have implemented. On the flip side, I see a complete Mono Implementation (With System.Windows.Forms) on SkyOS.

What gives?
There is an opensource Java environment available, although I forget what its' called (cafe? kafe? something like that..), which I'm sure you could use on those operating systems.

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: Database.ocx
« Reply #23 on: October 02, 2007, 08:29:01 pm »
What part of ".NET Compact Framework" escapes you? It is certainly possible to develop .NET Applications on Windows Mobile phones, and it has been done with great success.
So if you take code you've already written, and re-write parts of it, it'll work fine. That's no good for the "write once run everywhere" style that Java tries to go for.

I'm not sure of the differences between the two, but I don't think they're that ground breaking. Obviously some unneeded features (full extent of Windows.Forms) were excluded from the Compact Framework but all of the language is still there.

Speaking of flawed arguments, you say that Java was closed source and .NET was portable. Why compare apples to oranges?

I'm questioning that myself, why would Java be called portable? It's only availible on other platforms through extensive reverse engineering (except maybe Cellphones). If it were truely portable, Hobbyist OSes (SkyOS, Haiku, etc.) would probably already have implemented. On the flip side, I see a complete Mono Implementation (With System.Windows.Forms) on SkyOS.

What gives?
There is an opensource Java environment available, although I forget what its' called (cafe? kafe? something like that..), which I'm sure you could use on those operating systems.

Yep, they considered porting it. It was however, an incomplete implementation.
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: Database.ocx
« Reply #24 on: October 02, 2007, 09:47:36 pm »
What part of ".NET Compact Framework" escapes you? It is certainly possible to develop .NET Applications on Windows Mobile phones, and it has been done with great success.

Java runs in WinCE as well. It's more portableed than .NET, period.

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: Database.ocx
« Reply #25 on: October 02, 2007, 10:11:36 pm »
What part of ".NET Compact Framework" escapes you? It is certainly possible to develop .NET Applications on Windows Mobile phones, and it has been done with great success.

Java runs in WinCE as well. It's more portableed than .NET, period.

That was never the argument, now you're changing it. The argument was if .NET was portable, which you were quick to dismiss.

It's a fact that SINCE they both carry a runtime, they are portable in regards of which platform implements the runtime. The "run anywhere" is a deceptive term used to promote the pseudo-portability of both platforms.

The real question to be asking is: Which specification is more accessible? This should be changing with the recent GPLing of Java however.
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Database.ocx
« Reply #26 on: October 03, 2007, 01:29:50 am »
I'm waiting for the day we can debate this out without getting personal.

Apparently, it isn't here yet.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: Database.ocx
« Reply #27 on: October 03, 2007, 06:01:02 am »
I'm waiting for the day we can debate this out without getting personal.

Apparently, it isn't here yet.

I don't think it's gotten anything out of the norm, I certainly wouldn't insult someone like Camel over something so stupid.
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Database.ocx
« Reply #28 on: October 03, 2007, 11:55:25 am »
I'm waiting for the day we can debate this out without getting personal.

Apparently, it isn't here yet.

Can you point out which post was personal?  I don't think anyone crossed a line here...

Offline mikeownage

  • Newbie
  • *
  • Posts: 7
  • I'm new here!
    • View Profile
Re: Database.ocx
« Reply #29 on: October 03, 2007, 01:46:09 pm »
How did we go from my silly little database.ocx to whats more portable? atleast no one has gotten around to insulting my lame usage of the list box :) or the fact that it doesn't offer to much yet. as for any personal insults i don't see any.

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Database.ocx
« Reply #30 on: October 03, 2007, 01:50:33 pm »
How did we go from my silly little database.ocx to whats more portable? atleast no one has gotten around to insulting my lame usage of the list box :) or the fact that it doesn't offer to much yet. as for any personal insults i don't see any.

We tend to go off topic.  Staying on topic is pretty boring! :)

Offline Chavo

  • x86
  • Hero Member
  • *****
  • Posts: 2219
  • no u
    • View Profile
    • Chavoland
Re: Database.ocx
« Reply #31 on: October 03, 2007, 03:45:41 pm »
Fucking list boxer.

Offline Hdx

  • The Hdx!
  • Full Member
  • ***
  • Posts: 311
  • <3 Java/Cpp/VB/QB
    • View Profile
Re: Database.ocx
« Reply #32 on: October 03, 2007, 06:01:03 pm »
I want my toaster to be able to connect to Battle.net.
http://www.theregister.co.uk/2001/06/04/bread_as_a_display_device/
Wouldnt be to hard to get a java bot running on a toaster ;)
~Hdx
http://img140.exs.cx/img140/6720/hdxnew6lb.gif
09/08/05 - Clan SBs @ USEast
 [19:59:04.000] <DeadHelp> We don't like customers.
 [19:59:05.922] <DeadHelp> They're assholes
 [19:59:08.094] <DeadHelp> And they're never right.