|
You cannot achieve this with the .NET framework alone; you'll need to P/Invoke some Win32 API calls to get the device context of another window and begin drawing on that. Thus, I recommend you ask this question in the Visual C++ forum; those guys have a better knowledge of what you'll need to do.
|
|
|
|
|
Hey,
just a quickie, is there an actual difference between Model View Controller, and Model View Presenter?
Or are they just the same thing?
Regards
Mark
|
|
|
|
|
They're not quite the same thing. MVP is a fresh take on the old MVC. Perhaps this article[^] will explain better than I can.
|
|
|
|
|
Thanks for the link Judah, I shall have a read.
|
|
|
|
|
I think the main difference is that in MVP there is a greater seperation of view and model. The view and model are exclusive; they have no knowledge of each other in MVP, whereas that is not the case in MVC.
|
|
|
|
|
|
Hi!
This dont seem to work, any ideas? (Im sure you have lots of ideas, but remember Im a newbie)
label1.Text += ".";
string k = label1.Text;
int r;
r = label1.Text.IndexOf(k);
if (r > 0)
{
MessageBox.Show("bla");
}
so, r is never above 0 despite that the string contains a "."
Newbie untill I die!
|
|
|
|
|
IndexOf returns a 0 based index. "." is not in position 1, it is in position 0. If nothing is found -1 is returned. Your code should be
if( r != -1 )
|
|
|
|
|
hi, and thanks for your fast answer. Im trying to program a calculator and you should not be able to hit "." multiple times in a row. So if I take this code:
string k = label1.Text;
int r;
r = label1.Text.IndexOf(k);
if (r != -1)
{
label1.Text += ".";
MessageBox.Show("bla");
}
And paste in under, for example, the button 9, I still get the msgbox! That should not happend, shouild it? Because now, there are no "." in the string...or Im missing someting here?
Newbie untill I die!
|
|
|
|
|
hristo1977 wrote: string k = label1.Text;
int r;
r = label1.Text.IndexOf(k);
Wait, you take the contents of your textbox (k) and test (IndexOf(k)), if it exists? This will always return the index 0.
What you probably want is IndexOf(".")
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
hristo1977 wrote: Im trying to program a calculator and you should not be able to hit "."
Here's a simple way to determine if the period character exists multiple times in a string:
string text = label1.Text;
int periodCount = 0;
foreach(char character in text)
{
if(character == '.')
{
periodCount++;
}
}
if(periodCount > 1)
{
}
|
|
|
|
|
Thanks a lot, Himango!
Newbie untill I die!
|
|
|
|
|
Does anyone know how to insert a line break character within the <summary> or <remarks> section of an xml comment / description associated with a method / property / class so that the printout in intellisense or HTML documentation includes this line break?
Thanks.
|
|
|
|
|
It is just slightly extended XHTML with some additional tags such as "summary", "remarks", "see", "param" etc. Putting paragraphs between <p> & </p> or putting <br/> for simple linebreaks should work.
|
|
|
|
|
funny, I've tried both but neither create a line break in the intellisense helptab. I couldn't recall the codes but you've reminded me and I believe they do work with, e.g., NDoc.
Thanks.
|
|
|
|
|
|
I have a form with a tabcontrol(with 2 tabpages) and I add a new TabControl at runtime using
this->Controls->Add(gcnew TabControl());
Its been created at top left corner of windows and not visible fully..how to control its location/size etc? how to access it?
Thanx in advance
|
|
|
|
|
I think you need to be in the C++ message boards. Anyway, you could do something like:
TabControl* tabCtrl = new TabControl();
this->Controls->Add( tabCtrl );
Now use tabCtrl to get its position etc.
|
|
|
|
|
oops.. wrong section..
I cant do the way u describe...as I have to create some tabcontrols dynamically at runtime but not at design time
|
|
|
|
|
I still do not see why you cannot do that. perhaps a little more code from what you are attempting to do will be useful.
You could do something like.
void MyPage::CreateTabControl() {
TabControl * tab = new TabControl();
Controls->Add( tab );
SizeAndPositionTab( tab ); //Put you size and position code in here
}
Now call CreateTabControl() dynamically from wherever in your code.
|
|
|
|
|
Thanx for ur reply.
But this is applicable to one tab bcos I am going to specify its location.
But at runtime I want to call this function(for eg: 20 times) then I cant see 20 tabcontrols as each one overwrites one another.Hope u understand my problem
|
|
|
|
|
I'm ,beginer is an exageration, i'm like 0 in custom controls development, so i was wondering if you could help me out if u know any articles or web sites where i can get any help or inspiration. i need to create a vertical checkbok and a connector...a simple line that connects 2 controls. Please help me out
rzvme
|
|
|
|
|
You are way such a beginner.
Go and google these simple words: Writing Custom Controls
You'll find plenty of inspiration.
|
|
|
|
|
Is there a program or web page out there that will lists ALL Win32 APIs and their components/functions for such files as gdi32.dll or user32.dll? I need to find software and/or webpage that will give me these functions and what each one does. I'm trying to hook a program to an active window for editing.
Thanks....
|
|
|
|
|
www.pinvoke.net/[^]
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|