|
There's no simple ole container control in the framework, as far as I know, but using the WebBrowser control to host an OLE object could work.
I found an article on this topic on MSDN.
Regards,
mav
|
|
|
|
|
Thanx mav. This link was really useful
Think Negatively, It makes you creative
|
|
|
|
|
HI~
I use a listview(large icon) of compact framework. After I click a item, it launches to another form with large icon listview.
However, after I launch to another form, all the icons of the previous form in the were disappeared.
How can I solve it?
Thanks
|
|
|
|
|
We are in the initial stage of developing
CE.NET 4.2 (O.S) for Windows Mobile Pocket PC platform using Intel PXA 255 and also PXA 263 chips with subsystems(Bluetooth,WLAN,GSM,GPRS and USB,serial ports) and for using the board in PDA ,which is meant for transmission of emails,integrating with Microsoft Outlook or other Linux tools for the purpose.
If you can develop our solution and quote for the same or alternatively suggest any source who can provide solution for the above requirement, we will be very much obliged.
With regards
K.Sudhhakar Reddy
CEO,OM TELECOMMUNICATIONS
Plot no-98,Phase-1,Kavuri hills,
Madhapur,Hyderabad-500033
India
Tel:0091-040-23112166
Email:omtel@rediffmail.com
omel@rediffmail.com
|
|
|
|
|
lol .... i didn't think India is now outsourcing too I thought all the outsourcing is going to India instead.
|
|
|
|
|
What's puzzling me for a while now is how the RichTextBox behaves when you add text at the end programmatically.
When you have a RichTextBox and call:
richTextBox1.SelectedText += "\nHello World!"; you'd expect it to be the same as calling
richTextBox1.SelectedText += "\n";
richTextBox1.SelectedText += "Hello World!"; wouldn't you?
Now the funny thing is that the first piece of code keeps the current font for "Hello World!" and the second one switches back to the RichTextBox's default font!
Anyone has a faint idea what's going on here or how to keep the RichTextBox from doing this?
mav
|
|
|
|
|
Hi,
I need to make a registry entry for the date of installation. How can I achive this in VS.NET Deployment project?
--
Regards
Vipul Patel
|
|
|
|
|
|
can i use a custom attribute on a method to access and modify parameters and varibles inside a method?
overriding is not applicable in my case
thanks
Mahasen
|
|
|
|
|
ms-help://MS.VSCC.2003/MS.MSDNQTR.2004APR.1033/cpref/html/frlrfsystemattributeclasstopic.htm
This link in MSDN 2003 will help you
M.Sendilkumar
Senior Software Engineer
TVS Infotech
Chennai,TamilNadu,India.
98413 27002
|
|
|
|
|
Hello, I am a newbie in interoperability, and I met a problem with SAFEARRAY in inter-thread communication; unfortunately, I found nothing close to this problem on the Internet.
To summarize:
I have exposed .NET classes to COM clients, one of the classes has an array has returned method value. And in COM (C++) it seems that passing a SAFEARRAY of n "myObject" from a worker thread to a UI thread fails whereas passing n times a single "myObject" works perfectly.
I want to know if something must be done on the c# array which is exposed to COM to solve that.
For those who met this problem (or are courageous), here are the details:
In C#, I have 3 classes "MyObject1","MyObject2" and "MyObject3".
"MyObject1" has a method which returns an array of "MyObject2": public MyObject2[] getArray();
"MyObject2" has a method which returns an instance of "MyObject3": public MyObject3 getObject3();
"MyObject3" has several methods which returns its id, name...
Now, I expose this managed code in a dll to unmanaged code, C++, with .NET framework interop fonctionalities.
In C++, I get:
"MyObject1->getArray()" has a safearray of MyObject2 as returned value
"MyObject2->getObject3()" has MyObject3 as returned value
Great! My managed code is exposed to COM clients!
Now the bug:
In C++, I have 2 threads "UI" and "worker", both are COINIT_APARTMENTTHREADED.
1. I create an instance of "MyObject1" in the UI thread
2. I pass this object to a worker thread method through a queue list
3. In that worker thread method, I call "MyObject1->getArray()" and get the SAFEARRAY of "MyObject2" as returned value
4. I pass back that safearray to a method callback of the UI thread
5. In that UI callback, I want to iterate on the safearray: for each "MyObject2" of the array, I call "MyObject2->getObject3()", then a method of "MyObject3"
-> bug: whatever the method of "MyObject3" which is called, it fails: it seems that "MyObject3" has a problem.
I have made some extra tests:
1. Test1: I put COINIT_MULTITHREADED to UI AND worker: no problem. But this patch cannot be used.
2. Test2: if I do steps 2-to-5 in the worker thread (which means I iterate the safearray in the worker thread, and never go back in the UI): no problem
3. Test3: if I do steps 2-to-5 in the UI thread (which means I never go into worker): no problem
4. Test4:
At step 3, I iterate on the SAFEARRAY. For each "MyObject2" of the array, I pass it to an other callback of the UI. Then, in the UI, I call "MyObject2->getObject3()" and then any methods of "MyObject3", and it is working!
That means that passing a SAFEARRAY of n "MyObject2" from worker to UI fails when we want to retrieve objects from each "MyObject2", but passing n times a single "MyObject2" works perfectly.
I wonder if I have something to add to my C# code so the marshalling/unmarshalling of the array works between threads.
Renaud
|
|
|
|
|
Hi,
I'm trying to write a serial port communication in Windows CE.NET ,
but when i call the 'CreateFile' method of the Kernel32 i get an unidentified exception.
The problematic function is :
"m_hFile = CreateFile(port, (uint)((m_bRead?GENERIC_READ )|(m_bWrite?GENERIC_WRITE )), 0, 0, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0)"
And i send "COM1:" as the name of the port.
Does anybody know how to develope a .NET base class library for serial port
communication in Windows CE?
Thanks,
Shay.
|
|
|
|
|
Hi,
I am trying to create a browser that i can use to capture GET and POST requests in C# (.Net framework).
I use the Microsoft Web Browser component to do the same. I register events like NavigateComplete2, BeforeNavigate2 and DownloadComplete but none of them provide me with complete POST headers.
The "header" member just provides
Content-Type: application/x-www-form-urlencoded
and nothing else.
I do not wish to use the HTTPRequest class because i want to support SSL based connections also.
Can someone please give me pointers on how i can get all the header values for every POST request. If there are any event handlers i can use please let me know.
Any kind of help will be much appreciated.
Kind Regards,
Shanit.
|
|
|
|
|
What you need to implement is a packet sniffer. A packet sniffer, 'sniffs' all the data sent via a port from an ip address OR data SENT from an ip address.
However, since SSL encrypts the channel all you get is the encrypted data. A good example of this is Ethereal[^].
Read this article (from CP!) about more information on a C# Packet Sniffer.
Hope this helps!
~javier lozano
(blog || email)
|
|
|
|
|
Hi~
Lei wrote
"I have 2 forms, form1 contains a ListView. What I want to do is, when
clicking an item in the ListView, hide form1 and show form2. Code for
ListView's SelectedIndexChanged: { form2.Show(); this.Hide(); }. When I
click the item, form2 shows with form1's title and menu. I noticed that when mouse down, the SelectedIndexChanged event was triggered and bring form2 to front. But when mouse up, system redrawed the selected item and bring title and menu back to form1's. I tried to handle MouseDown and MouseUp event of ListView but they were never triggered. Now I used a tricky way to solve the problem: start a thread and use Control.Invoke to switch forms. It is not good, I think there must be a better solution. Thanks."
I am facing the same problem. Someone solve it with setting timer. However, is there any other way to solve it?
Thanks~
|
|
|
|
|
Hi
I have developed a PocketPC application - I have a Client that calls WebServices (uses .NET Compact Framework) and I have a Server that publishes the web services.
I want to make sure that the same Client application ports to SmartPhone.
What changes do I have to do to the Client Code, and to the WebServices code in the server? Would the same webservices work for both? If not, how does the server detect who is calling the web service - the PocketPC or the SmartPhone?
Please help
Thanks
|
|
|
|
|
Hi!
I am developing a mulititier application.
I created some value classes with custom attributes specification.And i have seperate query builder class.This query builder class will construct the query based on the valueobject.Internally the query builder using reflection
reads all propertie's name and custome attributes.Upto that there is no problem.If i try to fetch the value of a property then the runtime error will occurs.For fetching the value i am using PropertyInfo.GetValue method.
So please any on help me to resolve this problem..
Type type=Obj.GetType();
foreach(PropertyInfo f in type.GetProperties())
{
foreach(Attribute attr in Attribute.GetCustomAttributes(f))
{
if(attr.GetType()==typeof(DefaultValueAttribute))
{
str+=":"+f.Name+":"+((ColumnMappingAttribute)attr).Name;
str+=f.GetValue(null,null); --This line shows error
}
}
}
Please help me to solove the problem
M.Sendilkumar
Senior Software Engineer
TVS Infotech
Chennai,TamilNadu,India.
98413 27002
|
|
|
|
|
If you would have read teh documentation for PropertyInfo.GetValue
you would have seen that the first parameter to it is the
"The object whose property value will be returned.".
If you read the Remarks section there, it says
"Because static properties belong to the type, not individual objects, get static properties by passing a null reference (Nothing) as the object argument."
But since you're trying to retrieve a non-static property that line should look like this:
str+=f.GetValue(obj,null);
So next time instead of "Waiting for 2 days" try "Reading the documentation for 5 minutes"
|
|
|
|
|
HI Roman Rodov
Thanks for direct me to have a correct solutions.I tried it, it is working fine.
M.Sendilkumar
Senior Software Engineer
TVS Infotech
Chennai,TamilNadu,India.
98413 27002
|
|
|
|
|
Hi
I creat new thread and run it:
System.Threading.ThreadStart st = new ThreadStart(MyRunig);<br />
tr = new Thread(st);<br />
tr.Name = "MyThread";<br />
tr.Start();<br />
at MyRunig :<br />
System.Windows.Forms.Application.Run();
so I have the new thread with window Q.
How can I send message from the main Thread (GUI) to the new one?
I am looking for Event driven mechanism
I used:
public void SendMyMessage()<br />
{ <br />
PostThreadMessage(fr.Handle,1122,(System.IntPtr)0,(System.IntPtr)0);<br />
} this is the way to send message?
<br />
[DllImport("User32.dll")]<br />
public static extern bool PostThreadMessage( System.IntPtr idThread, int msgID,System.IntPtr pm,System.IntPtr lm);
But I didn't get the message ( with WndProc )
Thanks
Koby
|
|
|
|
|
If you want to call functions on controls belonging to the other thread then you have to define a delegate for each of these functions (for each different method signature at least) and then use Invoke() or BeginInvoke() with these delegates.
Take a look at Control's members for a description of these tunctions.
mav
|
|
|
|
|
Anyone know of an easy way to input dates in the CF platform?
I have a form with a few text edit fields.
The users will probably fudge it up and try wrong formats, etc.
All I can see for now, is breaking up the text, and using "new DateTime(y, m, d)"
Thanks.
"For all of our languages, we cannot communicate" - Christy Moore, Natives
|
|
|
|
|
I've found the answer:
DateTime.Parse
DateTime.ParseExact
"For all of our languages, we cannot communicate" - Christy Moore, Natives
|
|
|
|
|
I have a button on my form. i want to raising the button`s click event.
|
|
|
|
|
Since no-one else seems to answer, I'll jump in:
Very easily by calling myButton.PerformClick();
But beware PerformClick(): It only works when the button is selectable.
When you for example derive a control from button and set its control style to Selectable==false, then PerformClick on this control will have no effect.
Regards,
mav
|
|
|
|
|