|
Dan Smith wrote:
Is this posible?
Yes
Dan Smith wrote:
If so, how?
There are several different ways of doing this and what you use depends on your requirements.
The easiest way is to expose a webservice on your server and have the WinUI use it. There is a section on webservices which may enlighten you on how to create them, if you're using VS.NET they're easy to use as well (right click on the WinUI project and choose Add Web Reference, then point the mini-browser to your deployed web service).
By default web services are stateless, but it should be possible to use the ASP.NET Session stuff to persist bits and pieces.
Your next option is to use Remoting. Remoting is a bit harder to put together and use, but it is more powerful as well. Nish wrote a good article on the basics of remoting. http://www.codeproject.com/csharp/absoluteremoting.asp[^] You may also want to check out the sample chapter from Ingo Rammer's book for a bit more indepth look Advanced .NET Remoting[^].
Good luck,
James
- out of order -
|
|
|
|
|
Start with building a ASP.NET Web Service. This class will be your Facade, and will invoke your business rules, and data access layers. If your architecture supports .NET code on both client and server, you can pass managed DataSets across the boundry, which will make both sides easier to write. From what I understand, you UI will be a System.Windows.Forms application. You add a web-reference to your ASP.NET Web Service to that project, and invoking methods on the facade will be a breeze.
For example, the UI want's to start with a list of customers. It calls a method on the facade: GetCustomerList( string territory ) which returns a DataSet. Behind the facade, you've got business rules that check if the user is authorized for that territory, etc. Once validated, a data access layer pulls a limited set of fields needed for this list out of the databse, limited to the specified territory, and returns it as a DataSet. This list might have just Customer Name, City, State, ZIP and ID.
Back on the client, you can drop that dataset write into a grid control to format, scroll, etc. Without round-tripping, you can sort of any of the fields. Once the user selects a customer, you call another facade method: GetCustomerDetails( string customerID ) which also returns a DataSet. If changes are made, call facade method UpdateCustomerDetails( DataSet details ).
Hope that gets you started...
Burt Harris
|
|
|
|
|
Burt Harris (msft) wrote:
From what I understand, you UI will be a System.Windows.Forms application. You add a web-reference to your ASP.NET Web Service to that project, and invoking methods on the facade will be a breeze.
Absolutely, here is a plug for my most recent article that cover how to do this: Cross Language Web Service Implementation[^], which includes a Windows Forms Web Service consumer application.
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
|
|
|
|
|
I have a MSI installer for my system. It's running smoothly on several machines, but in one specific machine, it isn't working. The MSI installs several ServicedComponents with custom install actions. Some of the ServicedComponents call COM components and apparently everything is fine and registered ok. But in this specific machine, the installer starts and goes until it shows the following error:
Install Error: Failed to generate type library 'c:\program files\crivo\drivers\bin\DriverBalanceamento.tlb'
for 'DriverBalanceamento, Version=1.0.1069.31940, Culture=neutral, PublicKeyToken=b8bf1c10d7a7a24d'.
Install Error: There is no MTS object context
I see dumb people
|
|
|
|
|
|
For future reference, if someone have the problem:
What I needed to do to solve it was:
(the order HAS to be this: )
1. uninstall the .MSI
2. uninstall the .NET framework
3. reinstall the .NET framework
4. apply .NET framework SP2 (don't know if it's required, but I did this way just to be safe)
5. reinstall the .MSI
The tricky part was (1) to uninstall the .MSI, since it was giving the same message when uninstalling. So, the solution was to use a .MSI without the custom actions which install the COM+ components, mantaining the MSI version number and product code. Use this MSI to remove the faulty application. The rest seems necessary to rebuild the GAC again.
I see dumb people
|
|
|
|
|
After install .Net framework, the programme also can't run right( mfc70.dll is not include in framework ). is that other components need install?
|
|
|
|
|
I hope you don't believe MFC has anything to do with the .NET run-time.
|
|
|
|
|
I'm trying to get my hands on the beta2 version of the .NET Compact Framework. Unfourtunatly, it is only available with VS.NET 2003 (VS.NET 2002 will not support smart device extentions).
You'd think after spending about $1000 for MSDN Subscription Professional edition, I could at least get a copy of VS.NET 2003 beta. For some reason, MS chose to only make it available to Universal subscribers, not fair! When I signed up for MSDN Pro, I was told I would get access to all beta versions of operating systems, sdks and visual studio.net.
If anyone can comprehend MS's thought process, please help me out.
|
|
|
|
|
$$$$$ is all that matters to M$. And Bill needs some more since he keeps givig BIG$ away to organizations and nations that don't want it....
R
|
|
|
|
|
And giving away BIG$ is a fantastic tax write-off.
|
|
|
|
|
|
Hi!
There is a need to create a custom run-time form designer under .NET. It
should be pretty similar to the Visual Studio's own designer. Is there any
control providing such functionality? (I tried to pull out smth from Visual
Studio -- no luck).
Could somebody help me?
Thanks!
Regards,
John Wood
|
|
|
|
|
Let's say I have 3 classes.
Class 1 needs to create an instance of Class 2 or Class 3 depending on some evaluation. All three classes reside within the same assembly.
When Activator.CreateInstance() is called does the loaded type get re-jitted even though the caller is in fact the same assembly and has already been jitted?
Just wondering
Any thoughts on this would be appreciated!!!
Jarrod
|
|
|
|
|
JarrodM wrote:
When Activator.CreateInstance() is called does the loaded type get re-jitted even though the caller is in fact the same assembly and has already been jitted?
Unless you run the ngen utility on your assembly, JITting takes place on a method by method basis. So the JIT should only occur once per method.
James
- out of order -
|
|
|
|
|
So each time I call a method for the first time on one of these classes newly instantiated by reflection it will JIT?
Jarrod
|
|
|
|
|
Sorry, I meant to add that bit in but forgot
This part is tricky for me to word so please accept my apologies before hand.
JITting occurs when one of a few things happen: A method is being run for the first time, the underlying IL of an already JITted method has changed, or in certain circumstances the native code produced by ngen will be ignored (ASP.NET is one case). There are also some Debug/Profiling methods that will perfrom a re-JIT.
Unless you are causing the JIT by running ngen, the native code generated will be tossed out after the Assembly has been unloaded. The native code generated is also AppDomain specific, so if you have two AppDomains each loading the same assembly then each method will be JITted once for each AppDomain.
Now in your case, the JIT will only occur the first time each method is used, regardless of whether the object using that method is created by Reflection or regular code.
James
- out of order -
|
|
|
|
|
I have a strange problem with a custom control (derives from System.Windows.Control). I've added code to the protected OnKeyDown and OnKeyUp methods of my control to handle up/down/left/right keypresses.
The keys work great most of the time. The one case where they do not work is when my control is used with the System.Windows.Forms.ListBox control. The listbox kills the focus on my control, preventing any keypress events from fireing. Sometimes the listbox takes the focus itself, sometimes not.
Any ideas on what the deal is? Thanks.
|
|
|
|
|
Jon Rista wrote:
The one case where they do not work is when my control is used with the System.Windows.Forms.ListBox control.
What exactly is the relationship between your custom control and the listbox? Is on embedded within the other, are you superclassing, are they siblings on a form...?
|
|
|
|
|
They are siblings on a form.
After more testing, this seems to be a .NET issue. By default, .NET seems to shift focus when the arrow keys are pressed down. Focus is automatically taken from one control and moved to the next until it hits a control that can keep the focus. For example, if you put a button, a checkbox, a textbox, and a radio button on a form, in top-down order, you can try this:
Click the button. Press down arrow three times. You will see the focus shift from the button, to the checkbox, and stop at the textbox, never reaching the radio button. Somehow the textbox is keeping the focus, although how I do not know.
I need to figure out what .NET does that prevents a custom control derived from the Control class from keeping focus once it has it. Well, rather, keeping focus when the arrow keys are pressed, it keeps focus for all other key events.
|
|
|
|
|
is there any facility available in VISUAL STUDIO .NET editor
to get the class diagram of a given project
|
|
|
|
|
No, you'd have to use Visio 2002 as well in order to get the class modeling features you want.
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
Microsoft has reinvented the wheel, this time they made it round.
-Peterchen on VS.NET
|
|
|
|
|
I've been playing around with the graphics object's transform functions (scale,rotate,translate). While they are useful functions for doing static drawing, they seem to be inefficient when used in a more dynamic drawing environment.
For example, when I need to move images across the surface of a large, background image, and I use ScaleTransform to properly scale all the various components being drawn, the drawing is much more sluggish than when I simple handle the scaling the old-fashioned way (pre-calculate the values and draw all the bitmaps to a scaled rectangle as when BitBlting or strechtblt ).
I am placing the ScaleTransform in my paint function. I see no way to use the Transform functions in the same way that the old Win32/gdi MapMode functions were used (set them once and they are applied on every paint).
Is there something I am missing about how to use the Transforms, or am I just expecting more from them than was intended?
"Any clod can have the facts, but having opinions is an art."
Charles McCabe, San Francisco Chronicle
|
|
|
|
|
Hi,
I don't know if this is the correct forum, but let's try...
I have some componente written in VB.Net that is called by ASP pages.
All of them works fine except for one that gives me the "class doesn't support automation" error message. The only help that I've got was "try to contact the application vendor"...
Running it interactively, I have another error message that I'm trying to work around ("The root transaction wanted to commit, but transaction aborted"), but this is a ContextUtil problem.
All the components have the same imports and inherits clauses and same properties in the packages. Any clue?
Thanks in advance,
Molina.
|
|
|
|
|
If you do, what do you end up with?
I assume that you end up with nothing, and the GC eventualy will take care of anything that gets created in the constructor up until the exception gets thrown.
Am I mistakin'?
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
Unknown wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|