|
hi
Make a column to template column and then in template col property use a drop down control in the design.
ok bye
|
|
|
|
|
Hello, my name is carlos and I develop a application that work whit the sim of the pda. The SO is Windows Mobile 2003 Phone Edition, with .net compac framework 2.0 and open net compact framework.
I try to insert one contact in the sim but the next method don't work. The metode don't return any exception, but don't insert the contact in the sim. I debbuging the application and I have seen that phonebookEntry.Text and phonebookEntry.Address remains target (phonebookEntry.Text = "").
I don't know because this happens, I hope that somebody can say to me since it becomes.
[code]
Private Sub miAfegirContacteSim()
Try
Dim sim2 As OpenNETCF.Phone.Sim.Sim = New OpenNETCF.Phone.Sim.Sim
Dim phonebook As OpenNETCF.Phone.Sim.Phonebook = sim2.Phonebook
Dim phonebookEntry As New OpenNETCF.Phone.Sim.PhonebookEntry
phonebookEntry.AddressType = OpenNETCF.Phone.AddressType.International
phonebookEntry.Plan = OpenNETCF.Phone.Sim.NumberPlan.Telephone
phonebookEntry.Text = "Carles"
phonebookEntry.Address = "937979797"
If (phonebook.Count < phonebook.Capacity) Then
Dim i As Integer = CType(sim2.Phonebook, System.Collections.IList).Add(phonebookEntry)
End If
sim2.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
[/code]
PD. Sorry but my english is very bad :P (I can write also in spanish or catalan)
|
|
|
|
|
As you might know, there's no "Clipboard" object in .NET Compact Framework 1.1 (target device PocketPC2002). However, i can access the clipboard through P/Invoke.
The thing is:
Declare Function SendMessage Lib "user32" Alias "SendMessageA" ( _<br />
ByVal hWnd As Long, ByVal uMsg As Long, _<br />
ByVal wParam As Long, ByVal lParam As Long) As Long
typical clipboard function call would be SendMessage(hWnd, WM_COPY, 0, 0) . But i don't know how to obtain a handle of the TextBox control. Can someone help me?
i tried this solution, but it didn't work.
EDIT: Looks like i need a handle of an active window, so i get it through GetFocus() . I saw a hWnd as Long declaration somewhere, but it doesn't affect anything since IntPtr and Long are basically the same.
Here's my code:
<br />
...P/INVOKE<br />
Declare Function GetFocus Lib "coredll.dll" () As IntPtr<br />
Declare Function SendMessage Lib "coredll.dll" Alias "SendMessageA" ( _<br />
ByVal hWnd As IntPtr, ByVal uMsg As Long, _<br />
ByVal wParam As Long, ByVal lParam As Long) As Long<br />
...END P/INVOKE<br />
<br />
...SUB<br />
Dim hWnd As IntPtr<br />
hWnd = GetFocus()<br />
Try<br />
SendMessage(hWnd, WM_COPY, 0, 0)<br />
MsgBox("SUCCESS")<br />
Catch ex As Exception<br />
MsgBox("FAILED" & vbCrLf & ex.Message)<br />
End Try<br />
...END SUB<br />
Msgboxing hWnd returns a value (some integers, so this one works), but SendMessage fails throwing NotSupportedException . Any solution out there?
EDIT
i found a working solution!
the correct function declaration is:
Declare Function SendMessage Lib "coredll.dll" (ByVal hWnd As IntPtr, ByVal Msg As System.Int32, ByVal wParam As System.Int32, ByVal lParam As System.Int32) As IntPtr
This is the code for obtaining a handle of the control:
Public Function gethWnd(ByVal ctrl As Control)<br />
Dim hOldWnd As IntPtr = GetCapture()<br />
ctrl.Capture = True<br />
Dim hWnd As IntPtr = GetCapture()<br />
ctrl.Capture = False<br />
SetCapture(hOldWnd)<br />
Return hWnd<br />
End Function
This code requires two additional declarations:
Declare Function GetCapture Lib "coredll.dll" () As IntPtr<br />
Declare Function SetCapture Lib "coredll.dll" (ByVal hWnd As IntPtr) As IntPtr
And so the final message call will look like this:
SendMessage(gethWnd(CONTROL), WM_COPY, 0, 0)
and the constants declaration:
Public Const EM_CANUNDO = &HC6<br />
Public Const EM_EMPTYUNDOBUFFER = &HCD<br />
Public Const WM_COPY = &H301<br />
Public Const WM_PASTE = &H302<br />
Public Const WM_CLEAR = &H303<br />
Public Const WM_UNDO = &H304
|
|
|
|
|
Hi,
i have a xml file tjat i get from a website,
and i need to save the xml to the disk, but i need to add a namespace to the xml.
Im using XmlTextReader To read from a stream,
and after that im using xmlDocument.Load.
i want to set a namespace to the xml that i got,
and dont know how.
thanx,
shay
|
|
|
|
|
How can I install programmatically .NET Compact Framework on Pocket PC?
I Love SQL
|
|
|
|
|
target platform - WinCE 3.0 (PocketPC2002)
I need to handle the textbox caret position changes e. g. when i move caret somewhere something happens.
VB .NET (CF 1.1), eVB or eVC++ 3.0 - doesn't really matter, but preferrably something VB
Right now i'm working on a round-about method - to start a thread with infinite Loop sequence which checks the caret position and responds to it's value. But this is relatively slow and unstable...
|
|
|
|
|
Hi,
I am using Wince 5.0 with VS2005. I have created user control and on click event i am creating new label and showing it on control.like this
Label newPanel = new Label();
newPanel.Visible = true;
newPanel.Left = 0;
newPanel.Top = newLabel.Height;
newPanel.BackColor = Color.Blue;
newPanel.Width = this.Width;
newPanel.Height = this.Height - newLabel.Height;
newPanel.Parent = this.Parent;
newPanel.Anchor = (AnchorStyles.Left | AnchorStyles.Bottom |
AnchorStyles.Right | AnchorStyles.Top);
newPanel.Show();
this.Controls.Add(newPanel);
then i want to use this control on Form,so i created the device application and droped my control on Form,after clicking on control i can see the new labe on control but after rebuilding the application the label disappears.
I want to create some more such labels dynamically on my conrol.
how to add dynamically created control inside the usercontrol??
Thanks
Tushar
|
|
|
|
|
hi i want to ask how to take data from USB port using C languang or C++.
i'm using this to take data from GPS then send it via gprs modem.
and if there any source code can you tell me where the website or u can email me at blood_november@yahoo.com
|
|
|
|
|
Hi,
has anyone ever tried to access files in \Windows-Directory? Any attempt to open a file via CreateFile() return a WIN32-Error 5 (ERROR_ACCESS_DENIED) on my device! Microsofts Remote-FileViewer tool for CE fails too if an attempt was made to download a file from \Windows to my development-machine!
Does anyone know a solution?
Best regards
Reiner
|
|
|
|
|
DLL and EXE files in ROM can be of two sorts: execute-in-place, and regular files. DLLs and EXEs marked execute-in-place cannot be opened for reading, only loaded by Windows using CreateProcess or LoadLibrary . Files with other extensions may also be affected if they're really DLLs underneath (and are also marked execute-in-place).
Technical reason: a DLL or EXE's image on disk is different from its image in-memory. An execute-in-place DLL or EXE is exactly what it says: it executes directly, in-place, from the ROM. A 'regular' DLL file has to be copied to RAM and fixed-up by the loader; for the execute-in-place DLL, it has to be fixed-up at ROM build time. In the process, the information required to fix it up is discarded along with the regular image headers. It isn't then possible to reproduce the file. It could have been, but Microsoft decided not to waste ROM space on keeping the information required to reverse the process.
Execute-in-place was very relevant in the first Windows CE devices which had very small amounts of RAM. I think it's being slightly de-emphasized now.
Either type of DLL, and indeed any file in the ROM, can be overridden by copying a file to the device's storage in the 'same' location to shadow it. However, you can never delete the file.
|
|
|
|
|
Mike,
thanks for your explanation!
It seems that there is indeed no way to produce an exact copy of such a file.
CreateFile() fails, file-mapping also. The only feasible way to get access to a DLL's image seems to be LoadLibraryEx() with the LOAD_LIBRARY_AS_DATAFILE-Flag.
It thought that it may be possible, if the exact image-size is known, to write the RAM-Image to another file. But at the modules base-address (located via the toolhelp-API) there are no such familiar things as the PE-Headers! I have spended much time and effort to get things working, but I think now it's time to give up...
Thanks again for your help!
Best regards and greetings from germany
Reiner
|
|
|
|
|
hi i want to know how to create an application to convert Cell phone Airtime to Electricity Pay Bills
Vuyiswa
|
|
|
|
|
In my application when I try to send data from Pocket PC to Desktop (via RDA method) my application crashes and I get this error: "SQL Server Compact Edition encountered problems opening Database".
Does anyone faced with this problem if yes plz let me know how can I solve.
Regards.
I Love SQL
|
|
|
|
|
PocketJEDI
Features:
- Editing of *.java files
- java syntax highligting
- simple project manager
- building project with external compiller (kopi)
- runnig compiled program with Jeode EVM
It works on:
- PocketPC device (ARM processor only)
- Windows Mobile 2003/5.0
- .Net Compact FrameWork 2.0 (Archive of Packages can be downloaded from here)
To run and compille applications you'll need also:
- Jeode JVM
- KOPI java compiller
Page of project: PocketJEDI
|
|
|
|
|
when i make Synchronize for SqlCeReplication make error message is (header informationis either corrupted or missing ) and error no.28035 (SqlCeError)
some body help me
123
|
|
|
|
|
I have a PDA application, where my application need to click a button to run a video file. How can play video by a button click on my form? I am using mobile client software factory.
Anyone can help?
|
|
|
|
|
Hi,
Have a look at Alex's article on MSDN titled "Hosting ActiveX Controls in the .NET Compact Framework 2.0" - http://msdn2.microsoft.com/en-us/library/aa446515.aspx[^]
This will show you how to host the Windows Media Player ActiveX control within your applicatoni. It's fairly heavy going.
If all you need to do is play a file in the existing windows media player application you may like to investigate using the System.Diagnostics.Process
class. You could use this to start "myVideo.wmv" and the device would determine the correct application to run to play the file.
Hope it helps,
Christopher Fairbairn
|
|
|
|
|
I was trying to create a login page that targets handheld devices. I created the browser file to properly detect BlackBerrys, and it worked. I created the login page using the LoginControl and membership framework, and it worked. I ran into trouble with the "Remember Me" checkbox. It boils down to this I think: The BlackBerry 8800 does not properly treat the checkbox! I have been unable to find anything. My form works on IE, BlackBerry 8700 and even a Treo. Here is a sample form with a checkbox:
<code>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
bool c = myCheckBox.Checked;
lblMessage.Text = "Checked: " + c.ToString() + "<br/>";
bool isMobile = Request.Browser.IsMobileDevice;
lblMessage.Text += "Mobile: " + isMobile.ToString();
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>It don't work!</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<input runat="server" id="myCheckBox" name="cbtest" type="checkbox" />
<asp:Label ID="lblMessage" runat="server"></asp:Label>
<input id="Submit1" type="submit" value="submit" />
<br />
</div>
</form>
</body>
</html>
</code>
Juan Ayala
|
|
|
|
|
Hi all,
does anyone know how to handle the PIN entering dialog? e.g. if i want to replace the PIN entering dialog with my own dialog? how can i do that?
thanks
|
|
|
|
|
|
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
|
|
|
|