|
I got it.I have to use DataGridTextBoxColumn instead.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
i've added a com component to draw charts in my application, but i can find anywhere in the help the functions associated with this control!!!
doudou
|
|
|
|
|
I not sure which is the best forum to place this question in so I will start here.
I have an web application that has a business logic layer consisting of serveral files in c#. I want to expose some of those methods in the files via a web service. I belive I can expose them using the [WebMethod] attribute. Now, I can also generate an asmx (web service)file for the web services but I can not for the life of me figure out how the asmx file is supposed to find out about the webmethods in the business logic layer.
Any suggestions.
I can easily create an asmx file and write the code directly into the file but that defeats the purpose (i.e. now I have the same logic in two places) Please any help would be great.
|
|
|
|
|
The .asmx can be created in VS.NET where you can create a Web Service. The beauty in this is that you should also be able to allow VS.NET to create the wdsl portion, which exposes the methods available through the web services. Take a look at the wsdl that Chris has created for the XML web service that is up and running now. Code Project WSDL Contents
HTH
Nick Parker
|
|
|
|
|
Hi Nick,
Yes I understand that and have been able to do just that. My question is how does one create a web service (asmx file) that supports multiple classes in different .cs files? When creating an asmx file, you can associate a codebehind page but it seems to be able to support only one .cs file and one class. I want the codebehind page to show multiple cs files and multiple classes. (Does this make sense?) Can this be done?
I might be missing something here so if you can elaborate, that would be great.
For example, the link that you provided for the codeproject web service provides an asmx file in which the methods all reside in a single class. What I want is the ability to support mehtods from multiple cs files and choose multiple methods from classes within those cs files. Hopefully this makes sense.
|
|
|
|
|
Is there an alternative to the Win32 API function GetAsyncKeyState(...) in C#???
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
Hi Rickard,
When I ported Joe's AutoRepeat class I had this same issue too. I couldn't find anything equivalent. For all I know, there might be a not so well known class, that does just this. But I believe it's not there.
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
Rickard,
Found it!!! It's amusing that I didnt find it when I wanted it, but I found it when I was just looking at random
Control.ModifierKeys Property is what you want
if ((Control.ModifierKeys & Keys.Alt) == Keys.Alt)
{
\\Alt key is down
}
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
That only gives you the modifier keys though, leaving out the other non-modifiers; from MSDN "Gets a value indicating which of the modifier keys (SHIFT, CTRL, and ALT) is in a pressed state."
James
Simplicity Rules!
|
|
|
|
|
Oh well. I guess I celebrated too soon.
Back to the drawing board gentlemen.
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
How to show a modal form!?
Form2 MyForm = new Form2();
MyForm.Show(); // This is a modeless.... but I want modal!!
Hope you understand and can help moi!
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
Try ShowDialog() instead.
--
Andrew.
|
|
|
|
|
when i click the window form's minimize box!
how to minimize it to tray icon(when the app is started,the app tray icon is displayed)!
and then how to display it again!
is the notifyicon's contextmenu event click-form1.show() enough!
the vs.net and c# is all new to me!
so if anyone knows,please tell me.thanks!
|
|
|
|
|
I'm trying to add a preview to my screensaver, but no matter what I do to the string coming in ( which should be a HWND ), I cannot get a graphics object that I can draw to - the preview window stays black. Any suggestions ?
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
In this mode, you should be drawing using screen coordinates.
I would check that...
|
|
|
|
|
That was weird, I tested that this morning and now it wants client coordinates???
|
|
|
|
|
I was using Graphics.Clear, and also FillRectangle to fill a HUGE rectangle so that my problem was not related to coordinates, because the screensaver preview window is pretty small.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
What I have working is this:
I am getting the HWND and the Graphics object with something a little more robust but equivalent to:
IntPtr hWnd = (IntPtr) uint.Parse(args[1]);
.
.
.
Graphics g = Graphics.FromHwnd(hWnd);
.
.
.
I call GetClientRect on the hWnd, and use that for all of my drawing...
|
|
|
|
|
How do I call GetClientRect in C# ?
This does not work for me:
if (args[0] == "/p")
{
IntPtr hWnd = (System.IntPtr)uint.Parse(args[1]);
Graphics g = Graphics.FromHwnd(hWnd);
g.Clear(Color.Orange);
}
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
If you create a Control from the hWnd you can use that.
Control previewWindow = Control.FromHwnd(hWnd);<br />
Rectangle rect = previewWindow.ClientRectangle;
BTW, just picked up a Radeon 7500 (dual-head) so I can use dual monitors now
James
Simplicity Rules!
|
|
|
|
|
James T. Johnson wrote:
BTW, just picked up a Radeon 7500 (dual-head) so I can use dual monitors now
Yummy - looks like I got the dual monitor support into the screen saver just in time.....
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
This code:
IntPtr hWnd = (System.IntPtr)uint.Parse(args[1]);
Graphics g = Graphics.FromHwnd(hWnd);
Control previewWindow = Control.FromHandle(hWnd);
Rectangle rect = previewWindow.ClientRectangle;
SolidBrush brush = new SolidBrush(Color.Orange);
g.FillRectangle(brush, rect);
Gives me a Null reference error, leading me back to the belief that I am unable to parse the hWnd in a meaningful manner.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Christian Graus wrote:
leading me back to the belief that I am unable to parse the hWnd in a meaningful manner
If this statement was true, my code wouldn't be running...
Take a look at the API definition I posted to the other part of this thread.
Regards
|
|
|
|
|
It's obviously working for you, but are you doing it in the context of the screensaver preview ? If you are, then I have no idea why I cannot get it to work for me. If I have a valid HWND in my variable, why can't I use the code I posted to get it into a control ?
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Yes, I am drawing in the context of the preview from the screen saver tab of the desktop properties.
I am not using a control, you don't need it in the preview mode.
|
|
|
|