|
Basically, I have just read the question, and not the first answer
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
Answer was to convert the 1% line to degree and add or subtract to the angles. The math equation associated with it was y=ax+b, a=tan(theta).
|
|
|
|
|
Hello Brothers
I am Looking for the best GPS tracking Application until now.
I want to make application for students tracking in Our University
please any ideas about how I start ?
if any brothers have Application please show me it
Thank you very much for all the members in code project
Best wishes
Dr. Kasa.
|
|
|
|
|
Dr Kasa wrote: I am Looking for the best GPS tracking Application until now. There is no olympic games for GPS software, so we don't know which 'the best' would be.
Dr Kasa wrote: I want to make application for students tracking in Our University
please any ideas about how I start ? Start by creating a basic application, and finding a cheap GPS you can interface with easily.
Dr Kasa wrote: if any brothers have Application please show me it Perhaps the people[^] could help.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
Hi Kasa
I think it depends on what kind of GPS unit ur students are carrying ..and what type application (thick client / thin client) you want write..
in My view rather buying separate GPS device , you make could use of ur students smart phone .. as you might aware that every smart phone contains GPS unit in it.
if you bought GPS unit .. some manufacture provides APIs to integrates GPS unit.
if you decide to use mobile phone GPS unit .. you can think of writing mobile app or webapplication..
for webapp from mobile you can consider to use HTML-5 geolocation (all most all all smart mobile are compatible with HTML-5) .. you can find so many examples HTML-5 geolocation
for mobile application you can find plenthy of examples tracking geolocation for Anddroid and iOS
both type of Applications webapp/mobileapp can do tracking.
I hope this helps , Apologies if did not understand what u need
Cheers
Praveen
|
|
|
|
|
|
Hello, sometimes in programming it without a console application is assembly the compile top it up all the over off the hello world first written sorry for one time the two sentences over top but the problem was encapsulation the "hello world" as is in very standard and common prototype first one to have it:
Using Microsoft.VisualBasic; //very unnatural, not natural english
using System.Windows.Forms;
void MAIN()
{
Console.WriteLine("Hello World"); //works
System.Windows.Forms.WriteLine("Hello World"); //doesn't work
};
Explain in your own words how encapsulation would solve this problem.
|
|
|
|
|
Um...the question itself doesn't make a lot of sense - or indeed any - but the code you show also makes no sense either.
There is no Forms.WriteLine method, because you can't write directly on a form, and particularly there is no static WriteLine method because unlike a console there can be many Forms in an application.
And encapsulation won't solve that.
A console app is a special type of application which has a very limited user interface: character input and output only. There is one input stream (the keyboard) and one output stream (the console). And there is some clever software behind the scenes which ensures that the output stream is displayed as readable text.
Forms applications aren't like that - they have a much richer user interface made of of Controls like buttons, labels, textboxes, and so on, and there are a number of input methods: keyboard and mouse for starters, but each Control handles it's own input and output. Some may display text (Label and TextBox for example) others may show images without text (a PictureBox perhaps). You can't just "write a line" to a form, you have to decide which control to show it on, and tell it what to display.
So I think you need to go back to your course notes, or your book, and read that chapter again - you don't seem to have grasped that the two application types are very, very different and you can't treat them in the same way!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Now, take a deep breath: what you are about to hear is not an insult. Everyone here was a beginner ... once.
Your question suggests, to me, that you are very new to programming, and pretty confused about what a Windows Form Application is.
A Console Application and a Windows Forms Application are totally different.
Yes, a Console is a "window," and it's the only run-time surface/canvas/window the user can interact with. It has a built-in processing loop read-evaluate-print triggered by your hitting the Enter key.
A Windows Form Application has (typically, by default) a Main Window, and the programmer can create as many other Windows (Forms) as they wish. Closing the Main Window will close all the other open Forms. Each Form, when it has focus, gets connected to the Windows message-pump that sends it keystrokes, mouse-actions, etc. Which Control on a given Form "receives" these messages will vary depending on the Control, and the context.
Sometimes people get confused because in a Windows Forms Application, you can cause text output to be written to the 'Output window in Visual Studio by using code like this:
Console.WriteLine("current value: {0}", currentValue);
There's a good free book, "DotNet Zero" by Charles Petzold you can download here: [^].
Once you have gotten an initial mastery of the Console Application, I suggest you get a book on Windows Forms; I think the (older, but still good) books by Jesse Liberty and Matthew McDonald are excellent.
cheers, Bill
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008
|
|
|
|
|
So you cannot use the same "words" to write both a console and forms app.. Not only are you forced into the new language C#, but sub languages as well
|
|
|
|
|
Why would you want to? The two application types are totally different and always have been. Before .NET (C#, VB.NET etc.) there was pure Windows, which was still different from console apps.
|
|
|
|
|
Yes, you can. A windows app is a console-app. It will write in both applications to the same destionation; stdout.
Anything else?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Sounds like ORT might be back
|
|
|
|
|
|
The use of English in the later posts would point at ORT...he has a certain "style".
Hopefully, this time he will refrain from the shrooms or whatever (or not post when using them)
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I have worked on Linking outlook with asp .net application ie sendind the appointment request from asp .net application i.e web to outlook . I got correct response also now want that response I am getting from Outlook To be sent as mail to the person requesting meeting after the accept/reject/tentative and update the status in Asp .net application .
|
|
|
|
|
If you're using Office Interop from ASP.NET, you should read the following Microsoft knowledgebase article:
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
Aside from installing Office on the server, there are various hoops you'll have to jump through to stand any chance of getting it working. And even if you do, there's no guarantee that it won't suddenly stop working for no obvious reason at some point in the future.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
Under that article is a forum, similar to this, where you can ask questions about said article.
I'd recommend you also explain "what" doesn't work, what your expected and actual results, or, in case of an error, the complete exception-message.
Otherwise, there'd be no way to help beyond asking basic questions like "is Google Earth installed", did it start, did SetParent fail, what?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.Diagnostics;
using System.Runtime.InteropServices;
using EARTHLib;
using UnityEngine;
using System.Resources;
namespace simulation
{
public partial class Frmexe : Form
{
[DllImport("user32.dll")]
private static extern int SetParent(
int hWndChild,
int hWndParent);
[DllImport("user32.dll")]
private static extern bool ShowWindowAsync(
int hWnd,
int nCmdShow);
[DllImport("user32.dll", SetLastError = true)]
private static extern bool PostMessage(
int hWnd,
uint Msg,
int wParam,
int lParam);
[DllImport("user32.dll", EntryPoint = "SetWindowPos")]
private static extern bool SetWindowPos(
int hWnd,
int hWndInsertAfter,
int X,
int Y,
int cx,
int cy,
uint uFlags);
[DllImport("user32.dll")]
private static extern int SendMessage(
int hWnd,
uint Msg,
int wParam,
int lParam);
private const int HWND_TOP = 0x0;
private const int WM_COMMAND = 0x0112;
private const int WM_QT_PAINT = 0xC2DC;
private const int WM_PAINT = 0x000F;
private const int WM_SIZE = 0x0005;
private const int SWP_FRAMECHANGED = 0x0020;
private EARTHLib.ApplicationGE ge = null;
public Frmexe()
{
InitializeComponent();
ge = new ApplicationGE();
SendMessage(ge.GetMainHwnd(), WM_COMMAND, WM_PAINT, 0);
PostMessage(ge.GetMainHwnd(), WM_QT_PAINT, 0, 0);
SetWindowPos(ge.GetRenderHwnd(), HWND_TOP, 0, 0, (int)this.Width,
(int)this.Height-50, SWP_FRAMECHANGED);
SendMessage(ge.GetMainHwnd(), WM_COMMAND, WM_SIZE, 0);
ShowWindowAsync(ge.GetMainHwnd(), 0);
SetParent(ge.GetRenderHwnd(), this.Handle.ToInt32());
ResizeGoogleControl();
}
private void Frmexe_Resize(object sender, EventArgs e)
{
ResizeGoogleControl();
}
private void ResizeGoogleControl()
{
try
{
SendMessage(ge.GetMainHwnd(), WM_COMMAND, WM_PAINT, 0);
PostMessage(ge.GetMainHwnd(), WM_QT_PAINT, 0, 0);
SetWindowPos(ge.GetRenderHwnd(), HWND_TOP, 0, 0, (int)this.Width,
(int)this.Height-50, SWP_FRAMECHANGED);
SendMessage(ge.GetMainHwnd(), WM_COMMAND, WM_SIZE, 0);
}
catch { }
}
private void Frmexe_FormClosing(object sender, FormClosingEventArgs e)
{
System.Diagnostics.Process[] ge = System.Diagnostics.Process.GetProcessesByName("googleearth");
ge[0].Kill();
}
modified 27-May-16 10:29am.
|
|
|
|
|
You can't; the example shows how to embed a running executable, not how to manipulate its data - it is not loaded as a COM-component (there might not be one) which would allow manipulation of its elements.
You'll find examples on how to add markers in their documentation[^], along with a warning that the API will be gone by the end of this year.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
google earth appilication can show without appication border example minimize,restoredown and close in winform?
|
|
|
|
|
Yes; you'd need to send a (windows) message to the GE application that sets the border. Most examples on embedding a running executable show how to do so.
Example here[^]
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
If you have an issue with the content of a CodeProject article then you should use the forum at the end of the article. However, I note that the author has not been active for some years so it is unlikely that you will get a response..
|
|
|
|
|