|
|
|
|
Getting value from stuff you don't own is a compelling
idea. Just think, someone else has created something
that has value, and has made it available to you. You
can now leverage its value in ways that makes all
parties richer. That's the promise of web services.
You need to know about web services. The advent of
standards-based web services marks a new era of
system development. First mainframe, then client-server,
the Web, now web services makes it possible to leverage
every legacy system of the past and do so much more
with your information assets.
Architag Press, a division of Architag International
Corporation, announces the publication of Web Services
Implementation Guide, Volume 1: Getting Started, by
Brian E. Travis and Mae Ozkan.
Sample chapters of the book is available at
http://www.architag.com/press/wsig.
This book will show you what a web service is, and
how you can align your internal systems and external
trading partner interactions to take advantage of this
new concept in system integration.
You will learn about the "Three Steps to Web Services":
* Automate internal systems
* Determine integration points
* Expose integration points as web services
This book is for systems architects, developers,
and I.T. decision makers.
Highlights in this book:
* Written in a light, entertaining style.
* Emphasis on architectural design for web services.
* A tutorial on the state of web services standards.
* Plenty of real-life examples of web service use.
* Tutorials on the key technologies: XML, SOAP,
WSDL and UDDI.
* Code samples of key XML-based web services
technologies and extensions.
* Companion Web site with all code samples and
late-breaking information.
----
Download sample chapters of Web Services Implementation
Guide at http://www.architag.com/press/wsig/.
Stanford Powers, Publisher Architag International Corp
Phone: 866-898-0001 Outside US: +1-303-426-3126
Email: spowers@architag.com Fax: 720-294-1396
|
|
|
|
|
How do I set the IsDefault property to True so that the Button is the default button of the form?
the IsDefault is a protected property, and its inheritted from ButtonBase.. so you can't set it to True
any ideas?
thanks
~Dan
--------------------
If anyone else doesnt know, the property to use is the AcceptButton of the form.
ex: this.AcceptButton = button1;
|
|
|
|
|
It's actually a property of the form now - AcceptButton and CancelButton. IsDefault is readonly and returns true if this button is the forms .AcceptButton. These can be set through the form designer or code.
|
|
|
|
|
I'm working on a c# application and i'd like to get it launchable from Microsoft Word using a new icon. The problem is I don't know how to do, I've been searching throw articles but they often explain how to launch and control Word from an application and not the contrary.
Could someone explain me how to do such a thing, or at least give me a few steps ?
Thank you.
---------
Or not ?
|
|
|
|
|
Can everyone explain me the following lines?
<br />
GCHandle handle = GCHandle.Alloc( savedArray, GCHandleType.Pinned );<br />
int scan0 = (int) handle.AddrOfPinnedObject();<br />
scan0 += (h - 1) * stride;<br />
Bitmap b = new Bitmap( w, h, -stride, PixelFormat.Format24bppRgb, (IntPtr) scan0 );<br />
handle.Free();<br />
What does the GCHandle object? Can I use the "fixed" keyword instead, to get the adress of "savedArry"?
|
|
|
|
|
Can you tell me where the code comes from, and what it's trying to do?
|
|
|
|
|
The code comes from the "SampleGrabberNET" sample on http://www.codeproject.com/useritems/directshownet.asp.
The code should save a memory-image with the Bitmap object.
|
|
|
|
|
I think you should be able to rewrite this as:
Bitmap b;
fixed (byte* pByte = savedArray)
{
IntPtr bits = new IntPtr(pByte + (h - 1) * stride);
b = new Bitmap( w, h, -stride, PixelFormat.Format24bppRgb, bits );
}
If you knew the size of the bitmap, you could also create a new one that size, use LockBitmap to get to the bits, and just copy the memory across.
|
|
|
|
|
I am writing a class that overrides Control and utilizes the non-client area. I need to be able to have hotspots within the non-client area. However, because of what seems to me to be unusual behavior, I am not able to get it working.
I override WndProc to intercept WM_NCMOUSEMOVE and WM_NCPAINT (as well as WM_NCCALCSIZE, WM_NCHITTEST, and WM_LBUTTONDOWN/UP) as follows:
(Please don't flame me for posting VB.NET code. I use both interchangably as they are pretty much the same thing anyways. It just so happens that I wrote this in VB.NET. I posted here because I would guess that C# programmers know more about the Win32 API than VB.NET programmers, and my questions have nothing to do with VB.NET)
Protected Overrides Sub WndProc(ByRef msg As Message)
Select Case msg.Msg
Case 131 'WM_NCCALCSIZE
...
Case 132 'WM_NCHITTEST
...
Case 133 'WM_NCPAINT
Dim dc As Integer
dc = GetDCEx(msg.HWnd.ToInt32(), msg.WParam.ToInt32(), 65536 + 128 + 1)
Dim hdc As IntPtr = New IntPtr(dc)
Dim g As Graphics = Graphics.FromHdc(hdc)
OnPaintNonClient(New PaintEventArgs(g, Rectangle.Round(g.ClipBounds)))
ReleaseDC(msg.HWnd.ToInt32(), hdc.ToInt32())
Case 160 'WM_NCMOUSEMOVE
Dim pt As PointL
pt.x = msg.LParam.ToInt32() Mod 65536
pt.y = msg.LParam.ToInt32() / 65536
Dim ppt As IntPtr = Marshal.AllocHGlobal(8)
Marshal.StructureToPtr(pt, ppt, False)
ScreenToClient(msg.HWnd.ToInt32(), ppt.ToInt32())
pt = Marshal.PtrToStructure(ppt, GetType(PointL))
Dim args As MouseEventArgs = New MouseEventArgs(MouseButtons.None, 0, pt.x, pt.y, 0)
OnNonClientMouseMove(args)
Marshal.FreeHGlobal(ppt)
Case 161 'WM_NCLBUTTONDOWN
...
Case 162 'WM_NCLBUTTONUP
...
Case Else
MyBase.WndProc(msg)
End Select
End Sub
Protected Overridable Sub OnNonClientMouseMove(ByVal args As MouseEventArgs)
If ... Then 'Test hotspots
...
PostMessage(Me.Handle, 133, 0, 0) 'WM_NCPAINT
End If
End Sub
Protected Overridable Sub OnPaintNonClient(ByVal args As PaintEventArgs)
...
End Sub
There are no problems painting the non-client area for resizes, max/min, etc. Intercepting WM_NCMOUSEMOVE and testing for mouse-overs on my hotspots works fine. However, the weird thing is that when my code does the PostMessage call, the WM_NCPAINT message never reaches WndProc .
Does anyone know what is going on?
Does Windows.Forms not send every message on to WndProc ?
Do I have to do something with PreProcessMessage ?
Can what I am trying to do actually be done in Windows.Forms?
Thanks.
|
|
|
|
|
I tried something else out that gave me strange results as well...
Instead of using PostMessage , I switched to using SendMessage . The WM_NCPAINT message is now reaching WndProc , however, the strange thing is that the drawing that I do there does not show up.
The drawing code works fine in response to WM_NCPAINT messages caused by resizes, min/maxes, etc...
Any ideas?
|
|
|
|
|
|
give it a Browsable(false) attribute.
|
|
|
|
|
I tried this and I thought it did not work. I'l try again.
|
|
|
|
|
I tired this and it did not work. I think I need to add that the property I am trying to hide is not one that I added, but rather one that is available via the control that I inherit. I don't want the user to be able to change the property so I need it hidden.
|
|
|
|
|
You could override the property in your control and then just call the base.property.
Example hiding Label.Text or something similiar:
[Browseable(false)]
public override string Text
{
get{ return base.Text; }
set{ base.Text = value; }
}
This would allow get/setting of the property but it would be not be seen in the property grid.
Later,
Nathan
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
On my MDI Parent Form or SDI Parent Form if I have any control i.e. push button, label etc. When I call my child form those parent controls still there? Anybody knows why, I will be thankful if somebody helps me in that.
Thanks in advance.
|
|
|
|
|
Okay its not a bug if you set your WindowState property to Maximize of Child Form it will behave in a way it required. Finally I found this.
|
|
|
|
|
I have a program that connects to a Web Service to authenticate a user.
When the user clicks ok the program access the Web Service through the
internet.
This actually seems to FREEZE the program until it has finished, how can I
solve this problem?
It's really not a good user interface like now!
I mean maybe I could make like when you are loggin in in MSN Messenger, but
how to do it?
Thankx!
"Nelle cose del mondo non e' il sapere ma il volere che puo'."
|
|
|
|
|
What you are seeing is that all the work is being done on one thread, including all the waiting that you have to do while you wait for the webservice to respond.
The solution is to use an Async method or a separate thread. The Async method will use a separate thread but it takes care of all the work for you; while you have to do all the work to use a thread yourself.
If I remember correctly the code that the "Add Web Reference" option generates includes some Async methods. The Async methods begin with Begin and End followed by the name of the method.
Using a method from the CodeProject webservice
ArticleBrief[] GetLatestArticleBrief(int NumArticles);
The Async versions of this method are:
IAsyncResult BeginGetLatestArticleBrief(int NumArticles, AsyncCallback callback, object asyncState); and
ArticleBrief[] EndGetLatestArticleBrief(IAsyncResult asyncResult);
Typical usage is as such
IAsyncResult iar = BeginGetLatestArticleBrief(numArticles, null, null);
if( iar.IsCompleted )
{
articleBriefs = EndGetLatestArticleBrief(iar);
}
else
{
}
Since you wouldn't be doing anything else while the user is logging in I would do this:
IAsyncResult iar = BeginLoginUser(username, password, null, null);
while( !iar.IsCompleted )
{
Application.DoEvents();
}
This is only a brief intro and a limited way of doing things, MSDN contains an entire section on Asynchronous programming which you should read before going much further.
If you use the MSDN that came with VS.NET I found the topic by going to the following nodes: Visual Studio.NET -> .NET Framework -> Programming with the .NET Framework -> Including Asynchronous Calls
HTH,
James
"Java is free - and worth every penny." - Christian Graus
|
|
|
|
|
How is late binding done in C#? I'd like to allow for the registration of 'pluggins' (used loosly) for an automation tool for Source Safe. IE as I come across a file type, the appropriate class/library which implements the correct interface is loaded and used to process the file...
|
|
|
|
|
your plugins should implement an interface, which means you don't have to late bind anything beyond checking and casting to the interface.
VB implements its latebinding using reflection behind the scenes (InvokeMember i suppose), which you can do manually in c# if you want.
|
|
|
|
|
But I don't want to have to recompile the code after each time or create a switch/if for each type
ie I don't want to do this
IVSSCheckout itemHandler;
switch (fileExt) {
case "asp":
IVSSCheckout itemHandler = new ASPHandler(); //tight bind is problem
case "cls":
IVSSCheckout itemHandler = new VBFileHandler();
case "cpp":
IVSSCheckout itemHandler = new VCPPPHandler();
}
I would rather do something parallel to:
className = GetFromRegistry( fileExt )
itemHandler = CreateObject( className )
I could very well be missing something quite simple and fundamental as I have just moved into .Net languages from C++ and VB.
|
|
|
|