|
I can't find an example of this in any of my books, or the examples in the forum.
I am talking of course, about a menu item that shows an ellipsis, not the blocked in > sign, that must be clicked before the sub-menu appears.
|
|
|
|
|
Nigel Mackay wrote: I can't find an example of this in any of my books, or the examples in the forum.
Because it's non-standard behaviour. How would the user know that he/she needs to click the item, when the standard behaviour is hovering?
In other words, people are used to putting their car into reverse when they want to drive into that direction. Your "reverse" gear will work differently from what the user expects.
Nigel Mackay wrote: I am talking of course, about a menu item that shows an ellipsis, not the blocked in > sign, that must be clicked before the sub-menu appears.
Could be done by adding the sub-items in the click-event, but that might be interpreted as a "choice" and might hide the item alltogether.
I are Troll
|
|
|
|
|
You can simply add three periods to the text of the menu item, then handle the menu item click like you always do, with an event handler. The triple period normally indicates a dialog is to be expected, and a Cancel option will be given. So make your handler do that.
|
|
|
|
|
Of course - no sub-menu items to appear during mouse-pointer "hover"
|
|
|
|
|
I need to create a taskbar in the mdiform just looks like windows taskbar..... when i open a form the name should be displayed in the taskbar when i minimize it should hide on the taskbar....
|
|
|
|
|
chandru4uall wrote: I need to create a taskbar in the mdiform just looks like windows taskbar
Sounds like a panel, docked to the bottom of the form.
chandru4uall wrote: when i open a form the name should be displayed in the taskbar
So, when you create a form, you also create a new Panel and add it to the "taskbar-panel".
chandru4uall wrote: when i minimize it should hide on the taskbar
You'd only have to hide the entire Window - the Panel that represents the Windows would still be there on the taskbar-panel.
I are Troll
|
|
|
|
|
I was reading up on screensavers (I'd like to try building one from scratch in VB). Am I correct in assuming that I can just write an exe to display the graphics, then manually rename the exe to an scr file to make it a screensaver? Sounds too easy to be true.
When compiling the list of available screen savers, the Control Panel searches the Windows Startup directory for files with the .scr extension. Because screen savers are standard Windows executable files with .exe extensions, you must rename them so they have .scr extensions and copy them to the correct directory.
http://msdn.microsoft.com/en-us/library/cc144066(VS.85).aspx?ppud=4#Creating_Screen_Saver[^]
|
|
|
|
|
Alan Burkhart wrote: Sounds too easy to be true.
Yes, but in this case it is. I have done this using C++ in the past, and all that is necessary is that the correct hooks are in place and it works like a charm.
|
|
|
|
|
|
Hi
I have a SplitContainer with two panels.
I'm adding controls dynamically through code to the first panel and it does it correctly - from left to right.
Than I trying to add same controls BUT to the second panel but it adds them from the last location I ended adding controls in the first panel.
Any idea how can I make the second add controls to the second panel from left to right?
BTW, it also concern adding other controls - like adding a lable at the top of every panel and only AFTERWARS adding the contorols UNDER IT.
Is there a way to move to the "next line" automatically or di I have to do it with a calculation?
|
|
|
|
|
You should add controls this way:
yourSplitContainer.Panel1.Controls.Add("Add control object here");
yourSplitContainer.Panel2.Controls.Add("Add control object here");
ThetaClear wrote: Is there a way to move to the "next line" automatically or di I have to do it with a calculation?
You will have to perform calculations for this. Also, take care of proper Anchoring and Docking so that layout remains good on resizing the form.
I personally prefer using TableLayoutPanel since it takes away a lot of pain that one needs to do while positioning dynamic controls. You can try using it if you wish.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
Thanks for your answer d@nish.
The first code snippet is not very relevant to me because I need to separate two different types into two different areas. So after I iterate through the first type and finish adding it up:
yourSplitContainer.Panel1.Controls.Add(object1);
yourSplitContainer.Panel1.Controls.Add(object2);
yourSplitContainer.Panel1.Controls.Add(object3);
.
.
.
I move on to the next type and ad it up
yourSplitContainer.Panel2.Controls.Add(object1);
yourSplitContainer.Panel2.Controls.Add(object2);
yourSplitContainer.Panel3.Controls.Add(object3);
.
.
.
But as I said the locations of the second type are not placed from left to right.
I'll try to use TableLayoutPanel - I have never used it before.
Thanks!
|
|
|
|
|
Are you adding same objects in both the panels? Are you setting the location of the objects properly?
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
The objects are same controls ListViews
Well, no. I'm not setting this property at all.
I thought there's some property to make the controls align left to right or something.
The first panel's control's are being automatically added left to right, I didn't understand why this doesn't happen in the second panel.
modified on Wednesday, December 30, 2009 5:32 AM
|
|
|
|
|
|
add a fill-docked FlowLayoutPanel to each of the splitContainer's panels.
modified on Wednesday, December 30, 2009 7:51 AM
|
|
|
|
|
Wow, cool control
Thanks!
|
|
|
|
|
I use VS2008.
I have a [horizontally] splitContainer, in the designer its width is set to 924px, The splitter distance to 462px and both panels have their minimum width set to 370. So far so good, when I built I got an error, along the lines of "The spliter distance must be set between the minium width of Panel1 and the container width - minimum width of container 2" (not those exact words). In my book that means the splitter distance of 462 must be between 370 and (924 - 370 = 554) which, unless arithmatic or the fundamental nature of maths has changed since I was a boy, it is.
The problem is that in the Designer.cs class this code
this.splitContainerMain.Size = new System.Drawing.Size(924, 496);
comes after
this.splitContainerMain.Panel1.Controls.Add(this.groupBoxUnrecognised);
this.splitContainerMain.Panel1MinSize = 370;
this.splitContainerMain.Panel2.Controls.Add(this.splitContainerDone);
this.splitContainerMain.Panel2MinSize = 370;
and splitContainerMain uses a default width of 150px, breaking the calculation. Is there any way to fix this problem permanently?
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
OK this is a bit schitzo, answering my own question, but I've found the magic google search term and go a word around here from here
http://social.msdn.microsoft.com/forums/en-US/winformsdesigner/thread/ee6abc76-f35a-41a4-a1ff-5be942ae3425/[^]
In the parent form, hook into the Load event and set the MinSize property there, not in the designer. The obvious option (moving the code in the designer.cs file) is repeatedly overwritten if the form is re-worked (in my case just setting the tab order did this) and is not viable long term.
Pretty bad design work from Microsoft IMO!
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
Hi All,
Is there a control somewhere that allows you to display HTML text in a text box on a Windows form?
Reason I am asking is that I am currently using a Rich Text control, but we run 2 systems (one a windows system and one a web system) off the same database. The web developer have asked that we change all our rich text boxes to HTML controls so that he can display it on the web.
So in essence I would need something that would be able to read raw HTML code (from a database) and display it on a windows form so that it looks more or less the same as it does on the web.
Hope that makes sense!
Thanks a lot in advance for any replies.
|
|
|
|
|
Hi,
the WebBrowser Control shows an HTML page if you call Navigate() or assign a string to DocumentText; by setting some properties you can make it a view-only Control.
|
|
|
|
|
we have several documents where we have steps for installtion of a software and they vary for each version released.
Steps may include :
Third party tools to install
Prerequisites
Procedure/way /steps to follow during installation
For each new version there will be some changes in this documentation.
When a person want to install software of particular version (say 2.2) he may go to documentation and follow the steps.
But everytime it is hectic to go for each version documentation and look for changed steps.
So my idea is to develop a web application where i can compare the differences in each version (for example i want to get the steps that differ during installation for version 2.2 and 2.3 )
|
|
|
|
|
Not a bad idea, and easily implemented. Assuming the user knows which version he/she is trying to install, you can provide a listbox with all the available versions. When the user selects a version from the list, your application can respond with the correct documentation for the selected version. You can do this in multiple ways.
One would be to rewrite your existing documents into separate instructions for each version, convert them to webpages, and serve up the right version when a selection is made. Another would be to create a single page, and modify its contents based on the selection before returning it to the user. Yet another would be to store each possible step in a database, then select the relevant items to assemble a webpage displaying the proper instructions for each version.
The last would be the most difficult, but it would make it easier later to add new steps for future versions to the database and provide code to assemble it correctly.
I'll be watching for the article here when you finish the project.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
I'm trying to develop a windows application where i can get connected to remote server and look for process state.
We have many remote servers where automatic installation of software going on. We have an xml file(installstatus.xml) where it tells us at what stage the installation is (Example : Inprogress , Completed, Failed.
So our aim is to develop a windows application where i can get connected to servers and look for their installation status(may be we can use installstatus.xml to look for installation status). Every time i connect to a server, the server information should get stored in XML file(i want to create a xml file where all the servers list i connect to should get stored)
|
|
|
|
|
Its simple its like File System if you have access to your Remote Servers then you can easily do.
Best Regards,
SOFTDEV
If you have knowledge, let others light their candles at it
|
|
|
|