Can I Send A Click To A Specific Point On A Form?
I've got this dumb form that minimizes to the sys tray but when I restore it, for some reason it doesn't completely get the focus until I click the form once even though it appears to have it...I finally got it working correctly by using the SetWindowPos api...but alas athough it works on my Win98 system it doesn't correct the problem on WinNT systems.....so I was wondering if there was anything similar to SendKeys that would allow me to send a MouseClick to make the dang thing happy?:wall:
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
A Function To Point To Specific Form
I have 3 forms, frmMain, frmStatus, frmWhatever
When I
Code:
PointForm(2).Show
, it show up frmStatus, because there's a function like this:
Code:
Private Function PointForm(Item As Integer) As Form
Select Case Item
Case 1: PointForm = frmMain
Case 2: PointForm = frmStatus
Case 3: PointForm = frmWhatever
End Select
End Function
The function above obviously doesn't work, but it's something i wanna do, a function that tells which form. Erm. is that possible?
Cut The Image From Specific Point
Hi All
I have one scaned document in that document there is at each specific point "hr" is printed.
now what i want i want make seprate image between one "hr" to another "hr".
any one can help out in this probs
Y Value Of A Line At A Specific Point
say i have a line called line1 and it has its positions:
.x1 = 100
.y1 = 1000
.x2 = 2000
.y2 = 3000
this makes a diagonal line. is there a formula to get the y position that line1 intersects at say x = 500?
if you don't know what i mean tell me and i will post a picture
i have tried to come up with a formula myself but failed so i was wondering if any of you guys could help
thanks
Starting At A Specific Point Within A Sub
Ok i have a program, at the end of the loop it asks if you would like to start the loop over.. If i say yes how do i make it start over at a specific point within the loop?
Thank you
Add Hyperlink Beginning At Specific Point
I'm using the code supplied in another post to add hyperlinks to my Index Worksheet. Thanks for that one !!
These links goto PDF files in the same directory.
Col 1 is the base filename, Col 3 changes as the file is revised. An "n" seperates the basename from the revision.
ex. 12345n1.pdf (1st rev) vs 12345n3.pdf (3rd rev)
When the Index Worksheet advances revision (col 3), I will re-run the macro so that the new hyperlink points to the latest revision PDF, makes sense I hope
My problem is:
I can't seem to get this VB script to begin at Row8, Col1 and blast down from there Everything above Row8 is Header Information that won't need hyperlinks. What am I doing wrong ?
Code:
Sub AddOmslinks()
'Application.ScreenUpdating = False
Dim rw As Long
Dim OmsPath As String
Dim OmsFile As String
Dim Cl1 As Integer
Dim Cl3 As Integer
Cl1 = 1 'Index Column
Cl3 = 3 'Oms Revision
OmsPath = ThisWorkbook.Path & ""
For rw = 1 To Cells(Rows.Count, Cl1).End(xlUp).Row
If Cells(rw, Cl1) <> "" Then
OmsFile = OmsPath & Cells(rw, Cl1) & "n" & Cells(rw, Cl3) & ".pdf"
ActiveSheet.Hyperlinks.Add anchor:=Cells(rw, Cl1), Address:=OmsFile
End If
Next
End Sub
Reading From Specific Point In File
Hi, i was just wondering if there is a faster way to do this:
I am inputting one big TXT file that gets to 100 kb and more sometimes every 5 seconds and then i ignore all begging, because i usually only want like the last 5 letters of the file. So my quesstion is how can i make the application only input everything behind a number of characters that i specify
Read File From Specific Point To The End??
I am attempting to read a file and write what I read to the end of another file. My problem is that I do not want to read the first part of the file I am reading. I need to find a "keyword" which tells me where to start reading and writing the information to the other file. Here is my code.... this code opens one file for reading and then writes the whole file to the end of the other file?
Do I need to do this line by line to accomplish what i need? The problem is the file i am reading is an extremely long html file.
dim fso as new FileSystemObject
Dim file as file
dim filetocopy as file
dim textstream as textstream
dim newTextstream as textstream
Set file = fso.GetFile(MyfilePath.html)
set filetocopy = fso.getfile(MyFileToCopy.html)
set textstream = file.OpenAsTextStream(ForAppending)
set newTextstream = file.OpenAstextStream(ForReading)
textstream.write newtextstream.readall
textstream.close
newtextstream.close
set file = nothing
set fso = nothing
Any suggestions
Thanks,
M
Finding A DLL With A Specific Entry Point
I have inherited a VB6 App. that calls a DLL using loads of different Entry Points.
Most of the Entry Points work fine. However, when calling the DLL using an entry point that doesn't work, I get
"Run Time Error '453';
Can't find DLL Entry Point EnableManualWrapup in antapi2"
I have found loads of ANTAPI2 DLL's on the various drives I have access to. Is there a bit of software that will tell me what entry points each DLL has ??
Adding Data To A File At A Specific Point
Hi folks,
Here's what I want to do:
I have a file full of data. I need to make a copy of that file, open the file and then search through it looking for a specific string. Once I reach that string I need to add some new data at that point in the file and then read in the rest of the original file. If everything goes to plan I need to delete the original file and change the name of the copy to the original filename. Has anyone got a good example of something similar that I could have a look at?
Below is some existing code which I could perhaps manipulate to do what I want:
strFileName = BackSlash(pstrDataDirectory) & pstrFileNameNoPath & ".PRT" ' pstrFileNameNoPath holds the name of the file I need to edit, so I need to copy this into a new file perhaps line by line, so that I can add in the new data
Set f = New FileSystemObject
Set t = f.OpenTextFile(strFileName)
booOK = False
Do
strline = t.ReadLine ' search for the line in the output file containing "final settings"
booOK = InStr(strline, "FINAL SETTINGS") > 0 And t.Line > 10
Loop Until booOK Or t.AtEndOfStream
If booOK Then
booOK = False
' I need to add some data into the file here
Do
strline = t.ReadLine ' look for the last line before statistics for each link begin
booOK = InStr(strline, "(PCU) (PCU)") > 0
Loop Until booOK Or t.AtEndOfStream
' then add some more data in here
thanks for looking
Howler
Word Automation - Insert A File At A Specific Point
I want to insert a Word template into a Word document at a specific point in the document.
(I'm creating a document from sub documents that are included depending on certain conditions)
When I do this it wipes out the rest of the document!
Does anyone have a method to do this:
Find a marker in the main document that indicates where to insert files
remove the marker
insert required files
Mant thanks in advance...
Mac
2d Point && Click
I'm sure nearly everyone has played one of the old 2d adventure games such as Monkey Island 1, 2 or 3, or Broken Sword 1 & 2. I'm interested in making such a game, and have sort of an idea how most of it works, what I'm not sure about however is the movement of the Player character, Moving from left to right is no problem but what happens when the character want's to move 'into' the picture? Obviously you just reduce the image as it goes further in etc. but what I don't understand is how you would work out where abouts a person can actually walk, and hence preventing them walking onto where the walls are etc, and also what size the char should be at each stage during this movement!
Anybody got any ideas?
Point And Click Problem
I am trying to design a form to help me test childrens ability selecting items in games. I have managed to design a form to dest their ability with drag and drop selection but I have come unstuck when trying to design a point and click selection form. The requirement is as below:
I have six picture boxes on a form, any three will have pictures loaded in them (three different pictures in total). To fill one of the empty boxes the user will have to pick one of the picture boxes with a picture in it to signify its selection as the one to be moved, then pick the required empty box as the destination, the picture will thn appear in the destination box and dissapear from the initial box. This procedure should be able to be performed on any box so that all the pictures could be transfered anywhere.
As I cant seem to store the Picture1.picture property as its only a handle to the picture, I am at a loss as to how to find out which picture has been selected in the source picture box so that I know which picture to load into the destination picture box.
Point And Click Problem
I am stuck at the point where I want to pick a picture in a picture box and then point and pick another picture box and the picture appears in that one. I thought i would just store the picture name of the first box being selected i.e. PictureMove = Picture1.picture and then call this variable when I the next box is selected (can't use picture1.picture = picture2.picture as the picture has to be able to be moved to any box).
This is where my problems started. I stored the property Picture1.picture in a variable but it is a number and not a string as I expected. It shows the picture name in the properties box but when it is stored it shows a number i.e. 263845 or 0 for no picture! Can't seem to find any info on this property relating to how I could store it, or what a better way would be.
The form may have three or more picture boxes on it and the picture needs to be able to be point and clicked into any empty picture box the user chooses.
I dont want to use drag and drop because this is another element in the research I am proposing to do (and by miracles I managed to sort this one out myself!).
Any Ideas or code to help?
Point-and-click Game..
Hey all
I'm pretty new to VB.. Been coding for about 3-4 weeks.
I know most of the basics.
Now, I'm in the process of creating a point-and-click style adventure game. But, I'm really lost .. I don't know where to start.. I though about using the Sqr((X2-X1)^2 + (Y2-Y1)^2)) formula to calculate the distance between the character's top and left and the X and Y (in a mousedown procedure).
Can anyone help me with all this and give me some advice? Thanks a lot!!
Putting Point Where Click
I want to put an X or a point on a picturebox where the user clicks. I tried using a shape (circle), and it works, but it doesn't leave it at the position you clicked last if you click somewhere else. I need it to show every point that is clicked. Here's what I have:
Shape1.Left = CStr(x)
Shape1.Top = CStr(y)
Form1.Shape1.Visible = True
Thanks for any help in advance!!
Point And Click Interface Problem
I am stuck at the point where I want to pick a picture in a picture box and then point and pick another picture box and the picture appears in that one. I thought i would just store the picture name of the first box being selected i.e. PictureMove = Picture1.picture and then call this variable when I the next box is selected (can't use picture1.picture = picture2.picture as the picture has to be able to be moved to any box).
This is where my problems started. I stored the property Picture1.picture in a variable but it is a number and not a string as I expected. It shows the picture name in the properties box but when it is stored it shows a number i.e. 263845 or 0 for no picture! Can't seem to find any info on this property relating to how I could store it, or what a better way would be.
The form may have three or more picture boxes on it and the picture needs to be able to be point and clicked into any empty picture box the user chooses.
I dont want to use drag and drop because this is another element in the research I am proposing to do (and by miracles I managed to sort this one out myself!).
Any Ideas or code to help?
Insertion Point / Cursor Click?
Hey guys,
I have some text fields for a data entry form. Instead of using the TAB button to navigate through the textfields, what if the user decides to click on them and type some text?
What I notice is that the insertion point (or cursor) skips a letter as if you automatically pressed the spacebar right after you click on the field. Is there a way in VB, so that if you click on the textfield, it won't skip one letter to the right?
Thanks
Chris
Can VB6 Send A Report From A VB6 Program To Microsoft Power Point
Hello,
I am trying to see if after you create a program in VB6 then a user uses that program to generate a report..... can you click on a button or something that will send the report into Microsoft Power Point ????
Can VB6 send that report to Microsoft Power Point to be shown on a screen???
Will Visual Basic and Power Point work together????
Thanks
bhowerton
Net Send To 3 Specific PC's
I need some code to net send a message to 3 PC's. How do I do this? I could netsend to a workgroup but all of the PC's are on the same workgroup & only the help staff needs to recieve the message. But all three need to get the message. Can anyone help me?
How Do I Create A Mouse Click Event That Clicks On A Certain Point On The Screen
IM tryin to create a program using vb, which clicks on certain points on the screen based on a timed duration. Im having trouble figuring out which function to use to send a mouse click to a specific xy point on the screen .. would win api sendmessage function work.. are there any other ways to create this event.... ? thanks..... this will be used to click in a internet explorer window... but i do not need to click a specific button.. just a point in the window... and i was hopin there was a way to abstract the event out from a command... i just want the program to click on different points on the screen.... thanks again
How Can I Generate A Tab Click For A Specific Tab?
in my app i have 4 predefined tabs, if during the log in process if the user is part of a specified group i create a 5th tab
my question is how can i generte a tab click for that 5th tab during run time with code?
Edited by - t_g on 4/29/2004 10:49:44 PM
Send Email With A Specific Text
Is it possible to let a visual basic send email with say a text from a text box and send it. Without having to press SEND or do anything, the program should do everything herself
thanks VidarJul
Simulate A Click -- On A Specific Window
Ok, what I'm trying to do is have the mouse "clicked" at a specific coordinate in a specific window whether the window is in focus or not. In this case, it looks for a window named "Commands_" (using FindWindow or whatever). This way, I could be doing something completely different, and still have the window clicked on without interrupting what I'm doing. I tried using SendInput, but that doesn't do anything to a specific window, it just uses the regular input stream...is it even possible to do what i'm trying to do?
[VB6]Click A Specific Word In Image
Hi, I'm trying to make a program to click a specific word in an image. My questions are; How do I grab this image http://www.outragerp.com/includes/se...c.php?rand=305
(the number afterward doesn't actually matter its random)
and then convert it to black and white. After its black and white I want to be able to find the coordinates of specific words such as 'cloud'. The convert to black and white makes it so that there are just a few words that are white and the rest becomes black. Essentially it removes annoying lines.
I really have no idea how this might work so..
How would I go about doing this?
Oh and thanks in advance for reply(s)
Edit: I'm not exactly asking for solutions merely helpful pointers to guide me to the solution
Click On A Link At A Specific Location In Web Browser
Hello Guies
I want to know that
if any web site is being browsed and there is some link or button in a page
Say Prev or Next
How should i write a VB Program that can automatically clicks on those links or button and the the link is activated
i can use the web browser control of VB as well
Right Click On A Specific Tree View Node
I am using a TreeView control and I want to use right mouse button to select the nodes of the treeview.
In fact, my objective is to display a pop-up menu if i right click on any node of the Treeview. It does but as you know, mouse down event has only button and x & y co-odrinates as its arguments. So, it never knows if the click is on a specific node or on an empty area.
Now, question is how can we know get the information about the right-clicked node. Also i want to select the specific node if its right-clicked only.
How To Make A Client Send Data To A Specific IRC Channel?
I am not very talented when it comes to VB coding, as I have just started looking at code this past week. I looked at a few tutorials regarding how to send data to an IRC channel, and came across this code. Thing is, it doesn't work. Nothing joins the IRC channel when I test the program. I added a winsock control. I'm just not quite sure what to do, so if anyone could point me in the right direction I would much appreciate it.
edit*
i get this error after running the program "System.Runtime.InteropServices.COMException was unhandled
ErrorCode=-2146788282
Message="Exception from HRESULT: 0x800A9C46"
Source="Interop.MSWinsockLib"
StackTrace:
at MSWinsockLib.IMSWinsockControl.SendData(Object data)
at AxMSWinsockLib.AxWinsock.SendData(Object data)
at VBNET.HowTo.frmLogin.Winsock1_Connect() in C:Documents and SettingsDavidDesktopBoxfrmLogin.vb:line 169
at VBNET.HowTo.frmLogin.btnOK_Click(Object sender, EventArgs e) in C:Documents and SettingsDavidDesktopBoxfrmLogin.vb:line 109
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms .UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int 32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at VBNET.HowTo.frmLogin.Main() in C:Documents and SettingsDavidDesktopBoxfrmLogin.vb:line 4
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Quote:
Private Sub Form_Load()
With Winsock1
.RemoteHost = "coins.dal.net" ' The IRC server
.RemotePort = 6667 ' Connect on port 6667
.Connect()
End With
End Sub
Private Sub Form_Unload(ByVal Cancel As Integer)
Winsock1.Close()
End Sub
Private Sub Winsock1_Connect()
' Introduce ourselves to the IRC server. Our nickname will be "WVB_Test"
With Winsock1
.SendData("NICK WVB_Test" & vbCrLf)
.SendData("USER WVB_Test " & Winsock1.LocalHostName & " " & UCase(Winsock1.LocalHostName & ":" & Winsock1.LocalPort & "/0") & " :WinsockVB Test Client" & vbCrLf)
.SendData("JOIN #oorgle" & vbCrLf)
End With
End Sub
How To Send Specific Strinng To Log $_SERVER['HTTP_USER_AGENT'] Script
Hi all . i am tring to use inet.open url for a php script .My php script looks for string sendt by the program. Now my vb6 is sending this script :
VB Code:
Microsoft URL Control - 6.00.8862
but i want it to send simmiler to this string :
VB Code:
edia Player Classic
Media Player Classic
shoutcastsource
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {BE6B3C18-D43F-BBA3-8046-F416968AB502}; (R1 1.5))
How i can make my vb6 so that when it makes inet.open url it sends the above type of string to my php not the default one.I hope some now show me how that can be done.Thanks
Inserting Text At A Specific Point In A Text Box.
This is probably really easy to do, but im just starting out with VB.
Could anyone tell me how I can insert text at a specific point in a text box, when a button is clicked.
I know how to place it at the end, using me.text1.caption & "#1" as an example! I need to know how to stick it any where in the box.
Also, could any1 tell me, how I can do this;
I need to know how I can insert the #1,
"My name is alistair #1 how r u."
but change the #1 to a peice of text, latter on in the program.
Right-click Context Menu To Forward Email To A Specific Address In Outlook 2000...
Hi,
I'm running Outlook 2000, and I wanted to be able to right-click on any email I've received (in any of various folders) and select a menu item that says 'Forward', and it will be forwarded to an email address that I'll specify in the VBA code.
I saw on this forum (at http://www.vbcity.com/forums/topic.asp?tid=9974&highlight=Outlook ) some VBA code that allows forwarding emails, and set it up so a button on the toolbar called the send function, but it didn't do anything (no error, no email forward, nothing). I'm not sure why... I followed the author's directions exactly. Perhaps it's my security settings (Outlook set to use Restricted Zone, Restricted Zone set to disable everything). I can not lower security to accomplish this email forwarding thing, though.
Anyway, I'm a VBA oldie who's forgotten most of it, so I'm for all intents and purposes a VBA newbie. It's amazing how much you can forget when you stop using a programming language.
Thanks for your help.
Darren
Send Click
Hey Everybody!
I now that U can send keys but can I send mouse clicks?
Can my program decide where the mouse are?
Send A Click To Unwanted Msg
is there a way to click an unwanted message box? I am processing multiple files and the native application occassionally asks for user response, which holds up processing. I need to get by these message boxes, like answering"no" or "ok" when the prompts appear, is there a way to get the current message box with "focus" and send a click to it to get it out of the way, it really sucks to come in in the morning and see a message box that held up processing for one response.
Send Double Click .... ?
I'd like to send "double left click" to the window (not focus).
What should I do??
I tried to "sendMessage" such as :
'VK_DLBUTTON = &H203
SendMessage(hwnd, VK_DLBUTTON, ByVal 0&, ByVal 0&)
But didn't get result :|
Looking forward your answer ...
Tks all.
Send Mouse Click
How do I make it so that the mouse left clicks somewhere on the screen according to X and Y coordanents.
Send A Mouse Click?
Does anyone know how I can reposition the mouse and send a mouse click to another application??
Not VB - Right Mouse Click -> Send To
If you right mouse click on a file ther eis an option to send to then a list appears. Everyone should know about this. Is there anyway of editing that list cause mine is all messed up. I have to breifcases and to zips and oh what a mess. If you know please speak up don't be shy. Thanks
Send Click Without Focus
Ok, so i got my program to work with the mouse click thing. Now I want it to send MouseClicks, and SendKeys without giving the recieving porgram/application the focus. I want it to remain minimized, and out of the way but still operating. Is this possible? and what would the code look like?
|