|
This[^] should get you started.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi...
I want to add 'ToolStripMenuItem' dynamically...
In my application i am getting port names with this statement
foreach (string s in SerialPort.GetPortNames())
{
}
now for each port name 's' i want to add a ToolStripMenuItem & a click event for each ToolStripMenuItem (i.e. for all available ports on PC). That click event will open a form with a textbox.
Is it possible to do these things dynamically in c#. Mainly dynamically adding click events for ToolStripMenuItem & open a form for each ToolStripMenuItem click event.
Regards,
Vinay
|
|
|
|
|
does it mean popup menu ?if yes then yes you can
sameer
|
|
|
|
|
Its same as our normal windows.
Like our normal internet exploree or any other windows give option in "File" menu...(New,Open,Save,Save as,Print,Exit etc.)
But click events are different...
Is it possible...?
|
|
|
|
|
ya you can do this.i think below code would solve you problem;
private void createMenu()<br />
{<br />
MenuItem myMenu =new MenuItem("Name",new System.EventHandler(myMenu_Click));<br />
menuItemFile.MenuItems.Add(mymenu);<br />
}<br />
private void myMenu_Click(object sender, System.EventArgs e)<br />
{<br />
MessageBox.Show("Hi");<br />
}
by following same procedure you create your desired menu
sameer
|
|
|
|
|
Thanks...
But in my application i dont know number of comports present on a PC. If there are 4 com ports then my application should create 4 ToolStripMenuItems & respective 4 click events.Each Click event will display a form with a text box placed on it.
Can u give more suggestion for my application...
Thanks & Regards,
Vinay
|
|
|
|
|
Hmmm .. No problem dear.use same function for all just type cast sender with MenuItem and get the text associated with it(((MenuItem)sender).Text ).By this you'll know which Item you have clicked.i think since now you can handle the rest code
|
|
|
|
|
With what u told i think it is not posible to add different clicke events dynamicaly & differet procedures to handle that events...
Thanks for your replies,
Vinay
|
|
|
|
|
Hello friends.
I am developing a c# application in which the product is a file with extension .eb.i want to make exe file.
How can i do this? please help me.
|
|
|
|
|
may be u have to run this line in VS command prompt
csc /target:module /out:file.exe file.eb
it might not be correct pls check
regards
|
|
|
|
|
What is a .eb file ? You're saying that the program when it compiles has this name ? If you press F5 in the IDE, it should generate an exe file.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello subarata and christian.
Sorry for providing mendatory information
i want to make exe means.
i want to make compilation wizard and i want to make an exe file
which contain my .eb file plus .eb reader and mendatory files.
once i click on that exe it should extract the reader and the related files.
i am developing my application in c# .NET 2005
Any kind of help is appreciable
Regards,
Irfan KOthari
|
|
|
|
|
Hello friends,
I am a c# developer.
I want to register my extension.
and also i want to make association with my application
means when .something will click than my application should open.
How can d this?
Help me to do this.
|
|
|
|
|
hi
U have to check for HttpHandlers and HttpModules if using ASP.net
Pls Check.
|
|
|
|
|
Hello subrata,
sorry for providing less information.
Actually i am developing desktop application.
Now, have you any idea regarding Asssociation and registration?
any kind of help is appreciable.
thanks for giving me reply.
wait for your next suggestion
|
|
|
|
|
Hi,
I need to incorporate OCR functionality into my web application. I
downloaded LeadTools Document Imaging Suite, Finereader engine
SDK and Asprise OCR.
Could somebody tell me where I can find help to integrate this into my
asp.net application?
Also pls give any other suggestions that there might be for other OCR
SDKs that can be tried out. We would be buying it eventually but we do
need to see if it works the way we would want it to.
|
|
|
|
|
Hi,
I am working in C#.NET environment.
In project some swf files has been displayed to only logged in users , and this swf files displayed by the coding.
But in testing face my testing team informed me that they are able to access those swf files without logged in. When I asked them about the process. Then they told me that First they read my source code from the browsers view source page. After reading the source they got the full path of swf files.
They simply copy that path and past on to the browser. And really I follow this step and able to see that swf files.
For protect this swf files I gone through all the settings of my site. And remove the read permission to swf files folder. And tested I got success now without logged in users are not able to view those swf files but when user logged into the site and request to view those swf files then that users is not able to view the swf files.
Now please tell me that I can denied those users to see my swf files who are not logged in.
Thanks.
Kunal Sagwaria
|
|
|
|
|
Hello Kunal Sagwaria
You can play with read permissions, if the use logged in then y coding change read permission for specific file, but this is not a good solution.
You can also place complete SWF files in database, which is better solution for protecting swf files.
But keep in mind that logged in user can save those swf files into his local computer.
|
|
|
|
|
First of all thanks for the quick reply.
Now suppose i change the method and now store all the swf files in database then i will be able to check user validation for using that swf files. this is good. now how to stop saving those swf files on local computers from the logged in users.
Kunal Sagwaria
|
|
|
|
|
hi
if ur are using c# then u can stop downloading the entire page in clients machine. In Page_load 1st line should be..
Response.Cache.SetCacheability(HttpCacheability.NoCache);
in js also u can do it.
It maynot be soln to ur needs.
pls check.
|
|
|
|
|
subrata.jana wrote: in js also u can do it.
It maynot be soln to ur needs.
plz dnt us txtspk in da 4rm, thr is no nd lk on da fone
|
|
|
|
|
Hi,
Do you know how to capture active tab's url in IE7. There are example for IE6, but when tab comes they do not work.
I really apprecieate your help.
Takecare!
OS
jayasshc
|
|
|
|
|
Hi,
In my one application I want to send a wmv file by mail. But I want that file to be send as inline instead of attachment so that user will start playing it as he opens the mail. Is it possible ? How can I achive this?
Regards,
Hemant.
|
|
|
|
|
I am studing about remoting in C#. I feeling uncertain some problem.I pleace your assist.
Question 1.
- Why is client and server must request same flatform( example .NET)?
Question 2.
- what is difference betweent Asynchronous and Synchronous in pocess distributed application?
Question 3.
- what is Stub ?. Why need it?.
Question 3.
- what is Marshal?.
Question 4.
- what is difference betweent proxy and stub in pocess distributed application?
question 5.
- Why can you say Remoting is based on RPC architecture ?
[I know some thing about Romote Proceure Call].
I am beginner to program distributed application. I am very expect your help.
Thank you
|
|
|
|
|
Quan! This is your professor from university. Shame and scariness of the demons on your kind and family for posting my homework questions on the cpians! Let all monsters of halloween be summoned by shiva on you because you posted my homework questions on cpiansex.
You let me down like a warm sadness gun well acquinted with the touch of a velvet hand. I need a fix from you, shame and black grades for the rest of semester on you for this. you make me want to die and cry. i don't know if I should stay alive and cry, or just die because of my infinite sadness of you posting homework questions on the cpians.
why can't you just listen to your good friend and professor sharada and do the homework yourself?! I cry recursively in an infinite loop now.
Sincelery yours, Computer Information conSciences Professor and grader, Sharada Ulhas
|
|
|
|