|
There's a picture in a program (not mine). How can I simulate a click on the picture? (I know the coordinates)
Thanks,
SMA
|
|
|
|
|
There is no "SendMouse" or "SendClick" so you have to use the Win32 API functions FindWindowEx to get the window that the image is in, get it's window handle, then use the API function SendMessage to send carefully crafted WM_LBUTTONDOWN and WM_LBUTTONUP messages to that window.
Warning: This is NOT something for beginners!! You have to have specific knowledge of how Windows works and how your application works. If you don't have sufficient research skills, you'll find this a very frustrating experience.
|
|
|
|
|
Hi,
I'm looking for a guide to create a wizard on VB 2003.
I did find many articles and guides how to create wizards in C++\C#\VB2005, but not a single one besides from microsoft's guide (which I didnt understand much of):
http://msdn2.microsoft.com/en-us/library/7k3w6w59(vs.71).aspx[^]
Must I mention that I'm new to VB, and if anyone could explain to me how to, and what to, that'd be greate. PLEASE PLEASE PLEASE.
|
|
|
|
|
The link you posted doesn't create a Wizard, but is a Wizard that helps you create an Add-In for Visual Studio.
Have you tried looking at the code in this article[^]?
|
|
|
|
|
I am working with Visual Studio 2005 w/ Service Pack 1 for Vista
I experienced a crash in Vista last night while "playing" my app. As it was the end of the day, I did not log back in and went home.
I came back in today, opened my solution and now am greeted by a friendly message from Visual Studio when I attempt to open the form [design] telling me that "The file cannot be opened with the selected editor. Please choose another editor. "
If I build the project, I get an error saying "String cannot have zero length" The file specified is "LC" (which is not the name of anything I have in my solution.). No line number is listed, nor column.
I am able to open the code for the form, the form designer, and a separate form in my solution.
I've Googled the error and so far found nothing that is of any help.
I am hoping that the good people of Code Project have seen this before and might know of how I can track down what is causing the problem or a fix.
Thanks in advanced!
-Steve
|
|
|
|
|
I don't use Vista, and haven't seen that problem under XP yet either.
The first thing I'd try would be to close the Solution, go into the Projects folder and delete the .SUO file (which is normally hiddden). Then try reopening the project.
After that, I would suspect that one of the files for that form has been corrupted somehow. I'd probably try salvaging the code for the form by opening its .vb file in Notepad and copying it to another file, then delete the form from the project, making sure the .vb, .resx, and .designer.vb files are removed, then recreate then form with all the controls using the same names you used before. You can copy and paste the code you salvaged back into the form's code.
|
|
|
|
|
Thanks for the suggestion Dave.
Deleting the SUO file did not fix it, but like a cautious VS user, I had a backup from a couple days ago I restored and updated with the notepad opened VB files. Still wish I could track down what went wrong for the time I don't have a backup or for other users.
|
|
|
|
|
How can I show the contents of a webpage in my program?
(F. e. if I'm making a web-browser)
The real $M@
|
|
|
|
|
I found this which might help...
|
|
|
|
|
|
|
This is the same link the other person gave. You might want to read the other posts before you reply.
|
|
|
|
|
Dave Kreskowiak wrote: This is the same link the other person gave. You might want to read the other posts before you reply.
You are absolutely right. My appologies for this.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Hi to all,
My question is a simple one how can i access controls of Startup Form from another class. Means i want to access that instance of the form which is available in the memory, don't want to create another instance. Thanx !!!
-- AliAmjad --
|
|
|
|
|
AliAmjad wrote: how can i access controls of Startup Form from another class.
In proper OOP programming, you don't. The only class responsible for those controls would be the form class. Your other classes do not need to know about those controls, nor should they even care to update them themselves. This would tie your other class to that form so hard you would be able to use the class in any other project.
Your class should be exposing events and properties that your Form class can get to and subscribe to so the form updates it's own controls, not the other way around.
|
|
|
|
|
Thanks for the reply. But i think it's not applicable in the scenario which i am facing. What if i am using the class which is responsible for raising events in many other classes then what should i do.
I've actually created a class named InformationReceived.vb
Declared its variable in a module. Then handled this class in that module here is the code:
Module GlobleMDL
Public WithEvents infoRec As New InformationReceived
Private Sub infoRec_Information_Received(ByVal info As String) Handles infoRec.Information_Received
MsgBox(info)
End Sub
End Module
Now instead of using msgbox whatever information i am receiving for other classes i want to display it on the statup form's Textbox.
If i declare and handles this class in the startup form's class then how can other classes access the instance of this class(informationReceived.vb)
|
|
|
|
|
AliAmjad wrote: But i think it's not applicable in the scenario which i am facing.
No such thing...
AliAmjad wrote: If i declare and handles this class in the startup form's class then how can other classes access the instance of this class(informationReceived.vb)
They can't. You're going about this all wrong, and the method you've come up with won't even work. Scrap this class/Module/whatever, you don't need it.
In your property getters/setters, you put Debug.Trace statements. Trace messages are caught by any of the TraceListener classes. You create this TraceListener in your main form and it'll hear all of these message no matter where they came from. Then you can Append each message in a TextBox.
|
|
|
|
|
Dave man i am really thankful to you. Just the final question because i am learning allot here. How can i append the messages to the Textbox and where to handle the class or when am i sure that i have received the message.
I've created the instance of DefaultTraceListner in the main form. And using Trace.Writeline for receiving information from other classes.
Thanks Again...
|
|
|
|
|
AliAmjad wrote: How can i append the messages to the Textbox
It's easy. I occasionally use this quick'n'dirty class to do the same thing while I'm writing an app:
Public Class TraceLogSupport
Inherits TraceListener
Private _targetTextBox As TextBox = Nothing
Public Sub New(ByVal TextBoxControl As TextBox)
Mybase.New()
If TextBoxControl IsNot Nothing Then
_targetTextBox = TextBoxControl
Else
MyBase.Dispose()
Throw New ArgumentNullException("You must specify a TextBox control to use to show log information.")
End If
End Sub
Public Overrides Sub Write(ByVal message As String)
_targetTextBox.AppendText(message)
End Sub
Public Overrides Sub WriteLine(ByVal message As String)
Me.Write(message & Environment.NewLine)
End Sub
End Class
To use it, all you do is creat an instance of it and pass it a TextBox you want it to use to log information to. I usually just use a small form with a TextBox on it and do something like this in it's Load event:
Private _tractListener As TraceLogSupport
...
Private Sub LogForm_Load(blah, blah) Handles MyBase.Load
_traceListener = New TraceLogSupport(LogTextBox)
Trace.AutoFlush = True
Trace.Listeners.Add(_traceListener)
End Sub
That's it, except for peppering the code with Trace.Write and Trace.WriteLine statements...
|
|
|
|
|
Hurrayyyyyyyyyyyyyyyyyyyyy !!!! thanksss man thank you very very much for your support this site really rocks and helped me allot. Again thanks for your support mannnn...
|
|
|
|
|
I have a windows application project that uses several Crystal Reports. When I created these reports I connected them to an access database that had the table/column structure that I wanted, but the application itself does not use this database. It creates a DataSet that matches the structure of the design database and uses the .SetDataSource to load it into the report like this:
reportDocument1.SetDataSource(dsMyDataSet)
This has worked fine in the past. Now I've added a new report and when it is run on a machine that doesn't have the design database in the same location as it was when the Crystal Report was designed and created, it will prompt asking for Database Login information.
I've seen many other posts with similar questions, but the only ones with solutions appear to still need to tie to a different database or the developer wants to learn how to pass login information in the code. I do not have a database at all to tie to. How can I sever this connection to the database and tell the report that I will be passing my data via a dataset? OR is there some other reason why this would be happening? I've tried to find differences between the report that still works and the new one but I can't see any different settings. Are there any tricky ones I may have missed?
Any help would be appreciated.
|
|
|
|
|
Kschuler wrote: when it is run on a machine that doesn't have the design database in the same location as it was when the Crystal Report was designed and created, it will prompt asking for Database Login information
Sounds like log in credentials are different. Have you tried making sure they are the same.
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
I've never done anything in regards to logging in to the design database. I never setup any users or passwords nor do I require any securities since this database never holds any data. And I am not aware that it is possible to setup log in credentials on a dataset. Could you please clarify or give me an example of what you mean? I really appreciate the help.
|
|
|
|
|
I'm getting the following error and I'm pretty sure it has something to do that i moved the code to Visual Studio 2005.
Just wondering if anyone has seen it before and could help me out.
Compiler Error Message: BC32206: Indirect reference is being made to assembly ITSWeb.PageTemplates version 1.0.2827.13561, which contains 'ITSWeb.MenuControl'. This Project references a prior version of ITSWeb.PageTemplates version 1.0.2826.16005. To use 'ITSWeb.MenuControl', you must replace the reference to ITSWeb.PageTemplates with version 1.0.2827.13561 or higher.
Source Error:
Line 34: <system.runtime.compilerservices.compilerglobalscopeattribute()> _
Line 35: Public Class webusercontrols_menucontrol_ascx
Line 36: Inherits Global.ITSWeb.MenuControl
Line 37:
Line 38: Private Shared __initialized As Boolean
Source File: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\itsweb\6130ecab\c8ceedfb\App_Web_menucontrol.ascx.8ddfe73a.iy-bw6ax.0.vb Line: 36
|
|
|
|
|
google "Compiler Error Message: BC32206" and read the first link.
I hope this helps...
You always pass failure on the way to success.
|
|
|
|