VB.NET:
Public Class Form1
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As IntPtr, ByVal nIndex As Integer, ByVal dwNewLong As Integer) As Integer
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As IntPtr...
An alternativre pattern:
(?<=FROM[ ]\S+[ ])\w+
then, you just need:
return match.ToString()
The pattern uses a "Positive look behind", meaning only return the desired match if it follows the match in the prefix. In other words, only return:
\w+
if it follows:
FROM[ ]|S+[ ]
Hope this...
A quick example, not specifically what you are looking for, but should point you in the right direction:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
RichTextBox1.Clear()
Dim p As New Process
Dim psi As...
There is another method, but it is not as flexible as DSOFramer and there are a limited number of programs for which it will work. You will have to use trial and error to find out which. For examnple it works (sort of) with Notepad, but not WordPad. It will work with Calc, but then goes wrong...
Again, another MS KnowledgeBase article:
http://support.microsoft.com/kb/301982
explains the process quite well.
The important thing to remember is that you must clean up any references to all Excel objects, or you might find the Excel process still running in memory when your application...
Install it, and then select it from the COM tab in the Add Components/Controls dialog box (right-click on the Toolbox).
It is very easy to use, just follow the examples provided.
[vampire][bat]
RiverGuy, good point.
I never do any Web development - I keep well clear of it!! As such, I would never have thought of suggesting Response.Write.
[vampire][bat]
What's wrong with a simple MessageBox?
either:
With objCommand
.Connection = oOleDbConnection
.CommandText =sSQL
MessageBox.Show(.CommandText)
.CommandType = CommandType.Text
.ExecuteNonQuery()
End With
or:
MessageBox.Show(sSQL)
With objCommand
.Connection = oOleDbConnection
.CommandText...
I don't fully understand your question.
If you are saying that you want each Tab in a TabControl to show a separate product, then I don't think that that would be the most effective design. Generally, each Tab would show different aspects of one particular product with a separate control...
Do you have to do it yourself?
WebBrowser1.ShowSaveAsDialog()
will do it for you.
If you have to do it yourself, then you may find the properties beginning with the word Document (there are 5 of them) helpful. At a guess DocumentStream. Personally, I've found ShowSaveAsDialog to be the...
If Drawing Then
Dim p As Pen = New Pen(Color.Black)
Dim g As Graphics = PictureBox1.CreateGraphics
g.DrawLine(p, StartPos, e.Location)
StartPos = e.Location
End If
can be simplified slightly to:
If Drawing Then
Dim g As Graphics =...
Maybe something like this?
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
PictureBox1.Image = Nothing
End Sub
Private Drawing As Boolean = False
Private StartPos As PointF = Nothing
Private Sub...
Qik3Coder
A simple example:
Public Class Form1
Private Function Divide(ByVal x As Integer, ByVal y As Integer) As Integer
Try
Return x \ y
Catch ex As Exception
MessageBox.Show("Catch")
Return -1
Finally
MessageBox.Show("Finally")
End Try
End Function
Private Sub...
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.