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
R

Rob Smiley

@Rob Smiley
About
Posts
79
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Implementation Protocol client / server (C + +) RS232 and Ethernet
    R Rob Smiley

    its spelled antidistinctlymintymonetarism. no, that's not right..

    "Great minds discuss ideas; Average minds discuss events; Small minds discuss people" - Eleanor Roosevelt "An eye for an eye only ends up making the whole world blind" - Mohandas Gandhi

    The Lounge sysadmin architecture question learning

  • Windows 8 will transform PC industry
    R Rob Smiley

    mmm. programming with an on-screen keyboard... looking forward to that X|

    "Great minds discuss ideas; Average minds discuss events; Small minds discuss people" - Eleanor Roosevelt "An eye for an eye only ends up making the whole world blind" - Mohandas Gandhi

    The Lounge question ios hardware

  • SSL, but not via a web server
    R Rob Smiley

    You need 2 or 3 files to implement this - .cer for the public key, .pvk for the private key and optionally (recommended) a .pfx for the combined certificate store key. This is the sequence i've used before to generate all the bits: makecert -n "CN=My Secure Key" -sv "MyKey.pvk" MyKey.cer cert2spc "MyKey.cer" "MyKey.spc" pvk2pfx -pvk "MyKey.pvk" -pi KeyPassword -spc "MyKey.spc" -pfx "MyKey.pfx" -f Once you have the files, embed the .cer in the 'public' past of your code, Install the .pfx in the server certificate store. Load the .cer with X509Certificate2 & find the private key in X509Store, e.g.

    _publicCert = New X509Certificate2()
    _publicCert.Import(My.Resources.PublicKeyCer)

    Dim certStore As X509Store = New X509Store()
    certStore.Open(OpenFlags.ReadOnly)

    For Each installObj As X509Certificate2 In certStore.Certificates.Find(X509FindType.FindByThumbprint, _publicCert.Thumbprint, False)

    Next

    Hope this helps, Rob

    "An eye for an eye only ends up making the whole world blind"

    Web Development sysadmin security cryptography tutorial question

  • Mouse from Ratatouille found loafing around on the job
    R Rob Smiley

    :^) :~ X| :mad:

    "An eye for an eye only ends up making the whole world blind"

    The Lounge announcement career

  • UK C'pians quick poll...
    R Rob Smiley

    No. I can't stand the man and certainly don't believe he's worth that salary - especially since it's license fee money Far prefer listening to Alice Cooper on PlanetRock at that time of the morning - now there's a guy whose funny without having to try:thumbsup:

    "An eye for an eye only ends up making the whole world blind"

    The Lounge career question discussion

  • Which version ODP.net is exactly required for oracle 11.2 and .net 2.0?
    R Rob Smiley

    The first download at http://www.oracle.com/technetwork/developer-tools/visual-studio/downloads/index.html should work. So to answer you're question, the version is 11.2.0.1.2 Can't remember exactly, but I think your code has to be compiled for x86 to use these drivers...

    "An eye for an eye only ends up making the whole world blind"

    Database tools csharp oracle com testing

  • Sql queries on unicode data [modified]
    R Rob Smiley

    try: select * from table where district=N'UÀÄ®âUÁð' nvarchar and ntext types require the N prefix before the opening quote when you're searching for unicode text.

    "An eye for an eye only ends up making the whole world blind"

    Database database

  • Upgrade from SQL 2005 EXPRESS to SQL 2008 EXPRESS
    R Rob Smiley

    Use Sql Express 2008 R2. That has a size limit of 10GB

    "An eye for an eye only ends up making the whole world blind"

    Database database help

  • Disable form not fast enough
    R Rob Smiley

    sounds like you should be using ShowDialog instead of Show. ShowDialog will automatically 'block' the main form, so you don't need to worry about disabling it

    "An eye for an eye only ends up making the whole world blind"

    Visual Basic help tutorial question

  • Windows Forms inheritance problem
    R Rob Smiley

    StyleCop is right - field members should be private, but this is one of those circumstances where the only sensible way to do what you want is to set the field to protected. Just go with that and ignore the StyleCop rule.

    "An eye for an eye only ends up making the whole world blind"

    C# csharp winforms help question visual-studio

  • Hope this gets through the censorship committee.
    R Rob Smiley

    Run these through google translate for a laugh... French->English gives you "Sex is evil introduced" Dutch->English gets "Sex is mistyped" :laugh:

    "An eye for an eye only ends up making the whole world blind"

    The Lounge c++ help announcement learning

  • The Illusion of a Choice
    R Rob Smiley

    The method signature is overridden from the base class, so exitContext has to be in the parameter list, even though it has no meaning in the context of a ManualResetEvent

    "An eye for an eye only ends up making the whole world blind"

    The Weird and The Wonderful csharp ruby

  • Visual Basic - I'm in Hell [modified]
    R Rob Smiley

    Am I the only one whose going to stick up for this language? I mean, it's only a syntax at the end of the day. True, C# is more satisfying to work with, but there's not that much more in it that you can't do in VB. John, I think you'll get used to the syntax pretty quickly & soon wonder what all the fuss was about... Just spare a thought for all the poor sods out there who are stuck with VB6 X|

    "An eye for an eye only ends up making the whole world blind"

    The Lounge csharp visual-studio question architecture

  • Regex Question
    R Rob Smiley

    Alan, try this. The code originally came from the netSpell library, so i'm not 100% it works correctly... Private _htmlRegex As Regex = New Regex("</[c-g\d]+>|</[i-o\d]+>|</[a\d]+>|</[q-z\d]+>|<[cg]+[^>]*>|<[i-o]+[^>]*>|<[q-z]+[^>]*>|<[a]+[^>]*>|<(\[^\]*\|'[^']*'|[^'\>])*>", RegexOptions.IgnoreCase Or RegexOptions.Compiled)

    "An eye for an eye only ends up making the whole world blind"

    Windows Forms regex html tutorial question

  • VS amputated shortcut
    R Rob Smiley

    Ctrl M+O is shortcut for Collapse to Definitions. Other useful ole is Ctrl M+L = toggle all outlining. I use these all the time

    "An eye for an eye only ends up making the whole world blind"

    The Lounge visual-studio

  • Dates
    R Rob Smiley

    Why do we buy petrol in litres & measure its consumption in gallons? There must be loads of other instances where we measure the same thing using two different units based on the context...

    "An eye for an eye only ends up making the whole world blind"

    The Lounge

  • Creating a Virtual hard drive out of your Physical Windows disk
    R Rob Smiley

    Check this framework out from .Net DiscUtils here[^]. It's got support for Microsoft & VMWare virtual disc formats as well as a whole load of others. Plus the whole thing is in C# :-D

    "An eye for an eye only ends up making the whole world blind"

    The Lounge question learning csharp php database

  • Get the date from SQL Server
    R Rob Smiley

    nasty! did the original programmer not realise that select getdate() would work too?

    "An eye for an eye only ends up making the whole world blind"

    The Weird and The Wonderful database sql-server sysadmin workspace

  • Image Crop Issue [modified]
    R Rob Smiley

    Hi, you need to do as Luc suggests & scale the rectangle of your cropping area. This should do the trick:

    float scaleX = (float)bmpImage.Width / (float)this.ClientSize.Width;
    float scaleY = (float)bmpImage.Height / (float)this.ClientSize.Height;

    rec = new Rectangle((int)(rec.X * scaleX), (int)(rec.Y * scaleY), (int)(rec.Width * scaleX), (int)(rec.Height * scaleY));

    "An eye for an eye only ends up making the whole world blind"

    C# csharp java com graphics tools

  • Image Crop Issue [modified]
    R Rob Smiley

    ok, it sounds like the panel bounds are relative to the pictureBox... hmm. does the image take up the full space in the pictureBox? also have you set a sizeMode on it? e.g. an image smaller than the control area & a size mode of centre or stretch could allow you to have the rectangle appear over the image on screen, but give bounds that are outside the image area. Set sizeMode to normal (so image appears in top-left corner) & see what happens

    "An eye for an eye only ends up making the whole world blind"

    C# csharp java com graphics tools
  • Login

  • Don't have an account? Register

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