|
I am working in the compact framework.
I have an ATL/COM library that creates a bitmap. I need to pass the bitmap to a C# program and display it. We have tried creating the bitmap in C# with GDI methods then used the APIs for CompatibleDCs, selectobject, getHdc, etc and passed the DC to the ATL object. On returning it from the ATL object I get ExceptionHandling errors relating to memory when I try to get a bitmap I can use in managed code. We have been able to pass the DeviceContext and draw directly on it but I want to retrieve a bitmap that I can cache as a member variable in my class.
Has anyone successfully passed bitmaps back and forth between managed and unmanaged code?
|
|
|
|
|
when i run my C#.net windows form means the following error is display.
"The type or namespace name 'keys' could not be found (are you missing a using directive or an assembly reference?)"
how to clear this error?
|
|
|
|
|
Someplace in your code you either have using keys or in the code you have keys.
You need to provide a reference to the dll that the keys namespace / object exists.
Go to references right click and add a reference.
Or remove the code that has keys in it if it is not needed.
Ben
|
|
|
|
|
Remember that C# is case-sensitive. You have to write Keys if you're referring to the framework's built-in class.
|
|
|
|
|
Hi,
I have already made this but i just cant do it again!! I'm missing something.....
What do i need to do in order to have a ok button to close a form?
What i have done was:
- Create a button in a form and give it a name (btnOk)
- Go to form properties and select btnOk in AcceptButton property
What do i need to do more?
Thx,
Nuno
|
|
|
|
|
Do you open the form using ShowDialog ?
---
single minded; short sighted; long gone;
|
|
|
|
|
Yes, i open it using ShowDialog()
Nuno
|
|
|
|
|
Add an EventHandler for this button click event and call
this.Close();
in that method.
Cheers,
Suresh
|
|
|
|
|
Hi,
Doing that the form closes but there isnt a result from it.
Nuno
|
|
|
|
|
Create a button.
Double click it in the sub section (function that appears), type this
this.Close();
Keshav Kamat
India
|
|
|
|
|
Hi,
Visual studio is saying that it doesnt know the method close.
You know, i'm thinkinhg this is very strange since i have already done something which i only had to tell in the mainform who was the accept button, and now i can't do it for this case.
Thx,
Nuno
|
|
|
|
|
Hi
In my C# project i use COM library, and want to invoke some properies of COM objects
dynamicly (using Reflection), but i can;t do this in standard way (because every com object have
RuntimeType Type and not Type of COM class) How i can to do this.Thank;
|
|
|
|
|
I have a wacom graphics tablet / pen pad. Is there a way to capture the signature with c#? Thanks.
|
|
|
|
|
There's always a way, but how it's done should be covered in the SDK for the pad. There's nothing in the .NET BCL that's going to "do it for you". I have no idea how it's going to be done, but it would depend on how the PC talks to the pad, be it Serial Port or network or USB.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Windows Presentation Foundation (WPF) has a number of APIs for receiving input from a stylus. Check out InkCanvas[^].
|
|
|
|
|
I was thinking it was something like a credit card signature pad! :->
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
I have been developing for a while now, mostly in VB. But now I have seen the light and joined the C# parade.
Anywho, is there a difference between the functions and use of string. functions and String. functions? I use .Empty , .IsNullOrEmpty , and .Format all the time. Does it really matter if I use string. or String. ? I know that one is a type, but besides the color in VS, what is the difference, and should I use one or the other?
Success is the happy feeling you get between the time you do something and the time you tell a woman what you did.
--Dibert
|
|
|
|
|
string is a C# keyword that is an alias to System.String.
If you have "using System;" in your file and you don't have any other class named String, then String (the class) and string (the C# keyword) are equivalent. Otherwise String may refer to your own String class, while string always refers to the built-in string class.
Another difference: you may use String as a name for local variables (if you like to confuse people reading your code), but string is reserved.
But normally using string or String makes no difference, both compile to the same IL.
|
|
|
|
|
I've always been told to always use the lower case as it makes it easier to read on others who are viewing your code (unless they come from jave)! Also, you should learn all about string builders. They are the best item for creating multi component strings and they only are created once, not every time you add another string element.
Sorry for the diatribe.
_____________________________________________________________________
Our developers never release
code. Rather, it tends to escape, pillaging the countryside all around.
The Enlightenment Project (paraphrased comment)
Visit Me at GISDevCafe
|
|
|
|
|
I would not recommend writing your own String class; too confusing !
|
|
|
|
|
There really isn't any difference. string is the C# alias for System.String , which is the actual CLR data type.
I personally use string when declaring variables and String when calling functions (like .Empty , .IsNullOrEmpty , and .Format ) as I think it makes it a little clearer; but that is simply personal preference and string.Format is exactly the same as String.Format .
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
String may refer to your own class, string refers to the inbuilt string class
Keshav Kamat
India
|
|
|
|
|
Hi Guys -
I am having problems dragging and dropping controls on my forms in VS2005. Nothing is locked and I am able to move them if I go into the properties window and manually change their position...but it won't allow me to grab them and move them around
|
|
|
|
|
This is just a guess, but is your app running. If you app is running I think it locks the from even through you can still see it.
Ben
|
|
|
|
|
Hi.
When the new webbrowser in .NETCF 2.0 is loading, a progress bar is displayed at the base of the control.
Does anyone know how to stop this from appearing?
I'm only using the control as a HTML viewer, so I really don't want to see the progress bar everytime I send new information to the page.
Thanks.
|
|
|
|