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
W

Werdna

@Werdna
About
Posts
167
Topics
19
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • install windows fonts
    W Werdna

    I need to do it programmatically.

    C# json question

  • install windows fonts
    W Werdna

    Does anyone know any API to install fonts to windows folder? On XP I used to just copy those to windows/fonts folder, but it does not work on vista. There is windows API AddFontResource, but it only installs font until user reboots computer. Thanks.

    C# json question

  • Monitor SOAP body for webservices
    W Werdna

    None of the above answers will work for me. I found out that I can use SoapExtension to get the data I need. Just in case someone ever has the same question.

    C# wcf xml question visual-studio tutorial

  • Monitor SOAP body for webservices
    W Werdna

    I'm connecting to a webservice over https and I need to see the xml that is being sent and returned. VS generated all the code to connect thru wsdl, and I'm not sure how to see what is transmitted. Is it somehow possible? Lookat at http traffic won't work, as data is sent on https port. Thanks.

    C# wcf xml question visual-studio tutorial

  • StructLayoutAttribute and type safety
    W Werdna

    I see this as possible problem. Imagine having [StructLayout(LayoutKind.Explicit)] struct MyStruct { [FieldOffset(0)] public int i; [FieldOffset(0)] public byte[] o; } now if you set: x.i = 0x4899; then you'd be able to access data from any address. I don't know if peverify can check those.

    C# question csharp com security tools

  • font script
    W Werdna

    You can use FontDialog FontDialog dlg = new FontDialog(); if (dlg.ShowDialog()==DialogResult.OK) { selectedFont = dlg.Font; }

    C# csharp tools question

  • Can I get the original string from a HashCode?
    W Werdna

    It's totally not possible. The hashing function is always one way. Since int can only have about 2.2B possible values, there is way more than 2.2B possible string combinations.

    C# csharp com question

  • handling Stack overflow Exception
    W Werdna

    Unfortunatelly as of .net 2 you cannot catch this exception. Here is the info from .net docs: In prior versions of the .NET Framework, your application could catch a StackOverflowException object (for example, to recover from unbounded recursion). However, that practice is currently discouraged because significant additional code is required to reliably catch a stack overflow exception and continue program execution. Starting with the .NET Framework version 2.0, a StackOverflowException object cannot be caught by a try-catch block and the corresponding process is terminated by default. Consequently, users are advised to write their code to detect and prevent a stack overflow. For example, if your application depends on recursion use a counter or a state condition to terminate the recursive loop.

    C# csharp help data-structures tutorial

  • Compact paths?
    W Werdna

    If you're drawing your text using GDI+, you can use StringFormat class and set Trimming to EllipsisCharacter. If you need it in a control, you can easily create custom control that does all the drawing and uses appropriate Trimming flag.

    C# csharp dotnet json question

  • Rotating image in C#
    W Werdna

    An easy way to draw rotated image is to use transformations: Graphics g = ...; g.RotateTransform(angle); g.DrawImage(...) if you want to rotate around any point, you can use matrix. Matrix m = new Matrix(); m.RotateAt(angle, new PointF(x, y)); g.Transform = m; g.DrawImage(...);

    C# tutorial csharp graphics xml help

  • Need Help for a parser
    W Werdna

    You might be better off using parser generator tool http://www.antlr.org is a good one. You can look at couple of my examples: http://www.codeproject.com/csharp/stringtokenizer.asp[^] or have a look at http://www.adersoftware.com/index.cfm?page=templateEngine2[^] (library with easy to use hand coded lexer/parser) or http://www.adersoftware.com/index.cfm?page=compilers[^]

    C# com json help question

  • Graphics.MeasureString - string with space at the end problem.
    W Werdna

    Make sure you pass StringFormat with MeasureTrainingSpaces: StringFormat format = new StringFormat(StringFormatFlags.MeasureTrailingSpaces); g.MeasureString(..., format);

    C# tutorial graphics testing beta-testing help

  • Read large text files with c#
    W Werdna

    I have created a simple program that does something similar. It will read a file in chunks using a reader and provides forward only navigation. If you send me an email I can send you the source code (C# vs2005) andrew at pmall dot com

    C# csharp performance help tutorial

  • DB Server Recommendation
    W Werdna

    I need to upgrade our db server and was wondering if anyone had any experience with opteron based processors. I want to use HP ProLiant DL385 with 2 AMD Opteron 280 processors (Raid 5 and 8GB Ram) I want to use 64bit version of windows and sql server 2005. (System price around $15,000) How would this compare to comparable Xeon processor based configuration?

    The Back Room database sql-server sysadmin question announcement

  • Server recommendation
    W Werdna

    I need to upgrade our db server and was wondering if anyone had any experience with opteron based processors. I want to use HP ProLiant DL385 with 2 AMD Opteron 280 processors (Raid 5 and 8GB Ram) I want to use 64bit version of windows and sql server 2005. (System price around $15,000) How would this compare to comparable Xeon processor based configuration?

    Database database sql-server sysadmin question announcement

  • ListView Control
    W Werdna

    You can use BeforeLabelEdit event private void ListView1_BeforeLabelEdit(object sender, System.Windows.Forms.LabelEditEventArgs e) { if (e.Item == 7) { e.CancelEdit = true; } }

    C# help

  • Error handling - which is preferrable?
    W Werdna

    Or in case of IO operation it would be better to do: catch (IOException ex) { .. io error occured. PathTooLongException and all other IO related inherit from IOException } catch (Exception ex) { .. all other unexpected errors }

    C# html com security help tutorial

  • to trigger some actions after form load.
    W Werdna

    Or if you're using .net 2 myForm.Shown += formStartup; void formStartup(object sender, EventArgs e) { }

    C# database question

  • Libraries of functions
    W Werdna

    You can't do that in C# In latest java (1.5) you can do static import and in C# 2.0 you can have static class that will force you to have only static members and can't instentiate that class. One possible (but not recommended) solution would be to have class rog { ... static methods here... } class myclass : rog { ... now you can call methods of rog without rog. }

    C# csharp c++ question

  • how do I read a files' or assemblys' metadata (date modified, assembly version, etc.)
    W Werdna

    I'm not sure if it will give you all the info you need, but you can do: Assembly asm = Assembly.Load(filename); then use properties/methods of asm: asm.GetName().Version You can also get attributes of an assembly by using GetCustomAttributes(typeof(AssemblyTitleAttribute), true)

    C# csharp help 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