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
P

Pasan148

@Pasan148
About
Posts
51
Topics
29
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • ObjectListView cell contents changing Issue
    P Pasan148

    I wanted to pragmatically change the content of a cell. So I have tried something like this

    Private Structure Items
    Dim ID as Integer
    Dim Name as String
    End Structure

    Dim objItem as Items
    Private Sub AddItem()
    objItem.ID = 1
    objItem.Name = "Name"
    objectlistview.AddObject(objItem)
    End Sub

    Private sub ChangeItem()
    objItem.Name = "MyName"
    objectlistview.RefreshObject(objItem)
    End Sum

    AddItem() method is working fine. But ChangeItem() method doesn't work. What's wrong with code

    Visual Basic help

  • Using a WPF Control with WinForms
    P Pasan148

    I have a customized WPF button control and I want to use this control with a WinForm application. I know how to use WPF user controls with WinForm using ElementHost. But I have no idea to use any single control (not a user control) with all its members with a WinForm application. Can you suggest me a good way to achieve this

    .NET (Core and Framework) csharp winforms wpf tutorial

  • CommandBuilder Problem
    P Pasan148

    I didn't use any Insert statement. Just used CommandBuilder class to generate SQL statements

    Visual Basic help

  • CommandBuilder Problem
    P Pasan148

    Is it possible to insert rows in to a MS Access table with a Auto number field using a CommandBuilder. I tried that but it's getting following error. Syntax error in Insert in to statement. I did same thing to a table which doesn't have a auto number field. It worked. I think the problem is that auto number field. What's the solution for this problem.

    Visual Basic help

  • Taking pictures with Web Cam
    P Pasan148

    I can't understand why it's not clear for you. I just want to modify that code to work on Windows 7 too. If you know the answer please let me know. If you don't know the answer just ignore it.

    Visual Basic com help question

  • Taking pictures with Web Cam
    P Pasan148

    I used this code to take picture with a webcam http://lobsterproductions.weebly.com/uploads/1/9/5/1/1951779/webcam_picture_tool_codes.txt[^] It works perfect on Win XP. But not on Win 7. What's the issue here. How do I modify this code to work on Win 7 too.

    Visual Basic com help question

  • Running Photoshop Action
    P Pasan148

    I want to run any action given by user. Not only resize image.

    Visual Basic csharp adobe

  • Running Photoshop Action
    P Pasan148

    I just want to run a action installed in Photoshop. First my app will start Photoshop. I can do it. Then it should run given action installed in Photoshop. That is the problem

    Visual Basic csharp adobe

  • Running Photoshop Action
    P Pasan148

    Is it possible to run a Photoshop action with VB.NET. If so can any one tell me the way.

    Visual Basic csharp adobe

  • Sending SMS
    P Pasan148

    I tried that SerialPort.GetPortNames function. It shows COM1 only. So if I connect my phone to a USB port can I use the port as COM1?

    Visual Basic csharp com question

  • Sending SMS
    P Pasan148

    Sending SMS using .NET[^] I used this code to send SMS by an application. it's need to pass com port as a parameter. But my PC doesn't have com ports. it only have USB ports only. So how do i find the com port which attached my phone. (Here i use a mobile phone instead of a GSM Modem)

    Visual Basic csharp com question

  • Combo box in List box
    P Pasan148

    Is there any method to insert a combo box in to list box. I want to allow users to choose items in a list box. It just like check boxes in a list box. But i want to use combo boxes instead of check boxes.

    Visual Basic

  • SQL Error
    P Pasan148

    It's working. thanks a lot. :)

    Visual Basic database com help question

  • SQL Error
    P Pasan148

    I am getting a syntax error in this SQL statement. But i can't figure out what it is. Dim sql As String = "INSERT INTO Users (UserID, Password, CompleteName, Admin) VALUES (@User, @Pass, @Complete, @admin)" Whole code segment is below Dim sql As String = "INSERT INTO Users (UserID, Password, CompleteName, Admin) VALUES (@User, @Pass, @Complete, @admin)" Dim com As New OleDb.OleDbCommand com.Parameters.Add("@User", OleDb.OleDbType.Char).Value = txtUser.Text com.Parameters.Add("@Pass", OleDb.OleDbType.Char).Value = txtpass.Text com.Parameters.Add("@Complete", OleDb.OleDbType.Char).Value = txtcomplete.Text com.Parameters.Add("@admin", OleDb.OleDbType.Char).Value = isadm what is the error of SQL statement.

    Visual Basic database com help question

  • Crystal report problem
    P Pasan148

    I have a database with two tables Customers an loans. Customer table contain customer details like id, name, address etc. Loans table contain details of loans taken by customers like loan id, customer id, loan amount. I want to generate a report showing all customers and their loan amount regardless whether customers took loans or not. I tried to do this but it shows only customers who took loans. But i want to show all customers. How can i do this

    Visual Basic database sales help question

  • Disabling the keyboard
    P Pasan148

    Please can you show me the code to set a new value for lParam variable. Since I am not familiar with hooks I can't understand how to do that.

    Visual Basic json

  • Disabling the keyboard
    P Pasan148

    I used following code to implement my project as you suggest

    Private Const WH_KEYBOARD_LL As Integer = 13
    Private Const WM_KEYUP As Integer = &H101
    Private Const WM_SYSKEYUP As Integer = &H105
    Private proc As LowLevelKeyboardProcDelegate = AddressOf HookCallback
    Private hookID As IntPtr

    Private Delegate Function LowLevelKeyboardProcDelegate(ByVal nCode As Integer, ByVal wParam As IntPtr, \_
        ByVal lParam As IntPtr) As IntPtr
    
    <DllImport("user32")> \_
    Private Shared Function SetWindowsHookEx(ByVal idHook As Integer, ByVal lpfn As LowLevelKeyboardProcDelegate, \_
        ByVal hMod As IntPtr, ByVal dwThreadId As UInteger) As IntPtr
    End Function
    
    <DllImport("user32.dll")> \_
    Private Shared Function UnhookWindowsHookEx(ByVal hhk As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean
    End Function
    
    <DllImport("user32.dll")> \_
    Private Shared Function CallNextHookEx(ByVal hhk As IntPtr, ByVal nCode As Integer, ByVal wParam As IntPtr, \_
        ByVal lParam As IntPtr) As IntPtr
    End Function
    
    <DllImport("kernel32.dll", CharSet:=CharSet.Unicode)> \_
    Private Shared Function GetModuleHandle(ByVal lpModuleName As String) As IntPtr
    End Function
    
    Sub New()
        ' This call is required by the Windows Form Designer.
        InitializeComponent()
        ' Add any initialization after the InitializeComponent() call.
        hookID = SetHook(proc)
    End Sub
    
    Private Sub Form1\_FormClosing(ByVal sender As Object, ByVal e As FormClosingEventArgs) Handles Me.FormClosing
        UnhookWindowsHookEx(hookID)
    End Sub
    
    Private Function SetHook(ByVal proc As LowLevelKeyboardProcDelegate) As IntPtr
        Using curProcess As Process = Process.GetCurrentProcess()
            Using curModule As ProcessModule = curProcess.MainModule
                Return SetWindowsHookEx(WH\_KEYBOARD\_LL, proc, GetModuleHandle(curModule.ModuleName), 0)
            End Using
        End Using
    End Function
    

    But there is a problem in this function

    Private Function HookCallback(ByVal nCode As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As IntPtr

        If nCode Then
            Dim vkCode As Integer = Marshal.ReadInt32(lParam)
            If vkCode = Keys.A Then
                SendKeys.Send("B")
                Return CType(1, IntPtr)
            End If
        End If
         Return CallNextHookEx(hookID, nCode, wParam, lParam)
    End Fu
    
    Visual Basic json

  • Disabling the keyboard
    P Pasan148

    As I know, .NET Framework doesn't support global hooks and I am not familiar with hooks . Can you suggest another possible way to do this with .NET

    Visual Basic json

  • Disabling the keyboard
    P Pasan148

    My requirement is to create a transliteration application. If I do this as you suggested, its ability limits to one application. But I want allow users to do transliteration on any window. To do so first I want to avoid typing English letters and track the key which was pressed. Later it will send translated letter to the active window. That's what I want.

    Visual Basic json

  • Disabling the keyboard
    P Pasan148

    Is there a way to avoid typing alphabetic keys (A-Z) in any window and track the key which was pressed at same time. I tried to use BlockInput API. But it disabled all keys in keyboard. I hope your kind reply. Thanks

    Visual Basic json
  • Login

  • Don't have an account? Register

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