|
|
I know about the anchoring, and I used it.
But as I said, the control ist anchored nicely, but the labels (text) remain as big as they are.
There are so many attributes concerning "sizing", so that I maybe always set on property not correctly.
How does anchoring, docking, autosizing and scaling work together - I found there no good descriptions in
the web.
I found that http://msdn.microsoft.com/en-us/library/ms171729.aspx[^]
You see, they write
"Note The Label control is the exception to this rule. When you set the value of a docked Label control's AutoSize property to true, the Label control will not stretch."
But how do I get the stretching then?
|
|
|
|
|
cherrymotion wrote: But how do I get the stretching then?
Why do you need a label control to stretch more than what is required to display the text?
|
|
|
|
|
Ok, I have it now. Something went wrong with my Auto-Size properties.
But can anyone tell me how to find out from the Control.Resize-Event, with which
factor the Form has been resized?
I have to calculate the space for my pictures an let them dynamically grow and shrink,
but for that I'm sure there is an opportunity to get that factor, isn't it?
Otherwise maybe I should save a rectangle with the current form size and set it then
in relation to the "grown" window parent. But a "resize-factor" would be much nicer I think...
Thanks for your answers, sometimes it is not easy
|
|
|
|
|
Hi,
The Form class already has 4 events regarding resizing: Resize, ResizeBegin, ResizeEnd, SizeChanged. That should cover it I'd say.
However you have to keep the current Size somewhere in order to calculate growth/shrink.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
modified on Friday, May 22, 2009 3:48 PM
|
|
|
|
|
Hello everyone,
Does anybody know of a way to send events to another process from the first process in managed C++.
I found an article for the same in C++ but couldn't find one for managed C++.
Thanks,
Parth
|
|
|
|
|
Member 3273983 wrote: I found an article for the same in C++
Provide a link please. Also explain why that article does not work for you.
|
|
|
|
|
|
Member 3273983 wrote: I want to do it in managed C++ which uses the form class instead of CWin* classes.
Yes. C++/CLI allows you to use managed and native code in the same project. So you can in fact use the approach from that article in your managed code. If you don't know how to create a C++/CLI project that supports managed and native code then you need to go read the Introductory CLI articles here on CodeProject.
|
|
|
|
|
Thanks for the info. I will look up the tutorials.
-Parth
|
|
|
|
|
I had one more question, is the same thing possible to get done with Java windows as target?
|
|
|
|
|
Hook up!
><O>
><O>
><O>
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
I have a situation where in i need to send the username and the password to a website and get the confirmation back from the website. Website takes the request in the form of query string.<b> The problem is when i send the request i am not getting the exact response, instead somtimes i get the html code of the website with the response or sometimes i get the url with response. below is the code, can someone please help me with this
mId is the username and mPwd is the password
try
{
String^ lcUrl = "http://login.somewebsite.com/Authorization/";
lcUrl = lcUrl + mId + "/" + mPwd;
HttpWebRequest^ loHttp = (HttpWebRequest^) WebRequest::Create(lcUrl);
String^ lcPostData = mId + "/" + mPwd;
loHttp->Method="POST";
loHttp->Credentials = CredentialCache::DefaultCredentials;
loHttp->ContentType = "application/x-www-form-urlencoded";
array<Byte,1>^ lbPostBuffer = gcnew array<Byte,1>(lcPostData->Length);
lbPostBuffer = System::Text::Encoding::UTF8->GetBytes(lcPostData);
loHttp->ContentLength = lcPostData->Length;
Stream^ loPostData = loHttp->GetRequestStream();
loPostData->Write(lbPostBuffer,0,lbPostBuffer->Length);
loPostData->Close();
HttpWebResponse^ loWebResponse = dynamic_cast<HttpWebResponse^> (loHttp->GetResponse());
Encoding^ enc = System::Text::Encoding::GetEncoding(1252);
StreamReader^ loResponseStream = gcnew StreamReader(loWebResponse-&gt;GetResponseStream(),enc);
lcHtml = loResponseStream->ReadToEnd();
loWebResponse->Close();
loResponseStream->Close();
MessageBox::Show(lcHtml,"Confirmation",MessageBoxButtons::OK);
}
catch(IOException^ exio)
{ MessageBox::Show(exio->Message,"Error",MessageBoxButtons::OK);
}
catch(WebException^ webEx)
{ MessageBox::Show(webEx->Message,"Error",MessageBoxButtons::OK);
}
catch(Exception^ ex)
{ MessageBox::Show(ex->Message,"Error",MessageBoxButtons::OK);
}
return lcHtml;
Naveen
|
|
|
|
|
Hi All,
I am Savitri here. I am new to this forum and also new to vc.net language.
I am getting confusion in delegates and events in vc.net. Please if any body have documents and examples for this topic please give me. I will read from that. I am not getting any examples in vc.net so i am asking you all. Please do needful for me.
Thanks in advance.
Regards,
Savitri p
|
|
|
|
|
There is a series of introductory articles for C++/CLI here on CodeProject. I imagine they cover delegates. Maybe you should check that out.
|
|
|
|
|
Hi,
I want to display online data in child windows of MDI application of VC++.Online data means the continuous messages which is receiving from other PC's. I want to know whether it is possible to display online and if it is possible how i can display. Or If any one knows any of activeX control for this.. please help me..
Thanks.
|
|
|
|
|
Your question is not clear. Are you doing this in C++/CLI? If not, this is not the correct forum.
|
|
|
|
|
I am getting the following message box whenever I try to debug the code.
<b>“The following module was built either with optimization enabled or without debug information:”
“To debug this module, change its project build configuration to Debug mode.
To suppress this message, disable the ‘Warn if no user code on launch’ debugger option”</b>
I have built the entire code in Debug mode and no where I have enabled the optimization setting.
I am using Microsoft Visual Studio 2008.
I am using the C# .NET for the very first time please help me out in this.
|
|
|
|
|
Are you sure that you have done a debug build? Do you have multiple projects in your solution? If yes, how you added the reference?
|
|
|
|
|
I have solved that issue .........
I just put my dll in GAC by usin Visual studio 2008 command prompt
|
|
|
|
|
deadlyabbas wrote: I just put my dll in GAC
Is that really what you wanted?
The GAC is not a dumping ground for fixing debugging error messages...
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: The GAC is not a dumping ground for fixing debugging error messages
Says you! Next you'll be suggesting that people read the documentation.
|
|
|
|
|
Thnx 4 looking into my problem...........
Sorry 4 d pain i gave .......
Well it ended happily
|
|
|
|
|
Thank goodness for lingo2word.com, otherwise I wouldn't be able to
read his/her reply to you...
Wow...
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|