|
ABSOLUTELY DEFINATELY. I have stepped thru the code in debug mode several time to make sure.
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Bizarre!
How about something like:
Dim bLogonResult As Boolean = Logon()
If bLogonResult Then
MessageBox.Show(bLogonResult)
ElseIf Not bLogonResult Then
PDM.Common.ClientData.RestartApplication = False
Me.Close()
End If
|
|
|
|
|
Hi, I am trying to run a very simple application that keeps giving me an error that says invalidOperationException was unhandled, an error occured creating the form...I need help,thanx
Faruzzy.net!
|
|
|
|
|
Hi,
look at the entire exception text including the stack traceback, use the line numbers it
mentions (assuming a debug build), investigate the Form's constructor code.
Are you using extra threads, doing some illegal cross-thread Control access?
If you can't find it, publish all that information as is.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi,
I have a datagridview and on a column I have combobox.
When I choose a element from combobox I want to find the index of this element.
thanks.
|
|
|
|
|
Use the SelectedIndex property of the combobox.
Paul
|
|
|
|
|
yes, but I don't have an idea.
please give some script.
thanks
|
|
|
|
|
Have you checked the documentation[^]?
This is usually the best place to start.
Paul
|
|
|
|
|
I am running a program that search .wav, .wmv, and .mp3 files on the computer and automatically stores them into a database table. The table name is tblFileReport. I have another table called tblExclude which includes files that are excluded. However, I do not want to insert the file into tblFileReport if the file exist in tblExclude. For example, if "ExcludeFileName" is equal to filename then I don't want this file to be added to tblFileReport. But, if the file is not in tblExclude then add the file to tblFileReport. Here is the code that I have so far:
For Each folder As String In paths<br />
Try<br />
For Each file As String In My.Computer.FileSystem.GetFiles(folder, FileIO.SearchOption.SearchAllSubDirectories, patterns)<br />
fileName = System.IO.Path.GetFileName(file).ToLower<br />
<br />
Insert(file, fileName, CType(IPAddress.AddressList.GetValue(0), Net.IPAddress).ToString, System.Net.Dns.GetHostName)<br />
'End If<br />
Next<br />
<br />
Catch ex As UnauthorizedAccessException<br />
<br />
End Try<br />
Next
The string filename is the name of the file, for example chimes.wav, and if this name is equal to "ExcludeFileName" which is the filename column in tblExclude then do not add to tblFileReoport. I am thinking maybe an If, Then statement needs to be included in this code sample.
Any ideas?
jds1207
|
|
|
|
|
You could put an If..Else block around your call to Insert() that calls a method to check whether the current filename is present in tblExclude.
Paul
|
|
|
|
|
i want form with source code for quiz competition how can i get that please help me. if you have that please send it to my mail deep_eddy2002@yahoo.co.in
E.DEEPAK
|
|
|
|
|
Noone is going to send you any code. You have to write it yourself. CodeProject exists to help people write their own code. It is NOT in the business of just handing over code for you to turn in as your own work.
|
|
|
|
|
I just want to make sure you know, the spam you get as a result of your post, is not from this site, or even people who use this site, but automated programs that search the web for people silly enough to post addresses like that.
And, what Dave said. If you want it, write it, or pay someone to write it. Ask us when you've tried to do it yourself and get stuck.
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 have a crystal report that displays records from a database.Each record has a number field "QTY". I want to display at the end of each page the sum of this field for all records in this page... ,and in the last page i want to display the sum for the page and the sum for all records in report.
Thank you
|
|
|
|
|
Check out the Running Total Fields in the field explorer while editing your Crystal Report.
|
|
|
|
|
thank you
i used the running total fields , but with this i can create a sum field for all records .I want to create a sum field for each page .for example :
Page 1 :
QTY
5
6
7
Sum 18
Page 2 3
5
2
Sum 10
Report Footer
Total Sum 28
|
|
|
|
|
|
Hi!
I know how to save an image into an Access DataBase in a binary format and retrieve it in a memorystream and display it in a picturebox, only problem is .Gif files.
I found the way to save(.Gif Files) into a Database, but when I try retrieving it, it gives an Error.
I need help very urgently.
any help will be extremely appreciated.
|
|
|
|
|
A GIF file is no different than any other image file. If the code works for one file format, it'll work for another, PROVIDED that the code is written properly.
What's the code you're using to store the image and retrieve the image look like?
|
|
|
|
|
If it is very very very urgent you maybe could read the error message, look at the stack
traceback, and use line numbers to locate the problem. We can't.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
well,
Dim img As Object = dataset.Tables(0).Rows(0)(0)<br />
<br />
Dim imgObject() As Byte = CType(img, Byte())<br />
<br />
Using theMemStream As New IO.MemoryStream()<br />
<br />
theMemStream.Write(imgObject, 0, imgObject.Length)<br />
theMemStream.Position = 0<br />
<br />
PictureBox1.Image = Image.FromStream(theMemStream)<br />
End If<br />
End Using
this is the code that I used, but it gave me this error:
first Error:
"A generic error occurred in GDI+"
Error Code = "-2147467259"
Second Error: (on cont...)
"Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang."
Third Error: (on cont...)
"Attempting to call into managed code without transitioning out first. Do not attempt to run managed code inside low-level native extensibility points, such as the vectored exception handler, since doing so can cause corruption and data loss."
|
|
|
|
|
This code is barely passable for reading image data and reconstituting it. What does the code look like that wrote the image to the database? After all, what good is the code that reads it (even if good) if the code that wrote it didn't do it correctly?
|
|
|
|
|
Hi,
your error code is 0x80004005 (E_FAIL), its most likely cause is a bad image file.
Assuming the exact same code runs fine with other image file types, I suggest you
try another GIF file (preferably originating from a completely different source).
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hello guys,
I like your advice.
I am programming a windows service in vb.net 2003 and I'd like to have the windows service run a windows form that provide me status information concerning the tasks of the service. And to make it more nice, minimize the form to the system tray.
How I do this properly?
I have done the following:
<br />
Private test As Thread<br />
Public Shared fStatus As New FormStatus ' The windows form<br />
<br />
Protected Overrides Sub OnStart(ByVal args() As String)<br />
' Create the windows form thread<br />
test = New Thread(New ThreadStart(AddressOf Me.dotest))<br />
test.Start()<br />
<br />
' The real Service work<br />
Communication.StartCommunication()<br />
End Sub<br />
<br />
Private Sub dotest()<br />
fStatus.Show()<br />
End Sub<br />
With this code, the form disappears almost immediately. If I use ShowDialog() instead of Show(), the notify icon does not process the click events.
Can anyone give me a nice advice to solve this issue?
Thanks.
|
|
|
|
|
I'v never done this before but from the top of my had I see at least one problem (obstical):
a service can run without a user being logged in and if this is the case I doubt that you'r form will show, I think it probably will generate a error or at least some strange behavior. So you'll have to check wheter or not there is a user logged in.
as to why the form disappears I don't really know but I would try putting the 'real service work' also in a sepparte thread.
I don't know if it will solve the problem but it's worth a try I think.
I think that if you always want a form to be displayed and the communcation.startcommunication only has to work if a user is logged in it probably be best that you write it in a windows form application and put that application in the startup of the user.
I'v only experimented with services a few times but I can tell you that if you try to do to much in them they start acting strange
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|