|
'System.Configuration.ConfigurationException.ConfigurationException(string)' is obsolete: 'This class is obsolete, to create a new exception create a System.Configuration!System.Configuration.ConfigurationErrorsException'
What exactly does MS want me to do here? I can't create a System.Configuration.ConfigurationErrorsException to update my legacy throw statements.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
To [No name supplied] (person whose reply was eaten by a bug[^]):
I did try throw System.Configuration!System.Configuration.ConfigurationErrorsException("blah"); but it gets a compiler error of "; expected" on the exclamation point.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
I wrote a application that will unlock users when they get locked out. I need my application to authenticate and run as a admin user so it can unlock the locked out users when a normal user runs it. I need to have the the admin credentials stored inside my application so it authenticates first then unlocks the locked out users if you need to see my code i will be happy to post.
I dont want to add a text box for user or pass and give the person who will be using this a admin account.... not cool
and this admin account that will be stored inside my app will be monitored closely.
Thank you for your time
Summey
|
|
|
|
|
Good people,
So, I built and installed my app. However, I can't find it in program files. Then I find out that "Click Once" installs it in the (general?) application cache.
My question is: how do I navigate to it in Windows Explorer. I want to check out some of the installed data files to make sure it's working. I have tried locating it in many directories including "Program Files", "Windows", etc...
Any help you can provide would be helpful.
Thanks,
Blitz
|
|
|
|
|
Use Windows explorer to search for the executable ie "myapp.exe". You should find it, then right click and choose "Open Location".
|
|
|
|
|
HELLO! I am student, created a program to capture video from camcorders machines, I would like to see the images of machines camcorders the Internet.
You can help me? Initially I'm using webcam.
This program is for completion of course.
thanks!
|
|
|
|
|
I'm afraid we can't help with such a general question. But to be able to see the images of another machines camera over the internet, they would need to be broadcasting it. To broadcast the images, you would probably also need some kind of server to broadcast to.
If it is for a project, the server could just be another machine on the network.
My current favourite word is: Delicious!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
I am trying to call a stored procedure from C#. The stored procedure, called create_journal, compiles succesfully on SQL Server and also runs sucessfully when executed in query analyzeer. It takes a datetime input parameter. When I call it from C#, I get an SqlException which says Error 170. Line 1 Incorrect syntax near create_journal_entry
The stored Procedure begins as follows
ALTER PROCEDURE create_journal_entry
@eom_date DATETIME --End of month date
AS
DECLARE
@next_jrnl_num VARCHAR(20)
The c# code is
private void createJEs()
{
DateTime cutOffDate;
cutOffDate=this.dtpCutOffDate.Value;
SqlConnection conn =new SqlConnection(DBConnection.connectionString());
conn.Open();
SqlCommand comm=new SqlCommand("create_journal_entry",conn);
comm.Parameters.Add("@eom_date",SqlDbtype.DateTime);
comm.parameters["@eom_date"].value=this.dtpCutOffDate.Value;
try
{
comm.ExecuteNonQuery();
moveFiles();
MessageBox.Show("Data has been successfully sent to the
GL.", "Success",MessageBoxButtons.YesNo,MessageBoxIcon.Information);
}
catch(SqlException ex)
{
MessageBox.Show("Error "+ex.Number + " "+ ex.Message,"SqlServer
error",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message,"System Error",
MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
}
finally
{
if (conn!=null)
{
conn.Close();
}
}
}
NB this.dtpCutOffDate is a DateTime picker control.
Please help as I am going nuts over this.
Thanks
|
|
|
|
|
You have to set your command object to stored proc type. i.e.
After this line
SqlCommand comm=new SqlCommand("create_journal_entry",conn);
Type this
comm.CommandType = CommandType.StoredProcedure
The default is text so it is reading 'create_journal_entry' as your query.
|
|
|
|
|
Thanks a batch! It worked right away......just wondering why the heck I could not see that. Feels like Friday.
|
|
|
|
|
I'd like to monitor a text file to see when an outside program changes the contents of it. Is there a simple way to do this??? Actually, the easiest way to do this for me might be to see when the it saves or closes.
|
|
|
|
|
|
You could check out FileSystemWatcher.. I can't remember if it'll tell you if the file's been opened or closed but it does let you know when a file has been changed, created, deleted etc... You can find it inside your ToolBox in Visual Studio
jay
|
|
|
|
|
Good deal. thank you both. I'm trying to make a PDF buttonclick event register in my code, but apparently this is very hard to do... So i decided to make the buttonclick in the PDF open and change a document. Then my C# app will hopefully see it and respond...worth a try any way. Thanks again.
jpc
|
|
|
|
|
According to this thread[^] it is possible if you're using Acrobat (not reader) with a little Java.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
I have a simple scene in Direct3D in c#, but i am having trouble getting it to draw objects in the right order:
Image 1
Image 2 (Wrongness)
device.Clear(ClearFlags.Target, Color.Black, 1.0f, 0);<br />
device.BeginScene();<br />
device.VertexFormat = CustomVertex.PositionTextured.Format;<br />
<br />
LoadTexturesAndMaterials("TexFloor.png");<br />
device.SetTexture(0, texture);<br />
device.DrawUserPrimitives(PrimitiveType.TriangleList, 8, Floor);<br />
<br />
LoadTexturesAndMaterials("TexPillar.png");<br />
device.SetTexture(0, texture);<br />
device.DrawUserPrimitives(PrimitiveType.TriangleList, 16, MakePillar(new Vector3(fb, 0, 0), 4, 0.2f));<br />
device.DrawUserPrimitives(PrimitiveType.TriangleList, 16, MakePillar(new Vector3(-fb, 0, 0), 4, 0.2f));<br />
device.DrawUserPrimitives(PrimitiveType.TriangleList, 16, MakePillar(new Vector3(0, 0, -fb), 4, 0.2f));<br />
<br />
LoadTexturesAndMaterials("TexCrystal.png");<br />
device.SetTexture(0, texture);<br />
device.DrawUserPrimitives(PrimitiveType.TriangleList, 32, Crystal);<br />
<br />
device.EndScene();<br />
device.Present();<br />
Graphics g = this.CreateGraphics();<br />
g.DrawString("HUD Test", this.Font, Brushes.Red, new PointF(20, 20));<br />
this.Invalidate();<br />
|
|
|
|
|
|
Hi guys I am making a custom control/user control.
How make mycontrol.dosomething(); fire an event
and How do I handle event handlers
Thanks
|
|
|
|
|
public class MyControl : Control
{
public event EventHandler DoingSomething;
public void DoSomething()
{
OnDoingSomething(EventArgs.Empty);
}
protected virtual void OnDoingSomething(EventArgs e)
{
EventHandler eh = DoingSomething;
if(eh != null)
eh(this, e);
}
} The event handler for this event can be done in the same way as any other control.
See my Events Made Simple[^] article for more info including custom event args etc.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
|
Hello,
I have an application with datagrid that takes the information from database (bindingsource).
I have a refresh button to refresh the datagrids.
I want to make a button that the user will write which column from the DB he wants to add to the datagrid to see it's data.
How can i add programaticly new column that will be bound to this database?
|
|
|
|
|
Hi
sorry for post in this forum, because i Posted a message in this link[^] about workflow management standards in .net but noBody replied yet, hence i post again in this forum (and give a link for main question) to find out solution, It's very emergency.
Thanks
|
|
|
|
|
hdv212 wrote: It's very emergency
Looking at your profile: With your Silver membership, nearly 600 messages posted and almost 4 years as a member, you really should know better! It might be a good time to google for a flame suit[^].
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Hi DaveyM69
thanks for reply, but what's flame suit ?
does have relation with workflow ?
|
|
|
|
|
I have multiple instances of a custom control on a form. I created the control. I am able to use the Tab key to tab to the next control in the order but the Shift+Tab key will not tab to the previous control. The Shift+Tab key also causes the tab to the next control. I also have a couple of Buttons on the form. The Shift+Tab key functions correctly when the buttons have the focus. Can someone suggest why the Shift+Tab key will not shift focus to the previous control when my control has focus?
thanks
|
|
|
|