|
There's plentry of examples out on the web. If you searched the articles here on CP the GPS, you would have found this[^] series of articles.
|
|
|
|
|
Hi,
-- modified at 8:18 Thursday 31st May, 2007
|
|
|
|
|
Hi,
I have looked at articles on this website 'How to write your own GPS program part 1 and 2' but they were no help. I have also looked at other articles as well as other examples on the web, as i am new to this I am finding it exteamly hard to make this program work.
I have two tabs, one of them contains the GPS application. I have a start button to start the connection with GPS device and stop button to stop the connection. The program gives me no errors but does not work. When I click the butons they do not function at all.
Please have a look the code provided below, this might help understand my difficulty.
Here are vb.net files that i'm working on: http://www.manzilcamberley.co.uk/GPS/GPSPDA.zip
Any Help or direction would greatly appriciated.
Thanx in advance.
Bill
|
|
|
|
|
I am trying to save an image from a PictureBox to an icon file, but I'm having two problems.
1. When saving the image to an icon, (.ico and ImageFormat.Icon ) it saves but it gets an "Unknown File Type" icon instead of it's own. But if I save it as a bitmap, (.ico and ImageFormat.Bmp ) it saves and displays fine. Why is this? Shouldn't it be the other way around?
2. No matter which format I save the icon in, when trying to open it in a icon editor I get an error saying either: "Not An Icon File" or "Invalid Icon Header File".
I have done plenty of research and every site I found says to save an icon the same way I am. Which is:
Dim IconImg As Bitmap
IconImg = ImgBox.Image
IconImg.Save("C:\Image.ico", System.Drawing.Imaging.ImageFormat.Icon)
What am I missing? Thanks for the help!
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
|
Thanks, but that involves drastically editing my code, and it saves the icons in 16-bit colors instead of 32-bit (and I can't figure out why). Is there another way?
Thanks anyway!
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
in my code
Private Sub logonBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles logonBtn.Click<br />
'Validate logon username and password.<br />
Dim myresult As Integer<br />
myresult = Me.TeacherTableAdapter.usernamePassword(PasswordTextBox.Text, UsernameTextBox.Text)<br />
If myresult = 0 Then<br />
MessageBox.Show("Logon Error; Username or Password is incorrect")<br />
Exit Sub<br />
End If<br />
MessageBox.Show("Welcome to Teachers Pet")<br />
Call LoadMainScreen()<br />
<br />
End Sub<br />
What if I wanted to return back more than one item...for instance, right now it's returning the user ID, what if I wanted, userID, TGrade, FullName?
Would I just return everything back in an array?
Thanks.....and if this is the wrong board and should be on the ADO.NET then let me know and I'll delete this and move it there.
Tom Wright
tawright915@gmail.com
|
|
|
|
|
Hi Tom,
By the look of it I think it might actually be reasonably easy (but no guarantees):
<br />
Private Sub logonBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles logonBtn.Click<br />
'Validate logon username and password.<br />
Dim myresult() As String<br />
myresult = Me.TeacherTableAdapter.usernamePassword(PasswordTextBox.Text, UsernameTextBox.Text)<br />
If myresult.GetValue(0) = 0 Then<br />
MessageBox.Show("Logon Error; Username or Password is incorrect")<br />
Exit Sub<br />
End If<br />
MessageBox.Show("Welcome to Teachers Pet")<br />
Call LoadMainScreen()<br />
End Sub<br />
Tom Wright wrote: userID, TGrade, FullName
It looks like you want to return data of different types, so the array would best be made of type String. You can then use the data from the myresult array with .GetValue(0-based index number here) and convert values from the string type to integer, etc. where needed.
As I don't know the code on the Me.TeacherTableAdapter.usernamePassword(PasswordTextBox.Text, UsernameTextBox.Text) side, your on your own making it return multiple values.
Hope this helps,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Looks like you're using some tool to generate the Datalayer. If this is true, just change the underlying SP that is executed by Me.TeacherTableAdapter.usernamePassword() function to return a resultset instead of just a string output. And run the tool again. This will make the function return a DataRow of the underlying table.
If the above is not true, you've to start from the ground up. Modify the SP to return a resultset, modify the function to read the resultset using a DataReader or a DataSet.
SG
|
|
|
|
|
Is it possible to track a form (that is not your app) and place a button on it for the end user to click on? So basically...say a dialog app starts up. My program (which will be running in the background) will see that this app starts....gets the dimensions of the app and places a button on top of the app as well and moves the button if the user moves the app around on the desktop.
Is this possible?
Thanks
Tom Wright
tawright915@gmail.com
|
|
|
|
|
It's possible if your code was written in unmanaged C++, but not VB.NET or C#. This is because the .NET Framework doesn't support the exports and static linking required to do something called "DLL injection".
This would be required because your code would have to become part of a foreign process so it can respond to another applications Paint events so the button gets repainted when necessary and respond to the clicks on the button.
|
|
|
|
|
Hi heroes,
I have a windows service(written in VB.Net) that runs a Shell command to execute a batch file, that was working fine on windows 2000 server, after migrating to Windows 2003 server, I get no errors regarding the execution of the shell command but the batch file doesn't do its job at all(as if it was not run).
on the other hand, if I run the bat file manually it works fine.
I tried to use Process class of the .Net but the same applies.
Also, the windows service runs in the context of System account that has all the rights granted.
What would be wrong? Please help
ThaScorpion
|
|
|
|
|
Verify the account that's being used by the Service. Make sure it's running. (I know - duh!, you'd be surprised...)
What apps does this batch file run? Do those apps require rights to certain resources to do their job? No - the Local System account does NOT give your service God rights over the entire system.
Change the batch file to log everything that would normally go to the console to a file:
somecommand param1 param2 > C:\batch.log
someothercommand >> C:\batch.log
The first line creates a new file in the root of C:, overwriting any file with the same name. The second line, with the two > characters appends to an existing file. Check this file for any errors that come up.
|
|
|
|
|
Thank you for replying so quick.
What do you mean by making sure that the System account is running ?
if I understand you mean the Windows service is running?, yes it is, it logs everything it does. Only the batch file doesn't or the EXE doesn't execute.
The batch file runs an EXE with some parameters.
ThaScorpion
|
|
|
|
|
ThaScorpion wrote: What do you mean by making sure that the System account is running ?
if I understand you mean the Windows service is running?,
Not the account, the service. Verify that the service IS running and that it's running under the proper account.
ThaScorpion wrote: Only the batch file doesn't or the EXE doesn't execute.
Change the batch file to log any output to a file, like I showed you.
|
|
|
|
|
I can write vietname unicode , SQL spend nvarchar nung i don't vietnames. I help me
|
|
|
|
|
Uhhh....What?
|
|
|
|
|
hi
Hello,Everyone .That really is have no way,so ask everyone to help me, I want to write a procedure that can carry on speech chat to come out with the vb.net, but a little data has no, i listened to other people say directx sdk can, check to check data also without result, and there is also no vb.net example of the speech in directx, I have already canned cross nat to carry on writing news to send out through an udp currently, the nether problem is to carry on a speech to collect, compress, packing with send out.but I a little data finds out, so i hope that that every superior elder generation a webmaster to help me, thanking a lot.
|
|
|
|
|
|
My guess is that our friend has used a web service or dictionary to translate his question into english.
Could he mean something like this:
Harddream wrote: That really is have no way,so ask everyone to help me
I couldn't find any way myself so now I am asking anyone to help me.
Harddream wrote: I want to write a procedure that can carry on speech chat to come out with the vb.net, but a little data has no
I want to write an application that turns speech (audio) into written text (or the other way around?), with VB.NET, but have not found a lot of information on the subject.
Harddream wrote: i listened to other people say directx sdk can, check to check data also without result, and there is also no vb.net example of the speech in directx
I heard other people talk about using the directX sdk to do it, and checked up on that, but could not find anything. I also did not find any examples of handling speech with directX.
Harddream wrote: I have already canned cross nat to carry on writing news to send out through an udp currently
I have searched the internet for current articles about sending data through a udp.
Harddream wrote: the nether problem is to carry on a speech to collect, compress, packing with send out
The basic problem is to collect continuous data from speech, pack, compress and send it (somewhere?)
Harddream wrote: but I a little data finds out, so i hope that that every superior elder generation a webmaster to help me, thanking a lot.
But I have found very little information, so if any more experienced coder might be able to help me, I would be really grateful.
As you Colin are a "superior elder generation a webmaster" perhaps you can help this guy out? I am pretty good with translating pig-latin, but haven't got the foggiest about speech-to-text and vice versa.
Regards,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi all
I've created a ASP.NET/VB.NET application to maintain a database via a datagrid and was looking to retrieve the Windows username of the current user of the application so that when they click to update any changes they make, a field in the database will update showing that user as the last person to update that record.
I've set the authentication to 'windows' in the webconfig file, could anyone point me to the code I would need to retrieve the windows username?
Many Thanks
Rob
|
|
|
|
|
This is better asked in the ASP.NET Forum. I don't see how you're going to get the username from the client without some kind of authentication on the client side and sending that information to the server, possibly storing it in the session object.
But, that's about as far as my very limited ASP.NET experience will take me on this one.
|
|
|
|
|
Will do, thanks for the reply Dave.
Rob
|
|
|
|
|
HttpContext.Current.User.Identity.Name.ToString() returns the domain and username seperated by a slash. The following will get the username.
Dim UserName as String
Dim UserLoginDomainAndID as string[]
UserLoginDomainAndID = HttpContext.Current.User.Identity.Name.ToString().Split(new char [] {'\\'})
UserName = UserLoginDomainAndID[UserLoginDomainAndID.Length-1]
I converted this from my c# code so appoligies if it's not quite vb.net, but it should be close.
Oh and I used this on an asp.net site that did windows authentication. Unauthenticated this will give you nothing. Not certain what would be returned under other authentication.
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
Hi Everyone:
I still have a nagging problem when it comes to using DataSets.
When I add new records to a dataset that contains nothing but the table’s schema, the dataset starts the auto increment field primary key field off at zero instead of one. I’m using an article titled “How to update a database from a DataSet object using Visual Basic NET”, to help me understand how to use datasets for data manipulation.
The article states, “To access primary key information, call FillSchema, and then set the MissingSchemaAction property of your DataAdapter to AddWithKey, or manually set the primary key in your code.”
I have done this and here is my problem.
When I add new records to an empty dataset, before I update the database the records look like this
0 Record 1
1 Record 2
2 Record 3
3 Record 4
As long as I don’t use the navigation buttons to move back to other records. I can save the DataSet to the database and it will look like this:
1 Record 1
2 Record 2
3 Record 3
4 Record 4
Now I’m going to show you where the monkey wrench comes into play. I load the dataset from the database. The dataset that is returned looks like this:
1 Record 1
2 Record 2
3 Record 3
4 Record 4
If I add a new record to the dataset like:
1 Record 1
2 Record 2
3 Record 3
4 Record 4
0 Record 5
I go back to another record to perform an edit and the dataset looks like this:
1 Record 1
2 Record 2
3 RECORD 3 <edit performed="" on="" this="" record="">
4 <blank>
0 Record 5
If I commit the changes made on the DataSet to the database, both addition and edited record. The database table changes to this:
1 Record 1
2 Record 2
3 RECORD 3
4 <blank>
5 Record 5
I don't understand why this is occuring. The dataset is based on the table schema, so logically it should know the first column is the primary key column and the primary key column is auto incremented. It starts at one and increments by one every time we add a new record.
To me it looks like the DataSet doesn't know that when I add a new record to the dataset to take the ID number of the last record and increment it by one to get the next primary key number. The DataSet also doesn't seem to append the new record at the end of the dataset. In other words advance to the end of the dataset, add the new record with the new ID number and so forth.
Why is this happening and what can I do to fix it?
Thanks,
Quecumber256
|
|
|
|
|