|
there are many different kinds of applications and ways to communicate over RS232C or some other serial standard, and you did not provide a single detail.
So I suggest you pick a few from this list[^] and read what you like there.
Warning: if you haven't done it before, serial communication on Windows can be quite complex to get it right almost all of the time, it depends on how high the load is (needed throughput versus available throughput), and how well your messages are structured (assuming a message oriented protocol of some kind).
|
|
|
|
|
thanks
|
|
|
|
|
from the link that you been given before, there more to c# not c++
what i want to do is in VC++ 2008. could you or anyone help me.
PLEASE..................
|
|
|
|
|
Obviously you don't need .NET to access Windows serial ports, however I haven't done that in the last 10 years, and I don't keep any example around. I suggest you use Google (or maybe the CodeProject search facilities) to find relevant articles. IIRC you would need CreateFile (with a special filename), ReadFile, WriteFile and the like.
|
|
|
|
|
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.
|
|
|
|