|
Hi,
I have a large file in one of my projects, that behaves as if DebuggerStepThrough is set. But I have removed every DebuggerStepThrough attribute from the file. I want to be able to step through the code, but it won't even stop when I set breakpoints. If I use the Stop command, I get a message saying "There is no source code available for the current location."
This file is not in my main project in the solution, but I can step through code in other non-main projects. Does anyone know any other settings to check, or have any idea what could cause this problem?
Thanks
David
|
|
|
|
|
Check to see that you Have Not declared a variable named 'System' as string. If you have, the class will look for methods in that variable, not at the namespace level.
In the IDE Menu go to: Project -> Properties -> Common properties -> Imports and check that "System.Diagnostics" is in the System Imports Box.
Every form and user control should have a line like this in the " Windows Form Designer generated code " region.
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
|
|
|
|
|
let's try that again, the line should read:
Every form and control should have a line like this in the " Windows Form Designer generated code " region.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
|
|
|
|
|
hi
the type "any" in API make error in VB.NET so what is best type that correct this problem
|
|
|
|
|
take a look here:
Windows APIs
http://www.mentalis.org/vbtutor/vbdotnet.shtml
|
|
|
|
|
|
Find the Last Day of a Month
http://abstractvb.com/code.asp?A=965
|
|
|
|
|
When trying to use Ctype to convert an object to a custom class, i have encountered a problem.
Even though when i call the getType method , im told that both the object that im trying to convert and the destination variable are the same type, however when i call the ctype function, i get a Specified Cast not valid message.
Any Ideas?
Thanks for your help!
|
|
|
|
|
:(Hi All! I am Kunal Mukherjee from Kolkata(Garia Station), India. I am facing a problem while coding in VB.Net. If you can PLEASE HELP ME!! Here goses the problem:
Suppose I am binding all the controls on my form to a dataview. But when I want to add a new record or if I want to mofify records and then update the datasource(database) then i am facing a problem. The dataset is getting updated but the datasource is not. I am using the dataadaptor's update method. But in all examples I found that if they are using dataview then they are using sql statements for update and insertion of records. What I want to know if I can use the update method of dataadaptor's to update the datasource, even if I use the dataview object. But if I go as per logic then whatever I have done is correct. Because changes made to the dataview automatically gets reflected on the datatable it is attached with. so when I use the update method of the dataadaptor then the records whose state has been changed should get updated in the datasource. Well that's as per my knowledge is concern. If you know how to solve this problem then please help me.
Also tell me that do I have to write sql statements for INSERT, UPDATE, or DELETE through the dataadaptor.
|
|
|
|
|
hi all, could you tell me how i can make a treeview to be right to left as in arabic, i work on vb6.0 hope its easy to be done
Thanks alot
Metal Man
|
|
|
|
|
The easiest way to do it in VB6 is to use a 3rd party component. Although the TreeView control does have a RightToLeft property (in VB.NET, not available in VB6), the TreeView is drawn left to right, while the test is draw right to left. It makes the control a bit difficult to read in R-t-L languages.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi man, thanks alot but i dnt understand what do u mean by 3rd party, at the end do u mean that i cant make it right to left on vb6
Thanks alot
Metal Man
|
|
|
|
|
"3rd party" means a control written by someone else besides yourself or Microsoft.
It could be done in VB6, but not easily. The technique is very poorly documented, unless your using VB.NET.
Your best bet is to use a control that's already been written and has support behind it if you run into problems.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i need barcode font 2 of 5 can someone tell me where can i get free it cause most of the sites i have checked out are paid.or can someone give me the function or module etc.... thanx in advance.
|
|
|
|
|
Hello everyone,
I'm up to speed with VB.NET now after years of VB6, but I've just started to experiment with the graphics functionality to customise my forms.
I wanted to use ColorMatrix and ImageAttributes so that I can manipulate Alpha, etc... when drawing my graphics.
I've looked high and low, and no one seems to be experiencing the same problem I'm having. In VB.NET it doesn't recognise types ColorMatrix and ImageAttributes. Am I not doing something I should be? Should I be referencing GDI+ or something?
I'm developing in Windows 2000 with Visual Studio 2002.
Any advice would be much appreciated as I'm on a tight time scale!
Many thanks,
Richard
|
|
|
|
|
Make sure your are including the following at the top of your code:
Imports System.Drawing.Imaging
Otherwise, every reference to ColorMatrix that you use would have to be prefixed like this:
Dim myCM As New Imaging.ColorMatrix()
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank you SO MUCH!!! School boy error, I feel a bit stupid, I did look everywhere for ColorMatrix tho, but didn't see it in Imaging. This has been driving me mad, just popped it in to my code and it's worked!!
|
|
|
|
|
Dear friends,
From my server application I want to send messages to all the clients connected to the SQL database. How can I achieve this? The scenario is like this...
At the day end, on the server the administrator of my system runs the day end option. This option is suppose to transfer the records of a particular day to respective files and so on. Before running the day end option, all the clients has to log out. Now the server is in a server room and clients can be any where in the office. So it’s not possible for the administrator to tell everyone individually to close the system. So I want to develop an option, which tells the administrator that who all are using the system, and the administrator can send them a message to close the system. I am able to display the name of the users logged into the system at a current time but I am not able to send the message. I know that I can use windows sockets for that purpose but can't I use windows messaging service for this??
Operating System: Windows 98/2000/XP/2003
Language: Visual Basic
Backend: SQL 2000
Regards,
Chintan
Chintan
|
|
|
|
|
Hello,
I want to read (RTF) files in my VB.NET programme. How can i do it. I apply the same method of reading text files, but it does not save the formatting of text like (bold, italics, underline) etc.
So , how can i make programme which allows me to read (RTF) Rich Text Format files or Microsoft WORD files in VB.NET through FILE HANDLING.
Plz help me
EsHbAn BaHaDuR
|
|
|
|
|
Public Sub LoadMyFile()
' Create an OpenFileDialog to request a file to open.
Dim openFile1 As New OpenFileDialog()
' Initialize the OpenFileDialog to look for RTF files.
openFile1.DefaultExt = "*.rtf"
openFile1.Filter = "RTF Files|*.rtf"
' Determine whether the user selected a file from the OpenFileDialog.
If (openFile1.ShowDialog() = System.Windows.Forms.DialogResult.OK) _
And (openFile1.FileName.Length > 0) Then
' Load the contents of the file into the RichTextBox.
richTextBox1.LoadFile(openFile1.FileName, _
RichTextBoxStreamType.RichText)
End If
End Sub
.NET Framework Class Library
RichTextBox.LoadFile Method (String, RichTextBoxStreamType)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsrichtextboxclassloadfiletopic.asp
|
|
|
|
|
Hello,
Kindly tell me that "how can i READ A SPECIFIC STRING IN TEXT FILE"
The problem is that:
In my Vb.NET application, i have a listbox, which contains different headings. I also have many text files containg data.I want that when i click on Heading1 of Listbox, then the program shows me the information related to the Heading1, after searching from the text files and display it in RICH EDIT BOX.
Kindly help me in this regard.
EsHbAn BaHaDuR
|
|
|
|
|
Imports System.IO
Imports System.Text
Public Class Form1
Inherits System.Windows.Forms.Form
#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 ListBox1 As System.Windows.Forms.ListBox
Friend WithEvents RichTextBox1 As System.Windows.Forms.RichTextBox
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
Me.ListBox1 = New System.Windows.Forms.ListBox
Me.RichTextBox1 = New System.Windows.Forms.RichTextBox
Me.SuspendLayout()
'
'ListBox1
'
Me.ListBox1.Location = New System.Drawing.Point(8, 8)
Me.ListBox1.Name = "ListBox1"
Me.ListBox1.Size = New System.Drawing.Size(120, 199)
Me.ListBox1.TabIndex = 1
'
'RichTextBox1
'
Me.RichTextBox1.Location = New System.Drawing.Point(144, 8)
Me.RichTextBox1.Name = "RichTextBox1"
Me.RichTextBox1.Size = New System.Drawing.Size(192, 200)
Me.RichTextBox1.TabIndex = 2
Me.RichTextBox1.Text = "RichTextBox1"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(352, 230)
Me.Controls.Add(Me.RichTextBox1)
Me.Controls.Add(Me.ListBox1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ListBox1.Items.Add("This")
ListBox1.Items.Add("Is")
ListBox1.Items.Add("A")
ListBox1.Items.Add("Way")
ListBox1.Items.Add("This")
ListBox1.Items.Add("Can")
ListBox1.Items.Add("Work")
RichTextBox1.Clear()
End Sub
Private Sub GetFiles(ByVal di As DirectoryInfo, ByVal searchPattern As String, ByRef MyFiles As ArrayList)
For Each fi As FileInfo In di.GetFiles(searchPattern)
MyFiles.Add(fi.FullName)
Next
For Each d As DirectoryInfo In di.GetDirectories()
GetFiles(d, searchPattern, MyFiles)
Next
End Sub
'this is the search and it is CASE Sensitive
'it searches for the first occurrence of the search word
'and records the path and filename in the richtextbox1
Private Function ReadMyFile(ByVal MyFilePath As String) As String
Dim MyStreamReader As StreamReader = IO.File.OpenText(MyFilePath)
Dim MySB As StringBuilder = New StringBuilder
Do While MyStreamReader.Peek() >= 0
MySB.Append(MyStreamReader.ReadLine())
Loop
Dim index As Integer = -1
Do
index += 1
index = MySB.ToString.IndexOf(ListBox1.SelectedItem, index)
If index >= 0 Then
RichTextBox1.AppendText(MyFilePath & vbCrLf)
Exit Do ' remove this to find all occurrences
End If
Loop Until index = -1
MyStreamReader.Close()
Return MySB.ToString()
End Function
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
RichTextBox1.Clear()
' files to search for
Dim searchPattern As String = "*.xml"
' directory to start recursive search in
Dim InitDirectory As String = "C:\xmldata\"
Dim MyFiles As ArrayList = New ArrayList
Dim di As DirectoryInfo = New DirectoryInfo(InitDirectory)
GetFiles(di, searchPattern, MyFiles)
For Each s As String In MyFiles
'Debug.WriteLine(s)
ReadMyFile(s)
Next
End Sub
End Class
|
|
|
|
|
I am attempting to convert a UTC time into a normal date and time using a dataset and the dataset's .GetXML() method.
I currently have the following UTC Time:
2004-08-16T16:30:54.0000000-05:00
I would like it to display as:
8/16/2004 4:30:54 PM
This is so that when I create an Excel file through XSLT, I can set the column type to Date and then have a date that is User Friendly.
Thanks for any help that can be provided.
|
|
|
|
|
Daytime, Internet Time Service Class
By Alastair Dallas
http://www.thecodeproject.com/vb/net/daytime.asp
|
|
|
|