|
You can indeed write code to do that. But is that what the OP is asking ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i had done this . i take screen shot through window. but i want to change the style to take screen shot. for this i open window in Maximized ,invisible and without border mode after that i select that area through mouse (which part i want to take screen shot) and after that i want to take screen shot.
Piyush Vardhan Singh
|
|
|
|
|
|
I must import an excel in openoffice because openoffice is free and all the customers have this program.
Any documentation about this subject would be welcome.
thanks
|
|
|
|
|
How does this relate to VB ? You want to open an Excel program in open office ? Doesn't it do that already ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I want to export a file csv in a openoffice in vb.net.
thanks.
|
|
|
|
|
I very much doubt that openoffice supports control through code the way that office does. I may be wrong, you should check their site for info.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
As a long-time VB6 programmer, I have made frequent use of the following function ...
Private Function VBDesignEnvironment() As Boolean
On Error Resume Next
Debug.Print 1 / 0
If Err Then VBDesignEnvironment = True
On Error GoTo 0
End Function
... to allow the setting up of test-conditions, etc, in apps under development. This function guaranteed to return True when operating with the IDE, but False otherwise.
This provides a useful safeguard should one forget to remove the test code before release (don't ask!).
Now, this technique does not work within the VB.Net IDE, unfortunately.
Does anyone have any similar, guaranteed-to-work function to determine if the code is running in the IDE?
Jeff Law
New Zealand
|
|
|
|
|
|
Thank you Christian!
That works a treat
Jeff Law
New Zealand
|
|
|
|
|
In DatagridView , is possible to set as datasource 2 or more related tables from a dataset ?
And more , to use a Sum of a field as datagridview column ?
For illustration i have 2 tables in my dataset:
Table 1 : St_ID (primary key ) , Name
Table 2 : MID ( Primary Key) , Student (related with ST_ID) , QTy , Date
in table 2 for a student there are 1 or multiple registration with different QTY and Date.
Now i want to display in datagridview 2 columns : Name Sum(QTY)
But i don't want to query directly the database , but i want to use only tables in dataset.
Thank you !
|
|
|
|
|
The DataSet class doesn't have a Select method to allow you to do this easily.
If your DataSet, which is a collection of DataTable and DataRelation objects, has those relationship objects in it, you can build your own table by enumerating the Name records in the "Table1" table, and lookup up the keys in the "Table2" table. You'd be able to interate over those records to build the Sum you want, then just add the Name and Sum to the DataTable you're building.
Or, you can simplify this greatly by having the database do it and just hand to you table, just like the SELECT commands you executed to get these tables in the first place.
|
|
|
|
|
I have an existing windows application that I wrote in C# that needs information from an existing legacy application (no code available).
The legacy application can hand off 4 pieces of information to an ActiveX exe. I have written this in VB6 and the information arrives and is displayed in a message box without problems.
My question is, how do I get the information from the activex exe into the existing C# application? Do I use an event? If so, how do I set that up in the vb app and then how do I recognize that the event fired in the C# app?
|
|
|
|
|
TimNaber wrote: The legacy application can hand off 4 pieces of information to an ActiveX exe. I have written this in VB6 and the information arrives and is displayed in a message box without problems.
And that method would be _______________ ???
TimNaber wrote: My question is, how do I get the information from the activex exe into the existing C# application? Do I use an event? If so, how do I set that up in the vb app and then how do I recognize that the event fired in the C# app?
It's done the same way. If the legacy app fires an event that VB6 handles, you wire up an event handler in C#. But, without knowing anything about how this "legacy app" works, or if it's even a component, and not a real app, there's no way to tell you how to do this.
|
|
|
|
|
Hi,
I am adding an entry into a listview of records. I want the focus to be on the row entry I just added. I can get the focus to select a particular row but I can't get the entry to be positioned as visible in the list view. Any ideas?
Thanks,
TEss
|
|
|
|
|
listview.items.add returns a listviewitem
a property within that object is "index" which will give you the position
'to set the row visible
listview.topitem = the returned listviewitem
|
|
|
|
|
I just want to ask a simple question and that is how to compare the queries of URLs that actually generates the same page for example:
http://www.example.com/?a=abc&b=cde
http://www.example.com/?b=cde&a=abc
Now these two URLs are equivalent but how can i compare them, i am actually using this code:
<br />
Dim i As Integer = 0<br />
i = Uri.Compare(uri1, uri2, UriComponents.Query, UriFormat.SafeUnescaped, StringComparison.InvariantCulture)
But it doesn't seem to work. Thanx in advance !!!
AliAmjad (MCP)
|
|
|
|
|
It doesn't work because they are actually two different URLs. By specifying the UriComponents.Query as the partsToCompare parameter, you're telling the function to compare the query strings of the two URLs, which are different. You should probably want to use UriComponents.Path instead to compare the URL upto (but not including) the query string.
|
|
|
|
|
This won't work because the querystring parameters are in a different order. The Compare method will be checking whether the query portions of the URIs are equivalent as strings, which they're not.
You would have to write your own comparison algorithm. This could be done by splitting each query into its constituent parts, storing those parts in a data structure and checking whether each data structure contains the same set of key/value pairs.
Paul Marfleet
|
|
|
|
|
Hi... I have 2 Questions 1.) I have a button which selects mp3 files and then stores their information into a datagrid and then records changes to the database. The problem is that if I look for files outside of the solution folder and select them to be added to the datagridview an error message appears saying that the database could not be found at the specified location(the location they give in the error isn't where the database is supposed to be located in the first place). It works when adding files within the solution folder and any underlying folders within the solution folder but just not outside of this folder. Any ideas why this could be?
My 2nd question is that I have various textboxes on a form that when the user selects a row in the datagridview and enters information into these textboxes then the datagridview should be updated. My textboxes are binded directly to the dataset tables columns and my datagridview to the dataset table. It was throwing a concurrency violation error earlier because i called datgridview.update() in the row leave event for the datagridview as well as a call to a sub called saveChanges which is a standard save procedure which checks if there are changes and updates database if there are. Now that I have removed the saveChanges() call from the rowLeave event for the datagridview..... the final row isn't saving changes. My datasets and table adapters are all generated so as far as I know this shoud all be fine? Can Anyone help? Its an access database by the way...my code works fine that I made to add files to the dataset and create a new row etc. Its just the editing that isn't working?
Mr Oizo
|
|
|
|
|
1. Sounds like you are defining the path to the database realtive to the working directory, which changes when you choose a file. Get the application path and use that to specify the path of the database.
2. Dunno.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi... I'm not too sure if I understand but I think you mean that my datbase location is not hard coded. I have it set as "dataSource=..\..\data\Accessdatabase.mdb" for the connection string datasource. the reason why i have done it like this is that i need to move my application around to various workstations while i am developing and I was taught that hard coding my connection string(aka using just the generated connection string) is bad practice? So if I am using a relative path and i choose to publish my software will it give me problems and will I only be able to select files from within the project solution folder to add to my datagridview?
Mr Oizo
|
|
|
|
|
Mr Oizo wrote: Hi... I'm not too sure if I understand but I think you mean that my datbase location is not hard coded.
No, it's because it's relative, so you rely on the working directory. The working directory is changed when you select a file.
As I said, get the application directory, and use that as a starting point to reach the database file.
---
single minded; short sighted; long gone;
|
|
|
|
|
HI ~
I'm currently doing my project about mail notification tool on the system tray(Gmail Checker).
My project should be able to check if some new mail is available now from the pop3 webmail server(Gmail). And I will coding in VB.2005.
But now,I still having some problems.And I don't know how to begin to write the project.
Could you please help me how to check the unread mail from pop3 server. Or can u send me some source code for coulult ?
Please help me. Thanks
Here my email address : edmond1002@gmail.com
Best regards,
Edmond
|
|
|
|
|
Hi,
I am beginner to vb.2003
I am working with CrystalReport in vb.2003. I have problem in passing the parameter value.
when I pass the date value from the form to CrystalReport i used this code.
Dim OB As New Receipts_monitoring
OB.SetParameterValue("Begindate", datetimepickerbegin.Value)
how i can pass the none date value to the CrystalReport.
(because i want to pass the value to the CrystalReport and sometimes i don't want to pass the value to CrystalReport)
please help me.
|
|
|
|