|
i am also having problem in socket programing. i can not send request from PPC to server application running on same pc can u help me.
|
|
|
|
|
Hello,
I'm developing a PPC application using C# .Net CF 2.0 and SQL CE 2.0.
I don't want my database .sdf file to be visible or accessible by the user, because that way he would have the possibility to delete it. I tried the following code:
if ((File.GetAttributes(path) & FileAttributes.Hidden) != FileAttributes.Hidden)
File.SetAttributes(path, File.GetAttributes(path) | FileAttributes.Hidden);
but .Net CF 2.0 does not support GetAttributes or SetAttributes methods.
Does anynone have an idea how I can do it or is there any program for hiding PPC files?
Thanks in advance,
Erisa
Destiny is not a matter of chance, it is a matter of choice.
|
|
|
|
|
|
Hi everyone,
Hopefully anyone will take the trouble to give me an idea, i'm posting the problem i've been working around these two days.
I'm deploing a pocket pc application, using C# .NET Visual Stdudio 2003.
I send the data I want print to server using socket communicaton. After the data are printed i receive a message from the server by means of socket programming.
This is the method that catches the message from the server
public void OnDataReceived(IAsyncResult asyn)
{
//end receive...
string mesazhi = "";
int iRx = 0 ;
try
{
if(asyn != null)
iRx =s.EndReceive(asyn);
char[] chars = new char[iRx + 1];
System.Text.Decoder d = System.Text.Encoding.UTF8.GetDecoder();
int charLen = d.GetChars(m_DataBuffer, 0, iRx, chars, 0);
if(charLen != 0)
{
System.String szData = new System.String(chars);
if (szData == "Printed")
{ this.dataGrid.DataSource = this.dataTable;
this.dataGrid.TableStyles[0].MappingName= this.dataTable.TableName;
this.AddGridColumnStyles(false,"EMERTIMI","SASIA");
}
}
As you can see in the method, after i receive the message from the server i want to display some data in a datagrid, so i give to it a datatable as a datasource. At this point my application doesn't respond and i have to restart my pocket pc.If I do not use the datagrid anything goes fine.
Please, someone help me!
|
|
|
|
|
Hi Erisa85d, by now i hope you have already worked out a solution
I wonder if you could tell me how you passed the message from the server to the PPC or viceversa
What IP adress and port did you use on you Server and on you PPC??
I hope you can give me that information, since i cant seem to be able to connect my server to my PPC using sockets
I made a simple example on my local machine, with 2 apps, 1 server and 1 client and it works as it should, but that code doesnt work when using a PPC and a server
Thanks in advance for your time
Alexei Rodriguez
|
|
|
|
|
<b>any body know how to implement a socket program in windows mobile .
i am create a socketconnection in windows mobile emulator but it cannot connect to server and runtime error a msg that 'not find assemmbly reference' so any body know how connect a windows mobile to a server please give the valued idea </b>
from vijo
<b> </b>
vimal
|
|
|
|
|
i am also having this problem, i am working in C#. and can not connect my application(in emulator ) to locathost.
|
|
|
|
|
Multithread application.
I use PostMessagge() function to send a user message (WM_USER + 303) with a HWND of a window
::PostMessage(m_destHwnd, WM_USER + 303, 0, 0);
In a destination windows I use ON_MESSAGE (WM_USER + 303, function) but the window don't receive the message.
With a HWND_BROADCAST the window receive the message.
IsWindow(m_destHwnd) function doesn't recognise the m_destHwnd window handler as a window. Is it possible. I verified the handler is correct.
-- modified at 6:40 Wednesday 3rd October, 2007
-- modified at 6:11 Friday 5th October, 2007
picm
|
|
|
|
|
I have this problem with a pocket pc app that I'm working on. The app runs beautifully while the device is running, but when it comes back after sleeping, my app crashes. I'm don't know how to debug this situation since the debugger stops when the device goes to sleep.
Does anyone have any advice on how to debug in this situation?
I'm using activesync 4.5, windows mobile 2003 on pocket pc, VS 2003.
Thanks for your help!
"In the middle of difficulty lies opportunity." Albert Einstein
|
|
|
|
|
If I'm stupid for asking this could someone just tell me so? Please? Or is this just impossible?
|
|
|
|
|
Hi Muthiah,
MuthiahR wrote: Is there any solution to track End/Power button key in modal dialog?
You can handle WM_KEYUP on any key in a modal dialog if you answer to WM_GETDLGCODE with DLGC_WANTALLKEYS .
The SmartPhone key mapping is in <your sdk>\winuserm.h: identifiers begin with VKT_ .
MuthiahR wrote: I am unable to termiate the application from modal dialogs using End/Power button on keypad
Well-behaved mobile applications are 'minimized' (actually set to the bottom of the Z-order) by user or program action and closed by the system when appropriate.
cheers,
AR
|
|
|
|
|
Edit: this is a response to a deleted message
Hi Muthiah,
Looks like it's time for you to stop typing and read some doc.
That could save much of your time (and mine ).
Check your doc for LVN_KEYDOWN.
cheers,
AR
-- modified at 16:15 Monday 1st October, 2007
|
|
|
|
|
Hello AR,
In your previous reply to my post regarding closing or terminating mobile applications, you mentioned,
"Well-behaved mobile applications are 'minimized' (actually set to the bottom of the Z-order) by user or program action and closed by the system when appropriate."
Right now, I am posting a message to main dialog and calling Destroy Window and PostQuitMessage functions to close my applications. Is this correct way to do it? or Is this what you mentioned in your reply?
If not, can you please provide me with some reference? I tried to find or read more about this, but in vain. Your time and reply is greatly appreciated.
Thanks,
Muthiah.
|
|
|
|
|
Hello,
WM 5.0
VS 2005
I have a mobile application that I want to install on a PDA. However all the PDA will not have the CF 2.0 on them.
I have looked a many articles and none of them address the situation if the compact frame is not already installed.
Doe anyone know of any articles where the setup will install compact frame work if it is not already on the PDA.
Many thanks,
Steve
|
|
|
|
|
hi Steve,
When ever you Installing CAB File on PDA, that time you can install CF2.0 (CAB File NETCFv2.ppc.armv4.cab) First.
Pavan Pareta
|
|
|
|
|
steve_rm wrote: Doe anyone know of any articles where the setup will install compact frame work if it is not already on the PDA.
All you have to do is to right click on the .NET Compact Framework Merge Module in your setup and deployment and choose "Include" to include it with your CAB. It will increase the size of your installer quite a bit though.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Hello
VS 2005
CF 2.0
WM5
I have created an application that scynchronizes the central database by sending changes to a web service.
This normally takes 5 to 10 seconds and the customer wants to have some kind of progress bar to show that something is happening.
This is some code that would explain what needs to be monitored. (Only showing the main parts - otherwise to much code to show)
<br />
'Synchronise Data with the central database<br />
Private Sub MenuItem9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem9.Click<br />
<br />
Try<br />
<br />
If (dsIncidents.HasChanges()) Then<br />
<br />
dsChanges = dsIncidents.GetChanges()<br />
<br />
'Send only the changes and return a fresh update from the central database<br />
<br />
Dim updatedIncident As DataSet = ws.SynchroniseIncidentChanges(dsChanges)<br />
<br />
'Assign to the global dataset<br />
<br />
Dim objGlobals As New Globals()<br />
<br />
objGlobals.IncidentData = updatedIncident<br />
<br />
Else<br />
<br />
'There was not changes made to the PDA incidents, so just download the latest incidents<br />
<br />
Me.GetLatestIncidentData()<br />
<br />
End If<br />
<br />
End Try<br />
<br />
End Sub<br />
So when the code above is running it should display a progress bar to show how long it will take. Or it could show just a animation so the customer knows there is something going on in the background.
Many thanks for any advice and code samples,
Steve
|
|
|
|
|
Hello,
I am looking for a solution wherein, in a system with Windows XP Embedded, a user boots into my custom application shell, but can switch to the Windows explorer shell, or vice versa, if he so pleases, without having to reboot or log off.
Or can this be possibly better applied by having a theme sort of implementation, much like that in XP desktop, where user have the ability to load different themes? If so, how should I go about it?
Thanx in advance...
-- modified at 0:08 Thursday 27th September, 2007
|
|
|
|
|
I am now using Embedded Visual C++ 4.0 my applications seems to be all in 256 colors rather than the device supported 16-bit color even on the emulator it shows that its compiled with 256 mode. How do I change this?
Thanks
samuel
|
|
|
|
|
please any one help me regarding use timer start & stop in c# mobile CE 5 application.timer1 .start and stop ,pause not working in c#.
please help me
Ram Krishna Pattnayak
Software Developer(SDS)
Sun-Dew Solutions Pvt.Ltd
www.sundewsolutions.com
kolkata
|
|
|
|
|
hi guys
Im transfering data from sql server 2005 to
comapact framework database (*.sdf)
My way to do so is :
Export the table into an XML file (using DataTable)
dt.WriteXml(FName, System.Data.XmlWriteMode.IgnoreSchema)
And on the mobile device I load the XML and save the Dataset
dt.ReadXml(FileName)
da.Update(DataSet11)
Everything is working only my table contains about 1500 records (20 fields)
and it takes about 6 minutes to load and save.
Is there any way or Method to do this any faster ?
Thanks in Advance
Dan.
|
|
|
|
|
Rather ironically for something called 'SQL Server CE', the SQL language is the worst, slowest way to do anything. If you're using .NET Compact Framework 2.0, the solution for loading data that's the fastest to execute while still being pretty readable and maintainable is to use the SqlCeResultSet class.
To do this, create a SqlCeCommand , passing just the name of the table to modify in the query text parameter. Then set the command type to CommandType.TableDirect . Associate it with an open SqlCeConnection and call ExecuteResultSet , using the ResultSetOptions.Updatable option. Then, on the SqlCeResultSet , call CreateRecord to get a new record, set the record's properties, then call Insert to insert it into the table.
See SQL Server Compact Edition Insert Performance[^] for details on just how big a difference this makes.
Equally, a direct table access operation is far, far faster than SELECTing from that table - not just time to first row being returned, but even the time to access each subsequent row. To access the results in a particular order, you can use the IndexName property to use a named index on the table, and you can use the SetRange method to restrict the set of results that are returned.
DoEvents : Generating unexpected recursion since 1991
|
|
|
|
|
|
Hello!
I'm starting to create some PPC aplications, but on a start I have a problem. After creating fresh new PPC project I have no device skin in designer view. Everything in options is set right.
|
|
|
|
|
Hello,
I am writing a smartphone application in visual C++ using WTL. And I want to change background color in progress bar. I am using following code to do this functionality.
CProgressBarCtrl m_ProgressBarCtrl;
m_ProgressBarCtrl.SetBkColor(RGB(0,255,0));
When I compile this code, I am getting following error:-
***********************************************************************************************
error C2039: 'SetBkColor' : is not a member of 'WTL::CProgressBarCtrlT<tbase>'
with
[
TBase=ATL::CWindow
]
***********************************************************************************************
I don't know what else to do to change background color of progress bar.
Can anyone help me with this?
I'd really appreciate it.
Thanks,
Muthiah.
|
|
|
|