|
Prabhanand Nagarajan wrote: I need my .net application written in vb.net to communicate to or process a application that runs on a mainframe system.
Your .NET application runs on a PC, your mainframe app runs on a mainframe. The only way I know to communicate from one to the other is via some communication method such as sockets, serial port etc.
MVP 2010 - are they mad?
|
|
|
|
|
Maybe COBOL.NET fits your needs?
Learning without thought is labor lost; thought without learning is perilous. (Confucius)
|
|
|
|
|
Hi folks,
I'm in need of your advice. I'm trying to create a screenshot from a c# application. This works well as long as I use my code within a standard desktop application. What we really need is a windows service taking screenshots. I tried Graphics.CopyFromScreen and the code in here Capturing the Screen Image in C# to grab an image but all I get back is a black image. Not even the dimension is correct.
The service was started with LocalSystem and desktop interaction allowed.
What did I miss? Any hints?
I can provide the sources If it helps...
Thank's in advance and best regards,
Stevie
Greetings,
Stephan Eberle
hawke@deltacity.org
|
|
|
|
|
As far as I know, starting with Vista, interactive
services aren't allowed.
Can you run a windowless app in the user session?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi everybody,
i'm currently developping a website using 3 tier architecture, i've been requested that the controls of the presentation layer should be loaded and customized via an XML file. To behonest i'm new to XML and I made some researches and i didn't succeeded.
Could anyone help me with this either by providing an example or some document?
shold i use teh web.config file?
thank you in advance for your usual help
|
|
|
|
|
|
thank you for your answer,
is there any other way without using the XSLT file ?
|
|
|
|
|
Sure, you could write the parsing and interpreting of the XML yourself (C# whatever) and incorporate it in your application.
However XSLT is specific to XML input so it's a natural candidate if you want to generate HTML on the fly.
The example I sent you uses a pattern.
If your pages do not exhibit such patterns it will become harder to customize using XML.
michael_jhons wrote: the controls of the presentation layer should be loaded and customized via an XML file
That's kind of an unbounded requirement.
What must be customized?? Position? Colour? Size?
Maybe just stylesheets will do the trick for you.
Dependent on the actual requirements you can make a choice how your solution will look like.
|
|
|
|
|
thank you for your help, i'll give it a try
|
|
|
|
|
As an afterthought, did they/you perhaps mean XAML?
Then your UI would be based on SL.
modified on Thursday, January 21, 2010 2:58 PM
|
|
|
|
|
requesters only mentioned XML, but of course i can use any methode that lead to a successful result
thanks
|
|
|
|
|
Dear Estys,
i just finished applying the method you provided, i faced a little problem,
it's while i'm loading,i'm also populating the radioButtonlist from a datatble, the RadiobuttonList is created using the xslt file,so an error is shoing to all using controls in the Default.aspx.cs file is "the name 'control's ID' does not exist in the current context"
so how could i use controls in this context?
thank you again for your help.
|
|
|
|
|
Hi,
I think I've read about it before butnow I'm needing it, I can't find anything about it.
How can I specify the xml deserialization order? Let me give an example. Imagine I have 3 parts in my class "School": classes, professors and students. I need to deserialize the following order (classes->professors->students) no matter how they are written in the xml.
Thanks in advance.
|
|
|
|
|
Mehdi_S wrote: How can I specify the xml deserialization order?
By specifying the Order using the XmlElement attribute, similar to this;
public class OrderedClass
{
private int field1;
private string field2;
private string field3;
[XmlElement(Order = 3)]
public string Field3
{
get { return field3; }
set { field3 = value; }
}
[XmlElement(Order = 1)]
public int Field1
{
get { return field1; }
set { field1 = value; }
}
[XmlElement(Order = 2)]
public string Field2
{
get { return field2; }
set { field2 = value; }
}
public OrderedClass()
{
field1 = 1;
field2 = "String1";
field3 = "String2";
}
}
The example is taken from MSDN[^], where you can download a sample application[^].
Good luck
I are Troll
|
|
|
|
|
Thanks a lot. that helps much. just anaother question related to the same topic: knowing that I can define the set of types that a set can contains, can I specify the order of types deserialization. For example, I have the classes student and professor that inherit from the class person.
the class persons contains the following set
[xmlarrayitem("Student", typeof(Student)),xmlarrayitem("Professor", typeof(Professor))]
[xmlarray("PersonsSet")]
public Person[] PersonsSet
{
get;set;
}
How can I specify that the professor elements has to be all deserealized before the student elements no matter how they are ordered in the xml document.
Thanks in advance.
|
|
|
|
|
Mehdi_S wrote: How can I specify that the professor elements has to be all deserealized before the student elements no matter how they are ordered in the xml document.
Taking your example; there's a difference in getting an order in the properties and getting an order in the items within the collection. You can change the order of the properties by adding those tags to the Person class. The collection would be serialized using that information.
Implementing ISerializable [^] or even IXmlSerializable [^] would be more appropriate for complexer structures. That way you can control the order of the properties and the data. There's a really nice CodeProject article on IXmlSerializable here[^].
Good luck
I are Troll
|
|
|
|
|
Hi I'm Creating a DLL File "Fr6Customise.dll" and Code is
Imports System
Namespace Fr6Customise
Public Class LoadModule
Public Shared Function ViewModule() As Boolean
Return True
End Function
End Class
End Namespace
----------------------------------------
Now I am using that dll in my project whenever needed...
Dim CAssembly As Assembly = Assembly.LoadFrom(My.Application.Info.DirectoryPath & "\" & "FR6Customise.dll")
Dim scriptType As Type = CAssembly.GetType("Fr6Customise. LoadModule")
Dim mi As MethodInfo = scriptType.GetMethod("ViewModule")
But, when I am using this Code scriptType always return Nothing. There is any error found in this Code.
How Can I Solevd It. Pl, Help me.
Arindam Banerjee
Sr. Software Developer
Rance Computer Pvt Ltd.
Kolkata (India)
|
|
|
|
|
...
Dim scriptType As Type = CAssembly.GetType("Fr6Customise.Fr6Customise.LoadModule")
....
That works for me, it's the fullname of the type
|
|
|
|
|
No, its Return "Nothing"
Can You Just Email me Your Code.My Email ID : webarindam@gmail.com
Arindam Banerjee
Sr. Software Developer
Rance Computer Pvt Ltd.
Kolkata (India)
|
|
|
|
|
Look in your application properties (of Fr6Customize)
The value of your "Root namespace" is the root of the fullname of your Type.
To see all types add the following line :
Dim types() as Type = CAssembly.GetTypes()
Set a breakpoint after this line and add a watch.
BTW just nitpicking, your code
CAssembly.GetType("Fr6Customise. LoadModule") has a space in the name.
no luck mailing my code : "reason: 552-5.7.0 Our system detected an illegal attachment on your message."
modified on Tuesday, January 19, 2010 9:05 AM
|
|
|
|
|
I'm working on an "add-on enabled" application where assemblies are deployed (copied / uploaded) to a server (and a reference added to a database) making the add-on available to the user. To set the standards of the add-on I've created a separate library with the interface definitions that I can even send to 3rd party vendors.
Problem comes when I try to instantiate the uploaded assembly and cast the instance back to my interface definition. My test add-on is 2 dll's, one for the add-on and one for the interface definition which I put together in the same folder, the instance is created correctly and I can get the public attributes with reflection but the instance type is object and cannot be cast to my interface type.
Any ideas? I have played around with different ways to load the assembly file but it does not seem to make a difference...
If I check if the Interface is implemented on the Type it is (assemb.GetTypes().Where(t => t.GetInterface("MyInterface") != null).FirstOrDefault() ), but I suspect that the problem is that its checking by name...
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
This is something similar, perhaps it will give you some ideas. Application Suite Template[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi Mark,
Thanks for the post. I cannot get the code to run (only have VS 2010 B2) installed, but the architecture is quite different to what I'm using. I'm using an interface that I share between 2 different projects, 1 being the application and 1 being the addon. What you are doing with Activator.CreateInstance I have also tried and I experienced to problems described...
I can quite easily get an instance of a class in an assembly, and the instance class will be based on my interface that I shared, yet I cannot cast my instance to the interface...
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
|
Why not take a look into the Managed Extensebility Framework (MEF)? It's very powerful (clickety[^]).
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|