|
Can anyone tell how to access internet from Win mobile 5.0 emulator in Visual Studio 2008? My PC has internet access. Can i get the connection on the emulator? Can i surf the net through the emulator in the same way i suft through my PC?
Please tell me how to do the same.
Thanks in advance.

|
|
|
|
|
Hi Deepali Khalkar,
Go to Active sync File Menu -> Connection Setting ... and Checked the "Allow connections to one of the following :" and select DMA and click on OK Button
then you got in your Project (IDE) Visual Studio select Tools - > Device Emulator Manager.. --> select your opened Emulator and right click on it and select cradle. now you are able to access internet.
Cheer
Pavan Pareta
|
|
|
|
|
Another way to enable internet connection:
* Open 'Emulator Properties' window using File->Configure menu.
* go to the network tab and check the 'Enable NE2000 PCMCI Network adaptor and bind to' chekcbox.
* select your machine's NIC card from the listbox.
* if you get a notification to setup proxy setting, choose anything and it should work.
Ankita
|
|
|
|
|
Hi,
Set the proxy setting in emulator.
than go to Tools Menu-------> Device Emulator---------> Select the appropriate Device and Right click and click on Cradle........
May be it solved your problem.
Thanks
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
|
|
|
|
|
I am developing a project that need to access mobile calender from PC. And i have several example that can access mobile calender from PC. But i can't run this application without installing PC Suite in my PC. How can i Run this example without PC Suite? Have any AT Command to access mobile Calendar?
|
|
|
|
|
What type of mobile device are you using?
|
|
|
|
|
I have tried with the following parameterised query for select statement and is working fine.
SqlCeConnection conn;
SqlCeCommand comm;
comm = new SqlCeCommand();
comm.Connection = conn;
comm.CommandText = "select * from signuptbl where username =@uname";
SqlCeParameter para = new SqlCeParameter();
para.ParameterName = "@uname";
para.Value = textBox1 .Text ;
comm.Parameters.Add(para);
Now i want to write an update query which takes multiple parameters. I have thought of the following code.
SqlCeConnection conn;
SqlCeCommand comm;
comm = new SqlCeCommand();
comm.Connection = conn;
comm.CommandText = "update signuptbl set firstname=@fname,lastname=@lname,,psw=@psw1 where username =@uname";
SqlCeParameter para = new SqlCeParameter();
para.ParameterName = "@uname";
para.Value = textBox1 .Text ;
comm.Parameters.Add(para);
para.ParameterName = "@psw";
para.Value = textBox2 .Text ;
comm.Parameters.Add(para);
para.ParameterName = "@fname";
para.Value = textBox3 .Text ;
comm.Parameters.Add(para);
para.ParameterName = "@lname";
para.Value = textBox3 .Text ;
comm.Parameters.Add(para);
I have tried this code but the row was not updated.
Is this a proper way? How to pass multiple parameters in a query? Can i get a sample code for the same.
Thanks in advance..

|
|
|
|
|
Deepali Khalkar wrote: SqlCeParameter para = new SqlCeParameter();
para.ParameterName = "@uname";
para.Value = textBox1 .Text ;
comm.Parameters.Add(para);
para.ParameterName = "@psw";
para.Value = textBox2 .Text ;
comm.Parameters.Add(para);
para.ParameterName = "@fname";
para.Value = textBox3 .Text ;
comm.Parameters.Add(para);
para.ParameterName = "@lname";
para.Value = textBox3 .Text ;
comm.Parameters.Add(para);
you declare single variable for parameter para and change the name and value multiple time. Instead of this, use multiple variable for parameter. use following code
<br />
SqlCeParameter para1 = new SqlCeParameter();<br />
para1.ParameterName = "@uname";<br />
para1.Value = textBox1 .Text ;<br />
comm.Parameters.Add(para1);<br />
<br />
SqlCeParameter para2 = new SqlCeParameter();<br />
para2.ParameterName = "@psw";<br />
para2.Value = textBox2 .Text ;<br />
comm.Parameters.Add(para2);<br />
<br />
SqlCeParameter para3 = new SqlCeParameter();<br />
para3.ParameterName = "@fname";<br />
para3.Value = textBox3 .Text ;<br />
comm.Parameters.Add(para3);<br />
<br />
SqlCeParameter para4 = new SqlCeParameter();<br />
para4.ParameterName = "@lname";<br />
para4.Value = textBox3 .Text ;<br />
comm.Parameters.Add(para4);
also specify the type of parameter
hope this helps
|
|
|
|
|
I am developing an application on Win mobile 5.0 emulator in C# using Visual studio 2008.
Can anyone let me know how to write an SQL statement in C# which returns the row count?
Is the parameter required to store the count value?
I will be greatefull if someone helps with the code snippet for the same.
I have tried the following code for the select statement(the select stmt does not return the row count value) and is working fine.
String uname_in='abc';
SqlCeConnection conn;
SqlCeCommand comm;
SqlCeDataAdapter adap = new SqlCeDataAdapter();
String connstring = @"Data Source=Program Files\signup\signupdb.sdf";
conn = new SqlCeConnection(connstring);
conn.Open();
comm = new SqlCeCommand();
comm.Connection = conn;
comm.CommandText = "select * from signuptbl where username =@uname";
SqlCeParameter para = new SqlCeParameter();
para.ParameterName = "@uname";
para.Value = uname_in;
comm.Parameters.Add(para);
adap.SelectCommand = comm;
System.Data.DataTable dt = new DataTable();
ap.Fill(dt);
psw1 = dt.Rows[0][1].ToString();
What changes should be done in the above code for writing a select stmt the return the number of rows selected?
Thanks in advance.

|
|
|
|
|
Hi Deepali Khalkar,
In SQL Query you can use count() mehtod for getting selected rows count.
see the below example.
private int GetRowCount()
{
int intCount = 0;
SqlCeConnection objCon = new SqlCeConnection("ConnectionString");
objCon.Open();
SqlCeCommand objCmd = new SqlCeCommand("SELECT COUNT(*) AS UserCount FROM Users", objCon);
intCount = System.Convert.ToInt32( objCmd.ExecuteScalar().ToString());
objCon.Close();
objCmd.Dispose();
return intCount;
}
hope this may be help...
Pavan Pareta
|
|
|
|
|
FYI "SELECT ROWS" should be faster that "Select Count(*)"
|
|
|
|
|
Hi,
I am using CF3.5 on Windows CE5.0 and when I try to create a bitmap using:
Bitmp bmp = new Bitmap(filepath)
I get the exception error below. I also tried loading file into MemoryStreamm and then tried creating bitmap by passing a memory stream with all bytes corresponding to image but I get same error.
I tried loading bmp, jpg, png images but none work. The device I am using is an iPAQ310. Is it possible that it's missing some kind of codec or some driver that compact framework assumes it to be there? If so, what is it missing?
Thanks in advance for any help you can provide.
System.Exception was unhandled
Message="Exception"
StackTrace:
at Microsoft.AGL.Common.MISC.HandleAr(PAL_ERROR ar)
at System.Drawing.Bitmap._InitFromMemoryStream(MemoryStream mstream)
at System.Drawing.Bitmap..ctor(String filename)
at SkyVision.LocalFileImages.Resources.get_tiny()
at SkyVision.FrontViewPanel..ctor()
at SkyVision.MainForm.InitializeComponent()
at SkyVision.MainForm..ctor()
at SkyVision.Program.Main()
|
|
|
|
|
You may want to install onto your device the resource DLL that contains the detailed error messages.
What is the resolution of the image?
|
|
|
|
|
Hi Joel, I already tried embedding a simple bmp 5x5 pixels into my exe and still got same problem. I have been digging into it and the problem seems to be that the device I am programming into (HP iPAQ 310) does not have the necessary dll's required by framework. The framework uses gdiplus.dll. Then I believe gdiplus.dll uses gdi32.dll and this dll itself uses coredll.dll.
The only one available in this device is coredll.dll and since it's in ROM, I am not able to even place another dll in the windows location. I would have to contact HP to have them provide me a new ROM version that contains this functionality.
However, this device has some neat 3D games so the alternative would be to figure out what library those games use. Problem is that I will have to go back to C++ for that. 
|
|
|
|
|
please,
Can any one give me the code in VB .Net to create today item in pocket pc
|
|
|
|
|
The Today items are implemented in COM and the .Net CF doesn't lend itself well to implementing such components. see this[^] for more details.
|
|
|
|
|
Hi,
When i am trying to set PreferredConnections using DMProcessConfigXML API for a GPRS connection. It returns the standard error code E_INVALIDARG.Can any one tell me why this is happenning? and what does it mean?.
WAP provisioning xml i passed into DMProcessConfigXML function is
<wap-provisioningdoc><characteristic type="CM_Planner">
<characteristic type="PreferredConnections">
<parm name="{8928DE37-C914-4db4-90E9-C5213E475A77}" value="MyGPRS"/>
</characteristic>
<parm name="FailoverPrompt" value="1"/>
<parm name="FailoverDefault" value="1"/>
<parm name="CacheTime" value="60"/>
<parm name="RetryCount" value="1"/>
</characteristic></wap-provisioningdoc>
and the out put xml return by DMProcessConfigXML function is
<wap-provisioningdoc><characteristic type="CM_Planner">
<characteristic type="PreferredConnections">
<parm name="{8928DE37-C914-4db4-90E9-C5213E475A77}" value="MyGPRS"/>
</characteristic>
<parm-error name="FailoverPrompt" value="1"/><parm name="FailoverDefault" value="1"/>
<parm name="CacheTime" value="60"/>
<parm name="RetryCount" value="1"/>
</characteristic></wap-provisioningdoc>
Here i can see the 'FailoverPrompt' parameter is failing. Why this is happening?
Thankful to you any kind of help.
Mohamed Shakir
Mohamed Shakir
|
|
|
|
|
Hello Shakir,
Your input string does not seem to be erroneous but there may be few reasons for this error.
1. The hosting server becomes inactive for any reason.
2. Failover has an internal timeout so even after making the connection successfully it may give this error if one of the resources within the connection group fails.
3. It is strictly OEM dependent and service provider dependent so please cross check with a different PDA and different service provider.
Regards
Manvendra
|
|
|
|
|
Hi,
I am very glad to be a part of this forum.
I am developing an Win32 smart device console application in Windows Mobile 5.0 Standard device that needs to retrieves information about all the applications in that device(i.e., atleast name and ID). I cam across one shellapi for Windows called GetAppInfo(). But how to make use of it is again not clear.
I have googled in different sites which was helpless.
Can anybody kindly help me in this context.
Thanks in advance for any help.
Regards,
Hema.
|
|
|
|
|
Hello,
I have followed all the steps given in the following URL--
http://netcf2.blogspot.com/2006/01/create-sql-mobile-database-part-1.html
With these steps i have created a simple SQL mobile database and transfered to Win mobile 5.0 emulator.
I am not able to insert the data or retrieve the data from this database to C#.net form.
I am a novice to develpment of application for win mobile 5.
Can anyone plz help me with the details of how to do it. I will be very greatfull if someone helps me with the code in detail.
Also another problem i am facing is that i cannot see a query analyzer 3.5 on all the pc's on which i install VS 2008. How can i get the query analyser 3.5 on such pc's. Is there any specific setting of emulator for it?
Thanks in advance.
|
|
|
|
|
Hi Deepali Khalkar,
See this link L I N K [^]
if you want to use query analyzer of the emulator. This will be automatically install
When you are including (using System.Data.SqlServerCe; ) Name space and running your project in DEBUG mode in Emulator then query analyzer installed then you are able to view query analyzer.
Hope this may be help...
Pavan Pareta
|
|
|
|
|
Hi,
I am working on smartdevice application..
I am trying to make a phone call from my device emulator to cellular emulator..
I have made all the necessary configurations required..(i.e)
in the device emulator i have chose
File>Configure>Peripherals>set the Serial Port0 to the COM that is similar to that of the Cellular Emulator..
and then Reset>soft is also done
Then from the device emulator i have chosen
start>settings>connections> i chose Add new modem connection from My ISP..selected Cellular Line(GPRS) and finally finished the connectivity..
Eventhough i have tried all these above procedures..the Phone is still in off mode in the device emulator..and i could not see any G symbol in the top bar of the device emulator..
P.S. Previously i was able to make calls and send SMS between the emulators..but now it is not possible..
Can anyone give me the solution for the problem i am facing..
Thanks in advance..
|
|
|
|
|
Hi,
with:
IntPtr deviceContext = GetDC(IntPtr.Zero);
Graphics deviceGraphics = Graphics.FromHdc(deviceContext)
it is possible to draw on the screen.
But how can I delete the drawn objects from screen? It still appears until something changed on the screen so Windows Mobile repaint that area.
I tried RedrawWindow() and also SendMessage(with WM_PAINT) to repaint the whole screen, but nothing works 
|
|
|
|
|
I you want to paint the full screen then why don't you run your application in full screen mode?
|
|
|
|
|
I want to paint directly on the screen. No Form, no Control. A hidden application which paints directly on the screen. For example a text in the top bar where the start-button is.
This works fine and is not the problem.
The problem is, that i'm not able to delete the things I drawed on the screen. They will dissaper when Windows Mobile force the controls, forms, etc. to be repaint.
For example if I draw text on the top bar the text still appears until I open the start menu, because then the bar will be repaint.
After closing my hidden application I want to delete the text, which I drawed. So I have to force the whole desktop to repaint (because the text on top bar was only an example).
But I tried RedrawWindow (with IntPtr.Zero) and also SendMessage (with WM_PAINT to IntPtr.Zero). This force Windows Mobile to repaint everything, but it doesnt work 
|
|
|
|