|
samitha,
wtsclientinfo.dll is a wrapper for wtsapi32.dll by Jitendra Kumar, (you should get with him) about that.
But regardless, wtsapi32 microsoft documentation for WTS_CLIENT_ADDRESS, which is called by his wrapper has some remarks you may be interested in first:
MSDN Remarks:
The client network address is reported by the RDP client itself when it connects to the server. This could be different than the address that actually connected to the server. For example, suppose there is a NAT between the client and the server. The client can report its own IP address, but the IP address that actually connects to the server is the NAT address. For VPN connections, the IP address might not be discoverable by the client. If it cannot be discovered, the client can report the only IP address it has, which may be the ISP assigned address. Because the address may not be the actual network address, it should not be used as a form of client authentication.
Reference:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/termserv/termserv/wts_client_address_str.asp[^]
progload
|
|
|
|
|
Great catch! A fine example of how reading the documentation on what your using can save you from wasting a lot of time.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
NAT won't be a problem. Can anybody suggest me a method to find the client's subnet mask giving its IP Address?
samitha
|
|
|
|
|
Hello, Everyone
Heres my problem, I have a binary search tree with 100 randmon elements in it. I have gotten that down, but can anyone give me some help on to how to get a count of those random number as they are entered into the tree. heres the code i am using
For index = 0 To 100
Nums.insert(CStr(Int(Rnd() * 100)))
Next
|
|
|
|
|
Create the random number. Then write code to record the frequency of each number. Insert the number into the binary tree.
|
|
|
|
|
Hi everyone
Could you please help me?
I would like to know the length of Two Dimension Array.
Example :
Dim arr(2)() as string
Dim LenRank2 as Integer
Dim i as int32
For i=0 to 10
arr(1)(i)=i.ToString
arr(2)(i)=i.ToString
Next
LenRank2 = arr.GetLength(1)
I got the error message
"Index was outside the bounds of the array."
I want to get the length of second dimension.
What's wrong?
Thank in advance.
!alien!
|
|
|
|
|
The error message is because of the first dimension.
In VB: If you declare as arr(2), the index will start from 0.
ie. arr(0) and arr(1)
If you want to use arr(1) and arr(2), declare as arr(1 to 2)
|
|
|
|
|
Thank you for your reply. Have a nice day.
!alien!
|
|
|
|
|
You can get the length of the inner arrays by calling Length(). Just like how you would do it with the outer array.
Dim myArray()() As Integer = {New Integer() {1, 2, 3, 4}, _
New Integer() {1, 2}, _
New Integer() {1}}
For index As Integer = 0 To (myArray.Length - 1) Step 1
MessageBox.Show(myArray(index).Length.ToString)
Next
The output above will be "4", "2", and "1".
|
|
|
|
|
How do you code passing of parameters from a VB form to a crystal report.
Ex : There is a textbox called "name" I need the value of that box (name.text) to be displayed in the crystal report
AMIF
|
|
|
|
|
Hi,
How do we make a listbox to respond directly when the user clicks on the items in the textbox? (such as making a menu appear or displaying info in a label when the items are clicked)
I have used the SelectedIndexChange event but nothing happens when the listbox items are clicked. The SelectedIndexChange event only seems to work when a button is added. It seems that the button's click event gets the listbox's selectedindex change event to start working. The listbox's textchanged event doesnt seem to work also.
Is there any way to make the listbox respond directly to the user's clicks without the use of button controls?
|
|
|
|
|
KaKa` wrote: How do we make a listbox to respond directly when the user clicks on the items
You catch the SelectedIndexChange event. So yes, you are on the right track.
The SelectedIndexChange event is only raised when the user selects a different item in the list. It's raised when you click or arrow through the items in the list. It should be just that simple.
KaKa` wrote: The SelectedIndexChange event only seems to work when a button is added.
When a button is added? Huh? What exactly are you doing here?
Also, the SelectedIndexChange event should not be effected by buttons. There must be something wrong in your code. Perhaps you should post your SelectedIndexChange code.
|
|
|
|
|
Not sure why yours did not work from SelectedIndexChanged but here is a code cut to use and try.
<br />
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles listStat.SelectedIndexChanged<br />
If listStat.SelectedIndices.Count > 0 Then<br />
<br />
Label1.Text = ListBox1.SelectedItems(0).Text<br />
<br />
End If<br />
If you list box is static you can get the index (integer) and in a Select / Case statement fire off different events. If the list box is populated dynamically you will have to loop through and pull out the index.
Jason
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
Hello,
I want to create a Custom Minimize & Maximize/Restore button in VB.Net. Can anybody tell me that What is the code for Minimize, Maximize/Restore Window.
Thanks In Adv.
-- modified at 21:07 Monday 20th February, 2006
|
|
|
|
|
Me.WindowState = FormWindowState.Minimized
Me.WindowState = FormWindowState.Maximized
chatura
|
|
|
|
|
hi again,
can it possible to make Panel control scrollable? How?
Thanks in Adv.
|
|
|
|
|
Yes.
In the designer select the panel on your form, go to its property panel, and set AutoScroll to True.
Afterwards, scrollbars will automatically appear when controls no longer fit inside the panel.
|
|
|
|
|
Is there a way to hide the console window in a console application? Or if not is it possible to open a command window in a Windows application? Any help is greatly appreciated.
|
|
|
|
|
|
coder45 wrote: Is there a way to hide the console window in a console application?
So do you not want to display the console window at all? Ever?
In that case, create a WinForm project without any forms.
coder45 wrote: Or if not, is it possible to open a command window in a Windows application?
You can launch a console window like this. The second argument passes a string of command line arguments.
System.Diagnostics.Process.Start("cmd", "/?")
|
|
|
|
|
Wonder if any of you guys can point me in the right direction? I'm really new to VB.NET, and its probably really simple, but I'm wondering if there is a VB.NET equivalent of the MSAccess &variable trick that I've often used to have Access use a string as the variable??
For example, the current snippet of VB.NET code reads:
Do While intCheckBoxesToCount < 12
strCheckVariable = "CheckBox" & System.Convert.ToString(intCheckBoxesToCount)& ".Checked"
... and then I want to perform some analysis of my string. What I was hoping for was something along the lines of ...
If &strCheckVariable = True Then .....
|
|
|
|
|
Why not keep an array of CheckBox control references and loop through that?
Class Foo : Inherits System.Windows.Forms.Form
<code>Public myCheckBoxes() As CheckBox</code>
'
Private Sub Foo_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
<code> myCheckBoxes = New CheckBox() {CheckBox1, CheckBox2, CheckBox3}</code>
'
' Do something...
'
<code>For Each chkBox As CheckBox In myCheckBoxes
If (chkBox.Checked) Then
' CheckBox is checked!
End If
Next</code>
End Sub
End Class
|
|
|
|
|
Thanks - this works well
|
|
|
|
|
Dear Friends, I need to save some sounds like "a" and "b" sound. Then I want my software to play them together without any break between those two sounds. Do you have any clue about this? For example I can play 2 recorded sounds by this code below. But there is some break between them. Can I prevent that break? Thanks for help.
Private Sub Command2_Click()
Dim Array1(1 To 10) As String
Dim Yol As String
Dim Tur As String
Yol = "C:\Proje\Sounds\"
Tur = ".wav"
Array1(1) = "a"
Array1(2) = "b"
Array1(3) = "c"
For i = 1 To 3
Call Play(Yol, Array1(i), Tur)
Next i
End Sub
Sub Play(Yol As String, Ses As String, Tur As String)
OLE2.SourceDoc = Yol + Ses + Tur
OLE2.Action = 1
OLE2.Action = 7
End Sub
-- modified at 16:27 Monday 20th February, 2006
|
|
|
|
|
hello
i have a combobox with the following data:
KL1
KL10
KL2
KL3
But I want to sort the combobox alphabetically and numeric
so I want to have;
KL1
KL2
KL3
KL10
Any idea how I can do that?
Thebest
|
|
|
|