|
Just add the following code into the block where u r creating the buttons dynamically:
this.ButtonName.Click += new System.EventHandler(this.ButtonName_Click);
After that u can define the function:
ButtonName_Click(object sender,EventArgs e)
Sandeep
+919891027854
|
|
|
|
|
i want to know the path where this .exe located.
ofcourse most of user set path c:/program file and the software's folder.
but if it is else where then what ?
so i want to know location of exe and then start that exe using Process.strat.
Thanks
Prakash Paghdal (prakash_paghdal@hotmail.com)
|
|
|
|
|
Hi Prakash,
If I got it right ,then you are probably talking about the path set by the user for installing a software in this case your .exe.you will get the location of all the assemblies being installed by the program under the HKLM\SOFTWARE\Classes\Installer\Assemblies registry key.Iterate through all the keys and check whether the name of any subkey ends with "app.exe" where app.exe is the name of your .exe file.The seperator used in the name will be "|" .so don't forget to replace it with "\".Hope it Helps.
Rakesh
|
|
|
|
|
I have one thing to say:
System.Windows.Forms.Application.ExecutablePath
|
|
|
|
|
You can also use System.Reflection.Assembly.GetExecutingAssembly().Location or GetName().CodeBase
|
|
|
|
|
How I can implement the username password form in windows forms application in C#......
Thanks,
Sandeep
+919891027854
|
|
|
|
|
Hi Friends,
I am developing scheduler application using C#. In my application i have provide the list view control for displaying the scheduled items. The listview control having the following columns.
Schedulename
ScheduleFilename
Time to Start
Time To Finish
Status.
Sometimes if the user give the filename as very lenghty, then the appearence of the filename in the listview column is not good. (ie., it is not fully displayed the filename.. only displayed the partial text). For that i have planned to provide the Tooltip option for the each column when the content of the particular column become lengthy. But i don't know how to provide the tooltip option for each column. Please guide me how to do this.
Regads,
Prakash.
A Journey of thousand miles must begin with a single step.
|
|
|
|
|
Hi
I am using mshtml for html editing in my WinForms application. How can I place a restriction on number of characters that can be entered in the mshtml?
Any help is appreciated.
-Nilesh
|
|
|
|
|
We have an application where we use mshtml for html editing. However we are facing an issue at the moment with the validating event. We have a text box control and an mshtml control side by side. We perform our validation (via causesvalidation property) on textbox if its empty. The strange thing we have seen happening is that validating is not fired if the textbox looses focus to mshtml control but is fired for all other standard .net controls.
Any clue how I can get around this? I don't want to use lost focus of text box as that gets fired at various places and I do not have the ability to cancel the event which is something I get with Validating.
Thanks for your help in advance.
|
|
|
|
|
hi,
I am using Visual Studio 2005 . I want to resize controls at runtime in C#. Please help me!
Thank you
|
|
|
|
|
In case the control is button ,
this.button1.Size = new Size(Width, High);
|
|
|
|
|
I want to resize controls like the way in Design View of C#. That's all.
Thank you
|
|
|
|
|
hi to all
how read a cell from dbgrid witch it binds with a table?
thanks
-- modified at 8:38 Thursday 12th January, 2006
|
|
|
|
|
is it possible to add bit maps on menu items in c# windows applications?
if yes please give mathods.
|
|
|
|
|
Hi there,
Sure. You'll get a lot of this stuff by do quick search from this site
below is just one of them Image Menu Item
<< >>
|
|
|
|
|
how can i develop elliptical (or in other shapes) puch buttons just like
windows application form push buttons using C#?
|
|
|
|
|
Hi there,
You can develop your custom button control by writting your own control class that inherits from the standard button class System.Windows.Forms.Button and then you have to override the method OnPaint to paint your button
protected override void OnPaint(PaintEventArgs e)
{
//code to pain your button here
}
Hope this helps
<< >>
|
|
|
|
|
how can we use win32 api functions from C# windows applications?
?
|
|
|
|
|
Hi there,
Just simply declare the API function that ur application want to call
in ur application, should be something like
[DllImport("User32.Dll")]
public static extern void GetWindowText(int h, StringBuilder s, int nMaxCount);
that means GetWindowText is an API in User32.dll. Then, call it if needed.
<< >>
|
|
|
|
|
|
:-DHi, i have created a tab control with few tabpages, i would like to have an up button and a down button located outside of the tab control (but in the same form) that allows user to scroll the current selected tabpage. how can i do that? or which property/function allows me to do so?
Thanks Alot,
from a beginner
|
|
|
|
|
Hi. I am not sure but maybe you can check out the Panel class.
Hope it helps,
FJ
|
|
|
|
|
Hi Friends,
In my application, I have created with listview control with 3 rows with Green color as row background. By default row 1 is in selected state. If i want to deselect the row from the listview control by clicking anywhere above the third row. At that time the deactivation of the row is applied, but the row background is applied as white. This could be occured even i rearrange the column of the listview also. How can i restore back the background color for the listview row after deselecting the row or rearrange the column?
Please help me to solve this issue.
Regards,
Prakash.
A Journey of thousand miles must begin with a single step.
|
|
|
|
|
I'm not safe from my own source according to VS2005.
So I built a sample solution in VS2005. After deployment of the solution to my own machine, I tried to add a csproj to the solution. Keep in mind I built these on my own machine. What does VS2005 say? Well, basically it says that MSBuild is a security nightmare in that it can run what essentially amounts to macros that could destroy my hard drive. Guess I'll never download another source project from myself and that I should really, really be sure about who I'm downloading source from. Wait, that's my source!
Halfway down this link is what MS has to say:
Linky to MS Build Overview
Anyone come across any workarounds so that anyone who downloads my csproj won't get this message?
Thanks!!!
Jim
|
|
|
|
|
how to declare a connection string in web.config and use it from there in our Web form
-- modified at 23:11 Friday 2nd December, 2005
|
|
|
|