Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. Are you having a particular problem with them or are they failing in general? If possible could you post the code / config sections you are having trouble with?
  2. You could always call the Activator.CreateInstance method, just curious as to what you are trying to do here as there may be a better solution.
  3. How are you connectiong to the SQL Server - using Integrated Security or SQL Server authentication? You may want to check the server settings to make sure they are still set correctly. Also installing SP2 probably enabled the XP Firewall, removing it may have still left the firewall running though - you may want to check if that is blocking access.
  4. You could always use reflection and InvokeMember to do Late Binding in C#, but wherever possible I would try to avoid late binding completely.
  5. I would personally class the Excel example as a problem of not supporting Overloaded functions ;) The COM world never had them so that optional parameters where the only way to acheive this - if COM had supported overlaoded methods then MS would have provided enough versions of Open to not require all thos Type.Missing entries.
  6. You would just need to declarte an instance of the class before using it Dim clstest As new Label_Printer.ClsPrintArgs MessageBox.Show(clstest.serial.ToString())
  7. Would a normal select of the form SELECT FROM WHERE = not do the trick? Or do you want to actually list the duplicates?
  8. In the case of replacing a DLL with a newer version an Optional parameter's default value is not part of the DLL's code but part of the associated MetaData. When an application that uses this DLL is compiled and doesn't provide a value for the optional parameter then the default value is not dynamically used by the DLL function but coded into the calling application, hence if the value changes in a newer release of the DLL the application will carry on using the original default value - the only way around this is to also recompile all clients of the DLL so they now have the new default value compiled into them. Also one overload can call another version of the function - this prevents too much code duplication and will probably be inlined away by the JIT compiler at runtime. e.g. Public Function FreeFallDistance(T As Single, Accel As Single) As Single 'Do something here End Function Public Function FreeFallDistance(T As Single) As Single FreeFallDistance(T, 9.98) End Function
  9. When you are running your app it will start at the top of Sub Main, procede throough the code and when the Exit Sub line is reached the method will exit and so will the application. Rather than use a timer you may just want to consider just using a simple loop and going to sleep for 1 second at the end of the loop.
  10. Under VB.Net optional requires you to provide a default value to be used if the parameter is omitted. Also when using an overloaded method to simulate a default value the behaviour is supported by the runtime. Optional parameters however are not supported by the runtime and this can introduce odd behaviour. If the optional parameter is in a classlibrary then the default value is stored in the Dlls metadata and used by the compiler at compile time. If a newer version of the DLL is deployed that changes this default value the calling applications will still use the original default; to get the app to now use the new default then it would need to be recompiled against the new classlibrary dll.
  11. Couldn't you just assign a new password to it?
  12. Does it give any more details than those listed above? Does the other system have the .Net framework installed on it? If possible could you run a debugger on the remote machine to see where it fails?
  13. I'm assuming the problem is that you aren't seeing the message box - correct? If so that is normal behaviour - services do not run within the logged on user's desktop (in fact the will run with no user logged in at all), this means they have there own desktop that just happens to never be displayed on screen - hence you cannot see the message box.
  14. Could you not display the form non-modal but make it topmost? Also you may want to handle the deactivate event for the form to decide if you really should allow the focus to be moved back to the main form.
  15. You should be able to either return a value if you are running from a sub Main or alternatively use the Environment.ExitCode property.
  16. If you do not want the button to close the form then do not assign a dialog result to it.
  17. You would normally create your own class and inherit it from System.EventArgs - then add your own public members. Just remember when declaring your event you need to specify a delegate with your derived class as the second parameter.
  18. Sorry 1433 is the correct port, my bad.
  19. The application will run, however it will run on the asp.net server and only with the permissions granted to the ASPNET user account.
  20. You will need to forward the correct TCP port from the router to the SQL box (1434 by default). However this is probably a very dangerous practice as it will potentially open your SQL box up to the internet in general. Is there a particular reason you need to give access in this manner.
  21. Rather than using the legacy VB6 file handling functions you may want to use more of the classes under System.IO. If you create a streamreader based on the file you could just read the entire file into a string array and then use Array.Reverse to put the oldest items at the top.
  22. Rather than it being a method of the class you probably want to raise an event to allow the calling form the chance to execute code and / or cancel the update. Could you not just use the existing Validating event of the text box to do the validation logic?
  23. Do you want other controls to inherit from this and provide their own ValidTextBox method or do you wish the validation code to be provided by the form that the control is placed on?
  24. You cannot install the Enterprise Edition on a Desktop OS, if you need SQL then either use the personal edition for a production application or if this is a development machine then you may want to consider SQL Developer edition.
  25. The error message pretty much tells you what you need to change - before you can display the print dialog you need to assign a PrinterSettings object to it like so Dim ps As New Printing.PrinterSettings PrintDialog1.PrinterSettings = ps ' Need to Select the Printer Me.PrintDialog1.ShowDialog() also if you are making the move to .Net I would recomend you look at structured exception handling - far superior to the old vb6 on error goto... method.
×
×
  • Create New...