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

Heinzzy

@Heinzzy
About
Posts
17
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • VB.Net Data Grid with Footer
    H Heinzzy

    I'd recommend you to create your own control inherited form DataGrid. It should consist of a DataGrid and your footer (you can create it of textboxes, labels, datagrids etc.) I feel it is nice solution, because you can always replace your component with another one implementing your IDataGridWithFootter. Regards

    Windows Forms csharp css

  • RSA Keys
    H Heinzzy

    look here it's quite simple!

    .NET (Core and Framework) help csharp java php database

  • decimal question
    H Heinzzy

    if I correctly understand your post

    double i = 11157.0;
    Console.WriteLine(i.ToString("#.#"));

    else clarify it plz

    C# question

  • Windows service
    H Heinzzy

    Thank you all! I realize that it was bad idea and switch to autorun application without UI.

    C# question

  • Windows service
    H Heinzzy

    Sure, but I'd like to start applications on the users desktop :((

    C# question

  • Windows service
    H Heinzzy

    unfortunately if I use Process.Start applications run without any interface :(

    C# question

  • Windows service
    H Heinzzy

    How can I make my service to start certain application, so user'll be able to use it?

    C# question

  • DataGridView and Deleting Rows
    H Heinzzy

    /// My stumbling point seems to be when I remove 1 using RemoveAt, the index numbers change and I get exceptions. delete items upward from bottom to top of datagrid

    C# database help tutorial question

  • ListBox.DisplayName problem
    H Heinzzy

    Unfortunately Pair contains only public fields named First and Seconds, but DisplayMember specify a name of the PROPERTY to display. So you could make it work like this

    {
    //form class

    private void Form1_Load(object sender, EventArgs e)
    {
    ArrayList list = new ArrayList();
    MyPair f = new MyPair("A", "B");
    list.Add(f);
    listBox1.DataSource = list;
    listBox1.DisplayMember = "second";
    }
    }

    class MyPair
    {
        public object First { get; set; }
        public object Second { get; set; }
        public MyPair(object a, object b)
        {
            this.First = a;
            this.Second = b;
        }
    }
    
    C# design help question

  • Reg: Disabling single item of CheckedListBox in C# -
    H Heinzzy

    checkedListBox1.SetItemCheckState(1, CheckState.Indeterminate);

    C# csharp help

  • Close All Child Window on Menu Click!
    H Heinzzy

    private void button2_Click(object sender, EventArgs e)
    {
    foreach (Form2 f in this.MdiChildren)
    {
    f.Dispose();
    }
    }

    C# csharp

  • windows not in focus
    H Heinzzy

    I feel that using a socet connection between service and application is not a good idea because this connection can be terminated by firewall etc ps use logging instead

    C# question tutorial

  • windows not in focus
    H Heinzzy

    So, we have a result here. To accomplish the mission you should definitly create a service. With hooks! ;)

    C# question tutorial

  • windows not in focus
    H Heinzzy

    To capture Keyboard stream use hooks Read this http://msdn.microsoft.com/en-us/library/ms632589(VS.85).aspx[^] Simple example using System; using System.Collections.Generic; using System.Text; using System.Diagnostics; using System.Runtime.InteropServices; namespace hook { class Program { private const int WH_KEYBOARD_LL = 13; private const int WM_KEYDOWN = 0x0100; private static LowLevelKeyboardProc _proc = HookCallback; private static IntPtr _hookID = IntPtr.Zero; static void Main() { _hookID = SetHook(_proc); Application.Run(); UnhookWindowsHookEx(_hookID); } private static IntPtr SetHook(LowLevelKeyboardProc proc) { using (Process curProcess = Process.GetCurrentProcess()) using (ProcessModule curModule = curProcess.MainModule) { return SetWindowsHookEx(WH_KEYBOARD_LL, proc, GetModuleHandle(curModule.ModuleName), 0); } } private delegate IntPtr LowLevelKeyboardProc(int nCode, IntPtr wParam, IntPtr lParam); private static IntPtr HookCallback(int nCode, IntPtr wParam, IntPtr lParam) { if ((nCode >= 0) && (wParam == (IntPtr)WM_KEYDOWN)) { int vkCode = Marshal.ReadInt32(lParam); if (((Keys)vkCode == Keys.LWin) || ((Keys)vkCode == Keys.RWin)) { Console.WriteLine("{0} blocked!", (Keys)vkCode); return (IntPtr)1; } } return CallNextHookEx(_hookID, nCode, wParam, lParam); } [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern IntPtr SetWindowsHookEx(int idHook, LowLevelKeyboardProc lpfn, IntPtr hMod, uint dwThreadId); [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern bool UnhookWindowsHookEx(IntPtr hhk); [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode, IntPtr wParam, IntPtr lParam); [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]

    C# question tutorial

  • windows not in focus
    H Heinzzy

    Although it's rather unwieldy task I guess I know a way to perform it. To interact with an application that is not in focus I recommend you to use windows application log. Create the window service to handle BC input and write it down to the Log. In the application - check the Log for new entries on timer event and if it exists put it into your textbox. So despite your application might be not in focuse it still can achieve data from BC.

    C# question tutorial

  • windows not in focus
    H Heinzzy

    But we still can distinguish BC from user by using prefixes. What do you think?

    C# question tutorial

  • windows not in focus
    H Heinzzy

    OriginalGriff wrote:

    Then you have a problem. all the Keyboard emulating BCRs I have seen read teh BC and just provide a datastream as if the barcode data had been typed by the user.

    I feel it's all ok. User such as a cashier isn't supposed to use a keyboard very often. So we can redirect BC stream to the textbox. In the textbox handler we can validate BC/user input. For example - user always start typing session with "A" char, else it's BC's chars.

    C# question tutorial
  • Login

  • Don't have an account? Register

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