Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. If all forms are closed and all non-background threads have exited cleanly (no resources left open etc.) Then closing down the main form should also close the application. Do you have any hidden forms still open? Any threads running? Application.Exit has pretty much the same result as end in VB6 - not all cleanup code gets called etc.
  2. If you're using .Net then System.Net will give you a lot of features without having to delve into APIs. The following article on codeproject may help (In C# though) http://www.codeproject.com/csharp/FTP.asp
  3. How are you trying to access the remote directory? Any code written so far?
  4. "Data Source = ;Initial Catalog = ;Integrated Security=true" or "Data Source = ;Initial Catalog = ;Integrated Security=SSPI"
  5. Have you refreshed the web reference on the client? If not that means the client is still expecting a decimal and not the string / user defined class.
  6. Although you can use 'Or' and 'AND' to do bitwise stuff the same keywords are used for boolean logic as well, if there is a situation where either bitwise or boolean could be applied there doesn't appear to be a way to force bitwise (try enums with the attribute for example)
  7. Optional parameters are generally looked down on in .Net and they can have nasty side effects if used in public functions within a DLL. Function overloading is generally the recomended way.
  8. To add to VolteFace's list VB has poor bitwise manipulation VB doesn't automatically short circuit logic evaluation, you need to use the new keywords like orelse, andalso C# also has operator overloading (if you need it that is)
  9. Under .Net you really should be looking at using Exceptions rather than the on error goto method.
  10. using Application.DoEvents inside the loop will give windows a chance to repaint the form and also process the message loop so the user can move the form etc.
  11. I just copy and pasted the code into a new vb project, changed the path to "C:\boot.ini" - I knew that file was there and it worked fine. Only thing I can think of is that the file isn't there.
  12. I believe the .ToLongDateString works based on your regional settings - check under control panel to see what the lond date format actually is.
  13. Running it at the moment on a 256M p3 733 and it runs just fine. Running on windows 2000 advanced server - fully serviced packed.
  14. I'll consider that as 'just as bad' then ;) I always avoided it in VB6 because of the way it abruptly ended a running app, seems like it does the same in .Net.
  15. Still use netscape ;) (well mozilla anyway)
  16. Just out of interest is 'End' still considered as bad as it was in VB6?
  17. Perhaps I've missed it in your code but you don't appear to be telling class b to handle the event. ps if you wrap you code in [ vb ] [ /vb ] but remove the spaces the forum will format up the code and make it easier to read.
  18. VB has the rootnamespace option, in C# just open the .cs file containing the class and near the top it will say something like namespace project1 {
  19. .Net dlls don't need to be registered, registering components is just a COM thing. In your Visual Studio VB project right click on references in the solution explorer and browse to the dll from there.
  20. At the top of the form module put Imports System.Net Imports System.Text and in the button click paste the following Dim wc As New WebClient Dim s As String Dim b() As Byte b = wc.DownloadData(TextBox1.Text) s = Encoding.ASCII.GetString(b) s should now be the raw text of whatever the url in textbox1 was. ps you need to enter the protocol as part of the url i.e. http://www.b3ta.com will fail http://www.b3ta.com should work
  21. if you are using C# the VB Keyword Me is replaced with the keyword this.
  22. I would recomend dropping the VB6 FileOpen / FilePut and look at the System.IO namespace.
  23. could be worth having a look on sourceforge (http://sourceforge.net), they have a lot of open source projects in C#.
  24. in form3 textbox one needs to be declared as public. Or preferably ad a property procedure to form3 for access to the textbox contents.
  25. Are you using C++ from within the Visual Studio IDE? If so right click on the project and go to properties, under linker advanced there should be an entry for Import Library. Type WS2_32.Lib into the field.
×
×
  • Create New...