15,672,179 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View Python questions
View Javascript questions
View C++ questions
View Java questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by glennPattonWork3 (Top 200 by date)
glennPattonWork3
23-Apr-23 19:11pm
View
Okay, I had solved it myself and moved on, marked it as solved and then some genius comes up with a solution which wouldn't solve the issue and then tells me I don't understand the problem and I can't use the correct reply method (when I did!). This is the sort of rubbish that stated on Stack Overflow, we don't want CP over run by the same attitude.
glennPattonWork3
22-Apr-23 11:53am
View
I would normally but the Prehistoric rig (Approve for Window 2.0!) I was using object to that.
That bit is working now, Now to play with a realtime clock!
glennPattonWork3
22-Apr-23 11:49am
View
Okay, firstly doing a straight boolean check shows you have little idea of what I was trying to do, temperature is a floating point number, the simple boolean example you give will work for less than or greater than, but not a value inbetween which from your example would be handled by the else. I would suggest looking carefully before giving a scathing reply. Also by your lack of knowledge of Bit Boundary I would bet very careful giving that sort of reply.
glennPattonWork3
22-Apr-23 7:41am
View
Bit bounds checking not a bad idea...
glennPattonWork3
26-Mar-23 6:39am
View
Works, Thank You!
glennPattonWork3
6-Jan-21 7:46am
View
The thing is the user account I am trying to use for this test doesn't have rights to turn the screen saver off, printing a character was one of the things I have also tried an animated JPEG of a butterfly. The saver seems to respond to mouse movements only (?)...
glennPattonWork3
6-Jan-21 4:07am
View
What it is I'm trying to move the mouse pointer to prevent a screen saver taking over. Not I'm not trying to create code to make it look like I'm working, I am trying to keep the screen alive to measure pixel brightness...
glennPattonWork3
17-Aug-18 11:17am
View
Yes, but the whole point is to see if the thing is up or down don't really care any more than that the whole point of Pinging them is to prevent them powering down, if they see a 'ping' they won't power off for two minutes. As this controls the Power line to another circuit which is being tested, the unit going to low power was an extra pain.
glennPattonWork3
17-Aug-18 6:47am
View
I'm really an Embedded Guy, but occasionally I have to play with higher level stuff
which where the trouble starts...
glennPattonWork3
17-Aug-18 6:35am
View
Ahh, good point... So I am using the wrong command
glennPattonWork3
6-Aug-18 5:14am
View
Cheers Griff
glennPattonWork3
7-Feb-18 12:59pm
View
Darn! clicked Q&A by accident saw a question that looked interesting, saw I could answer it did & then looked at the date!
glennPattonWork3
8-Mar-16 10:14am
View
Mmm, worth a thought!
glennPattonWork3
8-Mar-16 9:56am
View
Also likening issues the firm don't want to (or can't) cough up for a later copy of Vis Studio so I am using an aged copy of 2005 which I have.
glennPattonWork3
8-Mar-16 9:54am
View
using Microsoft.VisualBasic; does bring chills!
glennPattonWork3
25-Feb-16 7:43am
View
Got it working!
glennPattonWork3
25-Feb-16 7:29am
View
Ahh if the thing is running under VSHost!
glennPattonWork3
25-Feb-16 7:24am
View
Mmm, It is producing a run time error 217 00009C34 a new one on me! lets have a google...
glennPattonWork3
25-Feb-16 7:12am
View
Great thanks for that, it seems to be importing without but not doing a darn thing, I'll have a fiddle.
glennPattonWork3
4-Aug-14 7:24am
View
Not to worry I have solved the issue I was having thanks! Is there a delete question option.
glennPattonWork3
31-Jul-14 7:41am
View
It's for that beast of a test rig (my feeling can't be published on it). I have done the Val of each and tested it, it appears to work (mind you it did that before!)
Glenn
glennPattonWork3
31-Jul-14 7:21am
View
I will try that!
glennPattonWork3
13-Jun-14 6:30am
View
Dang! Friday too tired!
glennPattonWork3
13-Jun-14 6:29am
View
That's what I thought, but the client thinks there software guy has found this miraculous tool to do it! I think my method of a switch is the easiest way to but...
I wanted some one else to back me (harder to say you don't know...)
glennPattonWork3
13-Jun-14 6:15am
View
Deleted
That's what I thought, but the client thinks there software guy has found this miraculous tool to do it! I think my method of a switch is the easiest way to but...
I wanted some one else to back me (harder to say you don't know...)
glennPattonWork3
12-Jun-14 10:43am
View
"Playing with strings from external devices that aren't sending string based data is a recipe for horrible problems later." could have said it better myself! You could use a ReadTo() rather than the Readexisting() as I have forund ReadExisting is a little unreliable...
glennPattonWork3
5-Jun-14 12:22pm
View
Oh, that is funny, the installer, the piggin' installer I spent time on, they aren't using because they can't get to work. See any approaching Ice burges I can! I have had to send them the files needed and directions of where to put them, see any problems...
glennPattonWork3
5-Jun-14 12:01pm
View
I am doing this right:
System.IO.File.WriteAllText("FailedSerialNumber.ini", SerialNumberFailWrite, Encoding.UTF8)
it seems so odd that some thing like this crops up now!
glennPattonWork3
5-Jun-14 11:54am
View
No, besides the test set up this software is to be used on has no network connection (for security, you would think they were doing high sensitive work!). I have been working on this with both arms and a leg tied behind head! One thing is agreed then ignored and now this. I can't contact the person trying to test my software and he(or she! sorry must be PC) can't contact me. My Boss just wants to be cc'ed why can't the end customer be as reasonable?
glennPattonWork3
5-Jun-14 11:35am
View
You have all the info I have (I think) translated to English from User English (over the pond not very techie). I don't have the file all I have is the stuff I sent, that works fine here!
glennPattonWork3
16-May-14 6:52am
View
I will give that a go, Thanks Glenn
glennPattonWork3
16-May-14 6:46am
View
Ahh, I need to convert the string to an integer then and leave it alone...
glennPattonWork3
15-May-14 12:10pm
View
Accepted, all I have to do now reverse the process!
glennPattonWork3
15-May-14 11:58am
View
Seems to work, I now have to test it with hardware that doesn't yet exist! (in all in parts next to the guys desk) hence giving me the awkward task to do (while he nips off early to get his car from the garage!)
glennPattonWork3
14-May-14 7:58am
View
Deleted
I apologise, still can't the hang of this, Sorry!
glennPattonWork3
14-May-14 7:46am
View
Hmmm, does it come with any software driver that you haven't installed yet?
glennPattonWork3
14-May-14 7:27am
View
Thanks for that, I was close!
Glenn
glennPattonWork3
14-May-14 7:16am
View
Tried it, doesn't work!, what I am aiming to is not have to click on the one item in the listBox to 'high light' it. I just need to auto select it!!
glennPattonWork3
14-May-14 5:23am
View
Thanks, that appears to have solved this bit, await further panic!!!
glennPattonWork3
14-May-14 5:06am
View
Cheers for that work in the test prog now to alter the beast!!
glennPattonWork3
13-May-14 11:58am
View
OK, though now I am certain it was to do with sizing on the form I could dropbox a version for you...
https://dl.dropboxusercontent.com/u/66257998/Test_Load_ListBoxSizing.zip
linky...
glennPattonWork3
13-May-14 9:48am
View
Sorry a bit busy a the moment will have a fiddle when I can.
glennPattonWork3
13-May-14 9:26am
View
It happens after every line of text, I'm glad you haven't seen it either, just plain odd, as I said got around the problem but not solved it question marks over my head, Visible = false is just a bool I hadn't resized it either???
glennPattonWork3
12-May-14 12:01pm
View
Ahhh, looks like I have to rethink the way I'm parsing it thanks
Glenn
glennPattonWork3
12-May-14 11:51am
View
That was an effort that should be a screen shot:
https://dl.dropboxusercontent.com/u/66257998/ListBoxData.png
glennPattonWork3
12-May-14 11:45am
View
Ahh Okay, the old copy it to clipboard trick isn't working give me a min.
glennPattonWork3
12-May-14 11:27am
View
Sure here it is:
https://dl.dropboxusercontent.com/u/66257998/T4%20_%20MasterList_IniLoader%20-%20Copy.csv
glennPattonWork3
12-May-14 11:11am
View
I did find A Fast CSV Reader while digging around, I was more interested in if Excel can put bits of data in when it saves it, as my prog has all the data in a list box just some extra ','s where there should be...
glennPattonWork3
6-May-14 5:48am
View
Cool, have a 5!
glennPattonWork3
6-May-14 5:19am
View
Seems to work, will that get rid of the Date stuff?
glennPattonWork3
28-Apr-14 12:48pm
View
Mmmm, got other issues at the moment. Need to go back to this later. Matter of interest I have checked the Properties of the files and they are not read only!
glennPattonWork3
28-Apr-14 11:52am
View
Thanks I will give it a go!
glennPattonWork3
28-Apr-14 11:13am
View
Sorry but ???? is that for the question
glennPattonWork3
28-Apr-14 11:09am
View
Also update: I have gone to the properties in the MSI and checked all the files there ReadOnly permission is set to false. What is going on here!
glennPattonWork3
25-Apr-14 6:42am
View
Thanks a lot, I did go through the software changing the if's from =true to Checked based on your first answer, now I have got to get the hardware working!!!
glennPattonWork3
25-Apr-14 6:21am
View
Thanks...
glennPattonWork3
23-Apr-14 13:58pm
View
Thanks Griff!
glennPattonWork3
23-Apr-14 13:16pm
View
You are not only one!!
glennPattonWork3
23-Apr-14 13:00pm
View
Sorry! Sorry! Should have removed message, I found it was what I was interfacing to was causing the problem (Ctrl-Z, Undo is wonderful!!)
glennPattonWork3
17-Apr-14 11:36am
View
It is a proper desktop app (or will be!) really I just wanted a way of seeing I had got the data!
glennPattonWork3
17-Apr-14 11:14am
View
I have managed to short circuit permissions (finally). It appears I can see the file, the data is there but how can I output it as a messagebox for instance.
glennPattonWork3
17-Apr-14 11:04am
View
I am more than a little confused by the using LumenWorks.IO.Csv.... need to included it but how?
glennPattonWork3
17-Apr-14 10:58am
View
I have done the following string path = "C:\\Allow"; with the CSV in Allow. I have now have permission issues which have dogging me all day!
glennPattonWork3
17-Apr-14 10:47am
View
Thanks. Have a 5 on me!!
glennPattonWork3
17-Apr-14 10:40am
View
Thanks... I was in the process of modding the question as your reply landed!
I need to set readFile don't I....
glennPattonWork3
17-Apr-14 5:09am
View
Rebooted, One thing I have noticed is if rebuild on the desktop it still does not included the icon properly... even if I rebuild the file, what is happening...
glennPattonWork3
17-Apr-14 4:50am
View
Thanks, have to check it after a reboot!
glennPattonWork3
16-Apr-14 12:07pm
View
Working like a charm, thanks!!!
glennPattonWork3
16-Apr-14 11:59am
View
Thanks, giving it a go now!
glennPattonWork3
14-Apr-14 10:07am
View
Not to worry my logic was faulty !
glennPattonWork3
14-Apr-14 9:46am
View
Thank You!
glennPattonWork3
14-Apr-14 8:36am
View
Hi,
Gets around permission problems, but will only save two records! I have has a good fiddle with it. And it seems only to allow the creation of the file and a second entry even if I use
If(File.Exists = True) Then
blah!
Blah!
End If
glennPattonWork3
14-Apr-14 6:34am
View
Solves that problem!
glennPattonWork3
11-Apr-14 13:14pm
View
You and me both brother!
glennPattonWork3
11-Apr-14 13:08pm
View
If wish's were horses!
glennPattonWork3
11-Apr-14 13:00pm
View
Sorry it has been a long day!
glennPattonWork3
11-Apr-14 12:54pm
View
Umm not sure how I do that!
glennPattonWork3
11-Apr-14 12:47pm
View
Well no I hadn't, seems to work though... have a 5 on me! oh Dang I can't put it as answer I'll give you 5!!
glennPattonWork3
11-Apr-14 11:43am
View
Thanks, there goes the weekend!
glennPattonWork3
11-Apr-14 11:37am
View
The negative number is a sort of problem, I was ignoring thanks for reminding me about that! I really appreciate the help. Hopefully the people concerned wont encounter the problem! Can you recommend a good site for RegEx (VB & C#)?
glennPattonWork3
11-Apr-14 11:24am
View
On a run when it fails (its awkward and I have yet to find a way of doing it everytime!)
when it passes the Output Debug window has the following in it.
Sorry the RegEx always seems to return FETCH? could it be seeing the capitals as ints (ASCII Code wise?)
DATARECEIVED 5491: F
DATARECEIVED 5491: E
DATARECEIVED 5491: T
DATARECEIVED 5491: C
DATARECEIVED 5491: H
DATARECEIVED 5491: ?
DATARECEIVED 5491:
DATARECEIVED 5491: -
DATARECEIVED 5491: 1
DATARECEIVED 5491: .
DATARECEIVED 5491: 9
DATARECEIVED 5491: 5
DATARECEIVED 5491: 6
DATARECEIVED 5491: 8
DATARECEIVED 5491: e
DATARECEIVED 5491: -
DATARECEIVED 5491: 3
DATARECEIVED 5491:
When it last failed it appeared to have the 'FETCH?' in it.
glennPattonWork3
11-Apr-14 11:09am
View
That seems to work now, it is returning FETCH? instead of the value, the whole string appears to be slightly different. Thanks for the help!
glennPattonWork3
11-Apr-14 10:53am
View
Regex.Split(result5491,["^.\d"])(0) gives an identifier expected command. Sorry it took so long to get back to you, but my PC shutdown (driver issue...I know how to fix! just need time!)
glennPattonWork3
11-Apr-14 10:33am
View
Mmm, That is what is needed.
glennPattonWork3
11-Apr-14 10:32am
View
That's what my first though was, but the blessed instrument does not seem to be guaranteed a reading of X, meaning where I had done the previous to it, it didn't work!
glennPattonWork3
11-Apr-14 10:23am
View
I do have the: Imports System.Text.RegularExpressions at the top. if that's what you mean?
glennPattonWork3
11-Apr-14 10:15am
View
I have had a look for a string called text, the only text used is the .Text property, sorry I am being pulled in different directions at the moment.
glennPattonWork3
11-Apr-14 9:57am
View
Sorry about that people coming at me from all sides the customer want a Version to play with on the plane... The error message is
Error 1 'RegularExpressions' is not a member of 'String'.
glennPattonWork3
11-Apr-14 9:52am
View
Sorry can you give me a minute as it is running a test now, that bug has not reared it's head for a little while now!
glennPattonWork3
11-Apr-14 9:35am
View
Sorry a bit fuller
Private Sub btnQuiescentCurrent_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQuiescentCurrent.Click
Dim SerialNumber As Long
Dim SerialNumberWrite As String
Dim resultDUT As String
Dim result5491 As String
Dim result5491_Trimmed As String
' Dim result As String
resultDUT = SendMessageAndWaitForCR_DUT("#SZ0" + Chr(13)) 'send SZ0 command to turn off radio
If resultDUT = "==TIMEOUT==" Then
MsgBox("Timeout DUT SZ0 Fail")
'Exit Sub
End If
resultDUT = SendMessageAndWaitForCR_DUT("#SZ6" + Chr(13)) 'send SZ6 command to turn off sensors
If resultDUT = "==TIMEOUT==" Then
MsgBox("Timeout DUT SZ6 Fail")
'Exit Sub
End If
txtActivityWindow.Text += "#SZ6 OK" + vbCrLf
MsgBox("Please Operate Switch For Quiescent Current Reading", MsgBoxStyle.Exclamation)
Thread.Sleep(2000) 'allow to settle
'read current from multimeter
ClearBuffer5491()
result5491 = SendMessageAndWait5491("FUNC CURR:DC" & Chr(13), 12) 'changes to current mode
If result5491 = "==TIMEOUT==" Then
MsgBox("Timeout 5491 Change To DC Current Fail")
End If
ClearBuffer5491()
result5491 = SendMessageAndWait5491("CURR:DC:RANG:AUTO OFF" & Chr(13), 21) '
If result5491 = "==TIMEOUT==" Then
MsgBox("Timeout 5491 Auto Range Off")
End If
ClearBuffer5491()
result5491 = SendMessageAndWait5491("CURR:DC:RANG 0.5" & Chr(13), 16) 'changes to mA current mode
If result5491 = "==TIMEOUT==" Then
MsgBox("Timeout Current Range 0.5 Amp Fail")
End If
Thread.Sleep(500)
MultimeterComPort.DiscardInBuffer()
MultimeterComPort.DiscardOutBuffer()
ClearBuffer5491()
result5491 = SendMessageAndWait5491("FETCH?" & Chr(10), 14)
If result5491 = "==TIMEOUT==" Then
MsgBox("Timeout 5491 FETCH? Fail")
End If
Thread.Sleep(100)
Application.DoEvents()
MsgBox("Please Return Switch For Normal Operation", MsgBoxStyle.Exclamation)
result5491_Trimmed = Text.RegularExpressions.Regex.Split(result5491, "[^.\d]")(0)
'result5491_Trimmed = result5491
result5491_Trimmed = result5491.Substring(8, 6)
' MsgBox("result5491 " + result5491 + " result5491Trimmed " + result5491_Trimmed)
'result5491_Trimmed = result5491.Substring(8, 6)
txtActivityWindow.Text += "Quicent Current = " + result5491_Trimmed + "mA"
Result_Save += "Iq" + result5491_Trimmed.Trim + ","
If (result5491_Trimmed < QuiescentCurrentLow) Or (result5491_Trimmed > QuiescentCurrentHigh) Then
' go to fail mode
QuiescentBool = True
End If
Saves()
'poss problem
SerialNumber = Val(txtSerialNumber.Text)
SerialNumber += 1
SerialNumberWrite = "SerialNumber = '" + SerialNumber.ToString + "'"
System.IO.File.WriteAllText("SerialNumber.ini", SerialNumberWrite, Encoding.UTF8)
End Sub
Well I don't think that will format very nicely but... Seems to be better than I thought!
glennPattonWork3
11-Apr-14 9:32am
View
result5491_Trimmed = Text.RegularExpressions.Regex.Split(result5491, "[^.\d]")(0)
Do I need the (0) (as I said regex sends me nuts!)
Glenn
glennPattonWork3
11-Apr-14 9:29am
View
Ooops! Sorry about that.
glennPattonWork3
11-Apr-14 9:22am
View
I am trying to use this code, but have fallen foul of Regex before (C#)! I have the Imports.System.Text.RegularExpressions, looking around MSDN is this supported in VB 2008?
It is complaining about RegularExpression not being a member of String...
glennPattonWork3
11-Apr-14 9:14am
View
Yup! I most certainly do!
glennPattonWork3
11-Apr-14 8:49am
View
Thought of that for this instrument yes, but for other instruments not always!
glennPattonWork3
10-Apr-14 10:21am
View
Accepting and closing question as I think I have a solution!!! Have a 5 as you got thinking the right way!
glennPattonWork3
10-Apr-14 10:19am
View
Ah! CDec my old nemesis....
glennPattonWork3
10-Apr-14 10:12am
View
FreqResult1823_Trimmed = System.Convert.ToDecimal(result1823A_Trimmed) appears to round to the decimal point.
glennPattonWork3
10-Apr-14 10:01am
View
Given it a go it does what I was finding earlier was problems getting the String to a Decimal so I could do the multiply by 6
glennPattonWork3
10-Apr-14 9:40am
View
Thanks for that, I will try it! Mind you you start to get frustrated when you see you question poping up in Google....
glennPattonWork3
10-Apr-14 7:49am
View
No Worries I am working on this problem and another (and thinking about lunch!)
glennPattonWork3
10-Apr-14 7:36am
View
No, but am About to....
glennPattonWork3
9-Apr-14 12:35pm
View
It always gets me in a mess have I accepted your answer or not?
glennPattonWork3
9-Apr-14 12:31pm
View
Thanks Griff, though I could count on you,, one thing the CultureInfo requires more set up
glennPattonWork3
9-Apr-14 12:31pm
View
Like a charm! Thanks You very much!
glennPattonWork3
26-Mar-14 13:04pm
View
Bat signal away, bang head on floor! Spotted the error
glennPattonWork3
25-Mar-14 8:21am
View
Suddenly the customer is on the phone to the customer I think I have the OK to do a complete Re-Write!!! Yayy!!!
glennPattonWork3
25-Mar-14 8:17am
View
Ahh, but it was hacked so it appear to work.
glennPattonWork3
25-Mar-14 8:08am
View
oh my <redacted> not that!, I have make mods to some code that doesn't appear to work. I was give the task of getting rid of one board and replacing it. I appear to have disturbed the pile and it won't work now!
glennPattonWork3
25-Mar-14 7:54am
View
Umm also Griff um switching off error catching is that possible... Could this cause it to appear to work...
glennPattonWork3
25-Mar-14 7:40am
View
Now I really HATE it, why, for the love of... I want to immolate the Muppet who wrote this. It work my **** it will fail I can. I'm not allowed to rewrite it. I'm in Dilbert heck
glennPattonWork3
20-Mar-14 11:51am
View
Yup, tried that. That's where the cross threading came from in the first place! I think the problem is the rich text box the data is in is on a different thread to the GUI thread and it gets beyond me!
glennPattonWork3
20-Mar-14 11:00am
View
The worst bit is I can send and receive reply, the worst bit I can see the reply in the text box I just can't get at it!
glennPattonWork3
19-Mar-14 13:30pm
View
We can but hope!
glennPattonWork3
19-Mar-14 13:26pm
View
Like I said I'm really a C# guy for Windows which does seem to be a little easier don't really like VB...I also avoid using the Tool Box and roll my own due to bad memories of VB6/MSComm!
glennPattonWork3
19-Mar-14 13:17pm
View
Thanks, first time I have come across WithEvents (mind you this is the first serious hack at VB.Net I have had!) on a separate note it has got rid of the blue wiggle but still isn't working! I didn't want to sleep tonight anyway, thanks.
glennPattonWork3
19-Mar-14 13:04pm
View
just tried that: get the blue line and Error 1 Handles clause requires a WithEvents variable defined in the containing type or one of its base types.
glennPattonWork3
19-Mar-14 12:59pm
View
Interesting...Giving it a go now...
glennPattonWork3
28-Feb-14 11:41am
View
Yup! I have an example of what I am trying to do in VB now:
glennPattonWork3
28-Feb-14 11:28am
View
Really it was thinking while typing
glennPattonWork3
28-Feb-14 11:24am
View
Thanks...
glennPattonWork3
28-Feb-14 11:21am
View
Now you mention it should == (the Equality Operator not the Assignment operator)
glennPattonWork3
18-Feb-14 6:07am
View
OK I'm guessing that the nice foreach() I use in C# does not exist in VB...(mutter, mutter, mutter) foreach (string subString in TextReply.Split(delimiters))
glennPattonWork3
17-Feb-14 6:11am
View
Couldn't use the Net PC booting, however have got around issue I think!
glennPattonWork3
17-Feb-14 5:54am
View
Face + Palm, I was going by the book Serial Port Complete 2nd Ed by Jan Axelson on page 164 WriteByte is down as a command...
glennPattonWork3
17-Feb-14 5:53am
View
Thanks!, Griff beat you to it!
glennPattonWork3
13-Feb-14 9:46am
View
Silly question but what type of Thermal printer, If it appears as Windows printer just use one of the print out examples here for C# to a printer. If you can't get it to appear in the printer list the manufactures web site is the place to go.
glennPattonWork3
13-Feb-14 4:17am
View
Thanks
glennPattonWork3
12-Feb-14 11:58am
View
I fully agree with you about timers and serial comms, I was using the tool box timer, System.Timer.Windows.Form the problem is the data is appearing in said rich textbox but I think the UI thread is running too fast for the update to be seen if I put a time wasting element it works fine.
glennPattonWork3
11-Feb-14 4:19am
View
Don't worry, I know, I have, at least I know where the bodies are buried and where the shovel is!
glennPattonWork3
10-Feb-14 12:47pm
View
Hi, Another day of WTF how do you do this in VB done. I have the ability to send multiple commands at last(!) and the TIMEOUT working properly! (I think) Basic easy my ****
glennPattonWork3
10-Feb-14 7:01am
View
Thanks A lot!
glennPattonWork3
10-Feb-14 6:37am
View
Umm Griff how do I set up the Elapsed event? I tried to add the below:
Private Shared Sub NoDataAtPort_Elapsed(ByVal source As Object, ByVal e As ElapsedEventArgs)
MessageBox.Show("Timed Out")
'NoDataAtPort.Enabled = False
Reply_Status = REPLY.TIMEOUT_REPLY
'Data_Back = "TIMEOUT"
End Sub
Seems to be the Shared causing problems....
glennPattonWork3
10-Feb-14 6:01am
View
Great thanks for that, what have 'they' done to MSDN I can't see to search it like I used to?
glennPattonWork3
10-Feb-14 5:38am
View
Umm how is the TimeOut Handler added, like AddHandler NoDataAtPort.TimedOut,Object as Delegate ?
glennPattonWork3
10-Feb-14 5:26am
View
Thanks I have just tried to find the answer on MSDN what happened to it?
glennPattonWork3
6-Feb-14 5:54am
View
Doh! Face Palm moment again! I needed to import System.IO Sorry!
glennPattonWork3
6-Feb-14 5:50am
View
Well I type Fil then get the intelli-sense kicks in, so I go down the list and the closest I can get from there is FileAttr. do I need to use import for file IO?
glennPattonWork3
5-Feb-14 7:38am
View
The message box was put there to see what state the enum was. When run with the message box it produced the message that was sent (this is a Serial Comms program) if the message box is enabled it allows the message to be received once (and only once) it locks the UI. I have experimented with Pauses in and around the while loops to no effect!
glennPattonWork3
5-Feb-14 6:09am
View
No worries, I'm really a C guy too! I hate this VB malarkey!!
glennPattonWork3
5-Feb-14 6:07am
View
How ever on testing it, it only works once if the message box is enabled...
glennPattonWork3
5-Feb-14 6:05am
View
Ahh, that makes some sense!
glennPattonWork3
4-Feb-14 17:20pm
View
I did click it, but it turned red for reject solution! I think some thing has gone wrong!
glennPattonWork3
4-Feb-14 12:42pm
View
I'm stuck it has to be VB!!
glennPattonWork3
4-Feb-14 12:42pm
View
Thanks
glennPattonWork3
31-Jan-14 6:28am
View
I wanted to use StringBuilder (I wanted to rewrite it in C# but wasn't allowed) so I might do that... or a mix or your & Pete's answer.
glennPattonWork3
31-Jan-14 6:26am
View
Thanks, I will have a go at that
glennPattonWork3
23-Dec-13 5:43am
View
One the major issues I don't have the VB6 it was generated from, it looks like this is going to go badly wrong!
glennPattonWork3
23-Dec-13 5:41am
View
I would have thought that would go down with Gimme Codez :-) urgent, after a Week & weekend I have had this know looks like the last problem.
glennPattonWork3
20-Dec-13 7:36am
View
Thanks Griff.... Happy Tree Day!!!!
glennPattonWork3
21-Nov-13 12:14pm
View
You recommended my Article Thanks!
glennPattonWork3
28-Oct-13 12:02pm
View
Added to right bit of code gives the dialog!
glennPattonWork3
28-Oct-13 11:27am
View
Added no effect??
glennPattonWork3
2-Apr-13 7:23am
View
So,DoEvents bad, threading good.
I can handle that.
glennPattonWork3
2-Apr-13 6:55am
View
Ummm, OK looking into that, why is DoEvents evil? like I said I came across it in VB6 solved a problem forgot about it....
glennPattonWork3
27-Feb-13 9:46am
View
Hmmm, If I do the above it will only check for the bit being set I also need to take action on the not set case, also won't that cause problems with trying to convert a ulong to a boolean?
I guess I should said so in the question but Hexvalue2 is a ulong.
glennPattonWork3
5-Feb-13 5:47am
View
I have never used Grid View but I am assumning you have it set up correctly, if I have a look at <p>http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview(VS.80).aspx</p>
it would seem that you would need to give the location of the combo box i.e. DataGrid1.Row[?] and DataGrid.Column[?] then the line to get the value from the combo box.
Glenn (sorry) (Orig Griff over to you!)
glennPattonWork3
4-Feb-13 6:06am
View
LAN or Ian?
glennPattonWork3
1-Feb-13 4:14am
View
Also I have just remembered the an old VB6 trick I used to do to free up the UI was to use a 'DoEvents' to free up the multitasking, as I remember it worked on some programs others which used networking (can't remember exactly what) but I found it could alter the way set events were handled (frame ordering mostly). It might work but when "they" start complaining it might be the DoEvents!
Glenn
glennPattonWork3
31-Jan-13 10:45am
View
Umm if its VB6 why didn't you use MSComm? or did you need fast responce from the port (gathering burst data). The Net 2.0 uses the SerialPort class which is better
as it allows for interupt handling better and faster that the MSComm method so I would an interrupt apporach such as the below for the data recieved event
myComPort.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(port_DataReceived); The unresponsive UI might be freed up with a doevents call, my memmory of VB6 is a little dim now but....
glennPattonWork3
30-Jan-13 18:44pm
View
Umm Hi, I have asked this question in a different way, supplied some more detail, drank a lot of coffee lost some hair, but thanks to Griff got it working before the dead line. Thanks Glenn
glennPattonWork3
30-Jan-13 8:02am
View
Don't worry before it goes out the door I take all that stuff out and upload it to our SVN server, mind you I also try to keep all the versions I do on my machine to try to keep my thoughts intact as I have looked at code I have written (mostly embedded stuff) and though it works, but why??
glennPattonWork3
30-Jan-13 7:33am
View
My code tends to be a mess of commented out blocks, comments
along the lines reverse this string before use, monty python & star trek quotes. I take it from some of your answers, we are in similar roles, I am an Electronics Engineer that was made the mistake of not ducking fast enough when the phrase "We need a Windows Front End for this" was mentioned!
Glenn
glennPattonWork3
30-Jan-13 6:54am
View
Data Sheets...the thing is I think this system is in for a complete redesign once we get around to it. The problem has been it uses some out date NEC processor which I would like to replace MSP430 (I like them!), mind you the best part was prizing open the first of these units and the boss reply of "it uses a (can't remember!), oh <<expletive_deleted>> its an NEC I broke the FPIP last time I used it" then time spent repairing the FPIP. the rest of the time it was 'hmm thats not on the diagram' time!
Glenn
glennPattonWork3
30-Jan-13 6:34am
View
Thanks alot, I now have it reading and writing correctly, can I ask do you think the details were a little sparse of what the system should do and how to do it?
Glenn
glennPattonWork3
29-Jan-13 16:29pm
View
Hmmm, gone home could forget about and found the following: //get it swapping ints to hex sring just //needs spaces ie. 10 27 00 00
int j = LEStringToInt("10 27 00 00"); textBox1.Text = j.ToString();
string s = IntToLEString(j);
textBox2.Text = s.ToString();
Now I can sleep thank you! Cheers for that I will try it tomorrow with the hardware thanks. Glenn //int j = LEStringToInt(s);
glennPattonWork3
29-Jan-13 12:29pm
View
I have it working! hex to int, I am pretty sure if you gave it int j = LEStringToInt("12345678");
textBox1.Text = j.ToString();
string s = IntToLEString(j);
textBox2.Text = s.ToString();
it would choke, that is chore for tomorrow but accuratly one way!! hex to dec!! just need to go dec to hex and see if that cures my problem!!!
glennPattonWork3
29-Jan-13 11:33am
View
Hmm, I do see the drop down but added System.Globalization; and the WTF wiggly line disappeared still can't get it to do anything though!
glennPattonWork3
29-Jan-13 11:30am
View
Well if I can't get this working I might see some how, I don't think It will be very high as it's only got girly bananna plugs on it!, I lost my scope and white board when we moved!
glennPattonWork3
29-Jan-13 11:11am
View
No its a nice chunky Tenma 30 amp job, I wonder where it came from!
glennPattonWork3
29-Jan-13 11:10am
View
If pass IntToLEString(); 123 an integer it complains about "NumberStyles" not existing in the current context. Also if I pass it a string it complains about expecting an int, which is why I sending it an int.
glennPattonWork3
29-Jan-13 11:00am
View
Thanks for that. I am starting to talk to talk to my power supply!
glennPattonWork3
29-Jan-13 10:20am
View
Sorry, for that our mail server went nuts didn't see your reply. First time I used drop box for sharing stuff looks like it worked. As for OPL I hadn't seen it haven't got a compiler for it so I think it works but can't say. The stuff in the reply from the PSION handheld is as your comments say it might be "OK" or more interstingly "I have found life on Mars", if you read the below reply I am trying now to put into an array and reorder that! :)
glennPattonWork3
29-Jan-13 9:54am
View
Hi,
Just sent 123(hex) as 0c 23 01 00 00 with the command /cw 0c 23 01 00 00 via HyperTerm got a #0 when I read it with a cr I get 23010000(hex) I read in as 23010000 which I tranlate to 00000123 parse to 291(dec) Meaning my reading function is OK. When I send I am sending 291 (dec) is 0c 12 30 00 00 meaning my send is wrong. I need to go back to the string parsing thanks.
glennPattonWork3
29-Jan-13 9:18am
View
You now have what I have docs wise!
glennPattonWork3
29-Jan-13 9:18am
View
The OPL code
https://dl.dropbox.com/u/66257998/Smeter.opl
glennPattonWork3
29-Jan-13 9:16am
View
https://dl.dropbox.com/u/66257998/Smeter.opl
glennPattonWork3
29-Jan-13 9:16am
View
The OPH code:
The Opl Code https://dl.dropbox.com/u/66257998/Smeter.oph
glennPattonWork3
29-Jan-13 9:16am
View
The Interface Definition Document:
https://dl.dropbox.com/u/66257998/INS%201003%20A%20-%20Psion%20Operation%20Guide.pdf
glennPattonWork3
29-Jan-13 9:09am
View
Interface Specification manual...you jest sir. All I have is the Interface Documentation (really a PDF with some commands and responce) which really isn't enough and some PSION OPL code which is very hard to understand and is not the version running on the PSION. Customer shouting at Boss, Boss yelling via Email (he out of the country 'til next week) If you give me a web address I can upload the interface doc and the OPL code. They are in the public folder on my DropBox account ,I just can't get the web link working! or I could share them with you directly ?? Glenn I will give it another go!!
glennPattonWork3
29-Jan-13 5:17am
View
Oh <<expletive deleted!!!>> 3012 is 1230 I need to swap the characters in pairs 30 12 becomes 12 30 and then check to see if the last bit is a zero if it is get rid of it! scratch head, more caffine!!
glennPattonWork3
29-Jan-13 4:08am
View
Also if I send 10,000 credit from the device I am replacing this is read back as 10,000 by the software I have written. So the I don't think the issue is the read, I think it is with the way I am treating the write. Further looking is required!
Glenn
glennPattonWork3
29-Jan-13 4:04am
View
Okay 0x123 hex or 291 dec, sent, read back 12306 dec or 3012 hex???
glennPattonWork3
28-Jan-13 10:12am
View
Here comes the first "dumb bottom question" but I think it warrents a question on its own!
Glenn
glennPattonWork3
28-Jan-13 8:46am
View
Thanks!
glennPattonWork3
28-Jan-13 8:45am
View
No I think I have got it using Griffs example, but you never know!
glennPattonWork3
28-Jan-13 8:40am
View
Thanks for that!
glennPattonWork3
28-Jan-13 8:36am
View
Thanks, need to get my thinking right for this stand by for more dumb bottom questions!
glennPattonWork3
25-Jan-13 11:38am
View
Thanks for that, had problem, went took five minutes to look out window came back and thought oh <<bad word!>> let us hope no one sees, that I have asked this!
glennPattonWork3
25-Jan-13 11:35am
View
Thank you Hangs Head in shame!
glennPattonWork3
24-Jan-13 12:29pm
View
because thats all the meter will take! I really don't know?, but it works!
glennPattonWork3
24-Jan-13 12:21pm
View
A little of both at the moment I managed to burn on finger tip yesterday!
glennPattonWork3
24-Jan-13 12:13pm
View
Umm, I am little busy at the moment for this sort of thing try www.lvr.com and ask a question on the Small Machines Forum and or get a copy of Parallel port Complete!
glennPattonWork3
24-Jan-13 12:10pm
View
Thanks for that I ask it several times with slighly different wording due to fact I was working at home then at work this problem was a bit odd but I got working on my own mostly due to sitting down and writing out the problem to get a solution that would work for all values and then find its 10,000 max was a bit of a let down. Thanks for the solution though it should give another check.
Glenn
glennPattonWork3
24-Jan-13 11:58am
View
Thanks alot, but I have solved this problem!
glennPattonWork3
24-Jan-13 11:32am
View
Oh thanks for that link and sorry I wasted your time!
Glenn
glennPattonWork3
24-Jan-13 10:46am
View
Bits, Bytes lets call the whole thing off, go it sorted!
glennPattonWork3
24-Jan-13 10:44am
View
Thanks to all I think I have solved it?
glennPattonWork3
24-Jan-13 10:44am
View
Sorry for that, but looking at it you gave VB to answer a C# question, here starts a holy war! Thanks got the problem sorted!
glennPattonWork3
24-Jan-13 8:58am
View
It is, but I'm not allowed to fix it! this botch is in a product that is out in the field and if I fixed it I'm likely to break software/hardware that is happy. It's the classic "we know this is wrong but make it work!" mutter,mutter
Show More