Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: huel
  • Order by date
  1. huel

    Readline doesn't read line feeds

    Hi, You could try something along the lines of Dim reader as new StreamReader(fileName) TextBox1.Text = reader.ReadToEnd reader.Close This will read in the entire text file, line feeds included. You'll need to get away from the ReadLine function at any rate. There are a couple of ways to do...
  2. huel

    Creating a .dll in VB.Net

    The quickest way to create a dll in visual studio is to create a new Class Library project (File -> New -> Project -> Visual Basic Projects). This project will create an empty class file (basically the same type of class file that you would create in a Windows Application project). When you...
  3. huel

    Having a problem with moving through recordset

    DeeRuff1 As a starting point, take a look at the CurrencyManager class. It may have everything that you need to get going. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscurrencymanagerclasstopic.asp It looks like you're using SQL Server. If...
  4. huel

    VB.NET pointer help

    kevin97531, Check out this web site: http://www.dotnetbips.com/displayarticle.aspx?id=229 It has some short examples demonstrating the use of pointers in VB .NET that should hopefully get you started. Jay
  5. huel

    Reboot Machine with VB.NET

    Windows has a built in .exe called shutdown. If you go to the command prompt and run "shutdown -?", you should be able to see a list of all valid switches. I haven't tried this code out, but it should give you the general idea. System.Diagnostics.Process.Start("shutdown -r") or...
  6. huel

    Byval as Any error

    Hi, Try substituting As Any with As IntPtr. IntPtr is VB .Net's way of representing pointers. A quick google search brought up some example code using ReadProcessMemory in VB .Net, which uses IntPtr instead of Any, but there's a good deal of extra code to trace through as well...
  7. huel

    Split one string into many

    Try Dim parts() as String = Split(txtName.Text, " ") Split is a built in function that will break apart a string at a specified delimiter. Jay
  8. huel

    Issue w/ Returning Parameter

    Hi, You need to specify "@Rc" as a return value, if I'm reading your code correctly. Da.SelectCommand.Parameters("@Rc").Direction = ParameterDirection.ReturnValue Da.SelectCommand.Parameters("@Rc").Value = DBNull.Value This will tell the data adapter that your stored procedure is returning a...
  9. huel

    Raising Custom Errors

    From the MSDN Help file on ApplicationException I have an application where I have to generate custom errors and I've found that inheriting from ApplicationExcpetion provides me with everything I need. Quick example: Public Class MyCustomException Inherits System.ApplicationException...
  10. huel

    Ending an application

    Yes, it looks like Application.Exit requires Windows Forms to be loaded. Based on my experience, the only good way to exit out of a console application is to call Environment.Exit(-1) (or another error code if something goes wrong). I don't think that you have to have security permissions set if...
  11. huel

    Ending an application

    Application.Exit This will terminate an application. Jay
  12. huel

    Using a Delphi 5 dll from VB.net

    This website may have some advice on how to convert strings to pointers in VB .NET: http://www.dotnetbips.com/displayarticle.aspx?id=229 More specifically, it has a short section on strings and pointers: I haven't tried it myself so I can't say for certain that it will work with PChar's, but...
  13. huel

    Using a Delphi 5 dll from VB.net

    I've used Delphi 5 DLL's in VB 6, which should be similar to using them in VB .NET. I had quite a few troubles with type problems when I was first using the DLL in VB 6. It turns out that all my type problems were due to passing strings from my VB 6 program to my Delphi 5 DLL. According to...
  14. huel

    Datagrid, not updating DB

    To grab the selected item out of a datagrid you could use dim item as Object = Dg.Item(Dg.CurrentCell) When you say that you want to set up an edit, does that mean you want the user to be able to edit data directly in the datagrid? Are you going to have separate button click events for your...
  15. huel

    Datagrid, not updating DB

    When you execute the stored procedure, are any error messages returned; or is it the case that when you execute the stored procedure, absolutely nothing happens? I can make one quick guess by looking at the posted code: Dim MemParam As SqlParameter = New SqlParameter("@Memo"...
  16. huel

    ADO in .NET

    One way to get to the ADODB namespace is to go to the Project menu, select Add Reference, and then click on the COM tab. Scroll down to the "Microsoft Active X DataObject vX.X Library" and add the reference to your project. After that, you should be able to access the ADODB namespace just fine...
  17. huel

    good book for vb.net

    Hi, I had quite a bit of luck with “Programming Microsoft Visual Basic .NET”, by Francesco Balena. Jay
  18. huel

    How to convert Date (E.g 10/11/2004) to 200405

    Hello, Have you tried the Format function? It takes an expression (in this case a Date) and returns a string in a specified format. So to answer your question, maybe you could try newDate = CInt(Format(myDateTimePicker.Value, "yyyy")) + CInt(Format(myDateTimePicker.Value, "yy")) + 1
  19. huel

    Assign SelectedValue in a combobox

    I apologize if my last response wasn't very clear. I tried coming up with my own situation which seems to be similar to yours. I work in a laboratory, so I'll use an example from one of my own programs. There are two tables, one called w_vSampleTypes and one called w_vEmailFormats. Here is the...
  20. huel

    Assign SelectedValue in a combobox

    RSX02, Here's a random thought. I wonder if it's because you're setting the dataSet.Tables(tableName).Column(colName).ToString property to set the the ValueMember and DisplayMember of the combobox. I double-checked the VB .NET documentation on what the DataColumn.ToString property really did...

Part and Inventory Search

Back
Top