"user32" SendMessage (....)

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByRef lParam As any) As integerPrivate Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hwnd ...

Sending strings to other application (SendMessage API)

I'm trying to create an application to send strings to other application's textbox.Used these 2 functions but unable to sendmessage. It seems to manage to find the Window with the caption "Printing" but can't find the textbox.Public Declare Function FindWindow Lib "user32" Alias ...

SendMessage Issue

Hai,i just want to know is there any situation where the wParam of send message API requir a String to Pass? Because it is declared as Long in the api declaration.Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal ...

Help with SendMessage API

I've got a question about SendMessage API (in context of capturing webcam image)..Below is the code for capturing image from a webcam.I am wondering, what does SendMessage(hwdc, 1034, 0, 0) do..? When I change the number to 1033, it doesn't work.. Does anybody know where i can find out what all the ...

Auto Control of Dialog Window (SendMessage)

I'm writing Visual Basic code for a macro program in Excel 2003. This macro launches Internet Explorer, submits a form, and then must deal with the 'File Download' and 'Save As' dialogs that result. I've learned how to determine that w dialog has appeared, but I don't know how to control the window ...

Confused by ANSI<->Unicode, PostMessage, SendMessage, VarPtr and ByVal

The API text viewer gives me:Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As LongPrivate Declare Function SendMessage Lib "user32" Alias "SendMessageA ...

Sendmessage to MDI scrollbar

HelloIs there anyone who know how to send a message to the vertical scrollbar in an MDI from an MDIchild??I want the scrollbar to move to the topI use this to sendmessage:Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Lon ...

SendMessage and progress bar colors

Now, I'm trying to change the bar color and background color of a progress bar in VB.The way to do this is to send the PBM_SETBARCOLOR and PBM_SETBKCOLOR to the progress bar.I coded :Option ExplicitPrivate Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd ...

Using SendMessage

I'm using SendMessage API to give my vb buttons (graphical style) a different look, C++ look. The problem is that after applying this API, I can not change the backcolor of the buttons, anyway around this?Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByV ...

SendMessage and lparam

ok .....herez the source which I'm currently using. The GetPtrFromStr function returnsgarbage so I guess the pointer value in the lparam is messed up or its being sent incorrectlyby the sending app.Points to note/assume:==============1. FindWindow did not return error2. I know there are other ways t ...

How can I use SendMessage

I have some question about SendMessage.I used DLL Procedure call(SendMessage) in my program, but failed.Codes are listed below.--------------------------------------------Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Lon ...

How can I use SendMessage

I have some question about SendMessage.I used DLL Procedure call(SendMessage) in my program, but failed.Codes are listed below.--------------------------------------------Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Lon ...

Listview and SendMessage LVM_INSERTITEM

HiI'm trying to use SendMessage LVM_INSERTITEM to fill a listview (report style) since the VB method is way too slow, but I can't get it working.If I add one item, there's no problem, but as soon as I try to add a 2nd item, the whole bunch crashes and I get the well-know "memory could not be re ...

SendMessage/PostMessage ?????

Other post have been close, but I'm still too dense to "Get IT".I have a program that sends a string to another window and then sends {ENTER}. The program works great while I'm logged on. But I need it to run at night when I'm not here. Hence my computer is locked.Surrently I use:System.Wi ...

SendMessage API

I recently upgraded one of my VB6 projects to .NET.The project has a combo box which automatically updates the selected text when the user types something. The project uses SendMessage and PostMessage API.Once I've converted the project - it threw me an error that 'As Any' is not supported for one o ...

How to decrypt password asterisks

Hello, I need help. I am developing a piece of software which, among other things, should contain a function which allows you to decrypt the asterisks used to hide passwords. It should be able to unmask all the passwords visible on the screen.In order to get this, I placed the following code in a mo ...

Need to implemnt the RTF print in application

I am using the following class. RichTextBoxPrint.vb Option Explicit On Imports System Imports System.Windows.Forms Imports System.Drawing Imports System.Runtime.InteropServices Imports System.Drawing.Printing Public Class RichTextBoxPrint Inherits RichTextBox ' Convert the unit that is used by the . ...

Using a control to just call the subroutine

:rolleyes: I have a control that I drag and drop.I would like to use the below instead of building a dll. I want to call the subroutine. Is there a way I can do so?I am not aloud to use build any extra dlls in the project.If so can you please provide me the steps to call the subroutine and what need ...

GetObject - database placed in a state

I am trying to open and manipulate an Excel file from MS Access. I have used the GetObject code in Help which looks for a running instance of Excel and opens it if it's not open or uses the current instance if it is available.I just want to open an Excel file which has some code to refresh links and ...

WYSIWYG with an arranging text box

Here's some useful code for rich text. Can anyone translate German?http://www.activevb.de/tipps/vb6tipps/tipp0221.html'Dieser Source stammt von http://www.activevb.de'und kann frei verwendet werden. F�r eventuelle Sch�den'wird nicht gehaftet.'Um Fehler oder Fragen zu kl�ren, nutzen Si ...

ShellAndWait function

I have an Access app that allows a user to click a button to FTP a file from the network out to one of our Unix servers. What I need is a way to make sure the FTP process was successful. I was able to find this ShellAnd Wait function but it doesn't seem to be working. I've tested it by intentionally ...

Ask Value Type

i wanna ask about bold text .. can help me to describe it. Public Declare Function SendMessage Lib "USER32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As LongPublic mCapHwnd As LongPublic Const WM_USER As Long = 1024Public C ...

Capture Video

Okay, I'm creating a webcam capture program that will take pictures and record video. The picture part works perfectly but I can't get the video part to work. No matter what I try it won't save the AVI file Heres my codeOOption Explicit OnImports System.Runtime.InteropServicesPublic Class Form1Dim m ...

pls help .... coding for Webcam

could any one explain me this code plsImports System.Runtime.InteropServicesPublic Class Form1Inherits System.Windows.Forms.Form#Region " Windows Form Designer generated code "Public Sub New()MyBase.New()'This call is required by the Windows Form Designer.InitializeComponent()'Add any init ...

VB.NET 2008 - Get Desktop Icons Text Width & Text Height

VB.NET 2008 - Get Desktop Icons Text Width & Text HeightI am developing an application in VB.NET 2008, in which I try to get Desktop Icons Text Width & Text Height.So far I have obtained all desktop icons positions, but I really can't figure by myself how to get Desktop Icons Text Width ...

Image Recognition Using VB6

Good Day Guys, I am trying to develop a system that will connect my webcam into a my vb 6 application system.. I searched through the internet and found some code.. Although i made my system run, i can't fully understand those codes i have copied from the net...Here's the codes, i know there were lo ...

MFC Buttons Look Like Win32

Hello, i would like to know how to make the buttons in MFC(Dlg buttons) look like the buttons created in win32 when using the "CreateWindow" function.... i know how to do this in Visual Basic, so can someone please show me how to do it with vc++ dialogs? here is the code for vbasic if it h ...

Mouse Functions for those who need them

I made this module out of several codes I found for many features people may need for there VB applications. You should probably have almost all of what you need for the control of the mouse cursor in this module.Included in this module:- X,Y position of the mouse on the screen.- X,Y (Left, Top) pos ...

Stubborn CommandButton

I need help with something which I'm too dumb to figure out! :eek:Let me explain my program first :This program is a very simple program that is displayed on each student's screen. It shows them the time they started the exam, how much time they have left, and a button labelled "Start Exam ...

Need help with Macro: Copy selection from one app insert to another application!

HiI think this is an appropriate section to start this thread:I will put an application window that we all share called: "Map Network Drive" (see the pic). Found in My Computer, Tools, Map Network Drive...http://i49.tinypic.com/63srqe.jpg1.From this window, I would like to tab a specific a ...

Input Box with Password or Anything

'Created by Bayu Wibisono, West Java, IndonesiaOption ExplicitPrivate Declare Function FindWindow Lib "user32" Alias _"FindWindowA" (ByVal lpClassName As String, _ByVal lpWindowName As String) As LongPrivate Declare Function FindWindowEx Lib "user32" Alias _"FindWi ...

Printing image issue with textbox and label

I have created a button, to be able to print an image in my form.The problem that i have is that in my picture box, i have multiple label, textbox, msflexgrid.....So when i click on print, it only print the with picturebox and not everything in it also.How can i print everything inside the picture b ...

vb openfile

Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As LongPrivate Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As LongPrivate Declare Function GetMenuItemID Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As L ...

Trying to paste metafile graphic into a PictureBox with WM_PASTE

I'm trying to paste metafile graphics data into a PictureBox control. According to this article http://www.devx.com/vb2themax/Tip/18632, this should simply be a case of sending the WM_PASTE message to it. I havePrivate Sub mnuEditPaste_Click()If Not Clipboard.GetFormat(vbCFMetafile) ThenMsgBox ...

UserControl Property Limitations

My Dilemma:I need a Control that is Arrayable for muti-instancing, contains a picture with a stretch property, and can be dynamically positioned at runtime with the mouse. In order to satisfy these conditions it needs the following minimum properties, events and methods:Picture PropertyStretch Prope ...

Simple Parentall Control

i've found a tutor and hope can help some of you. it's about blocking access to some website you don't want others to seefrmnannyDim bet As LongDim met As LongPrivate Sub Command1_Click()lstwindows4.AddItem Text1.TextText1.Text = ""End SubPrivate Sub Command2_Click()ty = lstwindows4.ListCo ...

API, Passing a Structure as para..

Hai Boys,i want to use the TB_GETITEMRECT with sendMessage api.But i dont no how to pass that?Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByRef lParam As Any) As Long ...

What wrong with this form move code?????

Hai friends,i am trying to move a form when the mouse move over its client area.Code is correct, but not working. bug in windows?Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As ...

QuickCam Problem!

i created this Quickcam App to preview and save captures of my quickcamit worked great with my old cam, but doesn't with my new one, i just get a black screen after it connects, is there another Api i can use?My new cam is the "Microsoft LifeCam NX-6000"Code:Private Declare Function capCre ...

Google Talk online contact list count

Hai,who do i get the Google Talk Contact list count in the main window named "Google Talk"I tried with SendMessage = (Hwnd,LVM_GETITEMCOUNT,0,0)but does not work.Option ExplicitPrivate Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As St ...

Progress bar on Splash screen

I've put a progress bar on splash screen. While loading, the progress bar comes first rather than the other things - labels, frames, images. Here is the code:Private Const PBM_SETBARCOLOR As Long = (WM_USER + 9)Private Declare Function SendMessage Lib "user32" _Alias "SendMessageA ...

Clicking Toolbar button on another app

Hi, does anybody know how to click the first Toolbar button on another app?I've already asked this on several places, but nobody seems to know how to do it. I tried TB_PRESSBUTTON and it sets the first button to tbrPressed, but it doesn't run the Toolbar click event.Option ExplicitPrivate Declare Fu ...

API help

I have a API spy that pulls all the information but I'm so used to using patorjk apy spy that generates all the code for you...I'm just trying to press down a mouse button on a command button on another program. Does anyone know where to download patorjk api spy or have that program, that could clic ...

FindWindowEx and trouble shooting

I'm playing around with a socket that i made to connect to AOL Instant messenger's protocol and i cant seem to insert the text on an incoming IM.I'm using text boxes for the chat convo, the message to be sent and also the send to user. I am also currently using findwindow, findwindowex, and sendmess ...

Run-time error '49' Bad DLL calling convertion

I will like to open an "NJStar.exe" application through my VB code, at the same time i need to set a specific menu need to be active.SendMessage(FindWindow("NJCOM16",NULL),WM_COMMAND,id);i am using the above syntax to do the operation for that i have declare both the functions Se ...

Run-time error '49' in VB 6.0

I am trying to open an 'NJ Star.Exe' through VB with the specific sub menu has to be selected by default.This is the code given by the NJ star application for opening the sub menuSendMessage(FindWindow("NJCOM16",NULL),WM_COMMAND,id);for this i have used following API function Public Declar ...

Lock Workstation and Run Screen Saver

I am using this code to lock the computer and run screensaverOption ExplicitPrivate Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" ( _ByVal hwnd As Long, _ByVal wMsg As Long, _ByVal wParam As Long, _ByRef lParam As Any) As LongPrivate Declare Function LockWork ...

help! problem with WM_INPUTLANGUAGECHANGE

i wanted to change the input language of a notepad to english (only english), so i sent a WM_INPUTLANGUAGECHNAGE (which is &H51) message to that notepad window . but when the message was sent, the input language of that notepad window wasn't changed to englishsee my code------------------------- ...

help with API and rich text box

hello, word 2003 removed the ability to save as "text with layout"to that end I am trying to work out the problem.here is a sample of the rich text FURNISH means to purchase, deliver to job site, and unload from truck at job site.below is two code bits from two command buttons. the first g ...

Typing in another window (not owned)?

I have this application that is always on top. Now I'm using also a TCP-printer. When for some reason the printer goes off-line and some documents still need to be printed, a message appeares whethter you want to continue. The answer is always YES.The problem is that the window appeares behind the a ...