|
I am trying to use the code from the "How to Write Your Own GPS Application" article but I don't know how to make it work. Assuming that I know nothing about VB.NET, how do I get that code (which looks like it is a class) to work? The application I am writing needs to update the system clock with GPS time, nothing else.
Matt
|
|
|
|
|
Quickcat wrote: Assuming that I know nothing about VB.NET,
Then what are you doing here ?
I don't know the article in question, surely if you run the demo and read the article, you'll see it working ? If not, I'd suggest asking the article author.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote: Then what are you doing here ?
To answer your question, I am here to get some assistance while learning something new. I would like to thank you for welcoming me so warmly. If this forum is not for assistance and sharing ideas then what is it for?
The article I read has no demo and I have had no response to my request for assistance from the author. I have been hoping that I could get some pointers on how to get the code that is available to work for me as it does not work alone. I believe that I need to call to it with an object but I am not sure how to do that. The article I am writing about is at the link below.
http://www.codeproject.com/vb/net/WritingGPSApplications1.asp[^]
|
|
|
|
|
Quickcat wrote: To answer your question, I am here to get some assistance while learning something new. I would like to thank you for welcoming me so warmly. If this forum is not for assistance and sharing ideas then what is it for?
OK - I'm sorry to be blunt. What I really meant was, are you really saying you have no idea how to use VB.NET ? I was advocating that surely you'd do a bit of reading and play with a few demo projects so you had enough of an idea to be able to make sense of any help that we offer you.
Quickcat wrote: I have been hoping that I could get some pointers on how to get the code that is available to work for me as it does not work alone. I believe that I need to call to it with an object but I am not sure how to do that. The article I am writing about is at the link below.
If you follow the link to WritingGPSApplications2, from the first article page, there is VB and C# code which includes a form, so I presume that it gives examples of how to call the code. It looks to me like the code in the first article is meant to be cumulative ( i.e. you only need the last file ). I'd have a look at that second article and see if it's got anything more useful in it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Ok, I will give it a try. Thank you.
Christian Graus wrote: I was advocating that surely you'd do a bit of reading and play with a few demo projects so you had enough of an idea to be able to make sense of any help that we offer you.
For the past few weeks I have been reading a book or two and working some examples. I am getting somewhat familiar with VB.NET and I am excited to learn more about it. I am having trouble getting through some of the more specialized things though, and it has been a long since I have taken any programming classes, or written any code for that matter. I will try your advice and see if I can get it going.
Matt
|
|
|
|
|
No worries. Good luck, and don't hesitate to ask again if you get stuck.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am trying to send ATAPI commands to a cdrom in VB.Net. While researching this it seems to me the VB is not the best at this. I am sure their is a way though. Can anyone steer me in the right direction? I read something on calling the Windows API to do some hardware speaking, but it said that that is being Phased out with VB.Net.
I am able to send these commands through 2 other test programs that we use.
Thanks!
Ken
|
|
|
|
|
Ken,
Using the Windows API in vb.net is still supported with interop.
Anyway, if can you tell me what sort of ata commands you wish to send to the cdrom, maybe I can help out.
progload
|
|
|
|
|
Thanks for the update!
I send a few similar requests to the drive with these other programs. For instance, I send an inquiry command - 12 00 00 00 FF 00 00 00 00 00 00 00. I am able to get the device type and model returned with that. I also do a 'Get Configuration' Command and 2 other commands that run a self test and then read the stored results.
I really apreciate your help!
Ken
|
|
|
|
|
Ken,
To access the drive at that level you'll have to use a win32 function called
DeviceIoControl from the Lib kernel32.dll under interop.
Do you have any source for the "other programs" you are talking about, that could give us a starting point?
Reading the device type and model number is not so hard, but coding the self test could get tricky. (IO control is not something I do very often)
If not, I'll have to dig back through some code I did last year on testing smart ide drives under ata control, so it may take me some time to work on this.
progload
|
|
|
|
|
That's good to hear. I've been looking through everything I could think of on the net to find out about this. So many things looked promising (like WMI) but no cigar.
The other program is a small program that tests cdrom drives. It was written by someone in my company from Korea. I cannot get in touch with him or get the sorce code. It has a small menu item called ATAPI which lets you type in ATAPI codes and click send. It shows the data buffer at the bottom. I can send you a screen shot if you want.
The self test is a proprietary built in self test that will run if you send E6 02 00 00 00 00 00 00 0C 00 00 00 to the drive with the parameters 0A 00 00 00 01 01 01 01 01 01 01 00( each '1' enables one of seven different tests) Then I read the results with E6 03 00 00 00 00 00 00 0C 00 00 00.
Hope that helps! I really apreciate you looking into this.
Ken
|
|
|
|
|
I am building a progam in .net that uses MSCOMM.ocx. I used the Setup Wizard to create a msi file. When I install the program on my develoment computer everything works fine. But when I install on my customers computer I get an application exception. I have installed the .net framework 1.1. I can remove the reference to mscomm and the program loads correctly, but when I include mscomm the program crashes.
I've also tried downloading a msm file but the dependencies (COMCAT and OLEAuth32) have errors. Any help would be great. I need to get my customer up and running soon.
Thanks
|
|
|
|
|
If your customer is using Win2K or higher the "COM" family of DLLs - ole32, oleaut32, etc. should already be installed, and there are known bugs in the merge modules that will cause the setup to fail on OS versions that have file protection. But you should not need these in your setup for those systems anyway.
As far as the MSComm problem, I don't know what to tell you. Have you tried manually registering MSComm on the machine where it fails, and then seeing if the app works?
You can also get a verbose log of what you setup is doing by running it on from a command line with a /l*v switch like:
msiexec /i "C:\MySetup.msi" /l*v "C:\MySetup.LOG"
which may or may not give you some insight into if there is a problem with the install.
|
|
|
|
|
Thanks for your input. I solved the problem. The issue was that I referenced the ocx using the References in the IDE but I didn't place the object on my form. Instead I used 'Dim WithEvents'. Once I place the object on the form and modified a little code everything worked great.
Thanks again!
|
|
|
|
|
Hello I have been dealing with this issue for a week and a half and have been unable to come to an answer.
I am building a windows form project that will sit in the system tray, unviewable to the user. The program will query a database to determine if any new reports need to be ran. if yes then it will pull the required data and manipulate the data into a readable format (the database contains some udf fields that need to be separated into columns) and placed into a datatable which is then added to a new dataset. An xml file is then generated (which is my prebuilt report source, the structure of the report never changes, only the data contained within) and is saved to the harddrive. I then declare a new reportdocument and load the report from the harddrive to the reportdocument. I then specify the default printer name and tell it to print. When i tell it to print it throws a logonexception error. It also does this if i try to export the report.
I have tried using a crystal report viewer to load the report and print, which works fine, but it brings up the print dialog which i cannot have. the reports need to load, print, and close behind the scenes without interaction from the user.
If anyone has any idea why i'm getting this logon exception error even though i'm using an xml file, or how to get past the crystal report viewer showing the print dialog (maybe by forcing the ok button) please let me know. I've been at this for awhile.
CODE:
'add datatable to dataset <br />
dsUDF.Tables.Add(udfData) <br />
<br />
'write xml doc for crystal reports <br />
createXmlDoc() <br />
dsUDF.WriteXml(myXmlWriter, XmlWriteMode.WriteSchema) <br />
<br />
loadReport() <br />
printReport() <br />
<br />
DS.Clear() <br />
dsUDF.Clear() <br />
<br />
Public Sub createXmlDoc() <br />
xmlOut = New System.IO.FileStream("C:\Program Files\HunterReports\ParsedData.xml", IO.FileMode.Create) <br />
myXmlWriter = New System.Xml.XmlTextWriter(xmlOut, System.Text.Encoding.UniCode) <br />
End Sub <br />
<br />
Public Sub loadReport() <br />
report = New ReportDocument <br />
report.Load("C:\visualStudio_Projects\myReports\Youth_Inq.rpt") <br />
report.PrintOptions.PrinterName = Printing.PrinterSettings.InstalledPrinters.Item(0) <br />
End Sub <br />
<br />
Public Sub printReport() <br />
try <br />
report.PrintToPrinter(1, False, 0, 0) <br />
Catch ex As Exception <br />
MsgBox(ex.Message) <br />
End Try <br />
End Sub
|
|
|
|
|
I'm creating an application which uses localization to switch between 2 languages (english or spanish) according to the operative system's language, actually everything works fine except for the YesNo buttons from the message box (it seems not to work in spanish), anyone knows if there's a way to change the culture of the message box using code, or a way to edit YesNo buttons to display something else?
Thanks
|
|
|
|
|
The MessageBox should display in the language local to the O/S Regional Settings Control Panel. If this isn't happening, I'd check what the language setting is in the Control Panel.
The only other way around this is to develop your own MessageBox class.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a question about your answer, I made a class form which all other forms inherits, this base class has certain properties, among them I set the culture of the application (in case the user whishes to set a default language), so I suppose that the message box only checks for the regional settings and not the culture set to the application, am I right?
|
|
|
|
|
Yes, MessageBox only uses the system regional information, not the app's. MessageBox wraps the Win32 API MsgBox function.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hye there
I am working on a Document Management System and my client is looking for one requirement. like when user right clicks on any file inside any folder in windows. with other options like Properties, Send to Zip file , Delete etc there should be one option like "send to MyApplication". I have no idea how to add this in windows right click menu. Can any one guide me on this issue
thanks
|
|
|
|
|
I have found the solution. so thanks for nothing.
|
|
|
|
|
Rizwan Bashir wrote: so thanks for nothing.
WOW! What arrogance! You gave an all-volunteer-effort discussion site 7 whole minutes to answer your question! If this is how rude you're going to be when we don't get around to answering your questions fast enough, take your questions, and your "holier-than-thou" attitude somewhere else.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
It looks that I put the bone in front of hungry dog and take it back with out letting him eat.
|
|
|
|
|
No, you didn't. What you said is VERY insulting.
"so thanks for nothing" means that you think you didn't get an answer fast enough or you didn't get the answer you wanted.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Sorry for insulting words. I think I should not have to say this. Please accept my appologies on my words. but you should also be sorry as you said take your questions some where ellse . When Ever I have any problem I used to ask here and also keep on searching the solutions and since I find the result mean while So I said omit the question though I could delete it even. but let it there as some one could also have this problem and I was right.
|
|
|
|