|
I have visual basic 2005 express on my pc. When I save a project it saves it to c:\mydocuments(visualstudio/projects). lets say i have a project called windows application 1. as you already know in this file will be the bin the resources and everything else pertaining to the project.I have a small memory stick that attaches to the usb port with 256 mb.I can copy the file windows application 1 to it. But then when I try to open the project again on my pc it says it has been moved or deleted,but it hasnt it is still there. I only copied it. why is that. I am copying to this memory stick so I can use another pc to work on this project as well. But I keep losing it on my pc. i am tired of recreating it. any suggestions?
thanx
|
|
|
|
|
I have a small vb.net application that monitors a running program and if it is inactive for a given amount of time it will shut it down. My problem is when a user has typed some info or changed some info in the form and my program goes to close it I get a "do you want to save" dialog box. Is it possible to use win api to catch this and answer yes? if so, any pointers?
chris
|
|
|
|
|
Personally, I can't see why anyone in their right mind would want to run such a program. I'd certainly be fairly irritated if something closed a program because I hadn't used it in a while - at the moment I've got 15 applications running (and for me thats low), most of these are sitting at points that I can easily pick up from where I left off. If the application gets shut down then I would have to do something to get back to where I left off which wastes my time.
Anyway, if the program pops up a "do you want to save?" how do you know the answer is yes or no? And what if the user has never saved the document before, how will you handle the next dialog box asking where to save it and what to call it?
Finally, how are you determining which programs to terminate. There are many processes in Windows that should not be terminated because they control various aspects of your OS. Ending those processes could destabalise your PC.
Sorry that I've not given you the answer you are looking for, but your project seems to be highly questionable.
Do you want to know more?
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums Upcoming talk:
SELECT UserName, Password FROM Users
-- Getting unauthorised access to a SQL Server, and how to prevent it.
|
|
|
|
|
The application I am refering to is an ERP system inwhich every item on the main menu represents an executable. In the SQL server database there is a table called applications thats builds the main menu system. I loop through this and compare it to the applications running on the client and kill it if the processor time shows that there hasn't been any use withing a given time frame. The reason I want to terminate the sessions after a set amount of time is because users log on in the morning and stay incative for hours on end. This is a big issue since we have only 35 concurrent licences and the cost for additional licenses is over 4,500.00 $ per.
|
|
|
|
|
Here is my problem:
I have a store procedure name stEmployees, with Code is the attribute. In the formula editor of crystal report, I tried to declare a variable string such as:
stringVar string := {stEmployees;1.Code};
ReplicateString (string,10 - Length (string) ) & string
However, when I run a check syntax on this, it returns error "A string is required" on the first line of the code. Could anyone help me with this problem. Thanks a bunch.
John
|
|
|
|
|
Hello there,
I'm currently creating an windows app, which should also contain a planning part. Users should be able to create 'projects' and 'actions' within those projects, and plan them within a certain time span. Now I want to display those projects (and actions) in one view. Now I need a control which is able to display that info.
I think someething like a timeline at the top and bottom of my windows form, and inbetween the actions of the project, and bars representing the time. A MS Project like view. Is there, or soes someone know a controls which is able to handle that for me, or do I need to create it myself?
Thnx, Eduard
I love it when a plan comes together
|
|
|
|
|
I'm developing a VB.NET based control which works today in my company's .NET WinForms based apps... but I need to use my control in our VB6 based applications also.
Is it possible to ActiveX/OCX-enable a .NET control or somehow make a OCX version ?
...and if so, how is it done ?
Thanks in advance
|
|
|
|
|
You've got a bit of work to do. Here[^] is an example that covers the basics of how to do it. You'd be wise to read up on COM Interop[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I got a "plain" .NET DLL (COM interopt enabled) to work fine from VB6... no problem here.
But I need to make a ActiveX control (visible user control) OCX from .NET...
Anyone got a sample or tutorial how to do this ?
|
|
|
|
|
The VB.NET compiler won't build a "real" ActiveX OCX control.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I have two list boxes each holding different file extensions but with the same names eg Part1.txt in first list box and Part1.pdf in the second list box. Is there a way by selecting Part1.txt in the first list box it will automatically select the Part1.pdf in the second list box.
Thanks
|
|
|
|
|
You have to supply the "automatic" code. There is nothing that will automatically select anything for you.
Handle the OnClick event of the first ListBox. Then for each selected item, you'll have to search through the second ListBox and enable the appropriate Selected() index.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello there
I have created on application and I wanted to put some graphics on button. the problem is when I place the icons on some forms they are coming and on some forms they are not. I checked every property of Button and form to locate the difference and except for the name nothing is different but the icons are bit choosy to decide on which screen they want to come. Same is happening with Toolbar I placed. having 11 buttons and only 7 are displaying the icons.... and rest have nothing on it.
I tried with image list and with out image list on buttons..
Any solution for this bug
Rizwan Bashir
|
|
|
|
|
If you are using visual styles and you set the FlatStyle to System on a button the image will not be drawn.
Hope this helps
Tom
|
|
|
|
|
here is a snip of code i'm playing with
Dim strSearch As String<br />
strSearch = txtSearch.Text<br />
Dim Cnxn As New ADODB.Connection<br />
Dim rstNotes As New ADODB.Recordset<br />
Dim strCnxn As String<br />
Dim strSQLSearch As String<br />
<br />
' record variables<br />
Dim mark As Variant<br />
Dim count As Integer<br />
<br />
Set Cnxn = New ADODB.Connection<br />
strCnxn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\RMSC LOGIN\Exhibits.mdb;Persist Security Info=False"<br />
' open recordset with default parameters which are<br />
' sufficient to search forward through a Recordset<br />
Cnxn.Open strCnxn<br />
Set rstNotes = New ADODB.Recordset<br />
strSQLSearch = "SELECT * FROM Email "<br />
rstNotes.Open strSQLSearch, Cnxn, adOpenStatic, adLockReadOnly, adCmdText<br />
<br />
count = 0<br />
rstNotes.Find "Notes LIKE '" & strSearch & "'"<br />
<br />
Do While Not rstNotes.EOF<br />
'continue if last find succeeded <br />
count = count + 1<br />
' note current position<br />
mark = rstNotes.Bookmark<br />
rstNotes.Find "Notes LIKE 'strSearch'", 1, adSearchForward, mark<br />
' above code skips current record to avoid finding the same row repeatedly;<br />
' last arg (bookmark) is redundant because Find searches from current position<br />
Loop<br />
<br />
'txtMessage.Text = rstNotes <---not sure about this<br />
' clean up<br />
rstNotes.Close<br />
Cnxn.Close<br />
Set rstNotes = Nothing<br />
Set Cnxn = Nothing<br />
Close<br />
it basically is supposed to search the recordset, for text that the user supplies which is the strSearch Varible.
Any help would be great.
|
|
|
|
|
You must have been reading the MSDN example for Recordset (looping to count number of instances) which I think is a very bad example.
Try to avoid looping through Recordset to get only specific record(s). In most cases it's much more efficient to modify your query to use SQL functions like COUNT, SUM, AVG, etc or specify a condition to get only the records you want.
Since I assume you only want to return one recordset, try modifying your SQL query into something like
"SELECT * FROM Email WHERE Notes LIKE '%" & strSearch & "%'"
You need the % as a wildcard for text before and after the search word(s).
This will return record(s) that match your query. If you only want one, use "SELECT TOP 1 * FROM..." instead.
If the recordset returns .EOF then there are no records found, otherwise simply display the data like this:
txtMessage.Text = rstNotes.Fields("FieldName")
I hope this helps
Edbert P.
Sydney, Australia.
|
|
|
|
|
Perfect That works great,
thank you for the help
|
|
|
|
|
Hi, i have a problem i an application i'm building in Visual Basic 2005 Beta 1, the thing is: when i try to update the access database, appears an error about some "InsertCommand" is missing, i'm using a code like the following:
Me.DVDsDataConnector.EndEdit()
Me.DVDsTableAdapter.update(Me.MyDVDCollection.DVDs)
and sometimes doesn't show the error but nothing happens, it doesn't update the database
what can i do?
|
|
|
|
|
You need to create the InsertCommand and assign it to your DataAdapter.
Basically this means you need to supply an SQL on how the data should be inserted into the database, e.g. "INSERT INTO DVD (DVDName) VALUES (@DVDName)".
You can use CommandBuilder to let .NET try to build an SQL script for you, but I recommend writing your own SQL so you know exactly what is changed in your database.
Have a look at this article[^] to find out more about InsertCommand.
I hope this helps
Edbert P.
Sydney, Australia.
|
|
|
|
|
Hello,
If I install Embedded Visual C++ on a machine that is already running Visual Studio .Net 2003, is there a possibility of something going wrong? (Would it damage the .Net CF in Visual Basic .Net 2003?)
Thanks
My sig:
"It isn't a bug, it's a feature I didn't know about." - Programmer2k4 (In case you didn't know - that's me! )
Oops, Programmer2k4 is now old...I should have thought about that a year in advance.
|
|
|
|
|
How can I get the SystemMenu Icons? The ones for Restore, Minimize, Maximize and Close?
Thanks,
Tim
|
|
|
|
|
mailing you one application which will extract all the system icons in the specified folder... check your mail with subject "mail from Rizwan"
Best Regards
Rizwan Bashir
Rizwan Bashir
|
|
|
|
|
Found the answer. They are actually part of the Marlett font.
|
|
|
|
|
Hi, I have some question related to my task in VB.NET. Those question are:
1. How to determine which row or value is select in a list view in VB.NET?
2. I have a button, I want it work when the user click on it, it would run a webpage (ex. when user click it point to www.codeproject.com) and open a default mail application to send mail to someone@codeproject.com.
3. How to create the splash screen in vb.net??? I try to use timer to close the current form (splash screen) and open the second form (the main form) but it display an error message. I used to do this method in VB6 and it is working very well. but I don't know who to do that in VB.Net after it raise a problem.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
The man from SCN-CO wrote:
1. How to determine which row or value is select in a list view in VB.NET?
Use the SelectedIndices and SelectedItems properties (as described in the documentation).
The man from SCN-CO wrote:
2. I have a button, I want it work when the user click on it, it would run a webpage (ex. when user click it point to www.codeproject.com) and open a default mail application to send mail to someone@codeproject.com.
Use the System.Diagnostics.Process class. These two calls will start the default application for internet browsing and sending mail, respectively:
Process.Start("http://www.codeproject.com")
Process.Start("mailto:someone@codeproject.com")
The man from SCN-CO wrote:
3. How to create the splash screen in vb.net???
Much has been written on this subject. I suggest googling for "VB.NET splash screen" and look through some of the samples.
Charlie
if(!curlies){ return; }
|
|
|
|