|
Not really because you are not interacting with the ASP.NET pipeline in your Windows Forms. Without this pipeline, you will have no access to things like the Session or Response objects.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi
can we create a windows service in which we could detect that which key of the key board is pressed ,, if possible so how can we do that , thanks in advance
hello
|
|
|
|
|
Yes ,This can be done using windows Hooks
|
|
|
|
|
Hi Everybody,
Please guide me, how to make a web service interface, which can access thru HTTP Post method (not for using SOAP Method). Please send link urls, demo projects or articles...........
Thank u..........
Nithin
|
|
|
|
|
Hello
I wonder if it is possible to accomplish the following scenario:
1.- I have stored in a database the source code for a simple component.
2.- An application downloads the source code.
3.- The mentioned app makes the downloaded source code to be compiled.
4.- The app then invokes objects from the compiled component.
Can this be done? What are the restrictions?
Thanks a lot in advanced.
|
|
|
|
|
|
Yes, this can be very well done using CodeDOM./ Relection.Emit.
|
|
|
|
|
Hello,
I have a problem with my program. I am using .net framework 2.0 and I am mamking some drawings on the form. I have some paths and I need to make union a intersection so I convert the paths to the regions. The problem is - is it possible to convert some region back to the path?
Thanks a lot for your reply
|
|
|
|
|
AFAIK, no, it's not possible to convert it back. I don't remember seeing anything that can do the conversion.
A better option would be to create your own class to hold the Path and the Region objects, then just expose them both as Properties, passing the correct one to whatever function you need. You'll also have to supply code to re-convert the Path to a new Region every time there is a change to the Path object.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thank you,
I have one more question. How is the best way to find the nearest point on the bounderies of the region from a specific point ( mouse click for exemple).
Thanks a lot
|
|
|
|
|
There's no built-in function to do that, you'd have to write one yourself. You can calculate the point to each line that makes up the region and then return the point with the shortest distance. You can probably build something from this[^] little algorithm.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I'm stuck.
I need to detect if a enumrated type has its FlagsAttribute set. I can't find the proper method/property in the reflection class. Any ideas?
Thanks
|
|
|
|
|
You need to use the GetCustomAttributes method of the FieldInfo object. The code would look something like this (untested, modified from production code that looks for a different attribute):
public static bool HasFlagsEnum(Enum value)
{
if (value == null)
{
throw new ArgumentNullException("value");
}
bool hasFlagsAttribute = false;
FieldInfo fieldInfo = value.GetType().GetField(value.ToString());
FlagsAttribute[] attributes =
(FlagsAttribute[])fieldInfo.GetCustomAttributes(typeof(FlagsAttribute), false);
if (attributes != null && attributes.Length > 0)
{
hasFlagsAttribute = true;
}
return hasFlagsAttribute;
} Assuming an enum named Color that has the FlagsAttribute, you would call this function like this:
Color color = Color.Red | Color.Yellow;
if (HasFlagsEnum(color) == true)
{
} This should get you pointed in the right direction.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
It works. Thanks for the pointer.
The VB code for anyone interested:
Private Function HasFlagsAttribute(ByVal Type As System.Type) As Boolean
Return Type.GetCustomAttributes(GetType(FlagsAttribute), False).Length > 0
End Function
|
|
|
|
|
Break your app into modules (assemblies) and get away from the monolithic exe. In short, join the era of modern software development. It's difficult to bill yourself as a 21st century company when using 20th century thinking.
only two letters away from being an asset
|
|
|
|
|
http://www.codeproject.com/cs/design/three_tier_architecture.asp[^]
This could be a start, however, if you need help in figuring out how to seperate your application into multiple assemblies while avoiding cross references, then you are missing some core software design knowledge that can't be replaced by reading a few articles.
only two letters away from being an asset
|
|
|
|
|
|
vladdy77 wrote: who do you think you are
The one not having to ask how to design my application.
only two letters away from being an asset
|
|
|
|
|
|
傻瓜将笑既使您显示它一个手指
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: 瓜将笑既使您显示它一个手指
Yep. His quote made no sense to me either
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|
|
Mark is right. YOu've got a SERIOUS redesign of your application in front of you. You'll be rewriting about half of your code to do what you want. This should have been a design requirement from Day 1, not after you ship your app!
If you can't see how an n-tier structure gives you the modularity you're looking for, I'm afraid that just reading a couple of articles isn't going to get the point acrossed.
By splitting up your application into seperate classes, such as a Data Layer, you're actually giving yourself the .DLL's you're looking for!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
vladdy77 wrote: We're trying to avoid total redesign as we're not sure customer will agree to it.
You have but one choice here - It's either do a redesign or you live with the 20MB download.
vladdy77 wrote: There is very little data access in this application as it is basically automating MapPoint with their dispatch system and that's why n-tier architecture with gui/bus/data layer is not very applicable to this project.
You're still missing the point entirely and why Mark was saying this. You have to break this application down into more discrete modules, LIKE a Data Layer, or Business Logic Layer, or this, or that. The whole point is that you MUST modularize this code.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|