|
Do this happen in every project you try or just in this one project??
|
|
|
|
|
I have the problem in every project.
First I thought something in my large project I work on is wrong.
Then I was happy that I could boil the problem down to even simple projects like the "hello world" example I mentioned in detail. I tried other projects as well. The problem is always the same: a break point in the code of a click event results in a program crash when I click the questionable button.
Best wishes from Germany
Michael
|
|
|
|
|
About the only suggestion I have is to uninstall VS2005 and reinstall it.
|
|
|
|
|
will give it a try.
It's VS.net 2003 plus Update for VS.net 2005. It really takes a while, but I guess it's worth to be checked out.
Michael
|
|
|
|
|
Finally I've found the solution:
The firewall caused the problem. I posted the details in the following forum:
MSDN Forums > Visual Studio > Visual Studio Debugger > VB.net2005: Setting a breakpoint (in click event of a button) causes programm
http://forums.microsoft.com/Forums/ShowPost.aspx?PostID=3106003&SiteID=1
Michael
|
|
|
|
|
Hello Friend,
I've faced the following problem related to timeout.When I am going to save something large value in sql server 2005, following message is displayed.
"Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached."
Please tell me the solution.
Thanks!
|
|
|
|
|
Try increaing the connection timeout and query timeout on the connection. That should do the job. You should also see if you can improve the performance of your sql code.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I've written following connection string
gConnectionString = "Integrated Security=SSPI;trusted_connection=true" + ";database=" + database + ";server=" + server + ";Connection Timeout=1200;";
Is n't enough?
|
|
|
|
|
Are you closing your connections when you are done with them? If you don't close the connection they stay open until the garbage collector gets the connection object. If that happens it is very easy to run out of connections.
Also, why are you asking this in the VB.NET forum - there is a perfectly good C# forum when your question is about C#.
|
|
|
|
|
Thank You
I'va solved my problem
|
|
|
|
|
i have an email client application using native .Net smtp classe for sending the mails
can any1 help to be able to send these mails across a proxy server?
Thanks
phatkin
|
|
|
|
|
The mail classes in the .NET Framework do not currently support accessing an SMTP server through a proxy. You'd have to use a third party library to do this for you or use a properly configured proxy server. The proxy would have to be configured to automatically send any connection attempt on port 25 to a configured SMTP server.
|
|
|
|
|
how to identify tab key press in vb.net
winnie
|
|
|
|
|
You can set the property AcceptTab of the control. Then you get the KeyDown, -Press, -Up - Events.
But to get the focus-change, you must then use the mouse.
HTH
Chris
|
|
|
|
|
How to create Pdf in windows application? Please Help me
thanku
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
|
THankou Sir
Answer:
Dim Filename As String = Application.StartupPath + "\Export.pdf"
Dim _SaveFileDialog As New SaveFileDialog
_SaveFileDialog.Filter = "Apache Files (.pdf)|.pdf"
'sss.Filter = "HTML Files (.htm)|.htm|" + _
' "Active Server Pages (.asp)|.asp|" + _
' "Apache Files (.pdf)|.pdf|" + _
' "Perl Script (.pl)|.pl|" + _
' "All Files|"
_SaveFileDialog.ShowDialog()
Filename = _SaveFileDialog.FileName
If Windows.Forms.DialogResult.Yes Then
Dim myDoc As New Document()
PdfWriter.GetInstance(myDoc, New FileStream(Filename, FileMode.Create))
myDoc.Open()
myDoc.Add(New Paragraph(" "))
myDoc.Add(New Paragraph("User Responses are as Follows:"))
myDoc.Close()
End If
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
Hi everyone,
I have data from my server using sql data. I had the problem to export my data from datagrid to excel. For 200 data is oke, no problem but more than 200 , the program is stuck. Anybody can help me to solve this problem ????
Private Sub ToolStripexport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripexport.Click
If (Me.dbgridinv Is Nothing) Then
Throw New ArgumentNullException("No DataGridView was provided for export")
End If
Using saveFileDialog As SaveFileDialog = Me.GetExcelSaveFileDialog
If (saveFileDialog.ShowDialog(Me) = DialogResult.OK) Then
Dim fileName As String = saveFileDialog.FileName
ExcelGenerator.Generate(Me.dbgridinv).Save(fileName)
Process.Start(fileName)
End If
End Using
End Sub
---------------------------------------------------
Imports CarlosAg.ExcelXmlWriter
Imports System
Imports System.Drawing
Imports System.Windows.Forms
Public Class ExcelGenerator
' Methods
Public Shared Function Generate(ByVal dataGridView As DataGridView) As Workbook
Dim workbook As New Workbook
Dim worksheet As Worksheet = workbook.Worksheets.Add("Sheet 1")
Dim worksheetRow As New WorksheetRow
Dim dataGridViewColumn As DataGridViewColumn
For Each dataGridViewColumn In dataGridView.Columns
worksheet.Table.Columns.Add(New WorksheetColumn(dataGridViewColumn.Width))
worksheetRow.Cells.Add(New WorksheetCell(dataGridViewColumn.HeaderText))
Next
worksheet.Table.Rows.Insert(0, worksheetRow)
Dim worksheetDefaultStyle As WorksheetStyle = ExcelGenerator.GetWorksheetStyle(dataGridView.DefaultCellStyle, "Default")
workbook.Styles.Add(worksheetDefaultStyle)
Dim rowIndex As Integer
For rowIndex = 0 To dataGridView.RowCount - 1
worksheetRow = worksheet.Table.Rows.Add
Dim columnIndex As Integer
For columnIndex = 0 To dataGridView.ColumnCount - 1
Dim cell As DataGridViewCell = dataGridView.Item(columnIndex, rowIndex)
Dim cellStyle As WorksheetStyle = ExcelGenerator.GetWorksheetStyle(cell.InheritedStyle, String.Concat(New Object() {"column", columnIndex, "row", rowIndex}))
If (Not cellStyle Is Nothing) Then
workbook.Styles.Add(cellStyle)
Else
cellStyle = worksheetDefaultStyle
End If
Dim dataType As DataType = ExcelGenerator.GetDataType(cell.ValueType)
worksheetRow.Cells.Add(cell.FormattedValue.ToString, dataType, cellStyle.ID)
Next columnIndex
Next rowIndex
Return workbook
End Function
Private Shared Function GetColorName(ByVal color As Color) As String
Return ("#" & color.ToArgb.ToString("X").Substring(2))
End Function
Private Shared Function GetDataType(ByVal valueType As Type) As DataType
If (Not valueType Is GetType(DateTime)) Then
If (valueType Is GetType(String)) Then
Return DataType.String
End If
If ((((((valueType Is GetType(SByte)) OrElse (valueType Is GetType(Byte))) OrElse ((valueType Is GetType(Short)) OrElse (valueType Is GetType(UInt16)))) OrElse (((valueType Is GetType(Integer)) OrElse (valueType Is GetType(UInt32))) OrElse ((valueType Is GetType(Long)) OrElse (valueType Is GetType(UInt64))))) OrElse ((valueType Is GetType(Single)) OrElse (valueType Is GetType(Double)))) OrElse (valueType Is GetType(Decimal))) Then
Return DataType.Number
End If
End If
Return DataType.String
End Function
Private Shared Function GetWorksheetStyle(ByVal dataGridViewCellStyle As DataGridViewCellStyle, ByVal id As String) As WorksheetStyle
Dim worksheetStyle As WorksheetStyle = Nothing
If (Not dataGridViewCellStyle Is Nothing) Then
worksheetStyle = New WorksheetStyle(id)
If Not dataGridViewCellStyle.BackColor.IsEmpty Then
worksheetStyle.Interior.Color = ExcelGenerator.GetColorName(dataGridViewCellStyle.BackColor)
worksheetStyle.Interior.Pattern = StyleInteriorPattern.Solid
End If
If Not dataGridViewCellStyle.ForeColor.IsEmpty Then
worksheetStyle.Font.Color = ExcelGenerator.GetColorName(dataGridViewCellStyle.ForeColor)
End If
If (Not dataGridViewCellStyle.Font Is Nothing) Then
worksheetStyle.Font.Bold = dataGridViewCellStyle.Font.Bold
worksheetStyle.Font.FontName = dataGridViewCellStyle.Font.Name
worksheetStyle.Font.Italic = dataGridViewCellStyle.Font.Italic
worksheetStyle.Font.Size = CInt(dataGridViewCellStyle.Font.Size)
worksheetStyle.Font.Strikethrough = dataGridViewCellStyle.Font.Strikeout
worksheetStyle.Font.Underline = IIf(dataGridViewCellStyle.Font.Underline, UnderlineStyle.Single, UnderlineStyle.None)
End If
worksheetStyle.Borders.Add(StylePosition.Top, LineStyleOption.Continuous, 1, "Black")
worksheetStyle.Borders.Add(StylePosition.Right, LineStyleOption.Continuous, 1, "Black")
worksheetStyle.Borders.Add(StylePosition.Bottom, LineStyleOption.Continuous, 1, "Black")
worksheetStyle.Borders.Add(StylePosition.Left, LineStyleOption.Continuous, 1, "Black")
End If
Return worksheetStyle
End Function
End Class
|
|
|
|
|
I have an app where I have a parent and child form. How can I capture the key that is pressed (if any) on the child form? I tried the keydown method, but when I run the program, it will not enter the method when I type a key.
Any help would be appreciated. Thanks.
|
|
|
|
|
the 2 forms are completely independent of each other even though you started one from another. event or delegate is the proper way to go.
the event example(done by memory - syntax is mostly good)
public class form1
private withevents mForm2 as form2
private sub ChildKeyDown(sChar as string) handles mForm2.ChildKeyDown
msgbox("the key pressed was: " & sChar
end sub
'add logic to show form2
end class
public class form2
event ChildKeyDown(sChar as string)
private textbox1_keydown(sender , e ) handles textbox1.keydown
raiseevent childkeydown(e.keychar)
end sub
end class
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
Just wanted to say thanks for this post - this is an area that is new to me and you have answered a question I had. 5 Stars
Guy
You always pass failure on the way to success.
|
|
|
|
|
hi
we are currently making a website, we also have a client in vb.net
the client works like gtalk where the user has to log in..
the same username and password will apply to the website and the client
is there anyway that we can post values/data from the client to the website, but it needs to be specific to the username provided by the user
in other word, what ever is uploaded from the client must go directly to the webpage of the specific user
any help would be most appreciated
thanks
|
|
|
|
|
I'd recommend developing a webservice to which your client app. 'talks'...
|
|
|
|
|
I'm using the SaveFileDialog in VB.NET 1.1 and would like to perform some processing if the user has clicked yes to overwritting an existing file but I cant seem to be able to catch this. I have tried to use something like (If SaveFileDialog.ShowDialog = DialogResult.Yes Then) but I cant seem to hit this condition at all. Any help please!
JojoStoneHead
|
|
|
|
|
Have you tried using DialogResult.OK ?
I hope this helps.
|
|
|
|