|
Use the System.IO.MemoryStream[^] class. StreamReader accepts any stream, so you can pass a MemoryStream instead of the FileStream.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
-- modified at 7:54 Friday 21st October, 2005
|
|
|
|
|
Have you tried the MemoryStream class is System.IO?
|
|
|
|
|
Hey everybody!
I am trying to create an ImageList to add pictures to my toolbar.
I am doing that using the design mode of VS.net.
anyway, after I am adding an Image to the ImageList, VS adds this code to the properties of the ImageList object:
this.imageListToolbar.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListToolbar.ImageStream")));
and when I run the program I get "System.Reflection.TargetInvocationException" exception in this line.
I really have no idea why it happens or how to fix it...
can anyone help me with that????
THANKS!
|
|
|
|
|
Did you change the namespace or classname after you added the image list? I've seen that cause problems. If you did that, try changing the "Default Namespace" entry in the Project properties dialog to the new namespace.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
no, I didn't change anything like that.
I get that error even if I am openning a new project, and adding an ImageList, and than adding to it an image.
I'm getting the same exception.
|
|
|
|
|
|
|
|
|
|
Just like any other event.
public delegate void EventHandler(object o, EventArgs e);
public class MyUserControl : UserControl
{
public event EventHandler OnEvent;
}
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
You mean how to init it ?, or how to use it in the parent control ?,if the first, then it has been answered, otherwise :
MyUserControl con = new MyUserControl();
con.MyEvent+=new EventHandler(Pointer); .
"Praying." Is this only what I can do for him ?
|
|
|
|
|
hi,
iam facing with some diff problem.
what the thing is..i have to open a popup window
when the button is clicked.i had written the javascript code in button click event. and it is working fine ...no pronlem...
what the problem is..when i close the popup window and press
backbutton of browser and then again forward button of browser
the popup is opening again....
how to stop that.
actually it should display only when button is clicked..
hope u understand.
plzzz help.
byeeeeeeee
|
|
|
|
|
I would like to make an application as follows:
one side has a lisbox populated with a treview, when user selects an item (from treeview)a control is created on hte right side. just like a window in visual Studio Net (tool/option)
any hellp will be greatly appreciated
|
|
|
|
|
Where are you stuck? Do you have any specific problems?
It's pretty simple to do, dock the treeview on the left, dock a panel on the right. Subscribe to the AfterSelect event on the treeview and add the appropriate control to the panel on the right.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I'm working on aps.net and i got a security issue that exception will be thrown when we place "~" before subdirectory.How can i handle this?
Plz help me out.
Statck trace for your info:
Invalid file name for monitoring: 'c:\inetpub\wwwroot\~WebApplication1'. File names for monitoring must have absolute paths, and no wildcards.
Exception Details: System.Web.HttpException: Invalid file name for monitoring: 'c:\inetpub\wwwroot\~WebApplication1'. File names for monitoring must have absolute paths, and no wildcards.
Stack Trace:
[HttpException (0x80070057): Invalid file name for monitoring: 'c:\inetpub\wwwroot\~WebApplication1'. File names for monitoring must have absolute paths, and no wildcards.]
System.Web.DirectoryMonitor.AddFileMonitor(String file) +429
System.Web.DirectoryMonitor.StartMonitoringFile(String file, FileChangeEventHandler callback, String alias) +76
System.Web.FileChangesMonitor.StartMonitoringPath(String alias, FileChangeEventHandler callback) +495
System.Web.Caching.CacheDependency.Init(Boolean isPublic, Boolean isSensitive, String[] filenamesArg, String[] cachekeysArg, CacheDependency dependency, DateTime utcStart) +1535
System.Web.Caching.CacheDependency..ctor(Boolean isSensitive, String[] filenames, DateTime utcStart) +50
System.Web.Configuration.HttpConfigurationSystem.GetCacheDependencies(Hashtable cachedeps, DateTime utcStart) +151
System.Web.Configuration.HttpConfigurationSystem.ComposeConfig(String reqPath, IHttpMapPath configmap) +760
System.Web.HttpContext.GetCompleteConfigRecord(String reqpath, IHttpMapPath configmap) +434
System.Web.HttpContext.GetCompleteConfig() +49
System.Web.HttpContext.GetConfig(String name) +195
System.Web.CustomErrors.GetSettings(HttpContext context, Boolean canThrow) +20
System.Web.HttpResponse.ReportRuntimeError(Exception e, Boolean canThrow) +39
System.Web.HttpRuntime.FinishRequest(HttpWorkerRequest wr, HttpContext context, Exception e) +486
Thanks,
JayaKrishna
Jayakrishna Damarla
Software Developer
|
|
|
|
|
The ~ character is used as a wildcard in some cases.
Is the folder named "~WebApplication1" or "WebApplication1"? If it is the later, just remove the ~ character.
---
b { font-weight: normal; }
|
|
|
|
|
The folder is "WebApplication" only.The issue came while audit.I can't restrict them to enter ~ before directory.
Is there any way to handle this type of request(say in global.asax.cs file) so that we can get it done.
Thanks,
Jayakrishna Damarla
|
|
|
|
|
Are they typing this in the the URL? Or are they entering this as some parameter on a form? ...?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yeah they are typing like that.They are testing by place tilde(~)symbol before directories in the url.
Thanks,
Jayakrishna Damarla
|
|
|
|
|
i am working with c# console application. i am using MSHTML.dll to parse the html page. i would like to know that how would i find iFrame, Frame and FrameSet Element from html page using MSHTML. sending code will be appricated.
Regards
Amit Grover
Amit Grover
CDAC R&D
Gist Group
pune
|
|
|
|
|
If I use WellKnownObjectMode.SingleCall, I will have an object created on the server for each function call to the server. If I use WellKnownObjectMode.Singleton, I will have only one object created on the server for all function calls to the server..... Now I have a problem that I want to make 1 object/client on the remote server... i.e. if a client is connected then there is on object made for it, no matter how many function calls he make. Similarly, there should be made another object if another client connects and that object be used for as many function calls, this client makes and so on... Do you have any solutions or design to this problem, any one??
975 - 74
|
|
|
|
|
|
hi..
i hav an application in c# which send Fax Automatically.but whenever there are .HTM or.HTML attachments while sending fax it opens Fax-printer Dialouge box to select machine.i dont want to select this manually.what can i do for this..i m using fxcomexlib.dll to send fax.
|
|
|
|
|
Hi All,
am using C# GDI+ to draw a huge amount of data... for now say, am drawing some sample 6MB of data which takes almost 5 seconds.. can anyone help me in optimizing this so as to reduce the time it takes....
am using a recrsive function for drawing.. drawrectange, drawpolygon, fillpolygon are the 3 functions i use...
thanks in advance,
Hariharan.T
|
|
|
|