|
Pardon my ingorance but what should cfg be declared as ?
Thanks in advance...
|
|
|
|
|
You can find that out by looking at the return type of the ConfigurationManager.OpenMappedExeConfiguration method, which is Configuration out of the System.Configuration namespace.
|
|
|
|
|
Hi,
By default, when adding a folder to a C# project, it will affect the namespace of new classes contained there.
EG: Add a folder called dummy. then a class below, the IDE automatically inserts "namespace classlibrary1.dummy" into the class.
Is there anyway to turn this on in VB.Net?
|
|
|
|
|
No, there isn't. The VB.NET IDE does not support automatically add Namespace statements at any time.
|
|
|
|
|
I have the following vb.net code :-
Dim bLogonResult As Boolean = Logon()<br />
If bLogonResult = True Then<br />
MessageBox.Show(bLogonResult)<br />
Else<br />
PDM.Common.ClientData.RestartApplication = False<br />
Me.Close()<br />
End If
Looks fairly straight-forwards. Right?
So why is it that when bLogonResult does equal True that it displays the message box then jumps to the Me.Close in the Else section?
Somewhat perplexing, I sure you would agree.
Any help appriciated
Thanks
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'
|
|
|
|
|
I'd be tempted to try:
If bLogonResult Then .....
|
|
|
|
|
I tried that. I also tried If Logon() Then and IF Logon() = True Then
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'
|
|
|
|
|
Is it DEFINATELY going into the 'Else'? You haven't got another Me.Close further down?
|
|
|
|
|
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
|
|
|
|
|