|
I am writing a netstat for windows kind of application which tell you which process is accessing what port etc. The problem is that netstat returns PIDs but not the program names.
My question is how do i translate a PID into a program name.
|
|
|
|
|
dear all,
how can i merge data from 2 or more xml files having similar kinds of tags.
is there way to do this using VB
thanx and regards
rIsHaBh
|
|
|
|
|
We have had multiple occurances of datasets disappering from the designer. We cannot be specific about the circumstances since we simply do not know when this will occur or under what conditions.
The .xsd and associated .vb files are still located in the source directory. The .vbproj file has references to both but is missing the following tagged lines (as an example). Restoring the tagged lines allows the code to compile correctly, but the data sets still do not show up in the designer. The implication is that we can't select the dataset and look at or modify the schema. Here is a snippet from the .vbproj with the missing lines tagged by >>>
<file
relpath="LabNfonts.vb"
="">>> DependentUpon = "LabNfonts.xsd"
SubType = "code"
>>> BuildAction = "Compile"
>>> DesignTime = "True"
>>> AutoGen = "True"
/>
<file
relpath="LabNfonts.xsd"
="" buildaction="Content">>> Generator = "MSDataSetGenerator"
>>> LastGenOutput = "LabNfonts.xsd"
/>
We are using a single data adapter and reconfiguring it to generate each data set. At execution time, the dataAdapter select, insert, delete, and update comman text is dynamically altered.
The only other way we have found to get the datasets back is to completely delete the dataset and all references to it in the MS generated code, then reconfigure the dataAdaper and regenerate the the dataset.
This is a huge waste of time, and I believe there must be s simple solution for prevention and cure of the problem.
Any insight would be greatly appreciated.
Thanks.
|
|
|
|
|
Hi,
I need to open a Word document in Crystal reports for .NET at run time.
Can anybody suggest a good means of acheiving this?
Thanks
Pedro Silva
|
|
|
|
|
Hey guys, I used VB.NET running on Win2K Advanced Server (SP3). I played around with DataGrid and it went fine. However, there's one point where all the changes I made seem to have no effect on the program when I ran it.
This is what happened:
I created a datagrid containing 3 columns, then I set the datasource to the dataset I read from SQL. It went fine!
Then I tried to play with the property of the datagrid (change the ReadOnly property for the column), and it didn't show any effect when I ran the program. Then, I delete 1 column from the datagrid (so, it's left with 2 columns), however, when I compiled and ran it, the datagrid still showed up with 3 columns!!!
Has anybody experienced this before? Or know the reason behind it?
Thanks in advance for your help!
|
|
|
|
|
I haven't used too much of the Windows datagrid, but if IIRC, any changes you make to the grid(like column no, or size) will not be reflected if you use databinding.
|
|
|
|
|
I'm trying to parse a CSV string and examples I've found so far do not appear to work with VB.NET
The regular expression I'm trying to work with is
,(?=([^"]*"[^"]*")*(?![^"]*"))
So if I'm coding this in VB.NET I have to replace the double quotes with two double quotes right?....
Therefore, my code is using a simple form with two controls as follows...
Dim re As Regex = New Regex(",(?=([^""]*""[^""]*"")*(?![^""]*""))", RegexOptions.Compiled)
Dim myArray() As String = re.Split(TextBox1.Text)
TextBox2.Clear()
Dim i As Integer
For i = 0 To UBound(myArray)
TextBox2.Text = TextBox2.Text & myArray(i) & vbCrLf
Next
Now if TextBox1 is A,B,C it works as expected
If any of the values have double quotes round them it all goes pear shaped.
Eg. a,"substr1,substr2",3.14,"hello" comes out with 7 elements in my array
a
,3.14,"hello"
"substr1,substr2"
3.14,"hello"
3.14
"hello"
"hello"
this is doing my nut! I've been looking at reference books and still can't get it to work.
Is there someone out there that's going to be my saviour?!?!
cheers
mf
|
|
|
|
|
Please help,there is any method or way to print data from datagrid.
|
|
|
|
|
Sure, there are some examples if you search on CP.
|
|
|
|
|
Have you investigated the PrintDocument class? You may want to subclass PrintDocument to output rows from the source of a datagrid.
|
|
|
|
|
Ok, anyone got an idea on how to do this in VB.NET? I need to know how to put Descriptions onto the Properties of my Classes that will show up in the "Tooltips" that display during Intellisense typing. Also, I'd like these descriptions availabe in the Object Browser.
You used to be able to do this in VB6 by going to "Tools --> Procedure Attributes". No, I am not looking for the "ComponentModel.Description" either...that is only for design time control properties (so it seems).
|
|
|
|
|
Can't you just use the <Description()> attribute?
[Edit]Sorry bout that, forgot that < wouldn't work in html [/Edit]
|
|
|
|
|
Well, no, that's what I said in my post..."ComponentModel.Description()" does absolutely nothing except display a Description in the Properties Editor on a Form. I want the Description to show up like it does in the Object Browser (with a Summary, etc.) and also to display a Tooltip while typing in Code.
|
|
|
|
|
You mean like the what the XML Comment does for C#? Well, if that's what you want, VB.Net doesn't support that, but I think there are 3rd party tools that replicate that somewhat. You'll have to look around.
|
|
|
|
|
I guess so. You know, that's retarded...I thought everything in the CLR was exactly the same no matter what language. So why does C# have more design-time enhancements than VB? For example, why do we always have to comment every ^%$%@ line of code instead of "/* .... */ ". Not that I am complaining...too much, because I do not like the syntax of C# / C++. I can understand and read it, but I don't think I'll ever code in it
|
|
|
|
|
|
Could someone please tell me if it is possible to select multiple rows with a msflex grid using the CTRL key? If not what component should I use?
|
|
|
|
|
I have a dll (written in PowerBasic) which I need to call from VB .NET. I dont want to rewrite the dll in .NET. So I decided to add a reference to the dll by adding a reference to it.
.NEt wont let me add the reference to the dll regularly.
how do i call functions in this dll??
P.S. It is not a COM dll, just a regular dll.
|
|
|
|
|
How can you get a button click event to search through multiple databases to bring up the results based on what is multiple drop down lists, check boxes, and list boxes?
How would you get labels for these results to appear? Some would have to match the columns in the database and some would have to match the contents of the drop down lists etc.
We want to do this in vb.net
|
|
|
|
|
This may be done someplace else, or even part of the .NET development package, but I have not found it so far. So I have created a small windows app called UGWarnDel that will remove those messages. The executable is under 6k zipped. If there is a need for this, you can contact me at my email address. Be forewarned, I am behind the email filter provided by INTERREACH.COM.
|
|
|
|
|
I am writing a program that accesses a CICS system using a socket. The problem I am having is that the server is slow and sends either a maximum of 393 bytes total (size of record) or a Chr(13) showing that the output is complete.
My question is that whether it is better to read byte for byte from the server (since it is slow) or set the receive window size in the tcpclient. The second solution has a limitation since I am waiting for a particular character in the output stream to show that my output has ended.
Thanks,
|
|
|
|
|
There is an Example in the MSDN help on receiving Data from a Socket. However, it uses the TCPClient Class instead of Socket, I am sure you can modify this. Do a search on "Chat" and it should find an example of a Chat application. In that example, it will show how to receive data Asynchronously.
|
|
|
|
|
I have an object that fires an event and a form that handles that event. When handling the event i show a new form but the new form hangs. It gets "Loaded", "VisibleChanged" and "Activated" events and hangs. I am attaching vb code as an example.
Please see and if you can figure out why it is so i will really appreciate if you tell me.
Thanks in advance!!!!
P.S. as I understand its a bug - the form must show without problems!!!
here is the sample code of the error in vb.net ))
'Class EventRaiser raises SomeEvent 3 seconds after it is loaded.
'EventHandlerForm handles that event and shows modeless form.
'Normally the new form must have no problems but actually it
'receives "Load", "VisibleChanged" and "Activated" events and hangs.
'Raises event "SomeEvent" 3 seconds after it is created.
Public Class EventRaiser
Public Event SomeEvent()
Private WithEvents myTimer As New System.Timers.Timer()
Sub New()
myTimer.Interval = 3000
myTimer.Start()
End Sub
Private Sub mytimer_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles myTimer.Elapsed
RaiseEvent SomeEvent()
myTimer.Enabled = False
End Sub
End Class
Public Class EventHandlerForm
Inherits System.Windows.Forms.Form
'EventRaiser raises SomeEvent 3 seconds after it is created.
Private WithEvents myEventRaiser As New EventRaiser()
#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
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
Me.Label1 = New System.Windows.Forms.Label()
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(16, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(320, 32)
Me.Label1.TabIndex = 0
Me.Label1.Text = "New Form is shown after 3 seconds. After it is show it hangs."
'
'EventHandlerForm
'
Me.AutoScale = False
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(344, 53)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Label1})
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
'In the myEventRaiser.SomeEvent handler a new form is shown modeless.
'New form receives "Load", "VisibleChanged" and "Activated" events
'and hangs
Private Sub EventRaiser_SomeEvent() Handles myEventRaiser.SomeEvent
Dim ff As New Form()
ff.Show()
End Sub
End Class
|
|
|
|
|
There is something about creating the new form inside that event handler. Creating the few form inside the handler for a button works perfectly, but not inside the myEventRaiser.SomeEvent handler for some reason.
RageInTheMachine9532
|
|
|
|
|
You "Dim"-ed the Form variable inside the Event Handler. Remember that anytime a Routine goes out of Scope, the Variables in that Routine also get destroyed. This could be causing the problem. Dim the Form variable outside of the Event Handler routine.
Hope that helps!
|
|
|
|