|
hi all,
I hope any one can help me :
what is the classes in C# or API functions allow me to do uninstall my program from PC??
thanks.
|
|
|
|
|
There aren't any.
You'll find the command line to uninstall an application in the registry in a key under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall. The uninstall information is in a value named 'UninstallString'. Pass that to System.Diagnostics.Process.Start.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi,
How can I browse through local shell folders such as the desktop and 'my computer' inside a treeview?
I have tried using SpecialFolders, but It only points me to the file folder compatable to the special folder, which does not contain all I need (e.g. the Desktop doesn't contain My Computer, and My Computer doesn't exist).
I want something like in the windows explorer - like the FolderBrowserDialog but not in a new window but inside a treeview, so I can handle this information on my own.
Thanks!
|
|
|
|
|
|
Thank you!
|
|
|
|
|
i am new in c# and i am having a problem in getting primary key value from table to a int variable
example
select user_id from user where login="dcds" ;
i need to store the user_id of this guy in a variable so i can use it for future so any one can tell me how to do this in asp.net using c#
thanks
|
|
|
|
|
This is a long process .... I haven't worked with asp.net in a while but I am sure it is similar to this ...
make sure to specify using System.Data and using System.Data.SqlClient
SqlConnection connection = new SqlConnection(YOUR_SQL_CONNECTION_STRING);
/*
//EXAMPLE CONN STRING
workstation id=YOUR_MACHINE;packet size=4096;integrated security=SSPI;data source="YOUR_SQL_SERVER";persist security info=True;initial catalog=YOUR_DB
*/
connection.Open();
SqlCommand command = new SqlCommand("select user_id from user where login='dcds'");
command.Connection = connection;
SqlDataReader reader = command.ExecuteReader();
int Id = -1;
while(reader.HasRows)
{
reader.Read();
Object obj = reader["user_id"];
if(obj != null)
Id = Convert.ToInt32(obj);
}
Hope this helps ....
Shardool Karnik
Lead Software Engineer
Compass Technologies, Inc.
http://www.compasstec.com
|
|
|
|
|
|
You are absolutely right ... I started off thinking that he wanted an entire row ...
|
|
|
|
|
Hi,
I have this segment of code, which is supposed to show a form (lf), and then when the user is done with that, show a loading form (load) until the main form is done loading (mf). This is what I have for my main function right now.
static void Main()
{
LoginForm lf = new LoginForm();
LoadingMainForm load = new LoadingMainForm();
load.Show();
load.Hide();
lf.ShowDialog();
if (lf.loggedin == true)
{
load.Show();
MainForm mf = new MainForm(lf.sessid,lf.loginform_username.Text);
load.Hide();
Application.Run(mf);
}
else
{
Application.Exit();
}
}
My problem is that when the loading form shows up, it looks incomplete. The title and stuff are still there, but in the place where a label and a button are supposed to be, it just looks incomplete, like the loading form didn't have enough time to load.
Can anyone help?
Thanks,
Jimmy Sawczuk
www.McJournal.org
|
|
|
|
|
sniper506th wrote:
it just looks incomplete, like the loading form didn't have enough time to load.
Or receive a paint event - which is what I suspect is the real reason.
If a window is damaged (and in its initial state a window is damaged because it has yet to draw itself) a paint event gets put on the message queue. When the application is running the Application object processes the queue whenever the application is idle (and I guess that the modal dialogs process the message pump also which is why that would have worked). Since you have not yet told your application object to Run there is no processing of any events.
After showing the form, you could attempt a Refresh()[^] on it. The Refresh() method on the Form class should force an immediate repaint of the form area (including child controls, such as buttons and labels).
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
|
You need to call Application.Run if you want to display a form.....it doesn't apply to a dialog. In your case you can pass the LoadingMainForm as a parameter to the Main form and display it in the constructor...hope this helps!
Shardool Karnik
Lead Software Engineer
Compass Technologies, Inc.
http://www.compasstec.com
|
|
|
|
|
There are several excellent examples here on how to define a collection property for your control and edit it with the collection editor in design time.
I've been trying to do the same with a dictionary collection (value and a key) but with no success. Any thoughts or ideas on how to edit a dictionary in design time without creating a completley costume designer?
is a good thing
|
|
|
|
|
Hello , can any one help me PLEASE , how can I convert a series of images to any video format can be played by WindowsMediaPlayer?
|
|
|
|
|
Try the DirectVedio in the DirectX redistrputable
|
|
|
|
|
Several graphics packages offer software tools, such as Jasc Software's Paint Shop Pro - Animation Shop that can build animations, .avi, etc. from still images.
|
|
|
|
|
Hello, Does any one know how can I track mouse movements on other pc desktop connected with mine ?
|
|
|
|
|
Recently I wanted to port a CListCtrl -derived class (no offense please, it really was that poll-misused control[^] ).
I discovered that two notifications I subscribed to inside my MFC control were unavailable in the .NET ListView control: LVN_DELETEITEM and LVN_INSERTITEM .
Searching Google and CodeProject and even disassembling the BCL with Reflector, I found no example code that implemented (at least) those two notifications in .NET.
Questions:
- Have I looked at the wrong places and there are actually already events in the current .NET 1.1 implementation for those notifications?
- If not, is there some sample code available?
Thanks for your help!
[Update]
OK, I actually found some hints[^], which I already tried out, but I failed to map the index passed in that messages to the ListViewItem s in the ListView.Items collection. Whenever I tried to access the Items[index] from inside the handler of the notifications, the collection was empty. Probably I handled the event too early, before the list view had a chance to fill its Items property properly...
--
Affordable Windows-based CMS for only 99 €: try www.zeta-producer.com for free!
|
|
|
|
|
Is there anyone who has any experience with programming .NET applications for Windows NT 4.0? I have to make a network enabled application and I know that the server atleast runs NT 4.
Basically the server will have to be able to handle networking with sockets, threads for dealing with multiple clients and ADO.NET for dealing with a database. So if you have any experience at all about these parts or anything else on NT 4 please let me know if I have got myself into a lot of trouble by saying I could do this.
When I check the MSDN documentation for some of the classes I'm gonna need they all say they are supported on NT 4 so maybe I have just got scared totally unnecessary but I really need to know about problems that may arise.
Isn't the idea with the CLR and IL that an assembly would run on all supported operating systems with a working .NET framework, right? So basically there shouldnt be any problems?
|
|
|
|
|
Each .NET Framework class has a list of systems it's available on in the documentation. Usually, NT4.0 (with SP6a of course) is on the list, some classes are not supported on 9x systems. I didn't have any problems with my programs running on NT4, as long as I used only the framework classes.
You have to be careful when you use p/invoke, though.
In my application framework I needed to get the long filename for an executable and since there's no .NET way to get this information I P/Invoked GetLongPathName(). Sadly, this didn't work with NT.
mav
|
|
|
|
|
hi,
i have enabled visual style on my applicaion but numericupdown controls do not apply the visual style,how can i force them to apply visual stles?
thanks
|
|
|
|
|
I believe I read somewhere that it's a bug and the NumericUpDown control doesn't paint in XP visual styles, even if enabled. But I can't find the source.
[EDIT: see this page[^]]
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
i have made an application in C# and then created a setup file out of it. When i try to install the application on a computer running Windows Home Ed., it gives an error saying 'unable to load file from assesmbly c:\program files\teas\mis\mis.exe' what could be the error? i have reinstalled the mdac components, IE 6.0 SP1, and the .NET framework but it didnt yeild any results.
|
|
|
|
|
I need to work with WebForm Controls which im trying to do it in global.asax.cs file.So that i can acess all requesting Forms.If I have to do in Page load of all Forms there is no difficulty but i have to copy the code in all Forms Page Load.
If I can acces Form Instance of Requesting WebForm in Global.asax.cs file i have to code in global.asax.cs file only which is simple.
Can anyone help me on this how to get Form instance of Requesting WebForm.
Thanks in Advance
Rajesh Thomas
|
|
|
|