|
thx
your suggestion helps alot
and the reason is cause of the limited amount of area on the form for the button and also that i am only allowed to use buttons
|
|
|
|
|
can any one able to help me
i want to close all the open window which is shown on taskber and remain my application open when i click in button.
thans in advance
|
|
|
|
|
use a loop and the system.diagnostics has a Process class. You can create an array of that class and store all processes in there and compare to kill all pids except for the ones you want.
Permissions may be an issue for your application.
|
|
|
|
|
Thanks for reply
i used this code
Public Class START
Dim theprocess() As Process
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim theprocess1() As Process = System.Diagnostics.Process.GetProcesses
Dim i As Integer
For i = 0 To 34
If theprocess1(i).Id = theprocess(i).Id Then
Else
theprocess1(i).Kill()
End If
Next
'If TextBox1.Text = "master" Then
' Me.Close()
'End If
End Sub
Private Sub START_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
theprocess = System.Diagnostics.Process.GetProcesses
End Sub
End Class
But it get restart after click the Button1..What should i do now to stop restart.
|
|
|
|
|
Your loop is hard coded to 34, why?
Im not sure you understand quite what you are doing. Google iterating through lists and arrays and how to do this properly. I'm sure there is an article on CP that will help about using the Process class.
Furthermore, I don't understand what the hell you are trying to do, short of killing every process.
|
|
|
|
|
Any_India wrote: i want to close all the open window which is shown on taskber and remain my application open when i click in button.
Why?? Since Windows is a shared system, your code has to play nice with other applications. If your code did that on my machine, I'd uninstall your app in a heartbeat and demand my money back.
|
|
|
|
|
I figured he would want to close *specific* applications... either way from his code snippet, I think he has ways to go.
|
|
|
|
|
A few days ago, someone wanted to know how to prevent a user from closing his application from the taskmanager. There was a suggestion that he should restart the application if it terminates.
Now here is someone who kills all other processes. ..and there's a rogue-proces that restarts itself
I almost died laughing here when I read the post..
I are troll
|
|
|
|
|
They come 2 or 3 times a week, close all applications, prevent my application from being close no matter what, etc etc. Some of them are very funny, read the one from a week ago (to lazy to get it for you) the guy went through every possible excuse to get his application unable to be closed from TM. I think he actually received help if I'm not mistaken.
|
|
|
|
|
This is probably something obvious that I'm missing, but here goes:
With multi-colored text in a RichTextBox, the colors are altered with a KeyDown event. This occurs regardless of whether I'm actually handling the RTB's KeyDown event (VB Express 2008).
If I use the mouse to select some of the text (of more than one color), and then use the Copy menu item, the original text remains as it is, and the copied text is correctly colored when I paste it.
But if use the arrow keys + Shift to highlight the text, or if I use Ctrl+C to copy it, the text color is changed to the first color left of the caret (moving right to left).
This also occurs if I use the arrow keys to highlight multicolored text, even if I just deselect it without performing any other action.
The results with the text colors are the same regardless of whether I handle the KeyDown event. Any suggestions are welcome.
|
|
|
|
|
Okay, I found it. Three daze of frying my brain, and there was this one line of code...
|
|
|
|
|
hi,
i need code for Prevent the user to reinstall my project again.When any user install my product then after if he try to reinstall it again by uninstall my previous install product.Shell i able to prevent them to reinstall the product.
Thanks in advance
|
|
|
|
|
..why??
Imagine me using your product. I install it on my laptop. Application asks me "who are you", and I enter the name "Eddy".
Next, I uninstall your application (for whatever reason), and I try to reinstall. I get frustrated, and try the name "Ydde". Next thing I'll do is install it on my laptop, or a virtual machine. Why? Well, because I want to use it, obviously, and it would be quite simple to find a computer where your application has not ever been installed on
I are troll
|
|
|
|
|
How to populate the values one combobox in a windows form with C# code using datareader.
|
|
|
|
|
Combobox class has an Items property which allows to add new item using Add() method.
|
|
|
|
|
Hi,
You can use Combobox1.DataSource property for populating data from datatable.
Set Valuemember and DataMember property also.
Hope this will be helpful for you.
|
|
|
|
|
The control I downloaded contains a dll file, (I dont think this question is specific to the control so I posted here, hopefully the right place) A search brings up too much noise.
so, how do I "install" it so I can drag it from the toolbox and use it in my form ?
thx,
a newbie.
|
|
|
|
|
Right-click in the ToolBox and click on Select Items... Browse to the .DLL file and click OK.
|
|
|
|
|
Thanks, that worked. much appreciated.
|
|
|
|
|
I created a few custom icons for buttons and menus. One image was added to a ContextMenuStrip item. Later I changed it to a different image. I removed the previous image from the Resources.resx file using the IDE. Now the all the MenuStrips and ToolStripButtons are gone!
This image is not connected in any way to any of the other MenuItems or ToolStripButtons. Is there any way to repair the project? I have a backup but it's much older.
Thanks in advance,
Mark
|
|
|
|
|
I've run across the same kinds of problems before. I always end up editing the Visual Studio generated file (Form1.Designer.cs or something like that if you're using C# ... not sure for VB) by hand. I usually find that all the control creation code is still there, but I need to re-establish the parent-child control relationships.
Something like:
this.mainMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileMenu, this.editMenu, this.helpMenu } );
Look at a valid project to see the exact syntax.
|
|
|
|
|
Thanks, I'll give it a try.
|
|
|
|
|
Hi,
Go to IntializeComponent() method and set the Contextmenu image property manually.
|
|
|
|
|
how can i able to Copy Dataset from on from to another from dataset
is it possible?
if yes tel me.
thanks in adv
|
|
|
|
|