Recent changes Random page
GAMING
Technology
 
Gaming
Entertainment
Science Fiction
Biggest wikis
Hobbies
Music
See more...

Talk:Main Page

From Visual Basic Wiki

Jump to: navigation, search

Contents

[edit] Open Source??

As a Visual Basic programmer for more than 15 years I am fairly certain that Microsoft never released their Visual Basic product as Open Source. I originally saw the reference to Virtual Basic on the main page and became curious. When I arrived and found reference to Microsoft Visual Basic I felt I had to ask for some verification that Visual Basic is Open Source since I have never found any evidence to support that and have been active in the VB community for many years. If you can steer me to a web page that offers VB Open Source I will gladly have a look. I think perhaps this reference is in the wrong category and should be moved to a more suitable category.

Where does it say VB is open source? Doomguy0505 06:14, 23 March 2007 (UTC)

Possibly you got this intention wrong, as the purpose of the classification "Open Source" in this context might be that VB script code published on this Wikia and scripted by the Wikia contributors can and will be classified as Open Source?
Just my 2c (€ cents) --IrasCignavojo 14:23, 10 April 2007 (UTC)

Guys, only one question: I see future in this wiki, but, speak all data relative to Microsoft's Visual Basic is only for Microsoft Users. I use Linux, and I use Gambas, and Gambas isn't mentioned in this wiki (even being the bigger Open Source Visual Basic desktop enviroment)... 90% of the Visual Basic data is fully compatible with Gambas, but what with uncompatible code? And VisualBasic.NET is another tale, they has changed part of the main code... Well, What do you expect, exactly, with this wiki? --DragonTrainer - Flamewars aquí, por favor. 15:26, 13 April 2007 (UTC)

Is there a link to this Gambas you speak of? --Doomguy0505 05:00, 21 April 2007 (UTC)

Here is Wikipedia info about Gambas: Gambas in Wikipedia and here is the main official site of Gambas: Official Gambas Site --DragonTrainer - Flamewars aquí, por favor. 22:41, 22 April 2007 (UTC)

Other "code repositories" often have a some small diagram showing which VB versions something is compatible with. Just use a template to simplify that. By the way, how open is this wiki to new stuff and such? Say I had a SHA-1 implementation, or a Tengwar Unicode-to-Dan-Smith-encoding converter? Also how does code contribution work here? Prefix all lines with a space and put it in a normal article, or upload file? Both? If so, is there an existing template to use? 82.139.85.237 11:23, 1 May 2007 (UTC)

You use the <pre> tag for code, and IMO, VB.NET is crap, the Script control doesn't work properly (or any COM components) --Doomguy0505 12:21, 1 May 2007 (UTC)
I'm not really into .NET myself. Still, it might be a nice courtesy to .NET folks to show if code is compatible or not. I've also added SHA-1.bas to Category:Code, assuming that's the appropriate location. Perhaps if this wiki gains some impetus I'll register and contribute some more; I'm also looking forward to the work of other contributors. 82.139.85.60 19:06, 5 May 2007 (UTC)

Since I have recently switched to Linux, I may be having a look into Gambas --Doomguy0505 10:40, 8 May 2007 (UTC)

Please inform us of your experience. Also please try to run VB using Wine - I'd be very interested in the results. If it mostly works, that's one less reason to stick with Windows. 82.139.85.253 15:28, 8 May 2007 (UTC)
I'll do it right now, not only for you; I'll do it for all interested people. Running Visual Basic under Ubuntu Linux. The test will not be complete today - Each day I'll making something.--DragonTrainer - Flamewars aquí, por favor. 13:06, 13 June 2007 (UTC)
Ah, thanks a lot! 82.139.85.229 14:05, 21 June 2007 (UTC)

[edit] What Visual Basic versions does this site covers?

From the little that is here, it looks like most of the site supports Visual Basic 6.0. Do we want to have comparisons between all the different versions of visual basic or do we just want to support two or three versions? What versions are people interested in supporting? There is nothing on the site that talks about this. Personally I don't care what versions we support here, But I think we should at least cover versions 3, 6 and the latest .NET version. Dparvin 17:41, 15 June 2007 (UTC)

When I add code, it will have been tested using VB 4.0. Note that if you want to contribute a self-contained module of code, there's a template that makes it easy to track compatibility. Note however, that code written for VB classic will generally not be compatible with VB.NET, and vice versa, nor is it usually possible to do something about that. 82.139.85.29 15:41, 17 June 2007 (UTC)

[edit] Can someone add this category somewhere useful?

Someone started Category:Questions, which is nice, but it's not linked anywhere, so few people find it. 82.139.85.133 05:16, 30 June 2007 (UTC)

Thanks, Doomguy0505! 82.139.85.142 03:43, 1 July 2007 (UTC)

[edit] Maximum number of files on project load

Hi guys! In the documentation for Visual Basic 4.0 it says: "You can only open 384 files on project load." I thought that was a bit of strange limitation to put on a development tool, so I tested it by creating a project with 512 class modules. No problem, not even noticable delays. My best guess is that this is a typo and it originally read 16384 (= 2 ^ 14). Which raises another question... Why this number? Numbers like 2 ^ 15 - 1 or 2 ^ 16 - 1 could have been expected, but 2 ^ 14? And does this still apply in the 32-bit era? In other words, does this only apply to the 16-bit version, or to both the 16-bit and the 32-bit version? Anyone who has tried to do this with Visual Basic 4.0 or any other version and got strange results? 82.139.85.222 11:07, 24 August 2007 (UTC)

32-bit would probably be 1073741823, 2147483647 or 4294967295, not that you'd have enough memory to load it... --Doomguy0505 13:08, 18 October 2007 (UTC)

[edit] Scale method limits

Hey guys, I've discovered something interesting about the Scale method. The difference between the maximum coordinate value and the minimum may not exceed 15000 times the number of pixels of the clientarea's width or height, sometimes plus one.

For example, a maximized window on a screen that's 1280 pixels wide

Scale (0, 0)-(19200000, 1)

still works, as do

Scale (0, 0)-(19200001, 1)
Scale (1, 0)-(19200002, 1)
Scale (0.5, 0)-(19200000.5, 1)

but

Scale (0, 0)-(19200002, 1)
Scale (0.5, 0)-(19200001.5, 1)

fail with error number 5 (Invalid procedure call).

This was on VB4. Do other VB versions have the same limit? Does anyone know of any technical reason underlying this issue? 82.139.85.92 16:29, 30 October 2007 (UTC)

[edit] Something weird happens when you return objects from methods with ParamArray's

First a bit of background to provide some context. When you return an object from a function or method, either through its return value or a ByRef argument, its reference count gets increased. When you throw an object reference away, its reference count gets decreased.

The semantics of calling a Visual Basic function, or function-like method are such that if you call them as a sub, or a sub-like method, the return value gets discarded. So you'd expect the following calls to always behave the same:

ReturnObject                      '(a)

Set Tmp = ReturnObject            '(b)
Set Tmp = Nothing

SomeObject.ReturnObject           '(c)

Set Tmp = SomeObject.ReturnObject '(d)
Set Tmp = Nothing

However, if you call a method which has a ParamArray, using syntax (d) will behave like expected, while syntax (c) forgets to decrease the reference count. It only happens when calling a method, not when calling a function in a standard module. It doesn't matter if the object is explicitly specified or not; With-blocks and local calls behave the same, which is to be expected. It only happens when the method has a ParamArray; Optional arguments, arrays, variants containing arrays, or a total absense of arguments are all okay as long as no ParamArray is present. It happens regardless of whether any arguments are actually specified on the call. It only happens with return values, not with ByRef arguments.

This happened to me on VB4; a minimal program displaying the problem:

Form1
Option Explicit

Sub Main()
Dim O As New Class1
O.ReturnObject
End Sub
Class1
Option Explicit

Private Sub Class_Initialize()
Debug.Print "INIT"
End Sub

Private Sub Class_Terminate()
Debug.Print "TERM"
End Sub

Function ReturnObject(ParamArray Arguments()) As Class1
Set ReturnObject = New Class1
End Function

Note that Visual Basic keeps a list of all allocated objects that have not been destroyed yet. If your program stops, for whatever reason, all those objects are destroyed. (If the reason was that the "stop" button has been clicked, the Terminate event won't fire, even though the object does get destroyed.) This means that if you step through the example above, you will see TERM appear in the debug window eventually. If you wish, you can extend the program to demonstrate that the object indeed gets destroyed by Visual Basic's memory leak fixer and not the way it should be.

No clue what causes this. 82.139.85.146 18:06, 12 December 2007 (UTC)

[edit] Paintpicture annoyance

I just discovered the hard way that Visual Basic's PaintPicture method calls StretchBlt instead of IPicture::Render. So much for clean object oriented design, code reuse and the principle that the picture probably knows better how to draw itself than you do. Thought I'd share. Anyway, considering the last few posts, perhaps we need a "Bugs and annoyances" page. 82.139.85.23 23:41, 18 February 2008 (UTC)

What would perhaps help this wiki to gain a bit more traction would be a way to release code under other licenses than the GFDL. Currently some of the code is licensed under a different license, but perhaps the GFDL applies to that code too? I don't know, but the GFDL doesn't offer the kind of protection that the GPL offers, so thinking it could apply might be holding people back. Perhaps there is a VB code repository that uses the GPL that we can link to? 82.139.85.187 19:16, 8 May 2008 (UTC)

.