Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. Could you not just call the button's click event manually? i.e. If Microsoft.VisualBasic.Command() = "rssyncme" Then '*****This is working and IS retruring "rssyncme" as the command line argument********** Sync_Click(nothing,nothing) End If Has this code been generated by the Upgrade wizard by any chance? If so you may want to replace some of the VB6 functions with their .Net equivalent. Use myStr2.substring(...) instead of VB.Right and system.Environment.CommandLine instead of Microsoft.VisualBasic.Command() for example
  2. You would need to use a Try ... Catch ... End Try Block Try MSQL.Open 'Other code may go here Catch ex as SocketException 'What to do if it goes wrong End Try
  3. Have a look at System.Diagnostics.Process that will allow you to run external programs. Also there is no need to post the same question in multiple places - either someone will reply or they won't. Posting the same thing in several places isn't going to get a better reply.
  4. would the array idea not work though?
  5. Does it have to be in a single textbox? Could you not impose some order i.e. Surname, Firstname, DOB, subject ...... ? If not if may be easier to split the text into an array then work on the individual items. dim vals() as string vals = TextBox2.text.split(" ") 'vals will now contain an array of strings with val(0) being Surname and vals(1) being Firstname.
  6. setting something to nothing lets the garbage collector know the object is no longer needed there and then rather than when the variable goes out of scope. However it won't free the resources then - that still relies on the garbage collector kicking in and freeing them up.
  7. Services run on their own desktop and as such cannot easily display things on the user desktop. An easier way is to have the service running in the background and have a seperate windows app that communicates with the service. This app can then display information, sit in the system tray etc.
  8. Compiled fine here (VS 2003 and XP). What error did it give? Did you follow the article through and put all the resultant DLLs in the correct places and create the app.config correctly?
  9. But if you start to code against the .Net framework rather than a specific vendor API (win32 for example) in the long term you could be reaching more clients than if you were just win32. ASP.Net development without requiring IIS as a server could be a tempting idea for the Unix users out there.
  10. What code is in the Next button? Also what code is at the end of the GetNextRecord routine. Also this might be a lot easier avoiding the VB6 file routines.
  11. probably want to put the redim line at the start of the OpenFile module.
  12. IIRC not anymore, if it causes a problem change it to Public CdArray() As CdType redim CdArray(0)
  13. try changing Public CdArray() As CdType to Public CdArray(0) As CdType
  14. How are you refering to the database's path? If you've hard coded an absolute path into the executable then it will look there. You may want to make the connection string a dynamic property if you've used the wizards to generate the connection - this will move it to an app.config file that can easily be editied to point to the correct location.
  15. Have you created any elements in the array at this point? Also have you got option explicit on and option strict on ?
  16. Applications running from a network drive have a restricted security policy. You can change this through the configuration tools under your administrative tools. Search these forums and you'll probably find more information on this.
  17. Which line of code causes the problem if you step through in a debugger? Also you may find it easier to use the .Net file handling methods in System.IO rather than the VB6 FileOpen, Input, FileClose methods.
  18. jpeg compression works on smooth tones and shades, the saving is probably introducing these artifacts as part of the compression process. Better using GIF or PNG in this case.
  19. If you go to the left drop down list you should see the form name and under it 'Base Class Events' - select that on the right drop down should now contain more choices - lookl for Load
  20. you could try disposing the controls instead of removing them. Dim cpt As Integer For cpt = 0 To Me.tableauBox.Length - 1 Me.gbData.Controls(cpt).Dispose Next not near VS at the moment so I can't test it just yet...
  21. the top clause doesn't support variables - then again it isn't ANSI standard anyway ;( you will need to set the rowcount variable to limit the maximum number of rows... declare @rows int set @rows = 10 SET ROWCOUNT @rows select * from customers
  22. Could you post the code you are using to create the form elements and also how you are freeing them up.
  23. How much memory do you have installed in that PC? Under .Net memory is only released when the garbage collector decides you need some memory back - if you have lots of available RAM then it won't free up as often as on a PC with limited memory.
  24. writer.WriteLine() will cause it to move to the next line.
  25. open the file with Dim writer As New IO.StreamWriter("C:/FormatLineOutput.txt", True) the second parameter will append to the file if it already exists or create a new file if it doesn't exist.
×
×
  • Create New...