Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

API Equivalent Of Sendkeys

I need the equivalent API of sendkeys. Thanks in advance!

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
"SendMouse" Equivalent For "SendKeys"?
VB has a powerful command called "SendKeys" where by you can emulate keyboard strokes in code.

But I need a way to simulate a mouse click in code. Something along the lines of a "SendMouse" command.

Any ideas, anyone?


VB Equivalent To VBA

Thanks in Advance.Any help will be appreciated.

Can any body suggest me VB equivalent to the below VBA from excel:

'Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Key2:=Range("G2") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom

'Selection.Subtotal GroupBy:=3, Function:=xlSum, TotalList:=Array(8, 9, 10, _
12, 13, 14, 15, 16, 17, 18, 19), Replace:=True, PageBreaks:=False, _

Is it possible to write this in VB or not?

C++ 'pow' Equivalent In VB6
I need to convert this C++ code to VB6:

double LogThreshold::scaleVal()
return pow(10.0, logval())
(logval is a public variable)

I can't work out the 'pow' in VB - is it Exp??

Public Function scaleval()
scaleval = pow(10#, logval)
End Function


Are These Two Equivalent?
Is this...

Dim Data(BufferSize) As Byte
Dim sBuff As String
sBuff = Space$(BufferSize)
CopyMemory ByVal sBuff, Data(0), BufferSize
mmioWrite hmmioIn, sBuff, BufferSize
equivalent to this...

Dim Data(BufferSize) As Byte
mmioWrite hmmioIn, Data(0), BufferSize
Given BufferSize is the same and that the Data array holds the same values in both code blocks?

C++ Equivalent?
Can someone show me the C++ equivalent to Visual Basics
sub main()
Everywhere i look only talks about win32 apps that have a form, but i need just a plain app that runs in the background. Some sample code over even a link to a tutorial would be great.

Lsf Equivalent?
Does VB have an equivalent of the lsf command (in Unix)?

To be specific, lsf gives a summary of a bunch of files with sequential file names. For example, if I have


I will get


Does such a command exist, or am I just proving how excessively lazy I am for asking instead of sitting down and coding?

API Equivalent
Visual Basic has this time runtime function:

Form1.ShowInTaskbar = False
For not showing the app in the taskbar (where is the start menu). Is there an API to do the same?

VB Equivalent!
The following 2 lines of code are in VB.NET (C#):
this.webMain.Dock = System.Windows.Forms.DockStyle.None;
this.webMain.Dock = System.Windows.Forms.DockStyle.Fill;
Does anyone know the VB6 equivalent of the above-mentioned 2 lines?

Please note that the above code makes use of the WebBrowser control (or whatever it is called in VB.NET).



C# Equivalent
I now start to use C#, but it is verrrrrrrrry tedious,
it may be very powerful, but difficult to memorise all those namespace etc

a lot of commands inside, and very difficult to find out.

Do anybody know where I can find a map about the
equivalent function in C#

such as in VB, use InStr, but in C#, it is IndexOf(Object)


VC++ API Equivalent
I know that if I want to play with the power of Windows, I can use API in VB, but what about VC++, what is the API equivalent, if I want to access registery or do particular stuff with Windows, where can I get the API for it, or what is it called the API equivalent for VC++.. is it MFC and if so, where can get the documentation or a site which has all the MFC and howto's to add and make use, like API for VB.


Equivalent Of % In C++?
is there an equivalent of % in VB?

% is used to know whats the remainer of a division
eg: 2 % 5 = 1
2 % 6 = 0
4 % 18 = 2

Isn't There An RPT$ Equivalent In VB?
Isn't there a way to make a string of one character or a series of characters repeated over and over a bunch of times without making a loop of string = string & "_"

API Equivalent Of .Cls?

I'm trying to figure out the equivalent of the .Cls function in VB which clears the dc for which it is called but I'm not having any luck.

I am subclassing a form and thought I could just do a PostMessage to the form's hWnd with "WM_PAINT" as the message parameter, but that doesn't seem to be enough.

Just to confirm, I created a form with a command button on it and put the code: Me.Cls and then looked at it with Spy++ and it seems that the only message getting processed was WM_PAINT.

So why is posting the "WM_PAINT" message not enough?

Any help would be appreciated..


VB And Its Equivalent
Can anyone list me a few application soft. which avhieve the same functionality as VB and are its competitors?

What Is The Equivalent Of 'i++' In VB?
This is one of those knucke-headed things in the online help for VB that drives me crazy. I can't seem to find the proper syntax to iterate a variable for VB. The long way would be :

i = i + 1

In other languages, this would be :


What's the VB equivalent?

Equivalent In
I have the following command works in VB 6. Does anyone know the equivalent in Appreciate any help.

Word_Doc.SaveAs App.Path & "..datarecon" & Replace(Doc_File, ".doc", ".rtf"), FileFormat:=wdFormatXML

Is There Anything Equivalent As /* */ In VB?
It is very awkward to type so many " ' " in order to comment out a block of code. Thank you very much!

Subform Equivalent In VB.
What are my options for making a sort of equilalent of a subform from Access in VB?? I have the typical desire to have a checkbox field for each record.

Take for example two fields:
Book Name: txtBookName
Read: chkRead

In Access I could create a continous subform. I suppose I could the datarepeater control, but then I need a class and an ActiveX custom control. I've read that "controls that support the DataSource and DataField property can be bound to one one property". So what if you have two txtboxes in your control??

Querydef Equivalent In Ado
I need to get the fields of a query. For Access 97 databases, I am able to use QueryDefs to get the fields. For newer databases/projects, I've tried the following non-DAO methods.

1) Set lrs = mp_App.CurrentProject.Connection.OpenSchema (adSchemaColumns, Array(Empty, Empty, ls_QueryName, Empty)
Do Until lrs.EOF

-- This method returns no columns for a query/view with parameters

2) Set lconn = New ADODB.Connection
Set lcat = New ADOX.Catalog
lcat.ActiveConnection = lconn
Set ltbl = lcat.Tables(ls_QueryName) 'err here
For Each lcol In ltbl.Columns
Next lcol

-- This method returns an error 3265 (item cannot be found in the collection) for a query/view with parameters

3) Set lconn = New ADODB.Connection
Set lrs = New ADODB.Recordset
lrs.Open ls_QueryName, lconn 'err here
For Each lfld In lrs.Fields
Next lfld2

-- This method returns an error -2147217900 (invalid sql statement) for a query/view with parameters

Since these techniques work fine until I use a query with parameters, this makes me wonder if the query is being opened or run to extract that information in the above methods. Is there any alternative to getting the fields. At worst case, I would even settle for the SELECT portion of the SQL statement and then extract the fields from that myself.

I also tried getting the collection of views from ADOX.Catalog, but there is no fields property for a view, so that didn't do any good.

I guess the other question is this... does DAO work with newer databases? I heard/read somewhere that DAO is or will soon be extinct. Is this the case? If I can use CurrentDB with QueryDef on new databases, that would settle the problem. I could find an alternate for getting query information out of projects, as I know DAO can't be used within a ADP/ADE.

I'm looking for suggestions! Thanks.

D3dxvec3unproject Equivalent?
Is there a Dx 8.1 equivalent function to the dx 9 function?

Break Equivalent In VB?
If I have a loop in C, such as this:

for(int i = 0; i < 10; i++) {
if(i == 5) break;
Then the loop will exit once i reaches 5. Is there such a way to do this in visual basic? I tried using the end statement, and that doesnt seem to work. I dont want to have to use a goto statement.

Hi {.NET Equivalent Of Type}
hi every 1

does anyone know how to declare public type record array in vb 2005 express edition.

in vb 6 you declare a record of array (record array)or (records)

the code is this

public type recordtype

name as string
balance as currency

End type

Dim Onerecord as recordtype

how do you convert this into vb 2005 express edition

please do reply if any one knows how to do this


C Sizeof() Equivalent In Vb6

in c you can do

and it will return the size in bytes of the struct passed.

Is there an equivalent in vb6 which will return the size of a user type:
for example:


biSize As Long
biWidth As Long
biHeight As Long
biPlanes As Integer
biBitCount As Integer
biCompression As Long
biSizeImage As Long
biXPelsPerMeter As Long
biYPelsPerMeter As Long
biClrUsed As Long
biClrImportant As Long
End Type

sub testSub()
msgbox "The size in bytes is: " & vb6sizeof(BITMAPINFOHEADER)
end sub


Is There An Equivalent OpenArgs In VB

i usually work in Access, but am now working on a project in VB6.

I am using one form to generate a new project, which is fine and is returning me with the Primary key I need to open my next form.

However, How can I pass this to the next form (as in access openargs) so that I can then do this sort of thing

docmd.openform "Formname", and then find the project associated with the key from the other form.

Cell Equivalent Name
Hi all
Given a cell number, for example (1,1), how do I find the equivalent in terms of row name, column name? Looking at the excel sheet, I know that cell(1,1) is B2. But how do I program this? I need to store B2 in a string variable. Please help.

Is There An Equivalent To #ifdebug In Vb?
i'm looking for a way to tell the parser in vb that i'm currently in debug mode. the reason behind this is that i want to try a few things before i release the code to users. what i'm being forced to do right now is use a global boolean variable - Debug - that i set to true when i'm coding within vb ide. when i compile the program for release i then change it to false so that areas or code i'm working on that are not complete are not used in the end user executable.

i know that in c-ide you can use the preprocessor directive #ifdebug which allows one to not worry about remembering to change variable values before compiling. is there an equivalent for vb6.0?

Struct Equivalent
I'm looking for a struct equivalent in visual basic. Is there such a thing?

What's The Equivalent Of Me For A Project?
Hi! When I wnat to modify the crrent Form I used the command ME ... but If I want to do the same when the current project ... is there any reserved word?

Thanks a lot again!

Mid Function Equivalent
is there an equivalent of the mid function that works with integers? im using vb6. any help would be really appreciated

What's The VB Equivalent Of: Int *p = NULL;
I'm converting code from C to VB and I'm stuck on this one. I'm new to VB. Thanks for any help!!

MS Access Yes/No.. What's The SQL Equivalent?
I have a Access Database that I'm transfering to a SQL Server. I figured out all the variable char, datetime stuff, but can't seem to figure out teh most equivalent to a Boolean value. I used Yes/No checkbox in MS Access, but can't seem to figure out what's the closest for my SQL Server. Use "Bit" and have 1 = True and 0 = False? (Note in VB, True = -1 and False = 0) Or do I have to end up just making a NVarChar and enter a string value True or False.

API Equivalent To App.EXEName
What's the API equivalent to Visual Basic's App.EXEName?

API Equivalent To Savepicture
I basically want to support picture resizing with a picturebox savepicture method, so that the user can specify the size of the bitmap to be saved, rather than just going with the dimensions of the picturebox.

I can StretchBlt it to the 'corrected' size, and do that to a hidden picture box, and call the savepicture method of that picturebox, but I would prefer not to have an extra picturebox. Is there any (easy) way of stretchblt-ing to a memory hDC, then saving from that hDC to a bmp file?

VB6 Equivalent For AfterUpdate (VBA)
What is the equivalent event in VB6 for VBA's ListBox1_AfterUpdate()?

Also, what is VB6 equivalent for ListBox1.Value??

I am quite confused since after I tried to convert my VBA code to VB6 code, suddenly I cannot find the same event nor action, so the result isn't what I expected... Please help. Thanks a lot in advance!

VB Equivalent Of PHP Count()
Is there an equivalent to PHP count()

(where the hell is the manual that list this stuff?)

count Count elements in an array

Php Explode() Equivalent In VB?
Hey guys,

I'm not sure how many of you are familiar with php (i'm sure quite a lot of you are)

I was just wondering if VB had an equivalent explode function, currently im receiving some data delimited by the | character, like below



At the moment im trying to retrieve this data (done), then split this data up, and then enter it into array so i can do a for loop with some of the values.

I'd really appreciate it if someone could point me to the solution.

Thanks for your time,


SizeOf() VB6 Equivalent?
I'm looking through the online MSDN for an equivalent to SizeOf() from C++... I need it for this:

I'm making a VB TYPE version of this, but, I'm not sure how to fill cbsize with the SizeOf() for the struct.

typedef struct tagMONITORINFO {
DWORD cbSize;
RECT rcMonitor;
RECT rcWork;
DWORD dwFlags;


So, does anyone know what I could use to replace SizeOf() or a safe number to hardcode into cbSize in place of SizeOf()?

vb Code:
Public Type RECT        Left As Long        Top As Long        Right As Long        Bottom As LongEnd Type Private Type tagMONITORINFO    cbSize As Long    rcMonitor as RECT    rcWork As RECT    dwFlags as LongEnd Type

VB's Equivalent Of Break

i have got the following code

VB Code:
For count = 0 To (ComboCh.ListCount - 1)        If ComboCh.List(count) = "3.5" Then            ComboCh.ListIndex = count            'Break        Else            ComboCh.ListIndex = 0        End If    Next count

and i wanted to step out of the for next loop if any of the list elements in the comboch is 3.5. i tried to do a "C-style" break, but that did not seem to work

what is the equivalent of break in VB?

COALESCE Equivalent
hello everyone..
does anybody know the equivalent of COALESCE in MS Access??


Equivalent Of VBA OpenArgs In VB6
Can anyone tell me is there an equivalent for the VBA OpenArgs property for a form in VB6.

Thank you

Mid$ - C++ Equivalent - RESOLVED

Does anyone know if there exists a C++ function equivalent of the VB Mid$. I have written my own version, but it keeps on adding extra chars on the end of my char *.


VB6 DataSet Equivalent
Hi, can anyone please tell me what the ADO VB6 equivalent of a .Net dataset is or if it exists?

I want to be able to populate a 'Dataset' in a VB6 function and return the 'Dataset to the calling function.


NT4 Equivalent Of CreateToolhelp32Snapshot() ?
Just wondering if there's a similar API that will work under NT4...?

SetTimeout VB Equivalent

I need to fire off a sub routine at fixed intervals eg every 10 seconds, but i don''t want the rest of my app to hang obviously the pupose of the timer control is to do this job.

However I don't have a form in my app in which to place a Timer control.

any ideas ??

C/C++ Equivalent Of DoEvents
I know this may not be the best place to ask this, but since everyone here should know about DoEvents, I'm probably better off asking this here than in a Visual C/C++ or Borland C++ Builder forum....

Is there a C/C++/MFC equivalent of DoEvents ?
Maybe it's not necessary in C ????


Equivalent To Vbworld For C / C++?
Can anyone recommend a good beginner's website to start learning C / C++? Preferably something easy to read along the lines of the tutorials on or Anything similar that relates to SQL would also be appreciated


C++ Equivalent Of Str() Func
Does anyone know if C++ has a similar function to the VB str() function?

Need to return an integer value as a string in C++...


Equivalent Of PChar In VB
I'm looking for an instruction in VB that would do the same thing that the PChar function of Delph, ie changing a string variant into a string compatible with C standard (A pointer to a 255 array terminated by a null character)

I've been sugested the same syntax PChar(mystring), but this instruction isn't valide on my version of VB (the 6 pro)

Thanks for any help

Mailto Equivalent
in HTML i can use mailto:.... to open an e-mail window and have an automatic subject and body for the e-mail (MS outlook)...

Is there something simillar for VBA (visual basic for applications). I use VBA in MS access 2000...

I know that it is possible with VB, but not sure about VBA...


Copyright 2005-08, All rights reserved