|
Hi,
I am facing lots of problem in writing a port listener. My goal was to listen the ports used by anathor application. I found some ready-made port listeners from the web. But I want to develop one for myself.
The platform can be VB/VB .NET. Please help me out....
Just do it...
Dev
|
|
|
|
|
I'm no expert when it comes to sockets, but I think you've got one problem. If you try to bind an EndPoint to a port that is already in use by another application, the bind will fail. You can't have two different apps listening on the same port.
What I think you'll have to do is capture the TCP/UDP traffic and filter out just the ports you need. And I have no idea how to do that...
RageInTheMachine9532
|
|
|
|
|
You are right I wanted to do that... But How to capture TCP/UDP or only TCP will also do now???
|
|
|
|
|
hi all
i am new to vb. by seeing all type of connection i am confused. can any one guide me which is the best way to connect access2000 database as back end to vb as front end and how to do that
with regards
Man created god Not God created man
|
|
|
|
|
Kinda tricky question - ADO is a BIG topic...
You can start with something like the code below (quick'n dirty) - remember to make a reference to some version of "Microsoft ActiveX Data Objects Library" or other in your project.
Dim DBConn As ADODB.Connection
Dim RS As ADODB.Recordset
Dim ConnectionString As String
Dim Query As String
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\myDatabase.mdb"
Query = "Select * from myTable"
Set DBConn = New ADODB.Connection
DBConn.Open ConnectionString
Set RS = DBConn.Execute(Query)
Do Until (RS.EOF)
MsgBox(RS.Fields(0))
RS.MoveNext
Loop
RS.Close
Set RS = Nothing
DBConn.Close
Set DBConn = Nothing
I would recomend that you download "Microsoft Data Access Components (MDAC) 2.6 SDK from" Microsoft. It's quite informative and containes a lot of examples for Visual Basic... (http://www.microsoft.com/downloads/details.aspx?FamilyID=cf5bf48d-9bbb-4ca2-9b03-4ee000db37ff&DisplayLang=en)
|
|
|
|
|
I have this OLE object supplied by a 3rd party software company. I use the code,C
Set obj = CreateObject("name.application"),
to run the code. This calls up the actual program, which includes a windows interface. By the companies own code, you are to use SendKeys to enter the username and password information in their login window, before the application will come up and you can then interact with the methods/properties of obj.
The problem I am having is that, while I can get this to run from a VB6 program or a VBS script, I cannot get this to run from an ASP page written in VBScript. A code segmet that I'm attempting to use is below:
Set obj = Server.CreateObject("name.Application")
set oShell = Server.CreateObject("WScript.Shell")
oShell.SendKeys "{TAB}" & "{TAB}" & "{TAB}" & "{TAB}" & _
"<username>" & "{TAB}" & "<password>" & "{ENTER}", True
obj.RunFile "test1.dxl"
str = "oleSetResult ""Hello World"""
obj.RunStr str
Any thoughts on how to get this type of scenario to work?
-cbonn1
|
|
|
|
|
HI Everybody,
I am a student in CIS and i have what may seem to be a dumb question but I was trying to build a database using Access and I was wanting to be able to enter a name and have the form compare that to the database and I have played around with code in the editor and I have no idea how to make that work. Any ideas??
|
|
|
|
|
It is not something difficult but it involves a few steps in doing so. Try get some VB books. They usually have the ADO and DAO which dedicate for this.
or if you want something F.O.C., do find out at URL
http://www.codeguru.com/vb/Database/index.shtml[^]
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
|
how to use API in VB.Net
thx
|
|
|
|
|
Check out <DllImport> in the help file.
|
|
|
|
|
How can I use the information from this hardware in VB.Net
|
|
|
|
|
They have released a mamnaged code library that wraps thier API interface and even a few sample applications. You can get them on thier website:
http://www.ealaddin.com/support/hasp/Win32api.asp[^]
I have used it and is seens very stable and easy to use.
I have not played around with any of the envelope stuff though, just with the encoded storage capabilities of the HW key.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
They have samples for accessing generic HASP DLL which is in C++ or Visual Basic 6.0. You could call generic DLL (Win32 DLLs) in VB.NET. Shouldn't be a problem.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Hi I am using the following code to replace a string in VbScript.
Documents.Closeall
Documents.Open FileName.txt, "Text"
ActiveDocument.Selection.StartOfDocument
blnFound = ActiveDocument.Selection.FindText(String)
If blnFound = true Then
ActiveDocument.ReplaceText String "ReplaceStr 2.2"
MsgBox "Hello World!", 65, "MsgBox Example"
End If
ActiveDocument.Save FileName.txt
My filename.txt looks like this:
string 2.3,002 4
The script replaces "String" with "ReplaceStr 2.2", but I also want to replace all the part following string i.e 2.3,002 4.
I want my filename to look like this after the script is run:
ReplaceStr 2.2 instead of ReplaceStr 2.2 2.3,002 4
Any help will be very much apprciated.
Thanks
|
|
|
|
|
Is there any way to check that .NET is installed before running? I'm looking to have my program put up an error message stating that .NET needs to be installed if hasn't been yet, kind of like how Windows programs used to tell you that you need to run the program in Windows if you try to start them up in DOS.
To not know is bad.
To not wish to know is worse.
|
|
|
|
|
Your going to need some kind of external process to check for the existence of the .NET Framework BEFORE your VB.NET app is launched. This is because the .NET Framework is needed just to load the VB.NET app.
I haven't been able to find any method of replacing the stub code in a .NET executable to put up the kind of message you want.
But, I could be wrong...
RageInTheMachine9532
|
|
|
|
|
DumpBin /imports indicates that the executable has a static reference to _CorExeMain in mscoree.dll . The loader won't load the executable if mscoree isn't present.
So even if you could replace the stub, it wouldn't help.
|
|
|
|
|
I was 99% sure it couldn't be done, just because of the reason you specified. I was just looking for a second opinion.
About the only way you could do that is to have a second executable check for the existence of the mscore.dll first, maybe with version checking too , then launch the .NET EXE if it finds it.
Thanks!
RageInTheMachine9532
|
|
|
|
|
I have asked a great Delphi coder to code something that detects if the framework is installed. If it is, it launches my application, if not, it tells the user which version is required (1.0/1.1) and gives the option to install it (from the CD). Very efficient way of doing it. The good thing about it being done in Delphi is that it requires no external DLL or runtime (VB6 would require VBRUN6.DLL). It could also have been done in C++, but we felt Delphi was a better language for this purpose.
|
|
|
|
|
I have three datasets that uses one datagrid to display the data. I need to format this datagrid to fit each dataset. However, I couldn't figure out how. Here's what I found out so far. In the DataGridTableStyle Collection Editor, I have created three members: 0, 1, 2. In each of these members, I have defined a GridColumnStyles collection in DataGridColumnStyle Collection Editor their properties. The problem I have right now is how do I call the DataGridTableStyle member at run time. I have three datasets that uses the same datagrid that is why I have three members in the DataGridTableStyle. But I can not figure out how to call the member that will correspond with a dataset that it is bind to the datagrid. Any help to do this task is greatly appreciated!
ljCharlie
|
|
|
|
|
How can I access the name of the server that my code is running on in VB?
|
|
|
|
|
in VB6 you can use the winsock control and query it's hostname related property.
or you can use the 'GetHostByName' WinAPI function
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
|
|
|
|
|
I've got a spin box, how do I set it so that it controls the current value of one of the attributes of my ScrollableControl??
-------------------------------
To begin at the beginning
|
|
|
|
|
Presumably the spin box control raises an event such as SpinBox1.PositionChanged or something similar (Check the controls documentation). You need an event handler for this in pseudocode it is something like this:
<br />
Private Sub SpinBox1_PositionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SpinBox1.PositionChanged<br />
'Code to handle event here.<br />
End Sub<br />
The event handler should pass data back in the Event args that you can use to set the attribute of the ScrollableControl or you could use the SpinBox controls property to set the value:
<br />
Private Sub SpinBox1_PositionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SpinBox1.PositionChanged<br />
ScrollableControl.MyAttribute = e.Position<br />
'Or<br />
ScrollableControl.MyAttribute = SpinBox1.Position<br />
End Sub<br />
If you are using VS.Net intellisense should point you in the right direction.
What are the controls that you are using and what are the properties, events and methods that you wish to change on them?
Jim
|
|
|
|