|
When I run application on PPC,forms draws itself in memory how many times I open it, if I open twice one form it draw itself in memory as two instances.
How can I let the application to draw form only single time?
I Love SQL
|
|
|
|
|
What development environment are you creating your application in? Typically the template/wizard code for your environment (with Visual Studio atleast) will have inserted code which restricts your application to one instance.
You may like to read the following thread on the MSDN Forums website (where the opposite problem is discussed, i.e. how to allow multiple instances) - http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1576750&SiteID=1[^]
Basically in the WinMain method of your application you should put some code similiar to the following:
hWnd = FindWindow(szWindowClass, szTitle); <br />
if (hWnd) <br />
{<br />
SetForegroundWindow((HWND)((ULONG) hWnd | 0x00000001));<br />
return 0;<br />
}
The call to find window is used to detect the existing copy of your application based upon it's window class and window title. Just alter the two arguments to match that of your application's main window.
Hope it helps,
Christopher Fairbairn
|
|
|
|
|
Try using showDialog() to open up the form. This shows the form as a modal dialog box with the currently active window set as its owner. The form being opened will show only once then, I think..
|
|
|
|
|
I am now developing a mobile application using Mobile Client Software Factory. Currently what i need to do is, I have a screen where it have a choice of events, I will the button where it will add the event from the system to the calendar that build in with mobile application and this will be the reminder.
Can i know whether this can be done?
Thanks.
|
|
|
|
|
Have a look at the following article on developer.com - http://www.developer.com/ws/pc/article.php/10947_3556186_1[^]. It contains step by step instructions on how to add the required references etc in order to use the Microsoft.WindowsMobile.PocketOutlook assembly.
You can also find a very good example here which does exactly what you want - http://rareedge.com/gmobilesync/2006/12/08/add-appointments-to-pocketoutlook/[^]. I have reposted the code example here for you:
using System; <br />
using Microsoft.WindowsMobile.PocketOutlook; <br />
public class PocketOulookSample <br />
{ <br />
public void AddAppointment() <br />
{ <br />
Appointment appointment = new Appointment(); <br />
using (OutlookSession outlook = new OutlookSession()) <br />
{<br />
appointment.Subject = "Bake a cake"; <br />
appointment.Start = DateTime.Now.AddDays(1); <br />
appointment.AllDayEvent = true; <br />
appointment.Body = "Nicole loves cake!"; <br />
appointment.Location = "Kitchen"; <br />
appointment.Sensitivity = Sensitivity.Personal; <br />
<br />
outlook.Appointments.Items.Add(appointment); <br />
}<br />
} <br />
}
Hope it helps,
Christopher Fairbairn
|
|
|
|
|
Thanks. It really helps. I think i type in the wrong keyword, no wonder I cant find the solution. Thanks so much.
|
|
|
|
|
Hello!
I know NOTHING about Pocket PCs or the Pocket PC Emulator. I am acutally creating an ASP.NET application and I want to make sure it's usable from a Pocket PC.
So, I want to use the Pocket PC 2003 Emulator to connect to the internet and view my webpage. I've read several articles on how to set this up, but none of them get me all the way there. I have followed all the directions, but when I try to access a website I get the following message:
Unable to connect: you have no modem entries created, and no network card present
I am pretty ignorant in this area. Can anyone tell me what I need to do here? I am cradling the emulator via the Device Emulator Manager.
Thanks!
Ian
|
|
|
|
|
|
Yes try DMA.
Worked with VS 2005.
|
|
|
|
|
put games on to my mobile phone from a mobile phone disc ???
help plz deano
|
|
|
|
|
My program can connect to SQL Server when PPC connect PC by using Microsoft ActiveSync but I don't know why it can not connect to SQL Server by using card wireless.
I use Microsoft Visual Studio .NET 2003 and PPC is WM 2005, sql server 2000, my coonect string "Data Source=ServerIP,1433;Initial Catalog=Northwind;user id=sa;password=sa"
The problem is always error everytime I open a connection.
"System.Data.sqlClient.SqlException: SqlException at System.Data.sqlClient.SqlConnection.OnError() at System.Data.SqlClient.SqlInternalConnection.OnError()"
Please help me, thanks
kevil
|
|
|
|
|
Hi,
the problem is that the adapter-/IP-Address is'nt the same for an ActivSync-Connection (usually 169.254.2.x) and for a WLAN-Connection (here the IP-Address is usually assigned via DHCP from an Access-Point (e.g. WLAN-Router). I'm workin on the same problem these days, but have not found a sufficient solution 'til yet.
A possible solution may be, to enumerate all adapters at runtime and insert the appropriate IP to the connection-string.
I let you know, if I had found a working solution.
Best regards
Reiner
|
|
|
|
|
Hi,
I have code that highlights rows in a DataGrid based on the value of the Status column. The code works quite well on the Desktop. When the same code is executed on Windows Mobile 6 environment (I am using emulator to test) it does not work. See code below.
I am installing custom control DataGridColorTextBoxColumn for table styles derived from DataGridTextBoxColumn that overrides the Paint method of DataGridTextBoxColumn. This method does not exist in Mobile SDK.
Any thoughts on how this can be done easily without writing a custom DataGrid that overrides Paint? In this case, one has to deal with the rendering of the entire control.
Any help would be greatly appreciated...
Thanks and Regards,
- Raj
|
|
|
|
|
Here's the code...
--------------- Installing custom control for column ---------------
private void AddStyles(DataGrid dg)
{
DataGridTableStyle ts = new DataGridTableStyle();
DataTable dt = (DataTable)dg.DataSource;
ts.MappingName = dt.TableName;
for (int j = 0; j < dt.Columns.Count; ++j)
{
DataGridColorTextBoxColumn cs = new DataGridColorTextBoxColumn(j);
cs.MappingName = dt.Columns[j].ColumnName;
cs.HeaderText = dt.Columns[j].ColumnName;
ts.GridColumnStyles.Add(cs);
}
dg.TableStyles.Clear();
dg.TableStyles.Add(ts);
}
--------------- Custom control code ----------------------------
public class DataGridColorTextBoxColumn : DataGridTextBoxColumn
{
//in your handler, set the EnableValue to true or false, depending upon the row & col
private int _col;
public DataGridColorTextBoxColumn(int col)
{
_col = col;
}
protected override void Paint(System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Windows.Forms.CurrencyManager source, int rowNum, System.Drawing.Brush backBrush, System.Drawing.Brush foreBrush, bool alignToRight)
{
{
DataTable dt = (DataTable)this.DataGridTableStyle.DataGrid.DataSource;
DataRow row = dt.Rows[rowNum];
Brush bgBrush = backBrush;
if (((string)row["Status"]) == "Open")
{
bgBrush = Brushes.Red;
}
base.Paint(g, bounds, source, rowNum, bgBrush, foreBrush, alignToRight);
}
}
|
|
|
|
|
when i use SqlCeRemoteDataAccess to pull data to DB of pda show error msg ::
( Error : a request to send data to the customer runn iis has failed . for more information , see hresult )
how i can resolve this my problem
123
|
|
|
|
|
Hello,
I am using the Compact Framework 2.0
I have an xml document I would like to read and write to.
<br />
Try<br />
'File the xml file<br />
Dim fileName As String = String.Empty<br />
Dim ds As New DataSet<br />
Dim dv As DataView<br />
<br />
Dim path As String<br />
path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)<br />
<br />
'Read in the xml file<br />
<br />
fileName = String.Format("{0}\WebServiceURL.xml", path)<br />
<br />
ds.ReadXml(fileName)<br />
<br />
'Find if a url already exists<br />
dv = New DataView(ds.Tables(0))<br />
<br />
If (dv.Count = 0) Then<br />
'This is the first time the application is running, so input from user<br />
Dim objInputURL As New InputURL()<br />
objInputURL.ShowDialog()<br />
Else 'Set the URL to the current web service location<br />
Dim objUrl As New Globals<br />
objUrl.UrlPath = ds.Tables(0).Rows(0)("url").ToString()<br />
End If<br />
<br />
Catch ex As Exception<br />
MsgBox(ex.Message)<br />
End Try<br />
The above code has a problem, as it cannot find the xml document. I have created this path and put the document inside it "\programFile\PDACodeRedWM5"
I still get the following error file not found
The problem is that the user will enter the URL of a web service. I would like the URL of the web service that they enter to remain, even after the user has completely closed the application.
So when they re-start that can they can use this URL.I have tried using the resources file and the resourceWriter to save the url, but that is read-only. So doesn't have a ResourceWriter.
Is there another method other than using a xml document that can be used to save this.
I am using CF 2.0 and are developing a PDA WM5 application
Does anyone have any suggestions?
Many thanks,
Steve
-- modified at 14:53 Friday 4th May, 2007
|
|
|
|
|
I have reinstalled VS.NET2005 and when I try to debug application can not stop into breakpoint.
In tooltip of breakpoint I got this message:
"the breakpoint will not currently be hint. The specified module has not be loaded"
Can anyone tell me how can I configure VS.NET2005 to be able to debug.
(I am using Mobile Application);
I Love SQL
|
|
|
|
|
I have download SP1 of .NETCF2.0 and my problem solved.
I Love SQL
|
|
|
|
|
Microsoft has provided new feature as VOIP (voice over IP phone service)in wimdows mobile 6.0.
I have some set of questions on this...
Can any body tell me if Microsoft also support Video calling via this application?
Has microsoft defined any acrchitecture like direct show for this support.
Or will it use internally direct show APIs.
How does oem integrate this application if they use third party video codecs?
Is this application is similar to video telephony?
I am sure microsoft has not yet come with video telephony application.
They have left it to OEM to make the application using microsoft SDK.
Any help of refrence will be helpfull.
Anil
Anil Kumar
|
|
|
|
|
My boss wants our mobile page to have a save password checkbox that will load your last used username and password into the appropriate input fields on the login page from your cookie.
This is all well and good, except that asp.net does not want you to preset password fields period. Nor does it want you to use <% %> tags to enter html into your page.
IS there a way to do this?
|
|
|
|
|
I am using CMyButtonclass(for eg) derived from CButton Class from MFC and using DrawItem method for drawing own child controls.Except radiobuttons everthing is perfect till the time....but the thing is i am getting the controls drawn on a window perfectly....now i am getting the problem in handling that....i.e.I need to handle the radio button events ....CHECKED and UNCHECKED.....
....for that i need a Handle of Parent window...
I have options of GetParent() method...I am using like this....
CWnd *p =GetParent(); from where i am getting the handle of that....i want the functionality of radiobuttons to be in my derived class so i am doingn that....
Can Any one find the solution of controlling the radio button in derived class so that event handling can be done in that only....
This is what i am trying to get that handle//....
CWnd *pChild = NULL;
for (pChild=GetWindow(GW_CHILD); pChild; pChild=GetWindow(GW_HWNDNEXT))
{
if (pChild == pBtn)
{
((CRadioButtonEx *)pChild)->SetCheckStatus(false);
((CRadioButtonEx *)pChild)->Invalidate(TRUE);
}
}
Basically m derived class should able to handle the Events associated with the radio buttons....
Can any one know the solution....
|
|
|
|
|
Hi Guys,
I have an application running on a PDA (WinCE), and I want to send messages on TCP/IP over ActiveSync (USB) to a debug/logging application running on my PC.
The PC application can run as a Server or as a Client (both are supported).
Is there anything special I need to do in order to open the TCP connection over ActiveSync ?
Can anyone help me with this ?
Thanks in advance,
Guy.
|
|
|
|
|
Hello,
Does anybody know of a CF control that duplicates the FolderBrowserDialog functionality? I want to be able to choose just a folder, and I do not want to use the WinAPI as I may not always know the platform the app is running on and whether that will work or not.
If nobody knows of one, does anybody know of a good starting point for creating a new class (e.g. one to inherit from)?
Thanks.
|
|
|
|
|
Hi all,
i've written my first winCE app and build a .cab file then i install it in a dopod device. the installation was no problem, but as i try to run it, there was a error message said that this app can not run because of either it is not yet signed or there are some component was not installed yet.
the question is, what was the component do i have to install? and should i sign the app first? since the app was only for a test purpose.
thanks
tjie pouw
|
|
|
|
|
Hello, someone can indicate to me like putting a link on “today” (exactly like the tom tom)?
Thanks.
Alex
|
|
|
|