kleptos
Avatar/Signature-
Posts
47 -
Joined
-
Last visited
About kleptos
- Birthday 06/10/1976
Personal Information
-
Occupation
Database Administrator
-
Visual Studio .NET Version
VS.NET 2003
-
.NET Preferred Language
C#
kleptos's Achievements
Newbie (1/14)
0
Reputation
-
I have tried that but i guess that doesnt work with a aspx page? I am sorta using this aspx page as an image so to speak. When i implement the code you spoke of above,it turns the background black. This should work with a aspx page right? <img src="image.aspx"> <%@ Import Namespace="System" %> <%@ Import Namespace="System.Drawing" %> <%@ Import Namespace="System.Drawing.Drawing2D" %> <%@ Import Namespace="System.Drawing.Imaging" %> <script language="C#" runat="server"> private void Page_Load(object sender, System.EventArgs e) { Bitmap bmp = new Bitmap(175, 60); Graphics g = Graphics.FromImage(bmp); Rectangle r = new Rectangle(0,0,175,60); Font f = new Font("Verdana", 9, FontStyle.Bold); SolidBrush b = new SolidBrush(txtColor); SolidBrush bg = new SolidBrush(Color.Brown); float x = 5; float y = 5; g.Clear(Color.Transparent); g.SmoothingMode = SmoothingMode.AntiAlias; string line1 = "String Goes Here"; g.FillRectangle(bg, r); g.DrawString(line1, f, b, x, y); bmp.MakeTransparent(Color.Brown); Response.ContentType = "image/gif"; bmp.Save(Response.OutputStream, ImageFormat.Gif); Response.End(); f.Dispose(); b.Dispose(); g.Dispose(); bmp.Dispose(); } </script>
-
I create an image with an aspx page and i want it to be transparent. I am pretty much just making a small rectangle image with some text on it. But the background needs to be transparent so all you see is the text, no background color. Any ideas or tutorials? Thanks! <%@ Import Namespace="System" %> <%@ Import Namespace="System.Drawing" %> <%@ Import Namespace="System.Drawing.Drawing2D" %> <%@ Import Namespace="System.Drawing.Imaging" %> <script language="C#" runat="server"> private void Page_Load(object sender, System.EventArgs e) { Bitmap bmp = new Bitmap(175, 60); Graphics g = Graphics.FromImage(bmp); Font f = new Font("Verdana", 9); SolidBrush b = new SolidBrush(Color.Black); float x = 5; float y = 5; string line1 = "My String Of Text"; g.DrawString(line1, f, b, x, y); Response.ContentType = "image/gif"; bmp.Save(Response.OutputStream, ImageFormat.Gif); Response.End(); f.Dispose(); b.Dispose(); g.Dispose(); bmp.Dispose(); } </script>
-
Thank you very much! This should help me out in my quest!
-
I am writing a small application, it has 4 text boxes and a button. On press of the button, i would like to be able to write the 4 values to an XML file. Tomorrow i would like to do it again, and again the next day. I know the structure of an XML file. I can write them in my sleep (well, basic ones anyway). I would like to have my application write to an XML file. Any real good examples floating around? I prefer any C# examples if possible. Thank you in advance for any and all help on this issue.
-
If you have the right catch block, your program should never end. Its when the error is not catchable by the catch blocks you have or if you have no catch blocks in your application, then your looking at application failure. If you have a general exception catch block and you still get the .NET Framework error box, it means the error that was thrown is not handled by System.Exception. Just take a look at the error message and usually it will tell you what exception was thrown, then just add a catch block for that exception (put the special catch blocks before the general exception). You should be all set. HTH
-
You can do multiple catch statements for each error and handle the error accordingly. Your application doesnt need to stop if your error handling code can catch the error, show the error, and keep going. try { // You code goes here } catch(OleDbException xec) { // Handle this error here } catch(Exception exc) { // Handle general errors here } finally { // Cleanup goes here }
-
I am trying to build a small chat server that will allow multiple users to connecto to it, accept incoming messages and echo back to all connected clients. I am sorta new to sockets and not sure how to implement multiple users connecting to my TcpListener. Any help or pointers in the right direction would be most helpful. I have yet to find an example of this through out the quick starts and the msdn library. Thanks!
-
I have it compiled, i just need to know how to call it from an ASP.NET page.
-
I am using a DAL component for all database access on a small project I am working on but i am not using VS.NET, just using the framework and a text editor. How do i go about using a DLL in my web application w/out code begind pages and such? Thanks for the help!
-
Ok, I have been working on a few basic things in Managed DirectX. They work great on machines with the SDK. However, if i take my compiled exe that works great and move to a machine that only has the DirectX Runtimes (not the SDK). The program crashes. If i have to redistribute the application i made, i should need to have the end users install the SDK, that would be way too silly. Anyone know what i need for these exe's to run? Thanks for the help!
-
If you install the new DirectX 9.0b Summer 2003 Update, it integrates to vs.net 2003 perfectly fine. The documentation, the managed dll's, everythign installs great. I have tested this on Win2000, WinXP and Win2003 Server.
-
Thanks! I tried that ICSharpCode one, the tar methods are a little more extensive then i was hoping for, but i will definatly give it a shot. Thanks!
-
Does the .NET Framework have anything built in for file compression? I wanted to create some compressed files (tar or zip) of a few directories for archival purposes. So i was hoping the framework already had something. Any ideas?
-
I would like to build an application that will have a Treeview, Listview and some other sort of window, similar to Outlook Express (I guess thats a good example). I dont know much about the TreeView control. So i am looking for a good tutorial that help me to understand the control, how to populate it and then i can take if from there. Any help would be appreciated.... :)
-
Distribution to .Net without the framework, looking for a REAL solution
kleptos replied to Denaes's topic in Deployment
I guess from a developers view, you need to know the audience. Then build based off that. If your audience cant be bothered with the framework, then another language would need to be used. Personally, i think the .NET fromework should be on every machine that runs windows, but thats just my opinion.