|
I didn't think of that and it worked just fine. Thanks!
|
|
|
|
|
Hi, Have a good day ...
I have an Existing Dial-up Connection , I want to Set UserName , Password for it ...
With C# ,
I can create dialup Connection with many options , with RAS compnents ( I tried so many ) but non of them will allow you to set the user name , and the password ,,,,
Kind regards ...
P.S
I found this API Declartion
RasSetEntryDialParams Does any one have an c# usage Example for it . it's structer is very complex .....
I know nothing , I know nothing ...
|
|
|
|
|
|
Read my article , u can find how to pass username,password to rasdial.exe
Managing Dialup connection[^]
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
I created a new, empty WindowsService in both VS 2005 and 2008 (specifying Framework 2.0) and a default deployment project for it. When I run either installer, it says everything installed OK, but it didn't! Even the Application Event Log says the installation was a success. The service executable is where it belongs, but the service is not installed. Running installutil.exe from the command line is successful.
I got to this place when a service that used to install fine was modified and subsequently refused to install correctly. Service install packages built last year still install successfully. Unmodified services that are rebuilt (in VS 2005) today also still install successfully. We tried building on three PCs with the same results.
What are we missing?
(All PCs have XP Pro SP2, with Framework 2 SP2 and Framework 3.5 SP1.)
|
|
|
|
|
hi
I need to find the list of IDM (internet download manager) downloads (urls,file name and extension is enough) from own program .
where they saves?
please tell me file name and its address or registry place "if not save in file"
|
|
|
|
|
C:\Users\Stark\AppData\Roaming\IDM\UrlHistory.txt
Where Stark is your PC UserName
And yes the Folder attributes is (hidden + system)
if you have windows XP
C:\Documents and settings\Stark\........\IDM\UrlHistory.txt
I know nothing , I know nothing ...
modified on Wednesday, June 17, 2009 2:45 PM
|
|
|
|
|
in VB.net Form has an event_Dispose. so does C# has this event ?
|
|
|
|
|
C# has Form.Disposed event handler... thou it does not seem to come up in design mode so you will have to code it your self...
public Form1()
{
InitializeComponent();
Form1.Disposed += new EventHander(OnFormDisposed);
}
void OnFormDisposed(object sender, EventArgs e)
{
}
I don't know what EventArgs can be used with it or even if it will work. What do you need it for?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
I am looking to create a app that will inventory hardware.
Program details.
1. Create a GUI to: Allow the user to select a list of hardware properties (i.e Processor Speed)from a list of all properties of the selected hardware (i.e Processor) Save these settings to XML file
2. create console app to read XML file scan the hardware then write it to a DB.
I would like to use the GUI in step 1 as a front end to configure the console app in step 2. Should i save the setting in a XML file or some other place/document? What is the correct way of doing this sort of thing and by correct I mean best method from a programming stand point.
|
|
|
|
|
packetsmacker wrote: 1. Create a GUI to: Allow the user to select a list of hardware properties (i.e Processor Speed)from a list of all properties of the selected hardware (i.e Processor).
Take a look at a PropertyGrid control. You will need a class S which would have all required propertied exposed to public. Then set the PropertyGrid.SelectedObject property to an instance of the class S .
packetsmacker wrote: Save these settings to XML file
2. create console app to read XML file scan the hardware then write it to a DB.
Search for "XML serialization". The System.Xml.Serialization.XmlSerializer class allows you to both read and write from/to XML with Deserialize and Serialize methods. All you have to do is to pass the typeof(S) and .NET will do all dirty work for you.
Greetings - Jacek Gajek
|
|
|
|
|
I would just write an app to poll the system for it's hardware specs rather than ask a user for hardware specs. Furthermore, there is no point in saving to XML when the GUI can write straight to the database.
|
|
|
|
|
I see your point. I would like to have this run on startup or at a scheduled time. I guess i could just put all the info in to the db and filter out the stuff I don't want to see when I create the sql query
|
|
|
|
|
AFAIK you can query remote machines using WMI, so if your machines are networked and available, you may not need a periodic local action, nor a database.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
well that changes everything. I should have posted this question before I started coding. I think this will be all I need.
thanks
|
|
|
|
|
i want to display Form2 when click on button in Form1. but i don want to open Form2 as instand of Form2. so how can write the code ?
|
|
|
|
|
Please explain more clearly what you are trying to do
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
i have 2 form. Form1 and Form2. i want to open Form2 by Clicking a Button in Form1.
my code is follow. but my Form2 can appear alot as i click on Button. so i just to open Form2 only one even i click that Button many times .
private void button1_Click(object sender, EventArgs e)
{
form f = new form2();
f.Show();
}
|
|
|
|
|
I see, maybe something like this then...
Form2 form2;
private void button1_Click(object sender, EventArgs e)
{
if(form2 == null || form2.IsDisposed)
form2 = new Form2();
form2.Show();
}
Life goes very fast. Tomorrow, today is already yesterday.
modified on Wednesday, June 17, 2009 12:00 PM
|
|
|
|
|
musefan wrote: if(form2.IsDisposed || form2 == null)
I would prefer if(form2 == null || form2.IsDisposed )
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
yeah, I realised my mistake after posting but didn't want to change it. But just for you...
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
I would prefer if( null == form2 || form2.IsDisposed)
|
|
|
|
|
I would prefer...
if(form2.IsNullOrDisposedOrAnythingThatMightCauseANeedForANewInstance)
form2 = new Form2();
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
I don't, I never did those reverse compares, not in all my years programming in C and other languages that might benefit from it. It looks ugly, and it is unnecessary for Form variables: strongly typed languages with a boolean type don't need this at all, except maybe when the variable is of that boolean type. But even in C, where bools are just ints, I've always chosen not to do so.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Luc Pattyn wrote: I never did those reverse compares, not in all my years programming in C and other languages that might benefit from it.
I suspect you never spent hours or days looking for bug that was caused by a typo dropping an '=' character that could have been avoided by a compiler error. As far as I'm concerned, it's a no-brainer to choose to take advantage of the compiler in every case you can.
|
|
|
|