|
Alain is right on the money.
Be sure to have the call to hide the window within OnInitDialog() as he shows. OnInitDialog() is executed *before* the dialog window is displayed, so you should see no flicker.
If you hide after the OnInitDialog()) has been completed, the window will/may appear and will then be hidden when your code is called, just as you are describing.
HTH
Gary
|
|
|
|
|
i have a pocket pc and a printer .
i need to print from my program this wrote by C#.net 2005
and i can't found control for printing like (documnetprint in windows application) how i can print?
123
|
|
|
|
|
Write the print data to a file, configure and open the COM port, send the print data/file out the COM port, close the port.
Or HP has CE drivers for their own printers.
GE
|
|
|
|
|
Hi there,
I currently have a Pocket PC client created in the .NET compact framework using C#. It connects to a web service (which in turn can connect to a SQL DB)
The Client sends requests (ie: Add Device, View Devices etc).
I want to be able to store these requests on the mobile device somehow. This is so that if the connection isn't there, devices can still be added to the "queue" so that when there is a connection the Client will call the webservice to add the devices in this queue. It has to be stored on the actual device because the application or device may be closed/turned off before the connection is restablished.
There are a few ways I have thought of doing these:
- SQL Express
- Storing in XML
- Somehow capturing the XML/SOAP message and storing this.
I was wondering if there are any others that people could add or any suggestions genereally.
Thanks in advance,
Pete
-- modified at 10:43 Thursday 12th July, 2007
-- Updated title and removed blank lines!
|
|
|
|
|
I am working with:
- VS.Net 2005
- Compact Framework .NET 2.0
- Windows Mobile 2003 Pocket PC.
create a cab file which install gprs setting (IP, Proxy address and Access Point) needs connection for internet, we copies cab file to mobile device which can be used to install setting for gprs internet.
do anyone of you know how to do this? oh! pls helP me to do so! thanks!
we fly to our destination as we help eac other, keep it in touch!
|
|
|
|
|
Hi zafax4.
Do you want to know how to create the CAB file and copy it to the device, or do you want to know how to create a CAB file that will install the GPRS settings?
Creating the CAB file is easy, specially on VS2005. However, I've never dealt with GRPS settings so assuming those settings are in the form of a simple file, then it would be a matter of including that file on the CAB file.
|
|
|
|
|
thanks for your reply, i know how to deploy an windows mobile application and create cab files, i just want know how this xml file can be used to install the configuration in the device automatically.
hmmmmmmmm
|
|
|
|
|
Well, it seems Mike has helped you out. I was going to suggest using DMProcessConfigXML, but I guess that would only make sense if trying to setup the GPRS settings programmatically.
Anyway, you're in safe hands with Mike, he's the one who helped me out after all!!
|
|
|
|
|
you right tuga, mike is very helpful and i always appreciate him and thank you too.
zafaa
|
|
|
|
|
You can use the CM_GPRSEntries Configuration Service Provider to achieve this. For the UK Vodafone network, we're using this XML:
<?xml version="1.0" encoding="utf-8"?>
<wap-provisioningdoc>
<characteristic type="CM_GPRSEntries">
<characteristic type="Vodafone GPRS">
<parm name="DestId" value="{436EF144-B4FB-4863-A041-8F905A62C572}" />
<parm name="UserName" value="web" />
<parm name="Password" value="web" />
<parm name="Domain" value="" />
<parm name="IpHeaderCompression" value="1" />
<parm name="SwCompression" value="1" />
<characteristic type="DevSpecificCellular">
<parm name="GPRSInfoValid" value="1" />
<parm name="GPRSInfoAccessPointName" value="internet" />
<parm name="GPRSInfoDataCompression" value="2" />
<parm name="GPRSInfoHeaderCompression" value="2" />
</characteristic>
</characteristic>
</characteristic>
</wap-provisioningdoc> You should save this to a file named _setup.xml . You can then use the makecab tool to make an installation cabinet containing the file. For Pocket PC 2003, you need to turn compression off and give the CAB a .cpf extension. For Windows Mobile 5.0 and later you can include the configuration XML in a regular, compressed setup CAB. See Creating a .cpf File[^] in MSDN Library.
|
|
|
|
|
thanks a lot! hows you Mike Dimmick? yeah thats exactly what i wanna know about xml.setup and cab file extension. i go through this.
thanks
zafaa
|
|
|
|
|
Hi Guys and Girls,
I am having trouble writing my first mobile application with Compact Framework.
Can anyone give me some sample code for a small application so that I can see how it works and familarise myself with the program.
Many thanks,
Pamela
|
|
|
|
|
|
Thanks Satips,
Can you give a sample code on how to send information to a PDA from a SQL server and vice versa so that I can see how it works?
Pamela
|
|
|
|
|
In the Link there are lot of Sample codes related to that. If you have gone through the Link fully means you could not asked this code.
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
in my C# program(I mainliy use SerialPort class),I input "at" in a textBox,then the program send "at" to serial port(the other end of serial port is a modem which is connected to my computer by a data line),but when i click receive button,the message I receive from serial port is the same as what I input,namely "at",not "ok",why?who can answer my question?How I solve this problem and get the right response "ok" from serial port?
next is my code:
public partial class Form1 : Form
{
private SerialPort sp = null;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
try
{
sp = new SerialPort("COM1");
sp.ReadTimeout = 5000;
sp.Open();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void button2_Click(object sender, EventArgs e)
{
try
{
sp.Write(textBox1.Text);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void button3_Click(object sender, EventArgs e)
{
try
{
/*string text=null;
char[] buffer = new char[10];
sp.Read(buffer,0,6);
for (int i = 0; i < buffer.Length; i++)
{
text += buffer[i];
}
textBox2.Text = text;*/
/*string text = null;
char t = (char)sp.ReadChar();
text+=t.ToString();
while (true)
{
t = (char)sp.ReadChar();
if (t == '\0') break;
else text += t.ToString();
}
textBox2.Text = text;*/
string text = null;
byte[] t = new byte[20];
char[] c = new char[20];
sp.Read(t, 0, t.Length);
sp.Read(t, 0, t.Length);
c = Encoding.ASCII.GetChars(t);
int i;
for (i = 0; i < c.Length; i++)
{
if (c[i] == 'O' || c[i] == 'K')
text += c[i].ToString();
}
textBox2.Text = text;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
|
|
|
|
|
This may have nothing to do with your code.
Modems have an Echo mode, returning exactly what you send to them. This sounds like your problem.
Configure the modem to turn echo mode off, "ATE0" if I recall correctly, in the modem initialization. Of course, the "ATE0" may be returned/echoed the first time, but then everything should operate as expected.
You may want to save the configuration after you have done this.
Gary
|
|
|
|
|
I am coding a messaging program on Windows Mobiles 6.0, but there is a problem in reading SMS. My codes of SmsOpen(…) are
SMS_ADDRESS smsaDestination;
TEXT_PROVIDER_SPECIFIC_DATA tpsd;
SMS_HANDLE smshHandle;
HANDLE hRead = CreateEvent (NULL, FALSE, FALSE, NULL);
// Open an SMS Handle
HRESULT hr = SmsOpen (SMS_MSGTYPE_TEXT, SMS_MODE_RECEIVE, &smshHandle, &hRead);
if (hr != ERROR_SUCCESS) {
printf ("SmsOpen fail %x %d\r\n", hr, GetLastError());
return 0;
}
.
.
.
However there is an error when calling
SmsOpen(SMS_MSGTYPE_TEXT,SMS_MODE_RECEIVE, &smsHandle, &hRead).
The error message is “Another application already has the SMS system open.” And there is not error if I use SMS_MODE_SEND.
I had already searched in many books and website, but I found only code that I used. Are there anyone know how to solve this problem?
Thank you.
Jidtrawadee Cheewatanon
jidtrawadee@hotmail.com
(Thailand)
|
|
|
|
|
Currently I am making a program that can open several images(bmp,jpg) and run them in a slideshow for my treo 700w (Windows Mobile 5.0 Pocket PC). I use SHLoadImageFile to open the images. I have no problems opening as many images as I went when I run them on the treo emulator that I run from VS. But when I try to run it on my phone, it only allows to open three images then just stops letting me load anything else after I try to load the 4th image. I have tried a lot of different things to figure this out but its really hard to debug something that works fine on your computer like that. Here is what I am trying. GetOpenFileName doesn't return an error. SHLoadImageFile doesn't return an error but it doesn't display the Error message box either. I tried inserting message boxes in several places so I could get an idea of where it stops and it stops when it tries temp = SHLoadImageFile line then nothing executes below it. I don't know if there is a limited number of times you can call that function but any help would be very much appreciated.
if (GetOpenFileName(&ofn))<br />
{ <br />
HBITMAP temp;<br />
if((temp = SHLoadImageFile(ofn.lpstrFile))!=NULL)
{<br />
g_hBitmap[count] = temp;<br />
MessageBox(NULL, ofn.lpstrFile, TEXT("File Loaded Successfully"), MB_OK);<br />
if(count > 0){ index=count;}<br />
count++;<br />
}<br />
else<br />
{<br />
MessageBox(NULL, TEXT("Image Unable to Load"), TEXT("ERROR"), MB_OK);<br />
}<br />
}<br />
else <br />
{<br />
DWORD dw = GetLastError();<br />
if (dw == ERROR_OUTOFMEMORY) <br />
{<br />
MessageBox(NULL, TEXT("Out of Memory"), TEXT("ERROR"), MB_OK);<br />
}<br />
else<br />
{<br />
MessageBox(NULL, TEXT("File Unable to Load"), TEXT("ERROR"), MB_OK);<br />
}<br />
}
|
|
|
|
|
I would like to development an application that can draw on whole screen, just like "transcriber". Could you mind to tell how can I implement and what kind of API (DirectDraw, GAPI, GDI....) I need to study?
Milllion Thanks
|
|
|
|
|
Hi all,
I'm testing several "ruggedized" PDA type mobile computers from different manufacturers. Each of these devices have "hard buttons" on the surface of the device itself, but not a full keyboard. Annoyingly each manufacturer has a different API to enable the control of these buttons...
...given that my application may well have to run on all of these devices, does anyone know if these manufacturer API's are just wrapping some Windows calls, and if so, what those calls are?
|
|
|
|
|
I am confused with the sample StockPro, i just want to know the working flow of activesync desktop provider and its device side.
After install WM5 for PPC sdk(using vs2005 for development), the sample is under the folder
C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Activesync\Activesync stock portfolio sample\Stockpor.
I do it follow the readme.doc, but no new item found in the activesync items list.
there are what i did:
1. using vs2005 compile the sample, we got devsetup.exe,devapp.exe,devsync.dll
and stockapp.exe, stsync.dll. I copied "devsetup.exe,devapp.exe,devsync.dll" to "\" after start PPC emulator successfully. and run devsetup, it is ok.
2. Disconnect emulator from "device emulator manager", the connect is again. The activesync will auto synch the objects it found. but there is no "stock" item in item list appeared in activesync status bar.
3. Run stockpor.exe on desktop PC, and choose the default data file "demo.por"
,then click synch button, ok the activesync is synching, but again with no new item show on the status bar.
Are there some fault operations in my condition?Why couldn't i see the new object "stock"! who can simply tell me how to use this sample, all above is just "my understanding"! thanks!
One day a pretty girl asked me:"Do u think you are handsome?" "I don't think so!".She gave a slap in my face:"Why lying?"...
|
|
|
|
|
Hello,
I have an issue with a pocket PC emulator (Microsoft Device Emulator V2 (2003)) and I need some help. I have a Pocket PC emulator here and I'm trying to make a software of my company work on it. (To make it quick, its a soft that allows us to manage our store's inventory) That software requires a barecode scanner in order to work. On the emulator, there's no, apparent, way to emulate such a device so I was wondering if there was a way to emulate a barecode scanner on the pocket PC. (Note: We don't want to use that scanner; data input will be made manualy. What we need is a way to make the soft belive there's a laser scanner installed on the pocket pc.
Thank you for your help,
|
|
|
|
|
Hi,
Any one knows any method to send an xml file to a web service from dotnet compact framework?
Thanks and regards,
sheeba
|
|
|
|
|
Hi,
I don't think there's a specific method to send a file to a web service on .NET CF, since a Web Service is something you can develop.
You can develop your own Web Service that receives a stream of bytes and writes them down to a file. Once you include a web reference to that Web Service, you can use its' methods. For example:
WebService<br />
ReceiveFile(bytes[] bytesRead)<br />
<br />
LocalApp<br />
SendFile()<br />
Where the SendFile() method uses the web service ReceiveFile() method. You would need a Stream to read the local file on SendFile(), and a Stream to write on ReceiveFile().
I hope this makes sense.
|
|
|
|
|