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...
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...
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...
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
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...
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...
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...
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...
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...
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...
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...
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...
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"...
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...
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
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.