|
please note: Yes I already posted this in the C# forum ( http://www.codeproject.com/script/Forums/View.aspx?fid=1649&msg=2604582[^] ), but at the suggestion of others said I might have better luck here.
I give up, this seems impossible without the UriBuilder class... Well since .NET 1.1 when they made Uri(string, bool) obsolete... So here is my question:
How do you build a System.Uri object in .NET compact framework that points to a "file://" scheme with passed query information?
I've tried every valid (not obsolete) constructor for System.Uri meaning:
* Uri(string)
* Uri(string, UriKind)
* Uri(base, string)
* Uri(Uri, Uri)
It didn't matter which I use because they don't have any affect on the outcome... Every constructor will escape the ? to hex as %3F which is not valid to use with query information!!!
I can do this fine with strings but if I pass a string to the WebBrowser control it'll convert the string to a Uri object and have the problem again. So I need to build the correct Uri object and pass it to the WebBrowser control.
MSDN says the following lie:
The Uri constructors do not escape URI strings if the string is a well-formed URI including a scheme identifier.
Proven by this example:(start a new smart device application and add this code to the form1.cs file)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace DeviceApplication1
{
public partial class Form1 : Form
{
public int demoValue = 4;
public Form1()
{
InitializeComponent();
this.Load += new EventHandler(this.Form1_Load);
}
void Form1_Load(object sender, EventArgs e)
{
Uri htmlFile = new Uri(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), UriKind.Absolute);
MessageBox.Show("htmlFile.AbsoluteUri=\r\n" + htmlFile.AbsoluteUri);
string properFormated = string.Format("{0}/DeviceApplication1/test.html?test={1}", htmlFile.AbsoluteUri, this.demoValue);
MessageBox.Show("properFormated=\r\n" + properFormated);
Uri fileWithQuery = new Uri(properFormated);
MessageBox.Show("fileWithQuery.PathAndQuery=\r\n" + fileWithQuery.PathAndQuery);
}
}
}
View your results and see my problem any suggestions? I'm desprate at the moment (this has been bothering me since April!)
-Spacix
All your skynet questions[ ^] belong to solved
I dislike the black-and-white voting system on questions/answers.
|
|
|
|
|
After further testing this has been reported as a bug to the Visual Studio and .NET team via MS Connect: Bug ID 352533
-Spacix
All your skynet questions[ ^] belong to solved
I dislike the black-and-white voting system on questions/answers.
|
|
|
|
|
Hi
When u start internet explorer on Windows mobile and u don't have connection yet then explorer automaticly starts connecting to internet. The same thing i would like to do.
I want that my aplication looks if i am connected to internet and if i am not then it should connected it self automaticly.
Thank you for the answer.
|
|
|
|
|
Hi,
I created a database by using CCeDBDatabase class in embedded vc++.
But I couldn't change the sort order of the database.How can I do that? I tried some ways that is written in the content,however that is not work.
Thanks
ibrahim
|
|
|
|
|
Hi to all!! Can any body help me abt asterisk ,how to generate call in asteriskwin32 to a local phone in windows xp. How to write call files and entension.conf.
|
|
|
|
|
Hi, I am a very new to .NET compact framework. I'm just curious that is there a way to create a program that can help me press the keypad. I have a problem with remembering lots of number. When I make an international call (I use card phone), I have to dial to one number and wait for the signal, and input some password and wait again and press the number I wanted to call with # at the end. So, when I have to put a long number, I just run my program which already have my password and the number I wanted to call. Thanks
|
|
|
|
|
Using VS 2005 (SP.050727-7600)
When I select:
1) File-->New-->New Project
2) Other Languages
3) Visual C#
4) Smart Device
One of the selections is 'Windows CE 5.0'
I have installed the CE 6.x SDK, and I so see:
'Platform Builder for CE 6.0'
Have they change the names? Should'nt I also be able to install so that I see 'Windows CE 6.0' under:
1) File-->New-->New Project
2) Other Languages
3) Visual C#
4) Smart Device
If so, how? I have searched all over the web and I not been able to find the answer.
I am go to work through the book 'Microsoft Mobile Development Handbook', but my ultimate target will be an AIM processor running a .NET version of CE 6.0.
|
|
|
|
|
There is a bug with registering target platforms with visual studio. You must have Visual Studio closed when you install the SDK's else it'll never detect them on your system.
If this is what happoned to you, then uninstall the CE6 SDK, reboot (for good measure), reinstall the CE6 SDK without having visual studio open.
-Spacix
All your skynet questions[ ^] belong to solved
I dislike the black-and-white voting system on questions/answers.
|
|
|
|
|
Before I start reinstalling everything I have a few questions.
After I do the install, I do see:
1)File-->New-->Project-->Platform Builder for CE 6.0. I assume this is what I will use to write the OS.
As far as writing and application, in C# .NET against an Windows Embedded 6.0 SDK:
Do I need a separate SDK for building C# .NET apps written against Windows Embedded 6.0?
So that when I select:
1) File-->New-->Project.
2) Other Languages-->C#-->Smart Device
I will see Windows Embedded 6.0, in addition to Windows CE 5.0?
If so, if there a free download? What is the link to the download?
Thanks,
|
|
|
|
|
|
Hi,All!
I am developing an application which play a video on windows pocket 2003. But I can't compile the code using DriectX for Pocket 2003 at all. I hope someone can be kind to tell me how to develop it. Thx!
Regards!
whiteclouds
|
|
|
|
|
I am developing smart device application using c#(Framework 3.5).For this development I need to print text using bluetooth printer. Please help me I have no idea for do this.
ssss
|
|
|
|
|
Hi,
I want to create a Modal dialog box in a worker thread.But when I close the modal dialog box, all the program is shutting down.What can cause to this? How can I create a modal dialog box in a worker thread? In addition to that I tried to create a modal dialog box in a worker thread for Windows and it worked fine. So I think that the problem is about Windows CE?
thanks
|
|
|
|
|
I need to connect device emulator to the network and get the internet connection. I don't no how to configure that settings. Please help me.
ssss
|
|
|
|
|
Use the Device Emulator Manager application, and right-click on the PocketPC emulator in its treeview, and pick "Cradle". That will form an activesync connection to the emulator, as if it was a hardware device.
~Arjun
Dave Traister
Software Engineer
ComponentOne LLC
www.ComponentOne.com
|
|
|
|
|
|
Hi All,
I am using .NET Compact framework, I have a text file having german text. The Text contains some special characters like 'ß','Ä','Ü' etc. i want to convert the text using codepage 850. But after conversion it is showing garbage for above characters.This might happen because these characters are incorrectly translated due to incorrect coding of translation table for code page 850. What should i do to display these characters properly after conversion?
I am using following code for doing that
//Create a new stream for the input file
StreamReader stream = null;
stream = new StreamReader(@"D:\SampleGermanText.txt", Encoding.GetEncoding(850), true);
string strLine = stream.ReadLine();
while (stream.EndOfStream == false) //loop until end of the file.
{
LogMessage(strLine);
strLine = stream.ReadLine();
}
stream.Close();
Thanks,
Tushar
|
|
|
|
|
The easiest way would be to substitute "ß" with "ss" and your done.
Greetings from Germany
|
|
|
|
|
Hi,
thanks for the reply, actually text files comes from customers so it can contain any character.
Regards,
Tushar
|
|
|
|
|
If it doesn't work properly, the file probably isn't codepage 850.
Take a look at the file in a hex editor - the easiest way for most programmers is to open it in Visual Studio by going to File, Open, File, selecting the file, then clicking the down arrow at the end of the Open button and selecting Open With. Then select Binary Editor.
Now, compare the characters you have against Microsoft's Code Page reference[^]. If it opens properly in Notepad, it's most likely Windows 1252[^].
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
Hi
Can anyone please help me, I need c# code to
manipulate the backlight with windows mobile 5?
I havent tested, but from googling I think there
is API for it using WM6. But I need WM5 support.
Managed, unmanaged! anything at all would be really great!
Thanx in advance.
|
|
|
|
|
I have found my solution.
|
|
|
|
|
Can you tell us what it was? I assume it wasn't MessageBox ("Please use a torch")...
Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
|
|
|
|
|
Hi,
I have an TCP server client application, with client running on the WM 6.0.
I have using TcpClient class to establish connection to my server and send data. If I am using wifi the code is working fine, but if I am trying to use GPRS its not working. I think I have to start GPRS connection first. Can someone please tell me how to fix this.
here is the client side code
public class Client
{
public void GpsClient(string Ostring)
{
TcpClient socketForServer;
try
{
socketForServer = new TcpClient("energystudy.dyndns.org", 13000);
}
catch
{
Console.WriteLine("Failed to connect to server at {0}:13000", "energystudy.dyndns.org");
return;
}
NetworkStream networkStream = socketForServer.GetStream();
System.IO.StreamReader streamReader = new System.IO.StreamReader(networkStream);
System.IO.StreamWriter streamWriter = new System.IO.StreamWriter(networkStream);
try
{
string outputString;
// read the data from the host and display it
{
outputString = streamReader.ReadLine();
//Console.WriteLine(outputString);
streamWriter.WriteLine(Ostring);
//Console.WriteLine("Client Message");
streamWriter.Flush();
}
}
catch
{
Console.WriteLine("Exception reading from Server");
}
networkStream.Close();
}
}
|
|
|
|
|
I'm new to EVC environment, and I'm creating DLL, but I'm unable to debug it. What are the steps that I can do to debug it?
Thanks in advance.
|
|
|
|