|
Windows CE has no concept of the current directory. All paths must be specified completely, i.e. from the root of the file system.
We use the following code to get the path to the application EXE:
Dim path As String = System.IO.Path.GetDirectoryName(
System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
|
|
|
|
|
Thanks Mike. it works
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
I am having trouble debugging my device.
I am able to deploy to the device, but whenever i set a breakpoint, the breakpoint becomes empty ands says that the moduleis not loaded.
I am developping a WM2003 application and my pda is dell axim x51v with is running WM5. i need to develope this proggy in wm2003 for competbility issue
Can any one help me please
|
|
|
|
|
are you doing a debug build with KITL enabled in said build?
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
hi all,
when i hide any form of my application then my application is not listed in running program section of Task manager window.
Please guide me what is the reason behind this problem ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
hi all,
i m developing application for PocketPc 2005 using vb.net
Following is the code to load a form named frmWizardForm1. however this code show(load) the form if this procedure execute first time
Private Sub PictureBox2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox2.Click<br />
frmWizardForm1.Show()<br />
frmWizardForm1.BringToFront()' this line produce error<br />
frmWizardForm1.dtpGameDate.Value = Date.Today<br />
frmWizardForm1.cboPlace.Text = ""<br />
frmWizardForm1.cboClub.Text = ""<br />
frmWizardForm1.dtpGameDate.Focus()<br />
End Sub
if i close the form & reopen it by above procedure then following error occured
"ObjectDisposedException was unhandeled" in second line.
i dont know where i m wrong ?
Please guid me .
any help will be grately appreciated
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
You need to call frmWizardForm1.Dispose() when the form is being closed, so it disposes all resources and the instance of that form. Then reload it, and you will be fine
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
hi justin,
thanks for your reply
i already try statement frmWizardForm1.dispose .but same error occured when we reload it.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
Ok, in your code I see this line:
frmWizardForm1.Show()
You don't want to do that, change that to
frmWizardForm1.ShowDialog()
Also, be sure to have the Dispose method being called in the close of that form, and that should fix it. I didn't notice that the first time Hope that helps
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
hi justin ,
thanks for your support.
i have Four form(frmWizardForm1, frmWizardForm2, frmWizardForm3, frmWizardForm4). which give appreance as a wizard & also include Back,Next and Cancel button.so if we open these form as ShowDialog,then it action require form must be close before we go back & forth .also in that condition back & next button not works.
hope you understand my problem.
waiting your positive response.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
No problem, I'm happy to help. I don't understand the current problem though. I believe you are saying that If you use ShowDialog() then you have to close the first form before you can use your back & next buttons. Is that correct? Explain to me what this form collection does, and if you click back or next, is it supposed to open a new form(frmWizard2,3,4)?
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
I think, when you use form.close(), it is usually disposed, and you have to create a new form instance before you can use form.show() again. I usually use form.hide()/form.show() if I want to continue to use the same form again.
|
|
|
|
|
hi,
thanks for ur reply
First thing ,if i hide the form then my application is not listed in task manager window. second i does not create any instance of form. i am working only with form in coding(in place of creating object).
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
I am not sure I understand this right, but how do you show a form that doesn't exist ?
Additionally I believe, not only on PDAs, but on desktop windows as well, only those programs show in the taskmanager, that have a window, i.e. form open on the desktop.
|
|
|
|
|
I want to attach external display and keypad to my mobile phone. So that i can use my mobile/sim card using external diplay and external keypad.
Please inform me, if any device available in market which is capble to give above fuction through mobile phone/simcard.
|
|
|
|
|
Here's what i am trying to achieve
1. I encrypted/decrypted the entire soap body instead of encrypting single parameter value, this seemed to be worked and i am happy with that
So what i have is Two CustomExtension Class that Encrypts and Decrypts Soap body and works both ways (request and response)
2. Problem is when i use this above Webmethod along with another extension ie DimeExtension (Opennetcf) the flows from client end reaches till the server just before the Service's webmethod call the CustomExtension is hit which is fine but error's out at processmessage .BeforeDeserialize where i am trying to load the stream to xmldocument for decrypting
Error message :
' ', hexadecimal value 0x01, is an
invalid character
My guess is the DimeExtension is messing up the Stream , i was playing around with it and found there is "/f" in the stream , but am not sure as i am unable to Visualize Ws-attachment
How does the Soap Envelope looks if Binary attachments are sent along with it? i guess they are the out most part
<soapenvelope>
Could you please help to right direction?
Client Code:
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/HelloWorld", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[OpenNETCF.Web.Services2.Dime.DimeExtension]
[CryptoExtension()] ----> CustomExtension
public new string HelloWorld()
{
DataSet ds = new DataSet();
ds.Tables.Add("tableTest");
m_attachdataset(ds);
object[] results = this.Invoke("HelloWorld", new object[0]);
m_retrieveattachment();
return ((string)(results[0]));
}
Server Code:
[WebMethod]
[ParamEncryptionExtension] ----> CustomExtension
public string HelloWorld()
{
DataSet dsrequest;
dsrequest=Class1.WSD_RetrieveAttachment();
DataSet ds = new DataSet();
ds.Tables.Add("responsetable");
Class1.WSD_AttachDataset(ds);
return "Hello World";
}
ParamEncryptionExtension Class
.........................................
public override void ProcessMessage(SoapMessage message)
{
switch (message.Stage)
{
case SoapMessageStage.BeforeSerialize:
break;
case SoapMessageStage.AfterSerialize:
EncryptParameterValues();
break;
case SoapMessageStage.BeforeDeserialize:
DecryptParameterValues();
break;
case SoapMessageStage.AfterDeserialize:
break;
default:
throw new Exception("invalid stage");
}
public void DecryptParameterValues()
{
XmlDocument dom = DecryptSoap(oldStream);
if ((dom != null))
{
MemoryStream ms = new MemoryStream();
XmlTextWriter xm = new XmlTextWriter(ms, null);
dom.WriteTo(xm);
xm.Flush();
newStream.Write(ms.GetBuffer(), 0, (int)ms.Length);
newStream.Position = 0;
xm.Close();
}
private static XmlDocument DecryptSoap(Stream streamToDecrypt)
{
streamToDecrypt.Position = 0;
XmlReaderSettings settings = new XmlReaderSettings();
settings.ConformanceLevel = ConformanceLevel.Document;
settings.IgnoreWhitespace = true;
settings.IgnoreComments = true;
XmlReader reader = XmlReader.Create(streamToDecrypt, settings);
XmlDocument dom = new XmlDocument();
dom.Load(reader);---------------------------------------> ERROR
XmlNamespaceManager nsmgr = new XmlNamespaceManager(dom.NameTable);
nsmgr.AddNamespace("soap", "http://schemas.xmlsoap.org/soap/envelope/");
XmlNode node = null;
node = dom.SelectSingleNode("//soap:Body", nsmgr);
if ((node != null))
{
String hashvalue = string.Empty;
String password = "P@$$w0rd";
hashvalue = Encryption.Hash(password, Encryption.HashAlgorithm.MD5);
node.InnerXml = Encryption.DecryptString(node.InnerXml, Encryption.CryptoAlgorithm.AES, hashvalue);
}
return dom;
}
Thanks in Advance
blue
|
|
|
|
|
hi all,
i want to read SMS from inbox of Pocket pc.I already search on net(google etc )but appropriate result is not found.Can anybody tell me that how can i do this thing using vb.net.
any guide or link will be grately appreciated.
thanks in advance
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
I am currently in the developement of something similar, basically my application is a bluetooth app that will activly search for phone close by, and then connect to the phone automatcally using AT commands via the Dial up networking profile
Most phone on the market now supports AT commands, and most of them support extracting SMS using AT commands, unfortunately tho, my nokia 7370 phone does not support that.
But you can do a lot of things using AT commands,i.e. monitor signal strength, monitor battery level, look at contacts, dial a number, recivce a call, go on the internet... all u can call
for more information on at commands, search for AT commands in the nokia forum[^]
I had been sucuessful on connecting to my phone via the bluetooth virtual com port via hyperterminal to use the at command, however, doing the same thing was not sucessfull on my axim x51v
I found out that in order to execute at commands on the phone from pda, i need to connect to the phoen using the DUN (dial up networking) profile. I found that a free souce library called InTheGo would allow me to do so
So far i am able to connect to the phone using DUN, and able to pair it. I will look into sending AT commands later
I would be happy to exchange some experience with you.
|
|
|
|
|
How can I create file in NOKIA mobile phone memory disk? How can I create dirrectory in NOKIA mobile phone memory disk?
My mobile phone is Nokia N72. I can access its memory disk after I connect it wity my computer. Its directory is 'My Computer\\Nokia N72\\memorydisk\\'
I failed to access it with the following code:
CString csNokiaDir("My Computer");
bFindFile=finder.FindFile(csNokiaDir);
csNokiaDir = "My Computer\\Nokia N72";
bFindFile=finder.FindFile(csNokiaDir);
csNokiaDir = "My Computer\\Nokia N72\\memorydisk";
I get another directory by the following MFC code:
BROWSEINFO bi;
TCHAR Buffer[512]="";
TCHAR FullPath[512]="";
bi.hwndOwner = m_hWnd;
bi.pidlRoot = NULL;
bi.pszDisplayName = Buffer;
bi.lpszTitle = "Select directory";
bi.ulFlags = BIF_RETURNONLYFSDIRS|BIF_EDITBOX|BIF_BROWSEFORCOMPUTER ;
bi.lpfn = NULL; //回调函数,有时很有用
bi.lParam = 0;
bi.iImage = 0;
ITEMIDLIST* pidl = ::SHBrowseForFolder (&bi);
if(::SHGetPathFromIDList (pidl,FullPath))
{
m_sFonePath2 = FullPath;
}
The path I got is'::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{416651E4-9C3C-11D9-8BDE-F66BAD1E3F3A}\354533010872671\E:\'
I used FindFile to check it and failed again.
Does any one know how to handle this kind of directory?
|
|
|
|
|
How can attach external display (i.e. pc monitor or else ) and also external keypad.
How can i operate mobile phone using external keypad and external display. Please guide me.
Interested in useful invetion/tricks/software
|
|
|
|
|
Hello i made a Pocket PC program that sends and receives data through the internet using sockets. It connects to the server which is a windows application.
When I tested the program with Activesync i had no problems. When using GPRS nothing happens, the server is not seeing any connections and the client program is frozen i think.
|
|
|
|
|
I have a WAVE file and I want to know how much time that file can be played. How can I do it? I tried to use OpenNetCF but its WaveFormat2 doesn't help.
I'm working on Windows Mobile 5 and .NET Compact Framework 2.0.
Thanks
I'm ...
a fan of Manchester United
a fan of Ozzy Osbourne
a King of Nothing
|
|
|
|
|
Hi all,
Is any .NET CF application able to receive/respond to any events when a WM2003/WM5 device goes into stand-by mode?
In other words, can a .NET CF application wake up a WM2003/WM5 device when it is on stand-by/suspend mode?
Problem:
How to wake up a WM2003 device, that is currently on stand-by/suspend mode and its battery life has reached say 10%.
Considering that keeping the device alive while checking the battery life is not a solution.
Ideas?
|
|
|
|
|
Only notifications can wake up a Windows CE-based device. You set up a notification by calling CeSetUserNotificationEx (there are older APIs but these should no longer be used).
You can see from the documentation of CE_NOTIFICATION_TRIGGER that you can have the notification fire either at a specific time, or when certain events occur (many of these events will only occur when the device is already awake). I think about all you could do would have the device wake up periodically to check the battery level, which isn't a very good solution.
Why do you want to do this, anyway? If it's to save user data, that's not a good solution. You should be looking to periodically flush changes to user data to a file, because the user could remove the battery or reset the device without warning.
|
|
|
|
|
Hello Mike,
Sorry for the late reply, I've been away for some time.
The idea was not let the device run out of battery completely by warning the user that battery was going down. Basically we're talking about a WM2003 Phone Edition, so it would be nice to remind the user that battery life is fading.
If I'm not mistaken, it currently only warns twice, once at 20% and again at 10%, but I want to keep warning after the 10%, so that the user gets so annoyed it has no solution but to charge the device
|
|
|
|