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
H

hertz_j

@hertz_j
About
Posts
26
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • DataGrid: Setting the current page in bold
    H hertz_j

    Version 1.1, and it is not automatic. What it does is but all the no current pages in links and the current in a span tag. But you cannot (at least I haven't found a way) to set the CssClass of the current and not current pages. So I ended up setting it for all span tags which means that my default span is bold, which is not really what I wanted.

    ASP.NET csharp asp-net tutorial question

  • DataGrid: Setting the current page in bold
    H hertz_j

    Hi, Is there a way to set the current page in bold when using data grids in ASP.NET? Example: 1 2 3 4 Where 3 is the page currently being viewed.

    ASP.NET csharp asp-net tutorial question

  • Blank default values for varchar field
    H hertz_j

    Hi Eric, I'll try that, thank you.

    Database question database sql-server sysadmin xml

  • Blank default values for varchar field
    H hertz_j

    Hi I want to use a blank (empty string but not null) as a default value for varchar column in SQL server 2000. Is this possible and if it is, how do I do it (in Enterprise Manager if possible)? Just so that I don’t get a lot of why do you want to do that answers. The underlying data access layer I use need blank values or it won’t create a correct xml files. Thanks Johan

    Database question database sql-server sysadmin xml

  • Need java community tips
    H hertz_j

    Hi, Thanks, I'll check codeguru.

    Kevin McFarlane wrote:

    Not much Java at codeproject

    Not to be rude or anything but don't you think that that might have been one of the reasons that I asked the question in the first place :-D /Johan

    IT & Infrastructure java

  • Need java community tips
    H hertz_j

    Hi Thanks I'll check them out. /Johan

    IT & Infrastructure java

  • Need java community tips
    H hertz_j

    Hi, Maybe my post was unclear but what I need is not help with a specific problem but just some tips on good java community sites. When it comes to my preferences on community sites I obviously like the code-project. So what I look for is articles, lively discussion boards and a professional approach. Was that clearer? /Johan

    IT & Infrastructure java

  • Need java community tips
    H hertz_j

    Hi I’m planning to brush up my Java skills a bit and would appreciate some tips on good java community sites. Thanks Johan

    IT & Infrastructure java

  • Visual styles problems
    H hertz_j

    I just found the solution to the problem, here it is: Just after calling Application.EnableVisualStyles() call Application.DoEvents() Regards Johan

    Visual Basic csharp visual-studio wpf winforms help

  • Visual styles problems
    H hertz_j

    This is driving me mad. I have been working on windows forms application for a while and suddenly straight out of the blue the visual style for the buttons stopped working. That is, they go back to looking like buttons in Windows 2000. All other controls that support visual styles seem to be working ok. Does anyone know anything about how to fix this? The really wired thing is that when I tried to do a new form in the same project all works ok for a few compilations and then the buttons just go back to ugly mode again. By the way I’m using .Net 1.1 and visual studio 2003. Regards Johan

    Visual Basic csharp visual-studio wpf winforms help

  • problems
    H hertz_j

    Sorry, I guess I pressed the wrong post. My mistake, I won’t do it again, please forgive me for this if you can possible find it in your heart to do so. ;P

    Visual Basic question career discussion

  • problems
    H hertz_j

    If you are going to post all your interview questions why do you post them one at a time? Just post the whole thing and be done with it. /Johan

    Visual Basic question career discussion

  • How to add only numeric values to a textbox control
    H hertz_j

    Hi, I don't know if this is the best way of doing it, but you could capture the textbox on change event and then loop through each char in the text field to check if it is a number or not. So something like this: Public Sub OnTextChange(Byval sender as Object, Byval e EventArgs) Handels T.TextChanged for each c as Char in T.Text.Chars if Not c.IsNumber Then MessageBox.Show("Bla bla bla") end if Next End Sub Hope this helps /Johan

    Visual Basic help tutorial

  • Problems loading an Assembly
    H hertz_j

    Hi, I'm trying to load an assembly from stream, this works fine. But how do I use the assembly once loaded? I just keep on getting a file not found exception in my code. Any idees? /Johan

    Visual Basic question

  • Including dlls in an exe
    H hertz_j

    Thanks I'll try that.

    Visual Basic question

  • Including dlls in an exe
    H hertz_j

    Ok, Well I guess I could but it dont think it would be worth the work it involves. But thanks anyway. /Johan -- modified at 9:49 Tuesday 11th April, 2006

    Visual Basic question

  • Including dlls in an exe
    H hertz_j

    Is their a way to include all referenced dlls into the compiled exe file? /Thaks Johan

    Visual Basic question

  • Help with Dynamic Casting
    H hertz_j

    Hi Dave, To honest, I don’t really “need” to do it in this way either. But it is a nice little exercise, and I think it might even be usefully :-D Once again thanks for your help, it was very appreciated.

    Visual Basic help

  • Help with Dynamic Casting
    H hertz_j

    Hi Dave, Thanks for the response. My question was probably not very clear. What I want to do is not cast using the xml innertext type but the obj(name) type. I know this looks wired and I guess it is. What I’m doing (and I know when it comes to performance it is just wrong) is to map from the xml node to a property in the object using the name of the properties. Now it becomes even worse, I use reflection to get the properties names and I invoke them instead of setting the normal way. I know this is extremely inefficient in performance terms, but it is very dynamic and I like the simplicity of the code. So what happens is: 1) An XML node is read 2) Loop over the child nodes 3) Set the object (Query) properties to the node value with the same name. (Dynamically casting to the property’s type) Here is the function that does the trick. 'Builds a query from a xml node Private Function BuildQuery(ByRef node As XmlNode) As Query Try Dim obj As New Query 'Map xmlnodes to properties where the names match For Each name As String In obj.Properties If Not node.SelectSingleNode(name) Is Nothing Then 'Dynamically cast to the type of the property Dim code As Integer = CInt(Convert.GetTypeCode(obj(name))) obj(name) = Convert.ChangeType(node.SelectSingleNode(name).InnerText, code) End If Next Return obj Catch ex As Exception Throw New ApplicationException("Falied to build Databasequery object", ex) End Try End Function On a side note I only use this rarely in the code, for reading data into object and moving data from object into file or database. These are expensive operations anyway so the overhead is not that great compared to the actual workload. That is at least the theory, but I need to do some test to check if it is correct. Thank you very much for your reply. Johan Hertz

    Visual Basic help

  • Help with Dynamic Casting
    H hertz_j

    Hi I want to dynamically cast to whatever type obj is. So I want to change the Boolean part to something like obj.GetType(). obj = CType(node.SelectSingleNode(name).InnerText, Boolean)

    Visual Basic help
  • Login

  • Don't have an account? Register

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