Answer Questions
Uğur Gümüşhan How to Close active window in MDI using shortcut Ctrl+W?
How to Close active window in MDI using shortcut Ctrl+W Thanks Hi : we can add keydown event at child form, private void CHD_KeyDown( object sender, KeyEventArgs e) { if (e.Control== true &&e.KeyCode == Keys .W) this .Close(); } then we can close the on focus child form in MDI form Best Regards! Add a "Close" menu item to your Windows menu and set its ShortcutKeys property to Ctrl+W. Implement it like this: private void closeToolStripMenuItem_Click(object sender, EventArgs e) { if (this.ActiveMdiChild != null) this.ActiveMdiChild.Close(); } ...Show All
scruber Can you make non-constant transparency :)
Like this http://www.youtube.com/watch v=RAtbXP_BiXk Gradient in some places and opaque in another, and custom shadow. It's without copying pixels from background windows, as you can see there is no delay in animation unders window and outside it. Even if you think it's not good for general interface it's very good for antialiased window edges Also that rotating window effect ;) It works in WinXP and people say in Win2000 too with additional gdiplus.dll No. It's just GDI+, WinAPI and a bit MFC No need .NET framework and works as i said in WinXP and win2000 (with additional gdiplus.dll file) Hi Rambalac, The application in the video appears to be us ...Show All
Bonato Pierantonio how to implement Licensing in your application
i want to implement licensing in my application....guidance required how to do that thanks this is a good article but the last line you commented about online activation using xml.....this is what i absolutly love to do....so that i can protect redistribution of my application......could you please.....proivde some guidance over that...thanks The software use WSE 3.0 . So you must install WSE 3.0 from Microsoft Corp products. Hi, this may be helpful: http://www.codeproject.com/dotnet/msinetserial.asp I know of people doing online activasion with xml-files. take a look at the shareware starter kit. Theres a video walkthrough at that link that should help understand how to support ...Show All
Nuno_Salvado About use GridView, Need Help!!! Thanks a lot!
I create a flight search WEB SERVICES at Server search the flights info. from database and sent back to Client. At CLient, there is a ShowAll.aspx, in Page_Load I create a table by hand (display is ok), Because the data returns like a Array, now I want to use GridView to display the data, can anyone teach me how to coding it in C#. Thanks a lot for you help!!! :) FlightServ.Airline air = new FlightServ.Airline(); //FlightServ - add Web Reference - Name //Airline - Airline.asmx FlightServ.Flight[] all = air.GetFilghts(); Response.Write("<TABLE borderColor='#ff6600' cellSpacing='5' cellPadding='5' border='1'"); Response.Write("<TR>"); Response.Write("<TH align='middle' bgColor='#00 ...Show All
KarthikNarasimhan Spalsh Screen
Hey, In in properties of a project how do you select what form you want to be a splash screen I used the help in the compiler but I could not get an answer that worked... Thanks :) Hang in there Dave! Give um a day to figure it out... If you have any more questions, I will be glad to help you out. You are correct. Also, do not forget to add the code again to open the next form after the splash screen . Your source file look like: // Create and run the splash screen Application.Run( new SplashScreen ()); // Create and run the main window Application.Run( new Mainscreen ()); Yeah, I have the correct code setup nice and neat for posting in this thread, but I think I will give ...Show All
Arska 2D grid
As i said in a previous post, i am writing an editor where i can "draw" maps using tiles. The tiles will be put on a 2D grid, each tile an object, and i am thinking of using the TableLayoutPanel and fill all the cells with picture boxes which in turn will hold the tile itself. However i can't seem to find a way of fixing the cells height and width, they remain dynamic. So, how do i make all the cells in a TableLayoutPanel fixed in width and height. Or maybe i should approach this project a whole other way hi, Please go through the below link. Hope this helps. Check the properties of panel class. http://msdn2.microsoft.com/en-us/library/system.windows.forms.panel(vs.80).aspx thank you, bhanu. Thanks for the r ...Show All
sal.a it Continue event processing after a prompt within the Validating event handler
I have many controls visible simultaneously on my Windows Form. One of them is an "editor," and when the user tries to leave that control by clicking on another control, I want to prompt the user to save their editing session, with a "Yes/No/Cancel" prompt. If the user clicks "Yes" or "No", then (after saving if they clicked "Yes"), the original click event should be processed. if they click "Cancel," the user should remain in the original "editor" control. To cancel, I just set the Validating event handler's CancelEventArgs argument's Cancel property to true (i.e., in C#: e.Cancel = true; ). However, displaying the MessageBox prompt in the Validating event inter ...Show All
Saania Runtime listview width?
lv is a ListView created & filled at runtime from a DataTable dt. It must adjust itself to a large variety of queries, so it must know how to autosize, so we add columns to it with Width=-1: ListView lv = new ListView(); for ( i = 0; i < icols; i++ ) { lv.Columns.Add( dt.Rows .ItemArray[0].ToString(), -1, HorizontalAlignment.Left ); } and they are populated from dt: for ( i = 0; i < dt.Rows.Count; i++ ) { sRow = new string[icols]; for( int j = 0; j < icols; j++ ) { sRow[j] = dt.Rows .ItemArray[j].ToString(); } ListViewItem lvi = new ListViewItem( sRow ); lv.Items.Add( lvi ); } Now to calculate the size of the container dialog window (to which lv will be anchored), I need th ...Show All
JothiMurugan ComboBox item backcolor?
Is it possible to set the backcolor of a combobox item Do you mean an item in the dropdownlist Just handle the DrawItem event and you can customize the painting of the list. Tony ...Show All
RBChallenger Windows Forms designer moves my controls on build
I have a project I'm working on.. we've been experiencing lots of issues with VS2005 moving our controls around on build. I have one form that is just being a pain in the rear. I place the buttons at the bottom of the form below a TabControl, and Anchor them to the bottom of the form. All the controls are locked in position. As soon as I run a build, the buttons shift themselves appx 40 pixels up, even though they are locked. This also causes the previously saved form to show the * next to the filename, indicating the build has actually modified the file to move my buttons. What gives here... my team has wasted at least several hours fighting with Forms that shift themselves vertically on build... any experience with this, or a potential i ...Show All
NickGetz recognize html text in datagridview cell
I have been trying to highlight certain text with a DataGridView DataGridViewTextBoxColumn. This is for a win32 application not a webpage. Is this possible One thing that I thought of to try was to get a cell to render the text as html. This way I could highlight multiple sections with simple html tags added to the text. Any help is appreciated. Yeah, embedding a webbrowser control in a cell sounds like trying to make popcorn with a flamethrower. It works but tends to have unintended consequences I think you are much better to try and make a RichTextBox into a cell. That shouldn't be to difficult to do, and it should be more than enough if you are just wanting to highlight some text. ...Show All
oiTomas Transfer to child
I've been messing around and searching for a few days and still haven't found what I've been looking for. I have an application (Form1) that opens up another window (Form2) on a click of a button. I need to be able to get what the user clicked in Form1, into a texbox on Form2. Like: Storage = System::String::Format(treeView1->SelectedNode->Text->ToString()); I need to share 'Storage' with both forms. Is there a way I can do this Thanks. You can use a class to pass the data and make an event in Form2 that will listen for the data to change or however would suit your need. In this line: Storage = System::String::Format(treeView1->SelectedNode->Text->ToString()); Should be: String^ ...Show All
Xcel Help with Winform and binding to an object
I'm looking for the correct way for me to bind an object to a winform to display some of it's attributes. For Example a Person instance with first and last name. I've been able to do it using a BindingSource, but have run into several things that I don't like. 1. The bindingSource is working with a collection, I just want to have one "person" that I'm displaying on a winform. If I change the person, I want to just replace that instance, not add to a bindingSource and navigate. I don't want the navigating tool on the form either. 2. I want to have changes that are made to the current "person" flow up to the interface. A simple example would be a button, that changes the person's name directly. I use this as an example to ...Show All
Jim Tzu Tab control contextmenu
I am facing a problem with tab control context menu. I have a tabcontrol and each tab page has a user control. I am able to display the context menu on the right click on tab page header. But once the mouse is right clicked on any tab page header then i can see the context menu if I right click on the tab page. I want the contextmenu to be displayed only on the tab page headers. I have also enabled the selection of the tab page on right click of mouse. I am using the Mouse up event for displaying the context menu. Can someone please suggest a solution. Thanks! Glad to see you finally work it out. :-) Hi, The code works fine here. ... And in the design phase, do set the ContextMenuStr ...Show All
Tryin2Bgood How to create UnInstall Shortcut?
I developed windows application in C# and i created setup and deployment project for that application. In that deployment project, i created shortcuts in Desktop & Programs. After that I build the application. When i install the application, it works fine and creates shortcuts. UnInstall open is not available in Programs Menu. How to create shortcut for UnInstall in programs menu. Because my client asked, uninstall option provide in programs menu. This application is created in dotnet 2003. If you are really going to do it, it's best to use the form: msiexec /x {productcode guid} /other options because then you don't need to specify the path to your MSI file. A simple search on ...Show All
