Communications :: Get Local IP (Strange Return)?

Jun 24, 2008

It seems to be the general consensus from most places I have looked that the following code

Code:
Dns.GetHostEntry(Dns.GetHostName).AddressList()
Is the correct method of getting the local IP address of a machine, and when run against

[code]....

View 5 Replies


ADVERTISEMENT

Strange Output During Compile When Adding Local Namespace To XAML

Mar 16, 2012

I'm attempting to create a bound WPF control; when I add a local namespace to the UserControl, I get strange output from the compiler. The header of the UserControl follows, with the offending line highlighted.[code]When that line is present, the compiler generates the following in the output:[code]

View 2 Replies

Communications :: Getting Local IP Address In Vista

Jul 14, 2008

I'm running into a problem with this code:

[Code]...

The problem is that I'm running on Windows Vista and the above code seems to want to return the IP V6 information and not the V4 information. How can I force it to return the V4 information?

View 1 Replies

Communications :: Serial Port Read Wrong Return Result?

Dec 17, 2008

Anyone else have an issue using read, It appears when I use read it gives me the correct buys but returns the wrong integer value So I use it and it fills the Array i make with &h10, &h6 but read reutnrs number of bytes returned to 1. if there a better way to go with Vb.net with RS232 I mean really my projet dosent have anything out of the Normal

Friend WithEvents CashValidator As System.IO.Ports.SerialPort = New System.IO.Ports.SerialPort("COM1", 9600, IO.Ports.Parity.Even, 8, IO.Ports.StopBits.One)
CashValidator.Read(MyResponce, MyResponceLen, 4)

View 2 Replies

Gained By Using The Function Itself To Hold The Return Value Instead Of Declaring A Local Variable?

Oct 28, 2010

What's best practice (in VB.Net):

Function GetSomething() as String
GetSomething = "Here's your string"
End Function
or
Function GetSomething() as String
Dim returnString as String = "Here's your string"
Return returnString
End Function

Obviously, neither of these implementations make any sense, but they're just meant to illustrate my point. Is there anything to be gained by using GetSomething itself to store the return value instead of declaring returnString locally and then returning that (does it avoid having an extra string allocated/instantiated - and if so, are there any performance/memory benefits)?

View 6 Replies

Communications :: Send A Command Via RS232 Communications

Jan 26, 2009

I am using VB2008 Express and am curious how to send a command via RS232 communications. The string that I need to send is 02h PON 03h. The start and end bits are 02h and 03h.

How can I convert 02h and 03h to its ascii form. In hyperterminal, I use the sequence {(hold)ALT 0 0 2} on the number pad to send the start bit.

I am using this code currently without the start and end bits

Code:

View 8 Replies

Add Domain User To Local Group While Logged In As Local Account?

Sep 15, 2010

Does anyone know how this can be done? The problem is that when you run the script to add a domain user to the local group as a local user you have no permissions to query the domain. Is there a way to pass a user name and password when doing this? [code]...

View 3 Replies

VB Dll Strange Output In C#

Aug 11, 2011

Module Module1 Public Declare Function GET_CALCULATION_FAN_ALONE Lib "EbmPapstFan.dll" (ByRef path As String) As Long Private Declare Function GET_PRODUCTS Lib "ebmpapstfan.dll" (ByRef path As String) As Long Public Declare Function SET_XML_PATH Lib "EbmPapstFan.dll" (ByRef path As String) As Long

[Code]...

View 2 Replies

C# - ASP.NET CSV Excel With Strange Characters

Mar 15, 2010

I'm exporting a table of data to CSV format, e.g.:

"COL1","COL2","COL3"
"1","some text", "£232.00"
"2","some more text", "£111.00"
"3","other text", "£2.00"

The code to export is fairly simple using an ashx handler:

[Code]...

My issue is when Excel tries to open the exported file the character appears before all £ signs, e.g. £232.00 when the value should be £232.00.

View 1 Replies

Serializing XML With Strange Namespaces?

Jul 14, 2011

Question: How does the class for the serialization of this XML content look ?

<?xml version="1.0" encoding="utf-8"?>
<vcc:CreateTextSearchResponse xmlns:vcc="urn:veloconnect:catalog-1.1" xmlns:vct="urn:veloconnect:transaction-1.0">

[code]....

View 2 Replies

SQL Keys Acting A Little Strange?

Jun 15, 2011

I have a bit of a strange problem with MySQL that I've never seen before. Basically, I need to enter the same entry into a table x number of times. The Primary Key is auto increment so there shouldn't be any duplicate value problems. However, it takes the last few columns and seems to clump them all into one value and is using that as a key. The error I'm getting back is:Duplicate entry '80-0--2011-06-16-0-1' for key 'idx_mtind you, there is no field called idx_mt. The primary key field is called just ID. And that 80-0--2011-06-16-0-1 is the last 8 columns or so (which you can see the names of in the cols variable) concatenated, which they obviously shouldn't be doing. Also, the first time the loop runs through, the entry goes through, but the later ones conflict with it. I confirmed that this is the problem by changing one of the last 8 columns to a value based on a loop, and that went through with no problems.

Dim cols As String = ""
Dim msi As System.Globalization.DateTimeFormatInfo = New System.Globalization.DateTimeFormatInfo()

[code]...

View 1 Replies

Strange COM Behaviour Called From .net?

Oct 13, 2010

i am working on an application which calls the COM component of a partner's application.Ours is .Net, theirs isn't. I don't know much about COM; I know that the component we're calling is late-bound i.e.obj As Object = CreateObject("THIRDPARTY.ThirdPartyObject")We then call a method on this COM object (Option Strict Off in the head of the VB file):obj.AMethod(ByVal Arg1 As Integer, ByVal Arg2 As Integer, ByVal Arg3 as Boolean)I am a bit nonplussed that even though this call works, this overload doesn't exist in the COM interop .dll that is created if I instead add a reference to the COM server using Add Reference. The only available call to this method that it says is available is AMethod().

View 3 Replies

Strange ConFig Error?

Mar 8, 2011

this one has me stumped - problem is bolded

Compiler Error Message: BC30456: 'Login1_Authenticate' is not a member of 'ASP.login_aspx'
<asp:LoginView ID="LoginView1" runat="server">
<LoggedInTemplate>

[code].....

View 6 Replies

Strange Tab Control Cut Paste?

Jan 15, 2010

ok I have a form.. has too much.. so I want to now use tab controlin VB6 I would delete then paste the object into the tab control andI recall it worked ok..with vs08 I cut and paste and looks ok.. but doesnt work..lets say I had button btnInstall when I paste it over its that name.. butwhen I click on it now.. it goes to btninstallButton_Click_1why did it put the _1 on there ? I didnt copy and paste .. I cut..

View 6 Replies

VS 2008 Strange Cmbbox

May 29, 2009

I got kind a mystery situation. There's not a lot of code, only few lines but the point is that it only works partially (it saves but does not load).

I tested it with another cmbbox1, which makes it work on seperate cmbboxes but not on either one or onother on their owns.[code..]

I got other cmbBoxes with titles on them loaded from the DB and they work fully, only this one doesn't.what should I look at?

View 15 Replies

VS 2008 Strange SuppressKeyPress

Jun 28, 2011

I want to supress a key for a textbox: [code]this is working, B key is supressed,but adding just a messagebox will not work..[code]

View 1 Replies

Asp.net Strange Exception Every Three Minutes Approximately

Mar 14, 2012

I am trying to make a very simple aspx page that pulls some data from a mysql database.
The page builds without a problem. (the aspx contains just the default form and a div just to print some data)

[Code]....

View 1 Replies

Automated Outlook Behaving Strange?

May 23, 2011

I&#65533;m using Outlook to automatically send an email to my mobile phone. To bypass the stupid "security" bug in outlook I use redemption.safemailitem.Now, this has worked for years, but for some reason I can&#65533;t change the adress to which outlook sends the mail. Instead of sending to the adress in the code, it sends to an old adress that&#65533;s not anywhere in the code (but it was, ages ago)

View 6 Replies

Creating An Xml String In .net And Having Strange Errors

Apr 13, 2011

I cretaed a vb application where I concatenate a string to build XML code and Im getting an error stating that I must include a matching PURCHASE-ORDER-SHIP-TO end tag which clearly exists see below:

sMyXml = sMyXml + " <PURCHASE-ORDER-SHIP-TO>" sMyXml = sMyXml + " <DIRECT-QUESTIONS-TO>ATHOS PETROU</DIRECT-QUESTIONS-TO>" sMyXml = sMyXml + " <address:ADDRESS xmlns:address=""http://www.removed"">" sMyXml = sMyXml + " <address:NAME-LINE-1>Addr1</address:NAME-LINE-1>" sMyXml = sMyXml + " <address:NAME-LINE-2></address:NAME-LINE-2>"

[Code]...

View 3 Replies

Get Rid Of All Strange Characters That Can't Get Into Mysql From A String?

Mar 14, 2012

I have a problem with strange character.

In mysql this character 💀 cause error Incorrect string value: 'xF0x9Fx92x80'

Samples of these characters are from [URL]

Say I want to analyze data from the web and found some strange character

how to remove this character 💀 ??

The occurance is rare.

In fact, how to know all characters that may be problematic for mysql and remove that? I am not saying escapeable characers. I am saying characters that are neither numeric, alphabeth, or chinese scripts, or punctuation. Characters that's totally bizarre.

How do I get rid of that from a string?

View 1 Replies

PSP Sync Program Strange Error?

Jul 26, 2008

Its a Program i created to Sync PSP with my PC (like psp manager)you browse through titles (images) add/remove/sync options plus aconnectivity test but when i start the "Sync.exe" VB Studio 2008 saysthat theres a problem with this code:

Dim Bypass
Dim Value As Short
Bypass = FreeFile()

[code].....

View 7 Replies

Strange Characters When Using Stream Writer

Aug 22, 2009

I am having a strange issue when using the StreamWriter where I am getting some strange charachers in my text file when reading data from a query string.

[Code]...

View 3 Replies

String Char Strange Appearance In XML

Feb 17, 2011

Why when I wrote in a xml the char "&" it appears &amp; ??

View 3 Replies

VS 2008 Get Strange Numbers For The Output?

Oct 23, 2010

I am working on a program that takes 12 numbers that the user inputs and calculates the total and average but every time I run it it comes out to be like 6.5 and numbers like that.

' Store the starting values in total and count.
sngTotal = 0
intCount = 1

[code].....

View 2 Replies

VS 2008 Strange Output By Use Of LineInput

May 31, 2012

i'm using lineInput to read a text file but get a problem with a certain record.it shows [code]I've changed the encoding to utf8, ansi, ... but nothing helps. Anybody an idea what could be the cause?It only does this with the first record in the file.

View 3 Replies

.NET Forms Behave Strange On Design-time?

Feb 20, 2009

I'm developing with VB.NET 2008.One of my host was crashed, so I take the files and keep development on another host. But now something strange is happening:All frames, lines and shapes are disappeared on design-time, but are seen normally in runtime.

[Code]...

View 1 Replies

AutoIncrement Column Strange Behavior On .mdb Files?

Aug 1, 2010

After a successfull bindingsource.AddNew(), .EndEdit(), TableAdapter.Update(), i'm trying to get the value of the PrimaryKey from the newlly added record wich is always = -1!

Private Sub BtnNewClient_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnNewClient.Click
If BtnNewClient.Tag = "New" Then
SetClientLayout(ClientLayouts.CLNew)
Me.ClientsBindingSource1.AddNew()

[code]....

View 3 Replies

C# - DotNet DateTime.ToString Strange Results

Dec 15, 2009

Why does: DateTime.Now.ToString("M") not return the month number? Instead it returns the full month name with the day on it. Apparently, this is because "M" is also a standard code for the MonthDayPattern. I don't want this...I want to get the month number using "M". Is there a way to turn this off?

View 6 Replies

Datagridview Checkbox Column Strange Behavior?

Mar 2, 2009

I have a simple datagridview that I fill from a mysql database using the latest mysql connector.net.I configured my columns in the datagridview collection and the data displays fine.I don't want the user to edit data directly in the grid so my datagridview is not readonly but all my columns are except the checkbox one. If I set the datagridview readonly I can't check my checkboxes.I added a checkbox column to be able to delete multiple rows easily but I can't uncheck a checkbox.

Let's say I have 3 rows in my datagridview I check line 1 checkbox- I check line 2 checkbox- I uncheck line 1 checkbox- I check line 3 checkbox As soon as I check line 3 checkbox, line 1 checkbox becomes checked "automagically"

[Code]...

View 4 Replies

File I/O And Registry :: Strange Chars In Textfile?

Nov 29, 2010

I write one line of text to a file and when I looked into the file I see three chars which I did not write

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved