Get Public Ip Address?
May 25, 2012How can I use my VB.NET application to get the public IP address of my computer?
View 2 RepliesHow can I use my VB.NET application to get the public IP address of my computer?
View 2 Repliesfinding my public IP address using .NET?
I've seen code that simply gets the text output from whatismyip.com but I want to use my own domain to find the IP address because I know it will always be available and I can use it as much as I like.
I'm assuming that I could get my public IP somehow by pinging a remote server such as a domain name that I own, but I'm struggling to find anything other than the built in ping in VB.NET which simply gives true or false as a result.
I did try doing a search first but for some reason the search is not working for me, Sits there apparently 'searching' for around 5 minutes then get a page cannot be displayed so I thought I would ask the question instead.
View 5 RepliesI can access a module from code behind but not from the aspx page in inline VB code <% ... %>.
View 2 RepliesImports System
Imports System.Threading
Imports System.ComponentModel[code]....
how to declare "smsport" on class smscomms as public so that it can be access in class form1 or button1_click event.
How do declare a public variable .aspx web page that can be used in all the pages within my web application?
View 3 RepliesAre there any IP Address filters or masks available in Windows Forms as per following screenshot? A backslash shouldn't be allowed or it should be filtered somehow.
View 1 RepliesSocketException was Unhandled: Only one usage of each socket address (protocol/network address/port) is normally permitted I get this error every time i click collect a second time.
[Code]...
Can anyone point me to some code which can help obtain the network address from the host IP and subnet mask?
View 3 RepliesI made web browser which consist address bar that I use it to type addressess in it i.ewhen I type [URL] it opens [URL] but when I go to anther page in google it doesnot show it's link in address bar lix InterntExplorer or other international browsers so how to show any link or any sub page's link in my browser address bar ?
View 1 RepliesI'm trying to use the DHCP API (using the references on pinvoke.net) to retrieve a computer's MAC address when given the IP address but I can't get the code to work. I've run all the C# code on pinvoke.net through the C#-to-VB converter but I'm stuck now.
Here's what I have so far. The value of res is always 5 (should be 0). Thing is, I can't find any documentation on what the return codes mean
vb
Private Sub GetMACDim client As String = "1.1.1.1" Dim server As String = "0.0.0.0" Dim si As New NativeMethods.DHCP_SEARCH_INFO si.SearchType = NativeMethods.DHCP_SEARCH_INFO_TYPE.DhcpClientIpAddress si.ClientIpAddress = Convert.ToUInt32(StringIPAddressToUint32(client)) Dim res As UInteger Dim oInfo As IntPtr
[code]....
' Use Your work Group WinNT://&&&&(Work Group Name) Dim DomainEntry As New DirectoryEntry("WinNT://Wokgroup") DomainEntry.Children.SchemaFilte
[code].....
In member register page, I added email address validation but it only check the email address format, such as .com, .net, .org.If user inputs fake account such as aaabbb01010@gmail.com, how to verify it and return an error?
View 2 Replieshow to assign a static ip address and dns adress by VB2008?
I search in MSDN,use system.net.ipaddress??or something else?
does anyone know how to get a computer's mac address with an IP address?
View 25 Replieswhere i put the *'s i get the error "The parameter 'address' cannot be an empty string. Parameter name: address".
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Dim mail As New MailMessage()
Dim SmtpServer As New SmtpClient
[code].....
I want to know what implies to declare a function or a sub using public or directly Sub / Function i.e.:
Public Function Whatever()
' Process
End Function
versus.
Function Whatever()
' Process
End Function
explain me the difference between them? I'm new to visual basic, and I need to know the very basic things in Visual Basic allowing me to become a professional User
View 8 Replieshow to add public variable that can be accessed by all forms??
Module mdlStorage
public s as String
End Module
I made a module and tried to use it but it cannot be used?
Im having trouble with this code, when i had it working with static variables set, it was fine, now i am using a passed variable, its not working... Might not be anything to do with it, anyhow...
[Code]...
I can't use a public sub in another form...
Here is what I'm doing:
I created a button called BTest and a TextBox called TBTest.
When I press BTest, it writes on TBTest "BTest Worked!".
PS: The button BForm2 is just for Form's change.
Form 1
Public Class Form1
Private Sub BForm2_Click(ByVal sender As System.Object, ByVal e As
[Code]....
I am looking to crack(Break) public key of DLL component
View 5 RepliesI have been playing around with VB for a while now, but still need to consolidate some thoughts. I was wondering if anyone could answer this..... Whats the difference between say Form1_Load and Public Sub New() on form startup? The reason i ask is i normally add calling subs to the form load process, but can you add any startup calls to the Public Sub New(), and if so, what is the advantage?
View 1 RepliesPublic Sub SToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SToolStripMenuItem1.Click
Lots of code
[code].....
Public Sub mainlogin_Authenticate(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.AuthenticateEventArgs) Handles mainlogin.Authenticate
'Are the credentials valid?
If Membership.ValidateUser(mainlogin.UserName, mainlogin.Password) Then
'Has the password expired?
[Code]...
Error 6 'System.Web.SecurityUtils' is not accessible in this context because it is 'Friend'.
I have a couple of PUBLIC SUB's on my Form1. Is there a way that I can execute them on Form1 through another Form / Button-click? I am using a Dialog1.ShowDialog() for configuring some settings for my application. Now, I have most stuff on my Form1 set / loaded via PUBLIC SUB's (for example THEME SETTINGS, DROPDOWN LIST values and so on), and if I change something in the Dialog1 this Subs need to be executed again ...
Before my explanation gets too complicate, here a sample with a simple SUB:
Asume you have a Form1 with a Button1. On Button1Click a Dialog1.ShowDialog will be executed. In addition you have the following PUBLIC SUB on Form1:
Public Sub ShowMessage()
MessageBox.Show("Hello World!", "Message:", MessageBoxButtons.OK, MessageBoxIcon.Hand)
End Sub
How could I execute this Sub on Form1 from Dialog1 (maybe on a ButtonClick event)?
I am working on someone elses code, and this is in a Public Class I have the following code (same error msg both procedures):
Protected Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext)
MyBase.New(info, context) <<<------ Line With Error
End Sub
[code]....
and get the error message "Too many arguments to 'Public Sub New()'"This is the first time I have seen this type of code in a class?
[code]
Public Class Printing_CopyFrm
Private quer As String="select * form cust_details"
Public Sub New(ByVal query As String)
[CODE]...
I'm converting a VB.net library to C# and having trouble finding the C# equivalent to a VB.Net Public Module.
In the same VB class is a With block. Any idea what the equivalent might be for that as well.
I have a public function to call default email client.Public Function OpenEmail(ByVal EmailAddress As String, Optional ByVal Subject As String = "", Optional ByVal Body As String = "") As Boolean
[Code]...