|
Because there's a FAR better replacement for it and the VB6 runtimes days are numbered.
Also, notice in VS2010, you can no longer open a VB6 project and convert it. MS removed the Conversion Wizard. Nothing says "Get the 'F' off that thing" louder than that.
Come on, it's been 10 years since the release of .NET. There's really no excuse to start new development on VB6.
|
|
|
|
|
Thank you all for irrelevant reply, but it is good that i get my feet on and try to walk ahead. I have installed a VB2005, knowing that it is a good start for one who emancipate from VB6. The problem is that, real the controls that i have been using in VB 6 some of them are not found in vb2005, or may be there are replacement of them by name. for instance Inet control, i never found it in vb2005.
Then i decide to use VB 6 for new project because i found it still in some forums like this one.
anyone with some crucial project sample for VB2005???
|
|
|
|
|
You can't find a control for it because that functionality was put into classes (where it should have been in the first place) in and under the System.Net namespace.
There are examples all over the web. All you have to do is Google for what you're looking for, like "VB.NET upload a file FTP".
|
|
|
|
|
VB6 is only here because people keep asking questions about it.
I for one never answer them because that only promotes the continued use of it.
|
|
|
|
|
|
O common Dave VB6 isn't that bad.
I just finished converting a VB3 program, thank god I can throw away the old code, was a nightmare to maintain
(And yes I converted it to .NET :P )
|
|
|
|
|
Did you check where the "myfolder" was being created? From the looks of this code, it is created in your root.
On other matters, there are tons of VB.Net sample code available - just google.
|
|
|
|
|
Hello there! is there any one can help me for the code that can transfer a folder using inet from my local machine to ftp/server folder?
|
|
|
|
|
You need to use the FtpWebRequest Class[^]. Here[^] is a good example (although it is in C#, I am sure you could translate it).
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
Thank you Eric. Actually i have been working with vb 6.0. i would like to get the codes that can run successifully, using Internet transfer control.
|
|
|
|
|
Upload File FTP - VB Example[^]
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
Hi,
I have created a small test program for using a non installed font.
There are only 2 control on the form a right docked printpreviewcontrol and a textbox.
When I use it on the form it prints fine, however on the printpreview its a standaard font and not the ttf file.
What do I wrong??
Jan
Private Sub PrintDocument1_PrintPage(sender As System.Object, e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
sPrint(e.Graphics)
End Sub
Private Sub fFontTest_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
TextBox1.Text = "abcdefghijklmnopqrstuvwxyz" & vbCrLf & "abcdefghijklmnopqrstuvwxyz".ToUpper & vbCrLf & "0123456789"
End Sub
Private Sub TextBox1_TextChanged(sender As System.Object, e As System.EventArgs) Handles TextBox1.TextChanged
PrintPreviewControl1.InvalidatePreview()
End Sub
Private Sub fFontTest_Paint(sender As Object, e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
sPrint(e.Graphics)
End Sub
Sub sPrint(g As Graphics)
Dim pfc As New Drawing.Text.PrivateFontCollection
pfc.AddFontFile(Application.StartupPath & "\Alpha.ttf")
Dim ff As FontFamily = pfc.Families(0)
Dim f As Font = New Font(ff, 20)
g.DrawString(TextBox1.Text, f, Brushes.Black, 0, 250)
g.DrawString(f.Name, Me.Font, Brushes.Black, 0, 450)
End Sub
|
|
|
|
|
I have a strange problem. We are using a program quite extensively in the company which is still in VB6 - more than 200 installations. All worked well until I updated my computer. VB6 and the program runs fine on my new computer, and the exe runs fine on Windows 7 but fails in XP. I have been able to debug it and the error is on the first FileSystemObject call, which is using the Windows Scripting Runtime library (scrrun.dll). The dll is referenced in the VB project. The dll is installed and registered on all machines. I've tried copying the newer dll from W7 to the XP system32 location but it does not overwrite the older file, so I assume XP protects the dll. I've also registered the dll again on the XP and it was successfull but the program still does not run. I suspect it might be because of 64 bit not being backwards compatible with 32 bit, but this is just a wild guess, and if so I don't know how to fix it.
I will appreciate any help.
|
|
|
|
|
You cannot copy the Script 5.7 .DLL's to XP and expect them to work.
Also, if you copied the .DLL out of C:\Windows\System32 on the Win7 x64 box, you copied the 64-bit version of the .DLL, not the 32-bit version. The 32-bit files are found in C:\Windows\SysWOW64.
Instead of completely screwing up your XP machines with .DLL's copied from a Win7 box, you might just want to download and install this[^] instead. It'll be a lot safer than Frankensteining your scripting hosts on your XP boxes.
Why are you using the FileSystemObject anyway when you can do just about everything in native VB6 code??
Oh, and BTW, there will be no VB6 Runtime support in Windows 8.
|
|
|
|
|
Wot? No VB6 on the upcoming mSlate?
|
|
|
|
|
I do what I can to kill the Beast.
The vast amjority of my work is done in VB.NET. I still don't understand how people piss and moan about the lack of VB6 support when .NET has been out for 10 years now. In some places, getting rid of VB6 is like trying to kill a vampire with a rusty spork.
|
|
|
|
|
"If it ain't broke, don't fix it."
Bastard Programmer from Hell
|
|
|
|
|
I believe in fixing it before its "known break" date. If you know VB6 is gone and won't be supported on future versions of Windows, why are you continuing to write applications in it?
|
|
|
|
|
Good point, and one shouldn't.
Bastard Programmer from Hell
|
|
|
|
|
Hi everybody,
in my project I'm referencing a dll which I had to compile in C# myself (conversion wasn't possible since the referenced classes contain unsafe code). After facing funny error messages (see right below) I searched the net for hours and feel a bit unsecure if my problem has to do with any missing bits in my dll - e.g. wrong manifest entries etc.?
What I see in VB (Express 2008) is:
- the compiled dll is referenced without any errors (i.e. the framework version etc. seem to be fine)
- double-clicking it in the project explorer leads me to the object browser, where I see all the included classes with their methods etc.
- the referencing vb project seems error free, i.e. the referenced dll seems to be working properly
The funny error stays: When debugging, the code stops with the first line of the main form's designer with a "Module not found" error (unfortunately not saying which...).
My major question for now would be: Are the a.m. facts enough to be sure my c#-dll isn't responsible for that? Or: How can I make sure?
Thank you
Mick
|
|
|
|
|
I suggest you create a little C# EXE project, which also references said DLL, and mimicks the start-up of your VB.NET code.
FWIW: make sure all projects (EXE and DLL) refer to the same .NET version, you can't mix and match in general, some combinations could work (such as 3.5 and 2.0; bowever 4.0 and 2.0 would not). That is true even when using a single language.
|
|
|
|
|
This was a VERY good idea, Luc - I have to admit that sometimes I don't think of the obvious
So here's what I did and the results:
- took a given c# sample (which contained the unsafe code that I had extracted to a dll)
- deleted all these classes
- replaced them with the reference to the dll
RESULT: The C# program runs just like it's supposed to! So I figure the dll is ok, right?
Then I converted this modified project to VB.NET (using latest SharpDevelop 4.1)... No error messages regarding the conversion. But: Starting the VB project --> RESULT: The same error!
Unfortunately the compiler refuses telling me WHICH module it's missing, so I still have no clue about that. Would you know a way how to find that out?
|
|
|
|
|
There are a few subtle differences between C# and VB; I'm not sure if any of these would cause the error you see, but I'll throw them out there for you to look at:
1. VB does not support unsigned integers; if a C# DLL has any public methods/properties which take/return uint's, the DLL will not function properly when referenced from VB code.
2. C# and VB vary in their usage of indexers; I'm not 100% clear on the difference, but I seem to recall VB treating them internally as a property called Item. So I suppose if you have an actual property called Item in a C# class, that could throw VB off, into thinking it's an indexer or something...
3. VB supports some sort of XML-literal syntax; I've never used it so I'm not all that familiar with it, and since you're trying to reference C# code from VB, not the other way around, this probably isn't an issue, but I'll mention it nonetheless just in case...
edit: also, one more thing... there are some special namespaces Microsoft.VisualBasic and Microsoft.CSharp with language-specific utilities; I'm not sure if it's legal to reference one of those from the "opposite" language, but it might be worth looking into...
|
|
|
|
|
Thank's for your thoughts, ekolis! I think I took care of the differences you mentioned, as well as deleting the root namespace in VB (obviously VB adds the dll's namespace) which the conversion didn't care of. The UInteger issue btw seems older information or at least not completly true - I checked that and can surely define a 'UInteger' type variable in VB.
The funny thing is: My code starts with calling the 'MainForm' - but doesn't even reach the "Sub New" in this MainForm when I step through it. I wish I could find out what throws the 'FileNotFoundException' (just saying 'module not found' without it's name or path)...
|
|
|
|
|
Here is another suggestion: turn your VB.NET WinForms app into a Console app so you can control its start-up; more specifically:
1. in solution pane, right-click the project, then "Add a Module", default filename would be Module1.vb
2. in that file, stuff this (assuming your main form is called Form1):
Module Module1
Sub Main()
Try
Application.run(New Form1)
Catch ex As Exception
Console.WriteLine(ex.ToString)
End Try
Console.WriteLine("hit any key to finish...")
Console.ReadKey()
End Sub
End Module
3. in solution pane, click project/Properties, set app type to "Console Application" and startup object to "Module1"
4. Now build, run, and watch what shows in the Console window. Hopefully the full diagnosis will be there.
|
|
|
|