|
Hi,
I am not able to get the windowtext of all windows opened in device(taskmanger application).
Also Getprocess() is not working in WM6.Is there anyother way to retrieve all the HANDLES so that i can get the windowtext using GetWindowText().
Thanks.
|
|
|
|
|
I am responding to your question after some delay, so you may have already found your answer. If not, I think that you should look into the EnumWindows[^] function to get the window handles, then you should be able to utilize GetWindowText.
|
|
|
|
|
Hello. I have a problem on a mobile application and I'm not able to find any logical explanation, and thus any solution.
The thing works like this:
- the user has two fields for date and time and one for a string. The application just get the information from these textboxes, passes them to a web service and the web service save them into the database.
- because the date/time for the device might be incorrect, the application gets date and time from the server using the web service
- to avoid the situation in which the connection to the server is lost, the date/time are retrieved from the server when the user log in to the application. When entering the screen containing date/time details, it calculates the number of seconds that passed since the user logged in and add them to the server date/time. In the textboxes this date/time is displayed and the user hasn't the possibility to change them.
Everything worked fine, but it seems that for one device date and time that is saved into the database is 1/1/2001 12:00:00. I was not able to reproduce this situation on the emulator or on the device that I have. Each time I save something the correct date is available.
If someone has any idea, please HELP.
Thank you.
|
|
|
|
|
I know that DateTime.MinValue is equal to 01/01/01. I think some of the code may have automatically assumed that the year in this string was for the 21th century and added the 20 at the begining of the year. I'd be willing to bet that the region/culture settings on the device on which you are observing the problem are different. So you may need to update your code to either use the neutral culture or to be compatible with other cultures.
|
|
|
|
|
Thank you for you answer. It is possible that, as you said, the regional settings of the device are not the one from other devices. Unfortunately this happens only from time to time, thus there was a code problem that hopefully now is fixed.
|
|
|
|
|
the problem that my code does the update during the same run while iam out and run again i find nothing of the updates i think it's a comminting problem anyway hope anyone help me!!
plz check the code:
public partial class Form1 : Form
{
static SqlCeConnection _connection = null;
public static SqlCeConnection Connection
{
get
{
if (_connection == null)
{
_connection = new SqlCeConnection(ConnectionString);
_connection.Open();
}
return _connection;
}
}
public Form1()
{
InitializeComponent();
}
public static DataSet ds = new DataSet();
public static int rowindex = -1;
private void menuExit_Click(object sender, EventArgs e)
{
Close();
}
#region File & Database Details
static string CurrentFolder
{
get { return Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase); }
}
const string _databaseLocalFileName = "DB1.sdf";
static string DatabasePathName
{
get { return Path.Combine(CurrentFolder, _databaseLocalFileName); }
}
const string _baseConnectionString = "Data Source =";
static string ConnectionString
{
get { return _baseConnectionString + DatabasePathName; }
}
#endregion
private void menuedit_Click(object sender, EventArgs e)
{
rowindex = dataGrid1.CurrentRowIndex;
if (dataGrid1.DataSource != null)
{
panel1.Visible = true;
txtcol1.Text = ds.Tables[0].Rows[rowindex].ItemArray[0].ToString();
txtcol2.Text = ds.Tables[0].Rows[rowindex].ItemArray[1].ToString();
txttblID.Text = ds.Tables[0].Rows[rowindex].ItemArray[2].ToString();
}
else
MessageBox.Show("should load data grid first", "error", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
}
public static SqlCeDataAdapter adap;
private void btnsave_Click_1(object sender, EventArgs e)
{
try
{
SqlCeCommand cmdUpdate = Connection.CreateCommand();
SqlCeTransaction se = Connection.BeginTransaction();
cmdUpdate.CommandType = CommandType.Text;
cmdUpdate.CommandText = "UPDATE tbl SET Col1=@Col1, Col2=@Col2 where tblID = @tblID";
cmdUpdate.Parameters.AddWithValue("@Col1", txtcol1.Text);
cmdUpdate.Parameters.AddWithValue("@Col2", txtcol2.Text);
cmdUpdate.Parameters.AddWithValue("@tblID", txttblID.Text);
if (Connection.State != ConnectionState.Open)
{
Connection.Open();
}
cmdUpdate.Transaction = se;
cmdUpdate.ExecuteScalar();
se.Commit(CommitMode.Immediate);
Connection.Close();
panel1.Visible = false;
menuItem1_Click(null, null);
}
catch (SqlCeException ex)
{
throw ex;
}
}
private void menuLoad_Click(object sender, EventArgs e)
{
try
{
SqlCeCommand com = new SqlCeCommand("Select * from Tbl ", Connection);
adap = new SqlCeDataAdapter(com);
if (ds.Tables.Count > 0)
{
ds.Tables["tbl"].Clear();
}
adap.Fill(ds, "tbl");
dataGrid1.DataSource = ds.Tables[0];
adap.Dispose();
}
catch (SqlException ex)
{
MessageBox.Show(ex.Message);
}
}
}
|
|
|
|
|
Hi i have create following link and i want both link in one line not saperate line.
<mobile:form id="Form1" runat="server"><mobile:link id="lnkHome" runat="server" font-size="Normal" navigateurl="~/Home.aspx">Home
<mobile:link id="lnkLogout" runat="server" font-size="Normal" navigateurl="~/Logout.aspx">Logout
|
|
|
|
|
Hi i want to add selectionlist in mobile:objectlist. I want two label contorl and one dropdown list and a check box on my mobile form as a datagrid control. My code is
<mobile:objectlist id="ObjectList1" runat="server" commandstyle-stylereference="subcommand" labelstyle-stylereference="title" autogeneratefields="False">
<field name="PatientName" datafield="PatientName" title="Patient Name">
<field name="Room" datafield="Room" title="Room">
|
|
|
|
|
Hi can any one help out to automaticall set page according to client mobile screen. i want page to fit according to clients mobile screen. I am unable to set mobile page height widht even.
|
|
|
|
|
if u r developing ur web application in visal studio(MMIT), u dont need to worry abot the screen size of user devices,, this envirnment outomatically detect the user screeen size and auto adjust according to the size.
|
|
|
|
|
Hi
I would like to buy a BlackBerry Bold but I want to be able to create applications for my mobile device. I googled about this and I found some articles.
I think I can develop applications for Blackberry with C# but I need a loader written in Java. Am I correct?
Can anyone help me about this?
Thanks.
|
|
|
|
|
Afraid not. As far as mobile development goes C# is only for .Net. And .Net Compact Framework assemblies are for Windows Mobile (although there is an S60 component that will allow many Symbian phones to run .Net programs).
|
|
|
|
|
Hi There,
How did you get on with this?
Were you able to develop for Blackberry?
If so would you mind pointing me in the right direction as I'm about to learn how to develop Blackberry apps in Java using Eclipse.
Cheers
Johann
|
|
|
|
|
Hi
Is there any one having a VB .Net code to change pocket PC wallpaper in WM 6.0
Please reply
Thanks in advance
|
|
|
|
|
I'm doing so in Windows CE and it's working nice:
Private Const HWND_BROADCAST As Integer = &HFFFF
Private Const WM_SETTINGCHANGE As Integer = 26
Private Const SPI_SETDESKWALLPAPER As UInt32 = 20
Public Sub SetWallpaper(ByVal ImageFileName As String)
Microsoft.Win32.Registry.SetValue("HKEY_CURRENT_USER\ControlPanel\Desktop", "Wallpaper", ImageFileName)
PostMessage(New IntPtr(HWND_BROADCAST), WM_SETTINGCHANGE, SPI_SETDESKWALLPAPER, 0)
End Sub
Hope this helps
|
|
|
|
|
Thanks for reply
But the postmessage is not working
please help
|
|
|
|
|
Can someone please help with a code that can activate auto answering
on a smart phone. Thank you
|
|
|
|
|
What operating system are you using? Windows Mobile, Symbian, ...?
|
|
|
|
|
Hello,
I have a very simple test DB application (VS2008 SP1, CF 3.5 SP1, SQLCE 3.5SP1, C#)that displays a datagrid and fills it with data on load, tableAdapter.Fill, and a button that executes a second time the same command tablaAdapter.Fill.
Deployed on CE 5.0.
1) on WM5.0 emulator works when run from vs2008, debugging (by the way, anyone has an idea on where to find a CE5.0 emulator ready to use under VS2008?)
2) on CE5.0 device works when run directly from the device
3) on CE5.0 device when run from vs2008, with debugging, displays the data, but when I click the button it gives a SqlCeException error on:
<br />
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]<br />
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]<br />
public virtual int Fill(AppDatabase1DataSet.testDataTable dataTable) {<br />
this.Adapter.SelectCommand = this.CommandCollection[0];<br />
if ((this.ClearBeforeFill == true)) {<br />
dataTable.Clear();<br />
}<br />
int returnValue = this.Adapter.Fill(dataTable);
return returnValue;<br />
}
Any suggestion?
Thanks,
Mattia
|
|
|
|
|
Hi!!!
How do i work this camera from WM5
|
|
|
|
|
Hi,
Your query is not clear. but i think you want to start your camera. if yes then try this code.
Dim ccd As New Microsoft.WindowsMobile.Forms.CameraCaptureDialog
ccd.Resolution = New Size(100, 200)
ccd.Mode = Microsoft.WindowsMobile.Forms.CameraCaptureMode.Still
ccd.Mode = CameraCaptureMode.Still
ccd.Owner = Me
ccd.Title = "Take a Picture"
If ccd.ShowDialog() = Windows.Forms.DialogResult.OK Then
If ccd.FileName <> String.Empty Then
PictureBox1.Image = New Bitmap(ccd.FileName)
ccd.Dispose()
End If
End If
May be it helps you.
Thanks
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
http://www.youtube.com/watch?v=-oJaaPCrk3Q
|
|
|
|
|
Hi
You can easily work with windows mobile camera
on your appliacion add reference of microsoft
using Microsoft.WindowsMobile.Forms;
CameraCaptureDialog cc = new CameraCaptureDialog();
cc.Mode = CameraCaptureMode.Still; // if you wanna take still photos
cc.StillQuality = CameraCaptureStillQuality.High;
put file name as you want to save.
If you need more help reply here
Good luck
|
|
|
|
|
Thanks!
This is code in my simple project
private void menuItem1_Click(object sender, EventArgs e)
{
CameraCaptureDialog ccd = new CameraCaptureDialog();
ccd.Resolution = new Size(100, 200);
ccd.Mode = CameraCaptureMode.Still;
ccd.Owner = this;
ccd.Title = "My Camera";
if(ccd.ShowDialog() == DialogResult.OK)
if( ccd.FileName != String.Empty)
pictureBox1.Image = new Bitmap(ccd.FileName);
ccd.Dispose();
}
it's Ok..
for debug i using device USA Windows Mobile 5.0 Pocket PC R2 Emulator from VS 2008
but this emulator not camera device...
how to add camera?
|
|
|
|
|
on which operating system you are compiling this project ?
You can compile in VS2008 and save the exe in your mobile divice and can run from there put one botton on your Form which will active your camera on mobile device and later can see that on My documents on mobile devie . Hope it helps
cc.DefaultFileName = "Picture .jpg";
cc.InitialDirectory = "\\";
|
|
|
|
|
Hi
Windows Mobile 5.0 Pocket PC Emulator does not provide the camera facility on the emulator. For debug your project on the Emulator you can use the Windows Mobile 6.0 Pocket PC Emulator.
May it solves your problem.
Thanks
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
http://www.youtube.com/watch?v=-oJaaPCrk3Q
|
|
|
|