Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
F

flipdoubt

@flipdoubt
About
Posts
30
Topics
13
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • RegEx help for a RegEx Newb
    F flipdoubt

    But there is RegEx in general and then there is .NET's flavor of RegEx. Are you recommending the O'Reilly book for .NET?

    C# regex tutorial csharp help question

  • RegEx help for a RegEx Newb
    F flipdoubt

    Can someone help me write a regular expression that will return a string from the beginning of the input string up until a certain string is reached? I know how to do this without regular expressions, but I want to use a regular expression so users can modify the format later. Also, can someone recommend a good tutorial for using regular expressions to accomplish this kind of task using .NET? Thanks.

    C# regex tutorial csharp help question

  • Get Win32 file version?
    F flipdoubt

    Thanks, guys! That is quick service.

    C# question csharp com announcement

  • Get Win32 file version?
    F flipdoubt

    Is there an interop or P/Invoke (or are those the same?) call to ascertain the Win32 file version of a file? I want to list the version of all files in a directory, but some may not be .NET assemblies. How can I read this info? Thanks.

    C# question csharp com announcement

  • Access Vista indexing engine from .NET?
    F flipdoubt

    Can I access the Vista indexing and search engine from a .NET application? If yes, can someone point me to resources on how to go about doing this? Thanks.

    Windows API csharp tutorial question

  • Simulate key strokes to trigger shortcut
    F flipdoubt

    I want to trigger a behavior for which a third party component provides a keyboard shortcut. The user can trigger this behavior with CTRL+SHIFT+V, but I want to do it automatically in certain circumstances. Any ideas?

    Windows Forms database question

  • Best laptop for programmers?
    F flipdoubt

    In your opinion, what is the best laptop for programmers? What attributes make a laptop better suited for programmers? Currently, I have a Thinkpad T40 and find it more than adequate. Getting a little old though, so I thought I would ask.

    Hardware & Devices question

  • LZW compression using C#
    F flipdoubt

    I know that I have the encoder installed on my machine because I can save single pages at G4 as well as multi-page tifs with the default compression, but I run into issues when I put the two together. My sample code reads a TIF file name from the app.config file, saves the first page in the file as a G4 image, saves the whole document as multipage file, but then fails when using the G4 EncoderParameter along with the save MultiFrame parameter. I'm using the same algorithm each time, just passing in addition EncoderParameters to the method. The astrices show the problem: using System; using System.Drawing; using System.Drawing.Imaging; using System.IO; namespace consoletest { /// /// Demonstrates my problem with multipage G4 tifs. /// class Class1 { /// /// The main entry point for the application. /// [STAThread] static void Main(string[] args) { string testName = System.Configuration.ConfigurationSettings.AppSettings["testName"]; string compName = "compressed.tif"; string multiName = "multi.tif"; string multiG4 = "multiG4.tif"; System.Drawing.Image original = Bitmap.FromFile( testName ); try { Image[] pages = Class1.ToImageArray( original ); Class1.ToGroup4Compressed( pages[1], compName ); Class1.ToMultiPageImage( pages, multiName ); Class1.ToMultiPageImage( pages, multiG4, Class1.GetGroup4Parameter() ); } catch( Exception e ) { System.Diagnostics.Debug.WriteLine( e ); } } /// /// Turns a multi-page image into an array of single page images. /// /// /// public static Image[] ToImageArray( Image image ) { int count = image.GetFrameCount( System.Drawing.Imaging.FrameDimension.Page ); Image[] images = new Image[ count ]; if( count > 1 ) { for( int i = 0; i < count; i++ ) { image.SelectActiveFrame( System.Drawing.Imaging.FrameDimension.Page, i ); images[ i ] = image.Clone() as Image; } } r

    C# csharp question

  • LZW compression using C#
    F flipdoubt

    Can I show you my code? It is just one console file.

    C# csharp question

  • LZW compression using C#
    F flipdoubt

    Hi, guys. I have a slightly related question about compression. I've been banging out some code that uses the Imaging namespace's EncoderParameters to save an image as a multipage TIF. My problem is that the default compression schema appears to be LZW; or, at least, that is what some of my property readers are telling me. Anyway, I'm trying to save a multipage TIF with CCIT Group 4 Compression, but I get "invalid paramter" exception any time I try to add compression parameters. Heath, do you have any experience with saving multipage TIFs with CCIT Group 4 compression in GDI+? If not, do you know anyone who does? I can post my code, if you're interested.

    C# csharp question

  • Form flashes beneath an OpenFileDialog or 2nd Form
    F flipdoubt

    This happens more often with Debug builds than Release builds, but I often have a Form with lots of controls and, hence, lots of painting to do that launches another Form, whether it is an Open File Dialog or a new Form. Basically, the Form at the bottom of the z-order does some ugly flashing while the OpenFileDialog or new Form closes. I've tried SuspendLayout/ResumeLayout on the Form at the bottom but this doesn't seem to help with its constituent controls. Any ideas on how to stop this? I can show you screenshots if you think that would help.

    C# debugging help tutorial question announcement

  • Application Data Path for VB 6
    F flipdoubt

    I'm a .NET programmer who knows how easy it is to access special folders via the Application.CommonAppDataPath and System.Environment.GetFolderPath() members, but how does one do this in VB 6?

    Visual Basic csharp question workspace

  • What do you use the HACK task for?
    F flipdoubt

    I use the HACK to denote "the following code is a hack to work around some unexpected behavior." Especially where using components, it often turns out that the HACK was neccessitated by a bug that the component vendor may correct or Microsoft might change in future versions of the Framework. What do you use the HACK task for?

    C# help question

  • Open Explorer to Network Neighborhood/Network Places
    F flipdoubt

    Is there a canonical lookup table for class GUIDs for namespace extensions?

    IT & Infrastructure com sysadmin tutorial question workspace

  • Open Explorer to Network Neighborhood/Network Places
    F flipdoubt

    Cool! Now the trick is to reliably look this up in different OSes.

    IT & Infrastructure com sysadmin tutorial question workspace

  • Open Explorer to Network Neighborhood/Network Places
    F flipdoubt

    I've read lots of stuff about opening Windows Explorer using command line arguments. Task http://www.createwindow.com/raewebsite/rae-2ex1.htm as an example. But how would I open Windows Explorer to Network Neighborhood or My Network Places? Any good ideas? I don't see an environment variable that might point me to such a place.

    IT & Infrastructure com sysadmin tutorial question workspace

  • Can you use functions like sprintf in c#
    F flipdoubt

    Why not just use String.Format?

    C# csharp question

  • God book on patterns in C#
    F flipdoubt

    Not that great. Definately not a "God" book.

    C# csharp question learning

  • ObjectHandle and SerializationException
    F flipdoubt

    By digging deeper into the sample code at ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/dncscol/html/csharp05162002.htm, I found that the type they load dynamically descends from System.MarshalByRefObject. This makes sense to me, so I just made a loader that is a MarshalByRefObject which encapsulates all the dynamic loading of Tasks within itself. Now, I instantiate the Loader in the other AppDomain and have it do its diagnostics and return a list of assembly names that contain tasks to instantiate from the current domain.

    C# json question announcement

  • ObjectHandle and SerializationException
    F flipdoubt

    The following code throws a SerializableException where it unwraps the ObjectHandle, but why? I can't find it in any of the MSDN docs and it doesn't even go away when I mark the Task as Serializable? Here is the code: --- public ArrayList GetAssemblyNamesFromHandle( AppDomain domain, string[] assemblyNames ) { ArrayList names = new ArrayList(); foreach( string assembly in assemblyNames ) { System.IO.FileInfo file = new System.IO.FileInfo( assembly ); if( file.Exists ) { string name = assembly.Replace( file.Extension, String.Empty ); System.Runtime.Remoting.ObjectHandle oh = domain.CreateInstanceFrom( assembly, String.Format( "{0}.Task1", name ) ); // Exception thrown here. Task task = (Task) oh.Unwrap(); if( task.Succeeded ) names.Add( assembly ); } } return names; } --- Here is the Exception: --- An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll Additional information: The type TaskLib.Task1 in Assembly TaskLib, Version=1.0.1326.35718, Culture=neutral, PublicKeyToken=null is not marked as serializable. ---

    C# json question announcement
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups