when gprs connection lost, the c#-program crashes
I want to get an object "MyObject" via GPRS / WebService from a server
to my PDA.
(with asynchronous web-Method)
This works fine, until the connection is lost due to poor reception:
The try-catch is ignored and the entire c#-program crashes !
Is there a solution for this ?
Thanks a lot for any advice.
try
{
iAsyncResult = webService.BeginWebMethod();
}
catch(System.Exception ex)
{
// error handling...
}
while (i < 50) // > 5 sec --> Timeout
{
if (iAsyncResult.IsCompleted) { break; }
Thread.Sleep(100);
i++;
}
if (i > 50)
{
MessageBox.Show("Timeout !!");
}
else
{
MyObject = webService.EndWebMethod() Tag: using CeSetUserNotificationEx Tag: 70304
NT Authentication on Windows Mobile 5 and CF 1.0
Hey - I've been using Mark IHimoyan's NTAuthEx dll succesfully to
connect to a web service that requires NT Authentication on Pocket PC
2003 for quite a while. I'm now trying to recreate this solution on
Mobile 5, still using Compact Framework 1 though. I know that CF 2 now
supports NT Auth, but as I say I need it working on CF 1. Mark's
suggestion was that I recompile the NtAuth native dll as a windows
mobile 5 library but I'm still getting 401 Unauthorized messages from
the web service. Has anyone got any advice on this? thanks Tag: using CeSetUserNotificationEx Tag: 70302
Include .NET CF 2.0 into my application
Hi, I have built an application that requires .NET CF 2.0. How can include it
in the installer. I am able to create an installer for my application but do
not know how to add .NET CF 2.0 MSI into the setup. Any idea? If i need to
modify my setup.ini file, please show me how or what code i need to add in.
Thank you. Tag: using CeSetUserNotificationEx Tag: 70301
How to add some HotKey command to my App
Hi,
How to add some HotKey command to my App?
And it's not some button command or menu command.
Thanks and Regards,
Peter Tag: using CeSetUserNotificationEx Tag: 70300
Cannot open web project 'A connection with the server could not be established'
Hi,
I have been developing a web project for some time now, and connection
to the server has been fine. This morning I tried opening the project
as usual but it returned the following error:
The web server reported the following error when attempting to create
or open the web project located a the following URL:
'http://localhost/YLCPDTdb'. A connection with the server could not be
established.
As far as i know i have not changed any settings. All i can think of is
that i connected enterprise manager to a server on discountasp.net as i
am in the process of deploying the application online. Could this have
messed up some settings on my local machine?
I am still able to connect through enterprise manager, query analyser
and IIS 5.1 is connected on port 80.
Any ideas?
Thanks Tag: using CeSetUserNotificationEx Tag: 70299
need help - mscoree.stat
Hi,
I would like to improve performance of my application.
Right now after running a few days period it starts to slow down.
For example I have a digital clock control which displays current time.
It stops refreshing and I can't get any response from WinCe device
every 30 seconds. It just stops responding for 2-4 (app doesn't have any
timer racing with 30 seconds interval).
Here is msscoree counters statistics. How to interpret them, where to
look for a problem. Any help would be appreciated!
Best regards
Matijaz
counter value n mean
min max
Execution Engine Startup Time 3006 0 0
0 0
Total Program Run Time 251750263 0 0
0 0
Peak Bytes Allocated 6401801 0 0
0 0
Number Of Objects Allocated 167476330 0 0
0 0
Bytes Allocated -204843452 167476330 24
8 523536
Number Of Simple Collections 335 0 0
0 0
Bytes Collected By Simple Collection 263087924 335 785337
640392 792228
Bytes In Use After Simple Collection 724160148 335 2161672
746740 3137444
Time In Simple Collect 118055 335 352
102 532
Number Of Compact Collections 4863 0 0
0 0
Bytes Collected By Compact Collections -473020284 4863 785923
531188 792560
Bytes In Use After Compact Collection 1256720200 4863 258424
255260 3138560
Time In Compact Collect 2195176 4863 451
43 738
Number Of Full Collections 11 0 0
0 0
Bytes Collected By Full Collection 1852672 11 168424
51196 312828
Bytes In Use After Full Collection 18412400 11 1673854
949960 2827708
Time In Full Collection 3738 11 339
180 607
GC Number Of Application Induced Collections 0 0 0
0 0
GC Latency Time 2316969 5209 444
43 738
Bytes Jitted 956020 12097 79
1 9961
Native Bytes Jitted 5166158 12097 427
36 43733
Number of Methods Jitted 12097 0 0
0 0
Bytes Pitched 4652278 10863 428
36 43733
Number of Methods Pitched 11839 0 0
0 0
Number of Exceptions 120 0 0
0 0
Number of Calls -1173982816 0 0
0 0
Number of Virtual Calls -1805464817 0 0
0 0
Number Of Virtual Call Cache Hits -1807307854 0 0
0 0
Number of PInvoke Calls 254845106 0 0
0 0
Total Bytes In Use After Collection 39391370 5209 7562
1103547 6302417 Tag: using CeSetUserNotificationEx Tag: 70297
Unknown Publihser Message
I am trying to do some IR development on a Windows Mobile 5 device, and I
find it very anoying that it gives me the unknown publisher message for my
EXEs and DLLs. Is there any way to disable that checking so I stop having
to click Yes for each file it is loading?
Eric Renken Tag: using CeSetUserNotificationEx Tag: 70289
USB Memory Stick Question
Has anybody had success writing applications that access files in a USB
memory stick on a PDA? What kind of access speed do you get, is it
comparable to a SD Card speed?
Thanks for any info. Tag: using CeSetUserNotificationEx Tag: 70278
quick word about opennetcf
Hello I need a quick explanation from opennetcf for thesis.
It's something about MVP's (most valuable proffesionals) what is
function definition of MVP?
Opennetcf it function's as a beta for compact (because the new stuff is
experimented/implemented)
it's an addition to compact framework for sure.
Somebody who could write +/- 5-10 lines about this? Tag: using CeSetUserNotificationEx Tag: 70277
dbnetlib.dll
Hi, Iam getting an error "Cann't find the file DLL PInvoke 'dbnetlib.dll'"
when my application tries to open a connection to a Local SqlServer. The
application is running on a device with windowsmobile 5 and Iam using
VisualStudio 2005 (compact framework 2). Iam deploying directly from Visual
Studio with Active Sync 4.1 when executing the application.
Any help is greatly appreciated.
Thanks.
- Jose. Tag: using CeSetUserNotificationEx Tag: 70276
forms created...!
What is the simplest way to know in a program a list of forms that are being
created?
I need to build some sort of class independent of each program that when
created, this class will monitor each form.
Evan Camilleri Tag: using CeSetUserNotificationEx Tag: 70267
GetType on complex structure
I doing P/Invoke on GetAdaptersInfo (the code follows, with the structures
for GetAdaptersInfo).
I'm getting a NonSupportedException on the code line:
Dim Entry As IP_ADAPTER_INFO = CType(Marshal.PtrToStructure(pEntry,
GetType(IP_ADAPTER_INFO)), IP_ADAPTER_INFO)
I took it piece by piece, and the exception is occurring on the
Marshal.PtrToStructure call. I've got a workaround (by using class
constructors with the pointer as the argument, kinda brute force), but I just
wanted to make sure that there was no way to make this work (or what is the
specific reason it doesn't work).
I also get a NonSupportedException for
Marshal.SizeOf(GetType(IP_ADAPTER_INFO)).
So, what's the specific reason that these two Marshal methods don't work --
is it just too complex a structure?
Thanks for any help,
Steve
===================================================
Public Const MAX_ADAPTER_NAME_LENGTH As Int32 = 256
Public Const MAX_ADAPTER_ADDRESS_LENGTH As Int32 = 8
Public Const MAX_ADAPTER_DESCRIPTION_LENGTH As Int32 = 128
<StructLayout(LayoutKind.Sequential)> _
Public Class IP_ADDRESS_STRING
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=(4 * 4))> _
Dim value As String
End Class
<StructLayout(LayoutKind.Sequential)> _
Public Class IP_ADDR_STRING
Public [Next] As IntPtr
Public IpAddress As IP_ADDRESS_STRING
Public Mask As IP_ADDRESS_STRING
Public Context As Int32
End Class
<StructLayout(LayoutKind.Sequential)> _
Public Class IP_ADAPTER_INFO
Public [Next] As IntPtr
Public ComboIndex As Int32
<MarshalAs(UnmanagedType.ByValTStr,
SizeConst:=(MAX_ADAPTER_NAME_LENGTH + 4))> _
Public Name As String
<MarshalAs(UnmanagedType.ByValTStr,
SizeConst:=(MAX_ADAPTER_DESCRIPTION_LENGTH + 4))> _
Public Description As String
Public AddressLength As Int32
<MarshalAs(UnmanagedType.ByValArray,
SizeConst:=(MAX_ADAPTER_ADDRESS_LENGTH))> _
Public Address() As Byte
Public Index As Int32
Public Type As Int32
Public DhcpEnabled As Int32
Public CurrentIpAddress As IP_ADDR_STRING ' Int32 -- this is a
*IP_ADDR_STRING (ptr) in original structure
Public IpAddressList As IP_ADDR_STRING
Public GatewayList As IP_ADDR_STRING
Public DhcpServer As IP_ADDR_STRING
Public HaveWins As Int32
Public PrimaryWinsServer As IP_ADDR_STRING
Public SecondaryWinsServer As IP_ADDR_STRING
Public LeaseObtained As DateTime ' Int32 -- original
structure: time_t
Public LeaseExpires As DateTime ' Int32 -- original
structure: time_t
End Sub
End Class
<DllImport("iphlpapi.dll")> _
Private Shared Function GetAdaptersInfo( _
ByVal pAdapterInfo As IntPtr, _
ByRef pBufOutLen As UInt64) As Int32
End Function
Public Shared Sub GetAdapters()
Dim structSize As Int32 = 1192 '
Marshal.SizeOf(GetType(IP_ADAPTER_INFO)) -- doesn't work in NETcf
Dim pArray As IntPtr = Marshal.AllocHGlobal(structSize)
Dim len As UInt64 = Convert.ToUInt64(structSize)
Dim ret As Int32 = GetAdaptersInfo(pArray, len) ' if
ERROR_BUFFER_OVERFLOW, len returned with needed buffer size
If ret = ERROR_BUFFER_OVERFLOW Then ' Buffer was
too small, reallocate the correct size for the buffer.
pArray = Marshal.ReAllocHGlobal(pArray, New
IntPtr(Convert.ToInt64(len)))
ret = GetAdaptersInfo(pArray, len)
End If
If ret = ERROR_SUCCESS Then ' Call
succeeded
Dim pEntry As IntPtr = pArray
Do ' Retrieve
the adapter info from the memory address.
Dim Entry As IP_ADAPTER_INFO =
CType(Marshal.PtrToStructure(pEntry, GetType(IP_ADAPTER_INFO)),
IP_ADAPTER_INFO)
pEntry = Entry.Next
Loop Until IntPtr.op_Equality(pEntry, IntPtr.Zero)
End If
Marshal.FreeHGlobal(pArray)
End Sub Tag: using CeSetUserNotificationEx Tag: 70266
map desktop folder
Is there any way (or tool) to map a desktop folder to a CE (PPC03) device -
like the emulator supports?
Thanks ahead
tb Tag: using CeSetUserNotificationEx Tag: 70265
NetCF: How to remove checkboxes from some of the nodes of a TreeView control at run time ...
Hello,
I have a piece of code that removes the check boxes from a treeview control
at run time for the .NET 2.0 of Desktop. I have changed the dll reference
from user32.dll to coredll.dll and compiled it and trying to use it in my
CF 2.0 application, but it does not work (does not remove the check boxes
for the nodes that I am trying to remove, does not give any error either).
I am not familier with interop services, so can some one with knowledge in
that area, please help me with this code.
Here is the code that works for the Desktop .NET 2.0.
using System;
using System.Runtime.InteropServices;
namespace tempnamespace
{
/// <summary>
/// Summary description for TreeViewExtender.
/// </summary>
public class TreeViewExtender
{
private const int TVIS_STATEIMAGEMASK = 0xF000;
private const int TVIF_TEXT = 0x0001,
TVIF_IMAGE = 0x0002,
TVIF_STATE = 0x0008,
TVIF_HANDLE = 0x0010,
TVIF_SELECTEDIMAGE = 0x0020,
TVM_SETITEM = 0x110D;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
private class TVITEM
{
public int mask;
public System.IntPtr hItem; // HTREEITEM
public int state;
public int stateMask;
public System.IntPtr pszText; // string
public int cchTextMax;
public int iImage;
public int iSelectedImage;
public int cChildren;
public System.IntPtr lParam;
}
static public void RemoveCheckBoxFromNode(System.Windows.Forms.TreeNode
node)
{
//
// It is important that the TreeView.Handle is accessed before
// the TreeNode Handle. If it is not, the results of TreeNode.Handle
// are non-deterministic.
//
System.IntPtr treeViewHandle = node.TreeView.Handle;
TVITEM tvi = new TVITEM();
tvi.hItem = node.Handle;
tvi.mask = TVIF_HANDLE | TVIF_STATE;
tvi.stateMask = TVIS_STATEIMAGEMASK;
tvi.state = 0;
User32.SendMessage(treeViewHandle, TVM_SETITEM, System.IntPtr.Zero,
tvi);
}
public class User32
{
[DllImport("coredll.dll", CharSet = System.Runtime.InteropServices.CharSet.Auto)]
internal static extern System.IntPtr SendMessage(IntPtr hWnd, int
msg, IntPtr wParam, [In, Out, MarshalAs(UnmanagedType.AsAny)] Object lParam);
}
}
I have already changed the dllimport to coredll.dll above.
Here is a sample code that uses the above code.
// TreeView tv = new TreeView.....
// assigned imagelist ...
TreeNode tn = tv.Nodes.Add("First");
TreeNode prefix = tn.Nodes.Add("Id Prefix - " );
prefix.SelectedImageIndex = 1;
prefix.ImageIndex = 1;
TreeViewExtender.RemoveCheckBoxFromNode(prefix);
Any help please.
Regards Tag: using CeSetUserNotificationEx Tag: 70262
CAB File creation
I have a cab file that works just fine, but when installing on Windows
CE 4.2, the install prompts the user for the installation directory.
Is there any way to make this prompt to not show up?
Any help would be greatly appreciated.
Thanks,
Tim Tag: using CeSetUserNotificationEx Tag: 70260
Handheld "Pocket PC" Arabic Printing
I recently read in many google group's about problem to print arabic on
Extech, oneil or either dotmatrix printer. If anyone still need to
print arabic from handheld in any printer, i can provide him by the
solution. just contact me, my email is:
abdelouahedDOTsabriAROIBASKmughamratDOTcom
Just replace the capitals letter by it's equivalent email address
Best regards
Abdelouahed Sabri
Mughamrat Tag: using CeSetUserNotificationEx Tag: 70248
Compact Framework redistribuale and custom setup
Hi,
I'm building a CF 2.0 application.
I've build a msi setup that can install and deploy the application (which
is quite easy with a custom installer class and ceappmgr from activesync).
Now I'd like to enable my setup to detect and install the CF if required.
I've red many articles on the web, and most of them suggested to shipped the
CF with my app, and install it myself (with a native setup dll or a custom
CeRapi method).
What about if a user install a dozen of apps that require the CF ? With this
scenario, every app is responsible to install the CF... So if X apps require
the CF, the CF cabs will be copied X times ?
I've take a look at the redistribuable package of the CF 2.0. This seems to
be targetting a developper audience (since it installs in a SDK folder, and
installs some CF DLL on the "dev" computer)...
unlike the .Net CF 1.0 SP3 (I remember it installed only the cab files and a
ini file, before deploying it actually).
I'd appreciate some lighting on this scenario, which is surely a recurent
case.
Thanks in advance,
Steve Tag: using CeSetUserNotificationEx Tag: 70241
"Referenced package not found" error
I'm using VS2005, CF v2.0, in a Windows CE 5.0 project with several
references to other assemblies, including some that are CF v1.1.
Upon adding one reference and using it, I get a deployment error
(compiling works): it says "Referenced package not found."
What is a package? WHICH one wasn't found? And what can I do to fix
this? The error message is frustratingly unhelpful. What are the
steps to troubleshoot? Google is turning up less than a handful of
unhelpful links. Tag: using CeSetUserNotificationEx Tag: 70240
How to un-EraseBkgnd
Hello everyone,
After the Form2 uncover the Form1, the Form1 refresh it's background and it
shows its gray form background in a flash.The Panel control of Form1 is
red.When Form1 refresh its background the Panel control show gray in a
flash.
How to let the Form1 unEraseBkgnd when the form2 uncover it. Just lik the
CWnd::OnEraseBkgnd(...)
{
return FALSE;
}
Many thanks,
Peter Tag: using CeSetUserNotificationEx Tag: 70236
Does anyone know any useful graph frameworks
Hello!
I am looking for useful .NET CF 2.0 graphical framworks.
Does anyone have any tips ?
Yours sincerely Anders Sahlin Tag: using CeSetUserNotificationEx Tag: 70234
Using System.Diagnostics
I found the following example on MSDN but
when I try to run it in CF I get a load of
errors:
using System;
using System.Diagnostics;
class Test
{
static void Main()
{
Trace.Listeners.Add(new TextWriterTraceListener(Console.Out));
Trace.AutoFlush = true;
Trace.Indent();
Trace.WriteLine("Entering Main");
Console.WriteLine("Hello World.");
Trace.WriteLine("Exiting Main");
Trace.Unindent();
}
}
Typical errors are:
error CS0117: 'System.Diagnostics.Trace' does not contain a definition
for 'AutoFlush
Any ideas what I am missing?
Thanks
Will Chapman Tag: using CeSetUserNotificationEx Tag: 70232
Gprs reconnection
Hi guys,
I have an application running on PocketPC 2003 and I use internet
connection for sending data.
The problem is that when I use GPRS connection averything is fine but just
for the first time the connection is made.
If the Gprs connection is lost because of ActiveSync connection for example,
the next time a Gprs connection is attempted
it can be done. The same Gprs module that I use in the application works
just fine with a small test application that has no other
features. Can anybody give me an idea of what could be the problem.
Any help will be appreciated!
Regards,
Boris Tag: using CeSetUserNotificationEx Tag: 70231
how to assign foreground and background color for datagrid
I want to assign different foreground and background color for each row of
datagrid.How can i do this.Any direct or indirect way.
I am using compact framework2.0 ,with c# for Pocket pc 2003 device Tag: using CeSetUserNotificationEx Tag: 70229
Problem with Marshal.SizeOf in CF 2.0
When I execute these two lines in CF 2.0:
Type t1 = typeof(LINECALLPARAMS);
int a1 = Marshal.SizeOf(t1);
I get a NotSupportedException on the second line. According to the docs it
should not even be able to throw this exception. Here is a stacktrace:
ved System.Runtime.InteropServices.Marshal.SizeOfInternal()
ved System.Runtime.InteropServices.Marshal.SizeOf()
ved System.Runtime.InteropServices.Marshal.SizeOf()
...
"ved" means at (in danish).
Can anybody help me out?
Thanks in advance,
Per Rasmussen. Tag: using CeSetUserNotificationEx Tag: 70222
Using Media player control in applications
WMPLib.dllDear All,
I asked before about playing WMA files in my application, i have been
answering to host the windows media player activex control
i downloaded the sample project that was in the link.
but when i try build the project and run it on my device, a run time error
occures says that the class is not registered,
I tried to use the dll which named WMPLib.dll in another project,
the first line i wrote is:
WindowsMediaPlayerClass player = new WindowsMediaPlayerClass();
i had the same error at run time which says that the class is not registered
so, is this the only way i could use the windows media player component by
using another DLL, or i can use it directly from my application.
Thanks in advance
Regards
Tamer Hesham Tag: using CeSetUserNotificationEx Tag: 70221
Thread Sleep RessourceS?
Hi
sometimes I got the problem, that when I call Thread.Sleep(1000) it
seems like my application takes nearly 100% of the system performance.
I call it in the device wake, because my applikation has to wait if the
database is on the storage card.
Is there any known problem ? How may I prevent this? Tag: using CeSetUserNotificationEx Tag: 70216
create shortcut for my app
How can I create the shortcut for my PDA app! I use VS.NET 2005 and build WM
5.0 ap! Tag: using CeSetUserNotificationEx Tag: 70211
Changing skins dynamically
Hi,
I have to develop an application for PocketPC initially and
then Smartphone where the skin can be changed by hitting a
button control. I don't want the image embedded so that its not
part of compilation. What is the best way to do this, ie best format
in which to store the images as there could be a few different skins.
Any guidance or links to articles most appreciated.
Thanks Tag: using CeSetUserNotificationEx Tag: 70203
Saving and Restoring Program Settings
Hi,
I am writing a WM app where I want to save the settings the user created and
restore them on the next execution.
I would also like the settings to be saved / restored by Activesync.
Any ideas?
Thx. Tag: using CeSetUserNotificationEx Tag: 70202
How to set the memory size of the emulator?
Hi All,
I use RDA to pull dataset from SQL 2000 server in emulator.If the records is
more than 10,000 ,the program running in emulator is failed down and no
response.
I think the memory of the emulator isn't enough.
So, how to set the memory size of the emulator?
Many thanks,
Peter Tag: using CeSetUserNotificationEx Tag: 70200
FindFirstUrlCacheGroup returns Null
Hi All,
I'm trying to call FindFirstUrlCacheGroup in a C# app with the following code:
Handle = win32API.FindFirstUrlCacheGroup(0, CACHEGROUP_SEARCH_ALL,
IntPtr.Zero, 0, ref groupId, IntPtr.Zero);
And every time I'm getting a Null result.
Any ideas will be very much appriciate.
Thanks
IC Tag: using CeSetUserNotificationEx Tag: 70199
Problem in TreeView Control
Hi,
i have a problem with the webcontrol treeview in asp.net v2 .
i want to save the state of expanding/collapsing of my tree after post
back .
i know that i can do that if i write "if (!ispostback)" ,but i can not
, because i am building the tree all over again
each time i am doing post back .
Can you please help me with this problem .
Regards ,Rony Tag: using CeSetUserNotificationEx Tag: 70197
Speicherung von Seriellen Daten
Hallo,
ich bin dabei folgendes Szenario zu implementieren und suche nach einer
geeigneten Lösung:
Aus einer "Datenquelle" steht ein kontinuierlicher Strom von Daten
bereit. Die zu schreibenden Bibliothek soll nun diese Daten auslesen und
einem übergeordneten Programm zur Verfügung stellen. Die Frage ist nun
wie? Dabei soll die Bibliothek auch über COM verfügbar sein. Die
Schnittstelle sollte also COM-fähig sein.
Ich dachte an einen Stream. Ist dies geschickt? Ist ein Stream COM-fähig?
Wie kann ich verhindern, dass der "Benutzer" nicht in den Stream
schreibt; die Bibliothek dies aber kann;. Sprich wie kommt man an das
zweite Ende des Stream?
Vielen Dank
Peter Tag: using CeSetUserNotificationEx Tag: 70196
Does the RDA need to install???
Hello All,
I use RDA to pull a dataset from the 2000 server :
string rdaOleDbConnectString = "Provider=sqloledb; Data
Source=192.168.0.1;Initial Catalog=music; User Id=sa;Password=1234";
SqlCeRemoteDataAccess rda = null;
rda = new SqlCeRemoteDataAccess();
rda.InternetPassword = "";
rda.InternetUrl = "http://192.168.0.1/sql/sscesa20.dll";
rda.LocalConnectionString =
@"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=\test.sdf";
rda.Pull(
"A",
"Select * from A",
rdaOleDbConnectString);
It is running well in the emulator ,but when it run in the device it note
'Type Load Error'.
Does the RDA need to install???
Thanks,
Peter Tag: using CeSetUserNotificationEx Tag: 70194
Dataset in Visual Studio project - VS crash and designer.cs file disappeared
Hi,
I have a problem when working with datasets in Visual Studio 2005 in Smart
Device project.
I created a dataset and in one table I defined a column as Enum whihc I
defined.
Example:
public enum GPSStandard
{
NMEA = 0,
SiRF = 1
}
When I defined default value "0" and saved dataset, Visual Studio crashed.
When I opened solution again and attempted to open dataset I recevied an
error message and dataset.designer.cs file disappeared from Visual Studio
project. I found this file in Recycle Bin, so I was able to restore it. But
I was still unable to open dataset. I had to change dataset.xsd manually, by
removing default="0". But another problem is that when you change xsd file,
Visual Studio automatically deletes Dataset.Designer.cs file and removes it
from the project.
I know that I should define default value for example GPSStandard.NMEA, but
trying to define a value of differnet type or mistyping shouldn't lead to
crash and automatic file remove.
Why Visual Studio deletes files from project and from hard drive?
Every time I work not only with datasets, but with designer in general I
have to make small changes, save file and open it again to see if VS
actually didn't corrupt anything.
Could I use compact framework 2.0 in VS 2003? VS 2005 doesn't seem to be a
finished product.
Another problem is when I need to copy cs file which was absolutely
independent on dataset I described. This time my dataset was properly
defined and I even didn't touch it. When I selected cs file on one project
and I pressed Ctrl-C, I selected another project, right-clicked on it and
chose Paste. File was copied successfully, but again Dataset.Designer.cs
disappeared.
I new what's going on here, so I immediately restored the file from Recycle
Bin. VS was able to open dataset without any error, so this cannot be the
reason to delete the file.
Why this happened? As I said this cs file was unrelated to dataset. It was a
small class with a few variables and properties with some XML attributes.
I'll appreciate any help. I'm quite scared of doing anything, because I
cannot do backup or check-in/check-out after every little change in the
code. I'm able to do backup once a day, but I need to work for this one day
uninterrupted by such failures. Maybe somebody knows how to tweak VS 2005
(say set a registry key to disable automatic file delete?).
Thanks. Tag: using CeSetUserNotificationEx Tag: 70190
Browsing subfolders in OpenFileDialog / SaveFileDialog
Hi,
Is it possible to use OpenFileDialog / SaveFileDialog in Compact Framework
to open subfolders?
I was trying to set InitialDirectory property to \My
Documents\MainFolder\SubFolder, but it looks like filedialog supports only
one level of folders in "My Documents". I also tried MainFolder\SubFolder,
but with the same result. OpenFileDialog will show only "MainFolder", but
I'm unable to set InitialDirectory to "SubFolder" or browse manually into
this folder. I cannot see subfolders in the list along with files.
Could I set InitialDirectory to "SD Card\MainFolder\SubFolder"?
Should I create my own dialog which would support this functionality?
Thanks. Tag: using CeSetUserNotificationEx Tag: 70189
screenshot emulator
Hi!
How to make screenshot of emulator? PrintScreen key don't work in WinXP, if
emulator windows presents on screen. Tag: using CeSetUserNotificationEx Tag: 70184
How to set the background color of Lable control in .NET CF?
Hi All,
How to set the background color of Lable control in .NET CF?
I use the following ,but it doesn't work in .NET CF.
monLabel.BackColor = this.Parent.BackColor;
or
monLabel.BackColor = System.Drawing.Color.Transparent
or
monLabel.BackColor = System.Drawing.Color. (the color of your Form)
Peter Tag: using CeSetUserNotificationEx Tag: 70182
c++ to c#... sip enumeration
I found http://www.developer.com/ws/pc/article.php/3583686 where there is a
SIP enumeration! I would like it in C#... any help?
Basically the following is what is stopping me:
CTypedPtrMap<CMapStringToPtr,CString,CLSID*> g_SipMap;
int SipEnumIMProc(IMENUMINFO *pIMInfo)
{
CLSID* pCLSID = new CLSID;
memcpy(pCLSID,&pIMInfo->clsid,sizeof(CLSID));
g_SipMap.SetAt(CString(pIMInfo->szName),pCLSID);
TRACE(_T("%sn"),CString(pIMInfo->szName));
return 1;
}
void CSIPDemoDlg::OnButtonEnum()
{
SipEnumIM(SipEnumIMProc);
CString sSipName;
CLSID *pCLSID = NULL;
for (POSITION pos = g_SipMap.GetStartPosition(); pos; )
{
g_SipMap.GetNextAssoc(pos,sSipName,pCLSID);
m_SipList.AddString(sSipName);
}
}
Do not know if correct, I made the following definition in
c#:[DllImport("Coredll.dll")]static extern int SipEnumIM(IMENUMPROC
pEnumIMProc);struct IMENUMINFO{char[] szName;Guid clsid;}delegate int
IMENUMPROC(ref IMENUMINFO imenuinfo);Evan Tag: using CeSetUserNotificationEx Tag: 70179
Numeric SIP
Is it possible that when I open the SIP I instruct it to open in nemeric
mode or alpha-numeric mode?
Evan Tag: using CeSetUserNotificationEx Tag: 70172
Showing last person called on Contacts
I am wondering if there is an simple way to do this.
I'd like to create a little app, then when started, would bring up the
Contacts dialogue and show the last person dialed or the last person
showing on the DialerPad screen.
I can think of the hard way that MIGHT be able to do this..but
wondering if there are any supported functions in WM 2005 and CF2.0 to
facilitate this? i.e. is there an api available to interact with the
Contacts app and to get the last caller's info?
thanks Tag: using CeSetUserNotificationEx Tag: 70170
OpenNETCF.Web.Services2
Anyone have any examples using this?
I'm wanting to communicate between a desktop app and a CE device via TCP/IP.
This seems like a good direction to go.
THX Tag: using CeSetUserNotificationEx Tag: 70161
VOIP c# SDK
Hello,
Im looking for a VOIP SDK that will be appliciable to both PC & Pocket
PCs using the .net framework & c#. Does anyone know such thing? I tried
bear soft's SDK but it didnt work so well (their code example in c#
compile but didnt function propertly..)
Thanks, Shai. Tag: using CeSetUserNotificationEx Tag: 70159
Exchange Server and Push email ...
Hello all,
We are trying to get PDA Phones for all of our sales folks and have a question
about Exchange Server and Push email on the devices.
When we send email from the PDA, does it also show up on the desktop outlook
in send items folder. I am under the impression that the device syncs with
the Exchange server and will show up on the desktop outlook when do send/receive
from the desktop outlook.
Any pointers in this regard.
Thanks,
Venkat Tag: using CeSetUserNotificationEx Tag: 70158
Bypass the "Bluetooth browser" form
In my tests I have two bluetooth services enabled (a GPS ang a net
connection).
Each time I open the port to ask data to the GPS, the Bluetooth
browser" form is shown, and I have to choose for the proper service.
It's possible to avoid this form?
Thanks Tag: using CeSetUserNotificationEx Tag: 70157
insert data to sql server mobile
I have a problem. When I try to insert data into a sql mobile database, the
data from the dataset does not save in the database ,only in the dataset as
long as I run the application, Anybody know what the problem is?
--------
DataRow uppdatRow1 = this.DataSet.Tables["Table"].NewRow();
uppdatRow1["Id"] = System.Guid.NewGuid();
uppdatRow1["Temp"] = CmbTemp.Text;
this.DataSet.Tables["Table"].Rows.Add(uppdatRow1);
this.TableAdapter.Update(this.DataSet.Table);
----- Tag: using CeSetUserNotificationEx Tag: 70155
Simulate up/down/left/right
This is a multi-part message in MIME format.
------=_NextPart_000_0006_01C675D3.90343E50
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello
I want to simulate up/down/left/right-keys.=20
I have this code:
Public Const KEYEVENTF_UP As Integer =3D &H2
Public Const KEYEVENTF_EXTENDKEY As Integer =3D &H1
Public Const KEYEVENTF_SILENT As Integer =3D &H4
<DllImport("coredll.dll")> _
Public Shared Sub keybd_event( _
ByVal bVk As Byte, _
ByVal bScan As Byte, _
ByVal dwFlags As Integer, _
ByVal dwExtraInfo As Integer)
End Sub
Public Sub PressKey(ByVal key As Keys)
Dim code As Byte =3D CType(key, Byte)
Dim up As Integer =3D KEYEVENTF_UP
Try
keybd_event(code, 0, 0, 0) 'keydown=20
keybd_event(code, 0, up, 0) 'keyup=20
Catch ex As Exception
End Try
End Sub
Now if I use PressKey(Keys.A), then I get an "a", globally
If I use PressKey(Keys.Up) (or down/left/right), it does nothing, but my =
PPC slows down ..
Whats wrong?
------=_NextPart_000_0006_01C675D3.90343E50
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2873" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hello</FONT></DIV>
<DIV><BR><FONT face=3DArial size=3D2>I want to simulate =
up/down/left/right-keys.=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I have this code:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV>
<P><FONT face=3DArial size=3D2>Public Const KEYEVENTF_UP As Integer =3D=20
&H2</FONT></P>
<P><FONT face=3DArial size=3D2>Public Const KEYEVENTF_EXTENDKEY As =
Integer =3D=20
&H1</FONT></P>
<P><FONT face=3DArial size=3D2>Public Const KEYEVENTF_SILENT As Integer =
=3D=20
&H4</FONT></P>
<P><FONT face=3DArial size=3D2><DllImport("coredll.dll")> =
_</FONT></P>
<P><FONT face=3DArial size=3D2>Public Shared Sub keybd_event( =
_</FONT></P>
<P><FONT face=3DArial size=3D2>ByVal bVk As Byte, _</FONT></P>
<P><FONT face=3DArial size=3D2>ByVal bScan As Byte, _</FONT></P>
<P><FONT face=3DArial size=3D2>ByVal dwFlags As Integer, _</FONT></P>
<P><FONT face=3DArial size=3D2>ByVal dwExtraInfo As Integer)</FONT></P>
<P><FONT face=3DArial size=3D2>End Sub</FONT></P>
<P><FONT face=3DArial size=3D2>Public Sub PressKey(ByVal key As =
Keys)</FONT></P>
<P><FONT face=3DArial size=3D2>Dim code As Byte =3D CType(key, =
Byte)</FONT></P>
<P><FONT face=3DArial size=3D2>Dim up As Integer =3D =
KEYEVENTF_UP</FONT></P>
<P><FONT face=3DArial size=3D2>Try</FONT></P>
<P><FONT face=3DArial size=3D2>keybd_event(code, 0, 0, 0) 'keydown =
</FONT></P>
<P><FONT face=3DArial size=3D2>keybd_event(code, 0, up, 0) 'keyup =
</FONT></P>
<P><FONT face=3DArial size=3D2>Catch ex As Exception</FONT></P>
<P><FONT face=3DArial size=3D2>End Try</FONT></P>
<P><FONT face=3DArial size=3D2>End Sub</FONT></P>
<P><FONT face=3DArial size=3D2></FONT> </P>
<P><FONT face=3DArial size=3D2>Now if I use PressKey(Keys.A), then I get =
an "a",=20
globally</FONT></P>
<P><FONT face=3DArial size=3D2>If I use PressKey(Keys.Up) (or =
down/left/right), it=20
does nothing, but my PPC slows down ..</FONT></P>
<P><FONT face=3DArial size=3D2></FONT> </P>
<P><FONT face=3DArial size=3D2>Whats =
wrong?</FONT></P></DIV></BODY></HTML>
------=_NextPart_000_0006_01C675D3.90343E50-- Tag: using CeSetUserNotificationEx Tag: 70154
dear all,
How could i use CeSetUserNotificationEx method with C# .net
thanks
Regards
Tamer Hesham