|
Greetings,
I am having C# project that make the Executable also. The system use over 20 users' machines. Currently I installed the exe indidual machines coping the source and it is tedious task to do! When i have to do any modification in existing, then again i have to make the setup.exe and installed individual machine.
Are their any way to do this task simple? like one VB.exe(in share folder in LAN), create shortcut and running ncely noh! like that!!!
Any learning resources, plz send me!!! U r Welcome!
Thanks in advance!
|
|
|
|
|
Take a look at ClickOnce, you can install the application onto their machines using this but it'll automatically check for updates and download and install them if configured to do so.
|
|
|
|
|
http://www.15seconds.com/issue/040121.htm Read this article this ll help you a lot. This article is about .net code access security
best regards,
krishna
|
|
|
|
|
Does anybody know how to organize dialog between 2 sites?
For example, site1 sends a message to site2. Site2 recieves the message and sends "The message was recieved"
|
|
|
|
|
Hi all,
suppose the current application is running in ur version 1.0.0.3 and now u are required to use new version 1.0.0.4 .
Now i need to know where can i make the changes i.e for the update to effect
in GAC or Application's web.config
Can anyone suggest me the answer
Thanks
kumar
|
|
|
|
|
Make changes in web.config , make a dll and store it in GAC
|
|
|
|
|
Dear Code Project Users,...
I'm using VS 2005 C# .NET to create a windows forms application. The application uses two .NET components, Dundas Gauge and Cognitance VideoCog.
I've written the software on my development machine and it runs well in release or debug mode. I have the .NET 2.0 SDK installed. I've also tried the software on my laptop. This has .NET 2.0 installed too. All works well. However, typically, as these things always do... the one machine it doesn't work on is end users machine! This machine also has .NET 2.0 installed.
I have tracked the problem down to InitializeComponet, by placing a try catch around it. The error is as follows:
Exception in Form1 System.IO.FileNotFoundException. The specified module could not be found. (HRESULT: 0x8007007E)
at ... Form1.InitializeComponent
I've placed a MessageBox on the first line of InitializeComponent, however it never calls it. So it appears that its not my code causing a problem. So anybody any idea what file InitializeComponent is looking for, and more importantly how do I solve it?
Note, I don't have VS2005 installed on the end users machine for debugging, and putting it on there is my last resort!
|
|
|
|
|
Since you are using two third-party components, have you verified that those DLLs are also on the end user machine? You don't need to install them, but the DLLs should be part of your install process, even if it is to copy them to the application directory.
|
|
|
|
|
Hello,
I am facing the problem using dtpicker.
Im my vb.net application on selecting dtate from dtpicker i am displaying records from database in agrid
By default i am displaying the today's date in the format 08/09/2007.
When i execute my application and changes the date using keyboard for instacnce pressing 06 for date
and 08 for month it accepts date without moving cursor from the current position and i get result.
But if i press 6 (instead 06) it doesn't accept. I tried to trace tthis value in dtpickers keyup, keydown , text changed and keypress events but not getting the current value unless and until i move cursor from it.
I am terribly stuck to this problem.
Please help me. Anyone who knows how it read current text of dtpicker please let me know.
any help will be highly appreciated.
Thanks a lot in advance.
|
|
|
|
|
hello friend !
in datetimepicker you can set the property of datetimepicker
Go to the property window set (1)custom formet : dd/MM/yyyy
(2) Format : short
(3)Value : current date
your problem is solve
bye have a nice day
|
|
|
|
|
Hi,
My .NET com dll is working fine, if I install it on local machine, but if I install it on mapped network drive, I am getting Exception error:
"Request for Permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, Publickey Token=b77a5c561934e089' failed.
Regards,
SA
|
|
|
|
|
Any manage code running from a non-local driver, i.e.: network share, is not trusted and runs inside a heavily restricted sandbox. The code has no rights to any local machine resources, like the file system and registry, among many others. This is what's causing the exception.
You've got a bunch of reading to do to understand Code Access Securty[^].
|
|
|
|
|
Hi Everyone,
Consider the following scenario .... i am calling a function that can throw 2 custom exceptions for Ex:- ExceptionA and ExceptionB , that was derived from ApplicationException ie
try
{
MethodthatraisesException();
}
catch (ExceptionA e1)
{
LogMessage(e1);
}
catch (ExceptionBe1)
{
LogMessage(e1);
}
The logmessage will just log the details to a file.... In Such a case, can we rewrite the code above as
try
{
MethodthatraisesException();
}
catch (ExceptionA e)
{
LogMessage(e1);
}
Will there be any performance constraints in the second approach
|
|
|
|
|
First, please put large code snippets like this inside of <pre> tags to keep the formatting and help make it more readable.
try
{
MethodthatraisesException();
}
catch (ExceptionA e1)
{
LogMessage(e1);
}
catch (ExceptionB e1)
{
LogMessage(e1);
}
try
{
MethodthatraisesException();
}
catch (ExceptionA e1)
{
LogMessage(e1);
} There are some differences in runtime behavior between these. In the second example, you will only catch exceptions of type ExceptionA and anything derived from it. So, if ExceptionB is derived from ExceptionA this will work, if not you'll only catch one of the exceptions.
That being said, in your examples, you are "eating" the error. You catch the exception, log it, but don't pass it up the chain by calling throw(); to rethrow the exception. This may be what you want, but generally you should only catch an exception if you can do some meaningful cleanup work as a result; if not, let the exception bubble up to whoever is interested.
There really aren't any differences in performance between the two. The runtime still has to perform a stack walk all the way up the chain looking for something that will handle the exception.
|
|
|
|
|
If ExceptionB is derived from ExceptionA then both samples will work in the same way, because an ExceptionB will be cathced in the first sample by the first catch block, too. To catch them seperately, the catch blocks have to be switched.
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
Urs Enzler wrote: If ExceptionB is derived from ExceptionA then both samples will work in the same way
Right, that's what I said:
In the second example, you will only catch exceptions of type ExceptionA and anything derived from it. So, if ExceptionB is derived from ExceptionA this will work, if not you'll only catch one of the exceptions.
Urs Enzler wrote: To catch them seperately, the catch blocks have to be switched.
Yes, given the first code sample and making the supposition that ExceptionB is derived from ExceptionA , the catch blocks would need to be in the opposite order. However, the original post stated that both exceptions were derived from ApplicationException , so the catch blocks would work correctly in either order. Again, the second example will only provide the same behavior if ExceptionB is derived from ExceptionA , which was one of the original questions.
|
|
|
|
|
I'd like to write a bit of C#/.Net that will generate text in a JPG format. I'm looking for any built-in-bits of .NET that will help me do this. Or, some sample code.
What I'm doing: I want to generate "album cover" JPG's to use on my iPod - but I don't want actual cover art. I just want a square, solid color background with the name of the Artist and the Album title printed on it, in colored text.
Since I have over 1000 albums, I'd like to generate this JPG algorithmically.
I would settle for a fixed font size, with truncation of long Artist or Album Name, but it would be nice if the text scaled to fit into the rectangle.
Thanks in Advance,
JoeRip
|
|
|
|
|
Take a look at the static method Graphics.FromImage() . Graphics.MeasureString() and
Graphics.DrawString() will handle the sizing and text overlay. There are a lot of properties that can handle smoothing and anti-aliasing of the text.
Sorry, I don't know of any existing source.
|
|
|
|
|
I see, you are suggesting that I load an existing JPG of my rectangle, and draw text on that. Sounds do-able.
However, I don't see any methods in the Graphics class for writing the JPG back out as a file. Am I looking in the wrong place? What do you suggest?
|
|
|
|
|
|
Do I really need to work with the Graphics class? I won't be displaying these images within my application... or do I still need to use a Graphics object, just to composite my text onto my background?
|
|
|
|
|
I suppose you could manipulate the bitmap bits directly but, the graphics class makes writing text trivial.
|
|
|
|
|
What Michael suggested is IMO the right approach:
1. create an empty Bitmap of the required size (alternatively load a background image from
a file)
2. get a Graphics object that provides access to that Bitmap
3. draw whatever you like to that Graphics (exactly as if you were painting to a window,
but this Graphics represents the memory-based bitmap)
4. finally save the Bitmap
If you want to show the final result on screen, you could use a PictureBox (set its Image
property) or just do Graphics.DrawImage() in the Paint handler of your Form, or some
other Control on it (I would use a Panel, I don't like PictureBox at all).
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
JoeRip wrote: or do I still need to use a Graphics object, just to composite my text onto my background?
Yes
using (Bitmap newAlbumArt = new Bitmap(width, height, PixelFormats.Format24bppRgb))
{
using (Graphics gfx = Graphics.FromImage(newAlbumArt))
{
gfx.FillRectangle(Brushes.White, newAlbumArt.Width, newAlbumArt.Height);
gfx.DrawString("Album Title", x, y);
}
newAlbumArt.Save(path, ImageFormats.Jpeg);
}
|
|
|
|
|
Dear All i have a problem with .NET IDE that is all of my control i placed on my forms in ASP.NET web pages, they all are floating control means i could place them any where like control on VB.Net , and if i want to insert control with in a container then also the control behaves like the individuals. so plz help how to i solve the prob.
Thanks you
|
|
|
|