|
David Fawn wrote:
I want to add "Value 2" of the rows with the same "Value 1" to the first row of this value and to delete the others
What??? Do you want this result in the database? Do you want all the gethered values from Value 2 to be in the same record appended to each other or in their own seperate columns in the same record?
Value 1 Value 2
Text2 xxxxxxyyyyyyffffff
or
Value 1 Value 2 Value 3 Value 4
Text 2 xxxxxx yyyyyy ffffff
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want them to be in their own seperate columns in the same record? (Example:
Value 1 Value 2 Value 3 Value 4
Text 2 xxxxxx yyyyyy ffffff
|
|
|
|
|
hello, i have a program that when the form loads it looks up in a textfile and if the textfile is empty the program will opens a register form: obj.showdialog(). now i want to when he/she enters a register key in the textbox of the register form and then he can click on the register button. i made it that when he click on the button a messagebox appears saying the user that he registered. now in the messagebox i want to make it with OK and when he click on ok the register form will automatically closes and the program will be active!! how can i make it??
Adrian
|
|
|
|
|
msgbox(" Prompt ", msgboxstyle.Okonly, " caption/title")
If msgboxresult.ok then
form.activeform.close()
End If
I guess this is what your looking for, i dont really understand the question.
|
|
|
|
|
|
I have a custom form that has transparent properties to give it a shape. When i install the app on another computer the transparent part shows up. What can i do about this?
|
|
|
|
|
I want to make my own connection wizard.
I have 3 radio button for user to choice whether they want to connect with MS Acces, SQL Server or Oracle Database.
According to their choice the connection string is passed
such as if user selected to connect with SQL server
a string conn = "datasource=.; user ID =sa; password="
is stored.
Now I want to connect to the server and fetch all the database names so that user can choose any database.
Any sample code will be much helpfull...
Thanks in advance..
|
|
|
|
|
|
Thanks so much...
Its did a trick..
You are the Rock. ;)
|
|
|
|
|
I have been using below code for freehang drawing in vb.net.But it doesn't change the color of new drawn line only.it changes the whole mousepath color, means if i select blue and previous one is red then whole path becomes blue.
But i desperately need screen pen effect like if i select blue then only blue reflect on mousepath and previous path(previously drawn line) color remains same.As like paint previous lines color remain same.
If any one knows plz help me!!!!
Imports System
Imports System.Drawing
Imports System.Windows.Forms
Public Class Form1
'Namespace myPaint
Inherits System.Windows.Forms.Form ' Of course
Dim mousePath As New System.Drawing.Drawing2D.GraphicsPath() 'declare a new Graphic path to follow the mouse movement
'*** below I declare some values for an Alpha and other user selected variables
'these will be used as I expand this program for a higher level use.
Dim myAlpha As Integer = 100 ' declare a Alpha variable
Dim myUserColor As New Color() 'this is a color the user selects
Dim myPenWidth As Single = 5 'set pen width variable
'**************************************************************
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents Button3 As System.Windows.Forms.Button
Friend WithEvents Button4 As System.Windows.Forms.Button
Friend WithEvents Panel1 As System.Windows.Forms.Panel
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
Me.Label1 = New System.Windows.Forms.Label
Me.Button1 = New System.Windows.Forms.Button
Me.Button2 = New System.Windows.Forms.Button
Me.Button3 = New System.Windows.Forms.Button
Me.Button4 = New System.Windows.Forms.Button
Me.Panel1 = New System.Windows.Forms.Panel
Me.PictureBox1 = New System.Windows.Forms.PictureBox
Me.Panel1.SuspendLayout()
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(87, 35)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(393, 27)
Me.Label1.TabIndex = 1
Me.Label1.Text = "Below is a Graphics path freehand drawing space"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(488, 112)
Me.Button1.Name = "Button1"
Me.Button1.TabIndex = 3
Me.Button1.Text = "RED"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(488, 160)
Me.Button2.Name = "Button2"
Me.Button2.TabIndex = 4
Me.Button2.Text = "BLUE"
'
'Button3
'
Me.Button3.Location = New System.Drawing.Point(488, 216)
Me.Button3.Name = "Button3"
Me.Button3.TabIndex = 5
Me.Button3.Text = "GREEN"
'
'Button4
'
Me.Button4.Location = New System.Drawing.Point(488, 264)
Me.Button4.Name = "Button4"
Me.Button4.TabIndex = 6
Me.Button4.Text = "YELLOW"
'
'Panel1
'
Me.Panel1.BackColor = System.Drawing.Color.Gray
Me.Panel1.Controls.Add(Me.PictureBox1)
Me.Panel1.Location = New System.Drawing.Point(24, 80)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(448, 280)
Me.Panel1.TabIndex = 7
'
'PictureBox1
'
Me.PictureBox1.BackColor = System.Drawing.Color.Transparent
Me.PictureBox1.Location = New System.Drawing.Point(16, 24)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(408, 240)
Me.PictureBox1.TabIndex = 8
Me.PictureBox1.TabStop = False
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.Color.BlanchedAlmond
Me.ClientSize = New System.Drawing.Size(579, 534)
Me.Controls.Add(Me.Panel1)
Me.Controls.Add(Me.Button4)
Me.Controls.Add(Me.Button3)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.Label1)
Me.Name = "Form1"
Me.Text = "Johns' Free Hand Doodle"
Me.Panel1.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
myUserColor = (System.Drawing.Color.Red)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
myUserColor = (System.Drawing.Color.Blue)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
myUserColor = (System.Drawing.Color.Green)
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
myUserColor = (System.Drawing.Color.Yellow)
End Sub
Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles PictureBox1.MouseDown
If e.Button = MouseButtons.Left Then ' draw a filled circle if left mouse is down
mousePath.StartFigure() ' The L mouse is down so we need to start a new line in mousePath
End If
End Sub
Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
If e.Button = MouseButtons.Left Then ' draw a filled circle if left mouse is down
Try
mousePath.AddLine(e.X, e.Y, e.X, e.Y) 'Add mouse coordiantes to mousePath
Catch
MsgBox("No way, Hose!")
End Try
End If
PictureBox1.Invalidate() 'Repaint the PictureBox using the PictureBox1 Paint event
End Sub
Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
' Here is where we do the actual painting
Try ' error trapping
'myUserColor = (System.Drawing.Color.Black) 'You can remove this line and add a user selected color to
'change the value of myUserColor
myAlpha = 100 ' This will give the color a Alpha effect, you can set this to 255 if you want a full color
'*********************** NOTE ***********************************************
'The line below set the pen up with the ability to add user selected Alpha, Color and Penwidth
' A simpler, but less flexible solution would be to replace the line with the following code:
'Dim CurrentPen = New Pen(System.Drawing.Color.Black, myPenWidth)
'************ End Note ***************************
Dim CurrentPen = New Pen(Color.FromArgb(myAlpha, myUserColor), myPenWidth) 'Set up the pen
e.Graphics.DrawPath(CurrentPen, mousePath) 'draw the path!
Catch
' MsgBox("Not happening!")
End Try
End Sub
'End Namespace
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Panel1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel1.Paint
End Sub
End Class
'Form1
Megha
|
|
|
|
|
The problem you are having is that a GraphicsPath hold all the points that is being drawn on the PictureBox1 object. When you go and paint the PictureBox1 with GraphicsPath you are painting with only one color, the current color at that time. What you need to do is create a GraphicsPath one for each color and when you want to draw in that color use the GraphicsPath you assign to that color. This way each GraphicsPath object holds multiple objects of the same color. Also you must check mousePath has a valid value otherwise you will get an execption as when you first start and do not select a color. Here is how I modified you code to do what you want.
Imports System
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Windows.Forms
Public Class Form1
Inherits System.Windows.Forms.Form
' Just to help in documentation
Enum PathColor
RED = 0
BLUE = 1
GREEN = 2
YELLOW = 3
End Enum
' Dim mousePath As New System.Drawing.Drawing2D.GraphicsPath 'declare a new Graphic path to follow the mouse movement
Dim path(3) As GraphicsPath ' Holds 4 GraphicsPath objects one for each color
Dim mousePath As GraphicsPath
'*** below I declare some values for an Alpha and other user selected variables
'these will be used as I expand this program for a higher level use.
Dim myAlpha As Integer = 100 ' declare a Alpha variable
Dim myUserColor(3) As Color ' The 4 colors that the user can selects from
Dim myPenWidth As Single = 5 ' set pen width variable
'**************************************************************
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents Button3 As System.Windows.Forms.Button
Friend WithEvents Button4 As System.Windows.Forms.Button
Friend WithEvents Panel1 As System.Windows.Forms.Panel
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
Private Sub InitializeComponent()
Me.Label1 = New System.Windows.Forms.Label
Me.Button1 = New System.Windows.Forms.Button
Me.Button2 = New System.Windows.Forms.Button
Me.Button3 = New System.Windows.Forms.Button
Me.Button4 = New System.Windows.Forms.Button
Me.Panel1 = New System.Windows.Forms.Panel
Me.PictureBox1 = New System.Windows.Forms.PictureBox
Me.Panel1.SuspendLayout()
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(87, 35)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(393, 27)
Me.Label1.TabIndex = 1
Me.Label1.Text = "Below is a Graphics path freehand drawing space"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(488, 112)
Me.Button1.Name = "Button1"
Me.Button1.TabIndex = 3
Me.Button1.Text = "RED"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(488, 160)
Me.Button2.Name = "Button2"
Me.Button2.TabIndex = 4
Me.Button2.Text = "BLUE"
'
'Button3
'
Me.Button3.Location = New System.Drawing.Point(488, 216)
Me.Button3.Name = "Button3"
Me.Button3.TabIndex = 5
Me.Button3.Text = "GREEN"
'
'Button4
'
Me.Button4.Location = New System.Drawing.Point(488, 264)
Me.Button4.Name = "Button4"
Me.Button4.TabIndex = 6
Me.Button4.Text = "YELLOW"
'
'Panel1
'
Me.Panel1.BackColor = System.Drawing.Color.Gray
Me.Panel1.Controls.Add(Me.PictureBox1)
Me.Panel1.Location = New System.Drawing.Point(24, 80)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(448, 280)
Me.Panel1.TabIndex = 7
'
'PictureBox1
'
Me.PictureBox1.BackColor = System.Drawing.Color.Transparent
Me.PictureBox1.Location = New System.Drawing.Point(16, 24)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(408, 240)
Me.PictureBox1.TabIndex = 8
Me.PictureBox1.TabStop = False
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.Color.BlanchedAlmond
Me.ClientSize = New System.Drawing.Size(579, 534)
Me.Controls.Add(Me.Panel1)
Me.Controls.Add(Me.Button4)
Me.Controls.Add(Me.Button3)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.Label1)
Me.Name = "Form1"
Me.Text = "Johns' Free Hand Doodle"
Me.Panel1.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
mousePath = path(PathColor.RED) ' Assigns the correct GraphicsPath for this color
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
mousePath = path(PathColor.BLUE) ' Assigns the correct GraphicsPath for this color
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
mousePath = path(PathColor.GREEN) ' Assigns the correct GraphicsPath for this color
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
mousePath = path(PathColor.YELLOW) ' Assigns the correct GraphicsPath for this color
End Sub
Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles PictureBox1.MouseDown
If e.Button = MouseButtons.Left Then ' draw a filled circle if left mouse is down
mousePath.StartFigure() ' The L mouse is down so we need to start a new line in mousePath
End If
End Sub
Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
If e.Button = MouseButtons.Left Then ' draw a filled circle if left mouse is down
Try
mousePath.AddLine(e.X, e.Y, e.X, e.Y) 'Add mouse coordiantes to mousePath
Catch
MsgBox("No way, Hose!")
End Try
End If
PictureBox1.Invalidate() 'Repaint the PictureBox using the PictureBox1 Paint event
End Sub
Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
' Here is where we do the actual painting
Try ' error trapping
'myUserColor = (System.Drawing.Color.Black) 'You can remove this line and add a user selected color to
'change the value of myUserColor
myAlpha = 100 ' This will give the color a Alpha effect, you can set this to 255 if you want a full color
'*********************** NOTE ***********************************************
'The line below set the pen up with the ability to add user selected Alpha, Color and Penwidth
' A simpler, but less flexible solution would be to replace the line with the following code:
'Dim CurrentPen = New Pen(System.Drawing.Color.Black, myPenWidth)
'************ End Note ***************************
' Paint all the GraphicsPath one color at a time
For index As Integer = 0 To 3
Dim CurrentPen = New Pen(Color.FromArgb(myAlpha, myUserColor(index)), myPenWidth) 'Set up the pen
e.Graphics.DrawPath(CurrentPen, path(index)) 'draw the path!
Next index
Catch
' MsgBox("Not happening!")
End Try
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Create GraphicsPath for each color
For i As Integer = 0 To 3
path(i) = New GraphicsPath
Next i
' Create each color
myUserColor(PathColor.RED) = myUserColor(PathColor.RED).Red
myUserColor(PathColor.BLUE) = myUserColor(PathColor.BLUE).Blue
myUserColor(PathColor.GREEN) = myUserColor(PathColor.GREEN).Green
myUserColor(PathColor.YELLOW) = myUserColor(PathColor.YELLOW).Yellow
End Sub
Private Sub Panel1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel1.Paint
End Sub
End Class
'Form1
----------------------------------
I hope that this was of some help.
-Fernando Soto
|
|
|
|
|
Hi,
Can any one tell me that is Nullable types are supproted in vb.Net 2005? If so, is it like c#.net?
|
|
|
|
|
Do u mean DBNULL.Value or dim x as object= Nothing;
Both r able to been used.
|
|
|
|
|
I URGENTLY need to be able to pass a network file path through to a function and obtain the PIDL. Can someone please let me know how I can do this.
|
|
|
|
|
Hi,
I'm writing an application in VB.net that takes a string & a number from the user & prints a receipt using the System.Drawing.Printing class. Is there anyway to detect the "out-of-paper" case , as i need to take corrective actions in such case. I checked out all the properties & settings of PrintDocument & PageSettings classes but found nothing.
any hints are really appreciated.
thanx
|
|
|
|
|
http://support.microsoft.com/default.aspx?scid=kb;en-us;821769
|
|
|
|
|
Thanx alot.. i think the article will help
|
|
|
|
|
i have build a custom datagrid using the datagrid. How can i add AutoFormat in my control just like datagrid has. another problem is that i am fetching data in the load event of the control, so when i fetch the data it works well the first time but when i reopn the same project it shows all the data at the design time. how can i avoid this.
|
|
|
|
|
Hi all, i use Vs 2005 beta, there is no DataGrid Object so i use DataGridView Object. But DataGridView object doesnt support DataGridTableStyles. When i used VS. 2003 , i created a class named "DataGridExtendedColumn" supplying numeric, commaseperated numbers also functional keys. But i couldnt use that with DataGridView object.
i create a table named "ExportDetails" at run time then i set it to DataGridView's DataSource. At design Time, i created columns on DataGridView then i set each column's DataPropertyName to associate column at table "ExportDetails" .
What can do for supplying to users a field which they can numeric numbers or comma separated numbers.
NOT:SURE I am aware of DataGridView object has no property as DataGridTableStyle despite of VS 2005 has DataGridTableStyles object.
|
|
|
|
|
Hi,
Ive not yet had the time to try out the new DataGridView but the DataGrid is still provided in the new framework version. It just isnt placed in the toolbox of VS.Net 2005 by default. Just right click into your toolbox. There is a menu entry where you can add/remove items. It will show you a big list where you just have to find the DataGrid .
|
|
|
|
|
Hi,
I am using the shell command in vb.net to run a dos program. After the program is finished it outputs to the screen some results. Is there anyway to read this back into a Rich text box.
Thanks
|
|
|
|
|
Hi;
There is a way but it is not direct. The Shell command in VB.Net only returns the process ID only if the DOS program is still running at the time your program executes the next statement and nothing else. Your DOS program outputs to the standard output, the screen. What you can do is create a bat file with one statement in it, "Your DOS executable with path > Some temp file with file path" without the double quotes, for example, c:\windows\system32\ipconfig > c:\temp\configresults.txt, save the file let say c:\temp\testip.bat. The > in the command is the dos redirect, which creates the file if it does not exist or over writes if it does. Replace the > with >> to append to the file. Once you program runs Shell the file c:\temp\testip.bat. Then the data is in the file just read it into your program and into your Rich text box.
Sample code
Dim readResults As String
Shell("c:\Temp\TestIp.bat", AppWinStyle.NormalFocus, True, -1)
Dim reader As StreamReader = New StreamReader("c:\Temp\configresults.txt")
Do
readResults = reader.ReadLine
RichTextBox1.Text &= readResults & Environment.NewLine
Loop Until reader.Peek = -1
I could not figure out how to add the redirect command into the Shell for it to work properly. If you can then you would not have to create a bat file, one step less.
I hope this was of some help.
-Fernando Soto
|
|
|
|
|
Hi;
There is a better way to redirect the output of a DOS program which I cam across in my readings. And that is using the Process object. Here is what I did to test it.
Imports System.ComponentModel
Private ERROR_FILE_NOT_FOUND As Integer = 2
Private ERROR_ACCESS_DENIED As Integer = 5
Dim myProcess As Process = New Process
Try
Dim prgOutput As String ‘ Output from DOS program
Dim strSplit() As String = Nothing
Dim delimStr As String = Chr(13) & Chr(10)
Dim delimiter() As Char = delimStr.ToCharArray()
myProcess.StartInfo.FileName = tbPath.Text ‘Full pathname to including file name
myProcess.StartInfo.Arguments = tbOptions.Text ‘ If the program takes args as string
myProcess.StartInfo.CreateNoWindow = True ‘ Does not create a window DOS program
myProcess.StartInfo.UseShellExecute = False ‘ Must be false to redirect output
myProcess.StartInfo.RedirectStandardOutput = True
myProcess.Start() ‘ Start the DOS program
myProcess.WaitForExit() ‘ Wait until it completes before moving on
prgOutput = myProcess.StandardOutput.ReadToEnd ‘ Get the DOS output
prgOutput = prgOutput.Replace(delimiter, "|")
strSplit = prgOutput.Split("|"c)
For i As Integer = 0 To (strSplit.Length - 1)
lbOutput.Items.Add(strSplit(i))
Next
Catch ex As Win32Exception
If ex.NativeErrorCode = ERROR_FILE_NOT_FOUND Then
Console.WriteLine((ex.Message + ". Check the path."))
Else
If ex.NativeErrorCode = ERROR_ACCESS_DENIED Then
' Note that if your word processor might generate exceptions
' such as this, which are handled first.
Console.WriteLine((ex.Message + ". You do not have permission to print this file."))
End If
End If
End Try
|
|
|
|
|
Visual studio no longer breaks inte the debugger when an unhandled exception is thrown.
I've been using Visual Studio 2003 for a while now and everything have been working fint until recently. I probably have changed som settings that I now can't find.
I can trap the error by wrapping the line with Try, Catch or setting the Setting: Debug/Exceptions/CLR Exceptions to break into the debugger when the exception is thrown, but don't give me the same error message.
What do I have to do to make it work as it should again? This is making me crazy. The application just keeps going when it encounters an exception.
/Johan Trenkle
|
|
|
|
|
In the Menu goto Debugging - Exceptions
In the Exceptions Dlg expand Common Language Runtime Exceptions and check the System Entry
Stefan
|
|
|
|
|