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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
K

Kaikus

@Kaikus
About
Posts
14
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • ComboBox index Databind
    K Kaikus

    Hi! I have a dataset colum wich values ara simple integers. I want to create a ComboBox with some string values, and databind the dataset as an INDEX to them. So, dataset has 1,2,3,4 my Combobox has "myString1", "myString2" (I can popolate manually or progrmatically, but theese values are NOT provided by the dataset) I want to databind my dataset to my combobox so that when dataset value is 2, the combobox show "myString2". I think it should be easy... but i'm not too used to combobox neither databind Thanks!

    C# database

  • Trapping arrow keys in form
    K Kaikus

    Thanks! In fact, just a few minutes ago, I had found this same article (google is your really 'very best' friend), and I was going to post the solution for any people who needed it. This, combined with myButton.PerformClick(), is the complete solution I needed. Thanks for your very quick reply!

    C# csharp database dotnet visual-studio help

  • Trapping arrow keys in form
    K Kaikus

    Hi! I've read arrow kay can only be intercepted by using KeyUp event. KeyPress only works with characters, and KeyDown allows Control Keys, too, but not arrow keys. I have tried, and KeyUp works well... but only if i have no other controls in the form! If I have any control enabled and focussed, I can't trap KeyUp Form evnent... I suppose the focussed control traps it. I have Visual Studio 2003, so I only can use .NET Framework 1 available (or so I have been told). I'm proggramming a simple form that allow me to brouse data fron a database, and I don't have access to this nice BindingNavigator control. So, I have created the form, binded controls, and created the First, Last, Prev, Next buttons to manage my CurrencyManager. It works fine, but I want to be able to browse just using my arrow keys. I think that trap arrow keys ON EVERY active controls in my form is a very poor solution... Any help, please? :)

    C# csharp database dotnet visual-studio help

  • Installing .NET Framework 2 and 3
    K Kaikus

    Hi! I have installed an 'old and rusted' version of Visual Studio 2003, with comes with base .NET Framework 1. I have some questions... Can I install and use .Net Framework 2 and 3 with Visual Studio 2003? What files do I have to dounload and install? Just the standard 'redistributable packs'? Can all of tree been simultaneously installed? Do I have to use some directive or somehow config Visual Studio to use one or other version? Or all thre convive / overlap simultaneously? What will I have access to? I supponse classes, controls, funcionalities (like Generics)? Will some new controls appear automatically on my toolbar, or I will have to manually regiser? Sorry for so many inquiries... and thanks in advance for your replies! :)

    .NET (Core and Framework) csharp dotnet visual-studio data-structures question

  • Explicit casting with Type variable
    K Kaikus

    Nice! I didn't know that. Just becouse I am returning to c# programmin after... 6 years without programming at all!! And I have only installed .NET Framework 1, do I wasn't aware of Generics. I will try! Thanks!

    C# question

  • Explicit casting with Type variable
    K Kaikus

    This is the temporal solution I have implemented, converting ToString. As you say, otherwise I should be sure to implement "==" operator for every object. Thanks for your reply!

    C# question

  • Problem with events...
    K Kaikus

    Thanks! I knew that was the problem. Parent was not completely set becouse I tried to suscribe inside child constructor, wich was invoked from the parent constructor. I tried your suggestion. It worked! But, how, and when to suscribe? Today morning, after a good rest, everything came clear. I just moved the suscription to the Forn_Load event :) Thanks!

    C# help

  • Problem with events...
    K Kaikus

    I have a problem... public delegate MyDelegate() class MDIParent { public event MyDelegate myEvent; public MDIParent() //Constructor { // Create and open MDIChild from MDIParent Constructor MDIChild mdiForm = new (MDIChild()) } Class MDIChild { public MDIChild //Constructor { ((MDIParent)this.MdiParent).myEvent += new MyDelegate(myPriveteMethod); } } Well, as you can see, I - Auntomatcally create a MDIChild from MDIParent constructor - In the MDIChild constructor I try to suscribe to an MDIParent event It gives me a SystemNullException. It perfectly suscribes if I do it OUTSIDE the MDIChildForm constructor. I suppose it is becouse parent form is not still initialized (child is created form INSIDE parent's constructor). I need to open MDIChild from the begginig, and suscribe to event at the begginning, too. Any workaround to do this without using the constructor Thanks!

    C# help

  • Explicit casting with Type variable
    K Kaikus

    'as' works the same way than normal casting... Doesn't work... :( What I want is compare the given value with data values from a dataset. So I first get the needed column DataType, and then I compare whith the properly unboxed value. The basic code would be: public int SeekRow (string colName, object value) { Type dataType = myDataSet.MyTable.Columns[colName].DataType; for (row=0; ...) { if (myDataSet.myTable[row][ColName]==(dataType)value) { return row; } } return -1; } If I can't, I must use a lot of untidy 'if' ot 'case'...

    C# question

  • Explicit casting with Type variable
    K Kaikus

    Is it possible to make a explicit casting using a variable? I'm passig a boxed object, and it's Type, as arguments. Inside the method I would like to unbox and use the content private void myMethod ( Object boxedObject, Type dataType) { .... ... = (dataType)boxedObject; .... } I know it doesn't compile this way. By the moment i'm using this kind of code: switch (dataType.ToString()) { case "int": ... = (int)boxedObject; case "string" ... = (string)boxedObject; ... } But... is there a way to make something similar to "(dataType)boxedObjec)" that doesn't need using 'if' or 'case' for every dataType? Thanks!

    C# question

  • Updatoing .NET Framework version
    K Kaikus

    Hi! I'm using just .NET Framework 1 and Visual Studio 2003. Will I have any problem if I install .NET Framework 2.0 or 3? Some controls will stop working? Will I have access to new controls / methods while programming, or It will onley install runtime libraries? I.E: Will I be able to use BindigSource / BindingNavigator, or I have to keep on CurrencyManager? Thanks!

    Database csharp dotnet visual-studio help question

  • Simple databinding
    K Kaikus

    This is exactly what I need, but... I don't have this control :( As I have recently read somewhere, I think I must try working with CurrencyManager, and implement it by myself. Let's see what can I find out... specially for SEEKING records. Thanks, anyway! :)

    C# question csharp tutorial announcement

  • Simple databinding
    K Kaikus

    I'm quite lost. I think it's simple, but I can't find the article or forum answer... I have a dataset. I have bound diffrent columns to different textboxes. Now... ¿How do I move throught the dataset? I just need to navigate through the dataset and then bound controls should automatically update. How to: - Move next/previous record - Seek or find records. Thanks! NOTE: By the moment I'm using Visual C# 2003 with NET Framework 1.1...

    C# question csharp tutorial announcement

  • Trap and Read magnetic tripe card reader [modified]
    K Kaikus

    Hi! I'm triying to read a card using a magnetic card reader. Now it's working perfectly in a quite simple way: reader it is pluged USB, and recognized as a HID, like a keyboard. I.E.: If I have focused a TextBox, and I pass a card, readed text is puted there (all three tracks, one after another, CR/LF inserted), directly. But I need to TRAP and read the text when no TextBox or simmilar is focused. I don't need any help about magnetic stripe encodig. I have this info. Just need to know how to get that text. Could you help me, please? Thanks!

    modified on Friday, January 15, 2010 6:56 AM

    C# help tutorial question
  • Login

  • Don't have an account? Register

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