C# - Converting NAD83 UTM To Lat And Long
Feb 22, 2012
Edit So the solution I posted from Jenner at VBforums was, obviously, in VB, and I used an online converter to port it to C#. Something was lost in translations, and that's why it was 10 miles off. I'm guessing I am just misunderstanding what the algorithms at the Proj.Net discussion boards are for and that's why they weren't doing what I wanted them to.
[Code]...
View 3 Replies
ADVERTISEMENT
Oct 1, 2010
I'm developing a custom control for numeric input that does some basic value range checking and have run into an issue when I set my property ValueMin equal to Long.MinValue. The IDE generates the following line in form1.designer.vb file that subsequently is flagged as generating an overflow.
Me.NumericInputBox1.ValueMin = CType(-9223372036854775808,Long)
I've done some checking using the Immediate Window with the following results.
?Long.MinValue
-9223372036854775808
?ctype(Long.MinValue, Long)
[Code].....
It appears that the CType function does not recognize the minimum Long value when the value is typed into the function, but works fine if it is passed Long.MinValue or a string with the value. It works fine for a typed in value equal to (Long.MinValue + 1). This problem only occurs with the Long (Int64) type.
View 5 Replies
Apr 1, 2010
Does anyone has the formula to convert X,Y,Z,Vx,Vy(cartesian 5D) as well as Azimuth, Elevation(Angular 2D) to Lat Long Alt?
View 1 Replies
Nov 22, 2011
I'm trying to compute the password expiry date, and most of the example code is in C# One sample has:
[Code]....
View 1 Replies
Jun 26, 2009
I'm pulling records from a db table (sybase) where I have run into a problem with a long varchar field. Using the OLEdb class I convert the field into a string variable which works fine in most cases, but there are problem with a few records. Examining the field in the database it shows that the value is not null, but the length of the field is 0.(SELECT field, length(field) FROM table). When I try to convert this into a string the result is rubbish.strContent = objReader.Item(i). I can't figure out what's the problem here, so I have avoided the issue by doing a table update before I start the process of getting data (I set the field value to null if field.length = 0
View 3 Replies
Sep 18, 2011
Is there a easer way of coding in stead of wrighting long long paragraphs like this in one line [code]All of this is on one line and i got lots of info to put down.."The game will begin on your 16th birthday with your mother waking you up. Today you are to go to the castle for the first time. Leave your bed and open your dresser for a Strength Seed. "
View 2 Replies
Dec 26, 2009
In Visual Studio 2008 I am using :Private Declare Function BlockInput Lib "user32" (ByVal fBlock As Long) As Long To stop input from occuring during a search-replace operation.
BlockInput(True) ' do not allow input during search and destroy
Dim cursorIcon As Cursor
cursorIcon = Cursor
Cursor.Current = Cursors.WaitCursor
Then setting it to false at the end of the operation. It did not work, so I thought maybe it was because I was calling it from a child window, so I created a function in the mainwindow, and ran it like this:
FrmMain.BlockFrmMainInput()With these functions is the Main window:
[Code]...
It did not solve the problem. I thought maybe it was because I was running under the debugger, so I tried compiling and running it debugger-free, but that did not do any better. I am still getting input when I double-click the mouse on either form.
View 2 Replies
Aug 22, 2011
my goal is to
1.Take an file(exe,dll,etc)
2.Convert it into hex
3.place that hex values in a stack
4.Execute the values inside the stack to its original form(i.e. take the elements out of stack and then convert it to a compile format)
Imports System.IO
Sub Main()
Dim fileName As String = "ABC.exe"
[code]....
View 1 Replies
Jul 27, 2011
I have a VB.NET app in which I'd like to use the Stopwatch class. The stopwatch will get reset every time it enters a particular method, which may be in less than a second, or not for hours. Is there a limit to how long you can let a stopwatch run before something bad happens? i.e. an error, or performance degradation?
View 2 Replies
Apr 4, 2011
Be it in 32 or 64 bit system?
View 3 Replies
May 8, 2009
How do i put a long description in my about box? I can't put it through Assembly Information because it cannot fit.
View 8 Replies
Dec 23, 2011
This is probably a really simple thing. Basically, the user clicks a button and a potentially long running task happens. I'd like to do a few things like toggle the button's enabled state, show a spinner, etc. In VB.NET Winforms I'd just do Application.DoEvents() and the updates would happen and the code can continue. How can I do this in ASP.NET? (preferable serverside or minimal javascript)
View 2 Replies
Dec 29, 2011
I am developing a web application in asp.net vb. My current situation is,I have a main site say [URL] and another site for generating reports depending on certain user ids say [URL].If I click a button on [URL] I have to switch on the generate report page on [URL] and return to[URL]. [URL] should generate report and set a flag in database of [URL].Currently I am redirecting to the page in xyz.com and add the long running task to queue as follows and redirect back to [URL].
If ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf LongTimeTask), New Object) Then
Response.Redirect(returnURL)
End If
But the problem is its not dependable. Means some times the queue is executing correctly but some times not. There are no errors in long time task. Just the queue is not executing.
View 1 Replies
Apr 7, 2009
How i can calculate the distance between two coordinates[code]...
View 6 Replies
Oct 7, 2010
I m new to this forum and also to VB.net programming. In an application Modbus protocol is used and I have generate LRC checksum for that. But I am stuck at conversion of a Long type data to Byte type. The long type data is for example : 4294967197. I tried all the following functions:
1.b = Byte.Parse(4294967197)
2.b = CByte(4294967197)
3.b = Convert.ToByte(4294967197)
[code].....
View 4 Replies
Jul 29, 2009
Is there a way in which I can detect how long someone has been idle using a form (ie. Not clicking or entering any information into any fields/textboxes). Or would I have to implement a timer which counts this and reset it in the event handler for any entry?
View 3 Replies
Jun 5, 2011
How to Covert a long name to short name??? for example: How to convert Visual Basic name into VB
View 1 Replies
Sep 7, 2011
What is wrong with this code?When the code runs cmd.ExecuteReader I get an error saying "Incorrect syntax near the keyword 'AS'".I'm assuming I didn't breakup the sentence correctly.
Using cnn As New SqlClient.SqlConnection(clsDBConn.clsDBConnections.prpConnString)
cnn.Open()
Using cmd As New SqlClient.SqlCommand[code].....
View 4 Replies
Dec 21, 2011
I develop in VB and often I'm writing long TSQL statements in SSMS but getting them into VB is a bit of a pain. I like SSMS during development because I can change the query / structure and test it when there are problems. Some of them become stored procedures and some of them I just keep in the code.I like keeping them in the code because when I have a problem with something, I can GREP my projects directory and find the code that does something (that I've forgotten) or someone asks something about how something works, I can look it up. I've yet to find a GREP for stored procedures. Is there such a thing?I've read in a "best practices" white paper how we're not supposed to concatenate super long strings with & _ but a hundred line proceure is a pain to nest in
sb.AppendLine(" WHERE [q3] IS NULL "
sb.AppendLine(" AND [q4] > 2
"
[code]....
C# handles these things much better than VB. I'm wondering how I can keep my code together during development and searchable later. I had my hopes up when VS 2010 offered implicit line continuation, that this would help my multi line SQL procedures. Again, I was mistaken. Perhaps I could write it all on one line. I'd be interested in knowing if there's a feature that I am not aware of. Well there are certainly many features which I'm not aware of, but I was referring to "long strings".
View 1 Replies
May 8, 2012
I'm using Bouncy Castle (c#/vb.net version) and generating a 4096-byte RSA Keypair to use in my certificate with this routine:[code]The procedure works ok, however it takes a very long time, up to one minute (I'm on a 2.4ghz pentium DualCore).Since I don't have much experience (almost none really) with RSA and all these things, I just wanted to ask if it's normal that it takes so long to generate the key, or if I'm doing something wrong.
View 1 Replies
Jun 21, 2012
I used to do this by eg String(52,95). (Getting 52 repetitions of an underscore) Cannot make out how to do it in dot net. I realise that String is no longer right but Str is not working either.
View 3 Replies
Nov 24, 2009
Can you do something like this? Public sub dosomething(byref value as (Integer or Long)) And how can you make a method accepts a unlimited amount of parameters? I'll probaly be able to find a explanation on the internet, but could anyone tell me how this is called. I am not using the right keywords I think..
View 4 Replies
Jul 13, 2010
I have a very long string. I need to parse this string so I can get information out of it. I know what each segment starts with and ends with. The length of the information will vary. I don't know what the easiest way of parsing this string.
Example data will be
ST*997*232898~AK1*HC*8888*~NM1*2*TESTING........
So i will want to get everything from ST to AK1then AK1 to NM1 and so on and so on.
View 10 Replies
Dec 13, 2009
The problem I'm facing is that PrintForm has a shoddy quality while getting the printouts and PrintDocument takes way too long to get on receipt printed (Almost 5-10 Seconds!)I'm either looking for an alternative for PrintDocument or somehow make the PrintDocument run faster
Dim
printFont As
New
[code].....
View 2 Replies
Mar 10, 2009
I have a situation like this:[code]This function takes several minutes. I do not have access to any kind of loop counter because the function is a big loop, but I do not want it to be done in the click event, I want the click event to call the function, as it does here. Is there any way to report the progress in a progress bar on the form with the button that called this function?
View 2 Replies
Jul 26, 2009
In Visual Basic 2008 Express with SQL Server Compact 3.5 and the Usual DataSet / TableAdapters, My Query is too long:Changing the names, it is a query like this:
SELECT Table1.*, Table3.*
FROM Table1
INNER JOIN Table2
ON Table1.ID = Table2.T1ID
[code].....
Problem is, Table1 and Table3 have around 10 and 5 columns each, with rather descriptive names, and The Table adapter is insistent on writing all the columns out and therefore hacks off my command. (It won't take * 's, it always says it can't find the column Table1.* )
Is there a way around this?
View 2 Replies
Oct 28, 2010
split long text ?
View 2 Replies
Feb 25, 2011
I've written an SQL query with a lot of 'or's in the 'where' clause: i.e. "SELECT * FROM myTable WHERE col1='a' or col1='b' or col1='c'...etc" I'm trying to run a query in access via vb.net, but I keep getting "Query is too complex" error message. I'm guessing I've hit some maximum limit. Anyone know a way around this, other than just to break it down into multiple queries?
View 5 Replies
May 15, 2012
error message i get during compile programe:
string must be exactly one character long. Couldn't store <1 > in scopee column.
Expected type is char.
this is my sql db:
[code]....
View 7 Replies
Dec 20, 2010
I am working in VB.Net 2010 framework 2.0.I am setting a big string to tooltip object. In this case tooltip is not appearing. If the string is short (say of 10 lines), tooptip is appearing properly.The following is the code:[code]....
If the "PanelText" is too long (say 50 lines), it does not appear. Sometimes it shows an empty tooltip.
View 3 Replies