|
Is there not an event on the application class that fires when Windows issues a shut down command? (It's been a while and I might be a bit rusty on that)
|
|
|
|
|
nothing i can see thats fairly obvious.
anyone else
thanks Colin anyway
|
|
|
|
|
It would appear your UI thread is blocked somewhere, but it's not obvious in the code you've posted. Single step through the execution of your server and watch the code run, line-by-line. If the debugger gets to a statement where it stops and doesn't execute the next line, you've found the block.
|
|
|
|
|
I am having a report folder which is based on crystal reports 4.3. I want to make this folder as virtual folder to the people who are all using the application.It's urgent.
Sivaraman.
|
|
|
|
|
What do you by a "virtual folder"??
sivaraman_sankaranarayanan wrote: It's urgent.
So what? If you want "urgent support", go pay Microsoft for it.
|
|
|
|
|
sivaraman_sankaranarayanan wrote: It's urgent.
How rude and makes people less inclined to help.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hello guys, im having trouble to write the code to select the next row in the datagrid.
Looked around and found this but it doesnt work;
datagrid.Select(1)
fyi: im on vb .net 2005 sp1
thanks in advance!
|
|
|
|
|
Hi,
Try this Me.BindingContext.Item(dg.DataSource, dg.DataMember).Position += 1
*dg = DataGrid
hope this helps
|
|
|
|
|
Hello,
VS 2005
I have a datagridview (order details) that is bound to a combo box (orders). Both controls are bounded using the bindingsource (bsOrders, bsOrderDetails)
The user will select a order from the combo box, and all the order details will be displayed in the datagridview.
The problem I am having, is that the user can edit the cells in the dgv, when they select another order from the combo box, those edits will disappear when they select that order again.
I don't want the cell changes to be commited to the database, only that they stay in the cell when the user selects from the combo box.
I have tried using the dgv.EndEdit() in the selectChangedCommitted event of the combo box. But this doesn't seem to have worked.
Many thanks for any suggestions,
Steve
|
|
|
|
|
VB6 HTML elements offsetParent recursive problem
How to recursively go through all parent elements of the current element on html page?
I do this and get error
While (TypeOf elem Is IHTMLElement)
parentall = "-Parent Tag=" & elem.offsetParent.tagName & _
elem.id & ",l=" & elem.offsetLeft & ";t=" & elem.offsetTop & _
Set elem = elem.offsetParent
Wend
|
|
|
|
|
This code snippet doesn't call itself, so how is this recursive?? This is just enumerating the elements at a single level. Perhaps a bigger snippet would help?? One that shows the rest of the code this snippet shows up in.
|
|
|
|
|
I have dropped all my emails into an access database, and now building a vb.NET windows app to query to return needed email bodies. The application runs through the database dataset function and returns 0 rows. I console.writeline the connection string and SQL statement and am able to pull records from the database. I can't see what I have wrong in the code. The function hitting the database is listed below. Please any help would be a really great thing. Thanks in advance.
Public Function GetSelectAnd2Records(ByVal strTableName, ByVal strCriteria1, ByVal strCriteria3) As DataSet
Dim ds As New DataSet
Dim strSQL As String
Dim dbConn As New OleDbConnection
dbConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\NovaEmailKB\KNOWLEDGE BASE SSC.mdb;"
strCriteria1 = "*" & strCriteria1 & "*"
strCriteria3 = "*" & strCriteria3 & "*"
strSQL = "SELECT [ID], [Subject], [Body], [Received], [From] " & _
"FROM " & strTableName & " " & _
"WHERE (((Body) Like """ & strCriteria1 & """ And (Terminals.Body) Like """ & strCriteria3 & """)) " & _
"ORDER BY Received DESC; "
Dim cn As New OleDbConnection(dbConn.ConnectionString)
Dim cmd As New OleDbCommand(strSQL, cn)
Dim da As New OleDbDataAdapter(cmd)
Console.WriteLine(dbConn.ConnectionString)
Console.WriteLine(strSQL)
Try
cn.Open()
Console.WriteLine(cn.State)
cmd.Connection = cn
cmd.CommandText = strSQL
cmd.ExecuteNonQuery()
da.Fill(ds, "SelectAnd2Rtn")
If cn.State = ConnectionState.Open Then
cn.Close()
End If
cn.Dispose()
cn = Nothing
da.Dispose()
da = Nothing
Catch ex As Exception
MsgBox("An unexpected MS Access error has occured: " & ex.Message)
If cn.State = ConnectionState.Open Then
cn.Close()
End If
cn.Dispose()
cn = Nothing
da.Dispose()
da = Nothing
Return Nothing
Exit Function
End Try
Return ds
End Function
|
|
|
|
|
I'd start by picking a single method to fill a dataset and sticking with it. You've got two different methods in here. And I detest using string concatentation to build an SQL statement. Simplify it!
Public Function GetSelectAnd2Records(ByVal strTableName, ByVal strCriteria1, ByVal strCriteria3) As DataSet
' Are you sure Access uses asterisks as wildcards???
' I don't know because I don't use Access anymore...
strCriteria1 = "*" & strCriteria1 & "*"
strCriteria3 = "*" & strCriteria3 & "*"
Dim strSQL As String = String.Format("SELECT [ID], [Subject], [Body], [Received], [From] " & _
"FROM {0} WHERE [Body) Like ""{1}"" And (Terminals.Body) Like ""{2}""" & _
"ORDER BY Received DESC", strTableName, strCriteria1, strCriteria3)
Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\NovaEmailKB\KNOWLEDGE BASE SSC.mdb;")
Dim comm As New OleDbCommand(strSQL, conn)
Console.WriteLine(strSQL)
Try
Using da As OleDbDataAdapter = New OleDbDataAdapter(comm)
da.Fill(ds)
End Using
Catch ex As Exception
MsgBox("An unexpected MS Access error has occured: " & ex.Message)
End Try
Return ds
End Function
|
|
|
|
|
Thanks so much for the advise, however using your code for the function I am still returning 0 rows. When I put the query directly into Access I return 8 rows. Again thanks so much for your thought and advise, I'll keep plugging along.
|
|
|
|
|
It's not obvious in the code. Either the query string your using directly in Access is different than the one generated by the code or the table name your passing in is different, or the database the app is using is different from the one your direct query is using.
|
|
|
|
|
Thanks once again for your thoughts. I ran console.writeline on both the connection string and the sql statement then using start run opened the database and ran the query that was placed in the output window. What I have found is when I take out the like and run an equal to where I get results in the datagridview on my form. It is becoming obvious that my problem has to do with like in the query which allows it to run in Access but not through the application. My next move is to try % as the wildcard not *. I sure wish I could use SQL Server but that is just not in the cards.
Again thanks for all your help.
|
|
|
|
|
Hi,
I have been trying to load the google toolbar in a custom web browser. But when it comes to the following line:
System.Reflection.Assembly.LoadFrom("C:\Program Files\Mozilla Firefox\extensions\{3112ca9c-de6d-4884-a869-9855de68056c}\components\googletoolbar.dll")
It says:
"Could not load file or assembly 'file:///C:\Program Files\Mozilla Firefox\extensions\{3112ca9c-de6d-4884-a869-9855de68056c}\components\googletoolbar.dll' or one of its dependencies. The module was expected to contain an assembly manifest."
I'd appreciate any help on how this can be done.
Thanks,
Ahmad
|
|
|
|
|
The last few months I have been developing a windows application for my company .The development was first implemented with Visual Studio 2005 Team edition ( 180 trial version ). The company decided to buy VSTO 20005 last month . Why am i saying all this ? Three months ago we installed to all our clients our application using ClickOnce , so that we could support them with frequent updates . But when i tried to publish some changes using VSTO , i got an error that "my certificate was not in my certificate store" . After a lot of search i realised that when you publish an application using clickOnce your manifest file is being signed with a test certificate , it doesn't matter if you choose to sign clickonce or not ( i was not choosing to sign my clickonce application ) , in your applications properties . That certificate not only is for testing purposes but IT EXPIRES after 1 year . So , after the certificate is expired , the users can still use the application , but you can no longer use the clickonce setup you created before. I tried to create a new certificate , publish again , and it all worked great . But , for my surprise , we can no longer support , send updates to our customers , because the first clickonce installation and the second one DO NOT HAVE the same certificate ! The solution that microsoft offers is simple .... Uninstall the old one and install the new one . Thankfully i found some articles how to create a new certificate , that expires in any years i want , but the big issue remains .
How to update the old installations with the new certificate . Sorry for my long message but i believe that such a good effort creating click Once installation should not face that kind of troubles .
You can create your own certificate using http://msdn.microsoft.com/library/en-us/seccrypto/security/makecert.asp
and exporting it using http://msdn.microsoft.com/library/en-us/seccrypto/security/certmgr.asp
A very good article about Click Once http://msdn.microsoft.com/smartclient/default.aspx?pull=/library/en-us/dnwinforms/html/clickoncetrustpub.asp
If anyone have any ideas how to overcome such an issue , without reinstalling everything , it would be much appreciated .
Thank you
|
|
|
|
|
Nope
We ran across the same problem - temp keys that expire in 12 months. The only solution that we could get to work was the uninstall process.
So the moral of the story - create a certificate BEFORE you start developing your clickonce deployed apps.
Sorry I know this does not help but at least you are not alone
|
|
|
|
|
I'm trying to make a gap-killer for the MP3 player I'm working on. Can anyone help me out with a way of getting the volume levels of an audio file? Basically I want to start from the end of a file and work backwards until the dB is at a certain level, and then trigger the start of the next song.
Simple crossfading would be easy enough, but it's a little too clunky for me. I hate cutting off the ends of songs that don't fade out.
Hopefully it works from both ends. Some of the songs I've got have dead air at the beginning too.
Thanks for your help.
"Go to, I’ll no more on’t; it hath made me mad." - Hamlet
|
|
|
|
|
Hi. I'm using Vb.net 2005 and need some way of allowing the user to select a folder and all files matching a certain extension (in this case mp3s) are then selected within that folder. I want to extract the abolute path, folder path and filename from each of the files in the folder. I already have used the OpenFileDialog class to select mp3s individually or by pressing ctrl + A to select all in the current folder, but i want to allow the user just to select a folder and all files are selected and using a for each loop iterate though all the files extracting the absolute path, file name and folder path. Can anybody help with this?
Mr Oizo
|
|
|
|
|
You can use a FolderBrowserDialog control to allow the user to select a directory (Its in the Dialog section of the toolbox near the OpenDialog control). Then in your code you can select the files that have a specific extension by using something like this:
Dim strMP3Files As String() <br />
strMP3Files = System.IO.Directory.GetFiles(strSelectedDir, "*.mp3")
Hope this helps.
|
|
|
|
|
Hey thanks alot.... It wasn't exactly what I was looking for but it got the job done by returning the absolute path of each of the files i was looking for. I just used a bit of string manipulation to satisfy my fileName field and got the folder path from the folderBrowserDialog.SelectedPath property. Happy times thanks alot
Mr Oizo
|
|
|
|
|
Hi Again,
Does anyone know how to implement the Alt-Tab function?
For example, I have my application running and I want the user to click on a button in my app which will return them to the previous running application without closing my app.
thanks,
joe c
joe c
|
|
|
|
|
I already told you there is no way to tell what the previous application or window was. You have to write hook code to track what the CURRENT window is and add it to a short list. WHen the current window becomes your application, you look in the pervious entry in the list to see which window HAD the focus.
Asking the saem question again and again will not change the answer.
|
|
|
|