|
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
|
|
|
|
|
How to Auto Update Each Text Boxes in a Grid or List boxes when i write any thing in the text boxes then all of Textboxes will also filled
|
|
|
|
|
Hi Guys,
I intend to develop a desktop application and my targeted audience are small business companies, they usually have a P3/P4 system with 256mb of ram running winxp and might not have good internet connection. I want to know the best application development tool.
I thought that I should use LINQ TO SQL, so i would be facilitated with new features of .net, but requirement of this feature is .net3.5 installed on client machine which makes deployment of the application a big headache.
My requirements are RAD of GUI and business logic with very easy deployment, like a DELPHI applicaiton.
I am using a DELPHI application and its installation file is of few MBs and installed with in few mins without much pain, on the contrary .net deployment taking too much time and irritates client.
|
|
|
|
|
FaisalMoon wrote: My requirements are RAD of GUI and business logic with very easy deployment, like a DELPHI applicaiton.
Why not use Delphi? There's nothing wrong with it, and it has a strong following. A bigger hammer is not always a good solution, but it sounds as if you're trying to find a reason to use a big hammer when there's no reason for it.
FaisalMoon wrote: .net deployment taking too much time and irritates client.
Other than your desire to work in .Net, is there any business case for using a tool that will hog resources and possibly annoy your customer?
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Roger Wright wrote: Why not use Delphi? There's nothing wrong with it, and it has a strong following. A bigger hammer is not always a good solution, but it sounds as if you're trying to find a reason to use a big hammer when there's no reason for it.
Well reason behind going for .net is that, I am a .net developer, and for DELPHI there is learning curve, and I am not sure its worth learning DELPHI?
|
|
|
|
|
FaisalMoon wrote: and I am not sure its worth learning DELPHI?
I haven't seen much Delphi-related work lately. Take a look at some Delphi-code and try to estimate whether it's worth it for you. Alternatively, you might want to consider installing a smaller .NET runtime, something like Mono
I are Troll
|
|
|
|
|
|
FaisalMoon wrote: after a bit of research I found '.Net Framework Client Profile'
Thanks, added it to my bookmarks
FaisalMoon wrote: I doubt if Firebird is well supported in Entity Framework and if I could use any good ORM for that, if any of you guys knows a good ORM which supports Firebird and .Net integration, please do let me know.
I haven't looked into it, but there might be a version of LINQ to Firebird.
I are Troll
|
|
|
|
|
I have Windows Form which is implemented as per singleton pattern and having TableLayoutPanel as container on it for other controls to be placed on it and it is generating an anonymous problem regarding controls movement in which they change their position when set as mdiChildForm of a mdiParent Form. In this scenario if a windows Form is not being implemented by singleton pattern then it is working fine and if not then the Controls like lable and others are changing their location when the form appear on screen inside mdiparent second time by the user. The further detail regarding this problem is described below.
There are two Forms named as UI-1 and UI-2 and one Is the MDIParent Form named as MainForm.
Form UI-1 has the singleton pattern implementation and can only be initialized by GetInstance() method as you can see from code given below.
The code In the UI-1 Form:
public partial class UI1 : Form
{
private static UI1 frm;
public static UI1 GetInstance()
{
if (frm == null)
{
frm = new UI1();
}
return frm;
}
private UI1()
{
InitializeComponent();
}
public void ShowLabelCoordinates()
{
MessageBox.Show("Location: " + this.label1.Location.ToString() + " Position: "+
this.label1.PointToScreen(this.label1.Location).ToString());
}
}
Form UI-2 is with its usual constructor and can be initialized directly from it as you can see from code given below.
public partial class UI2 : Form
{
public UI2()
{
InitializeComponent();
}
}
The code in the main Form which is actually a mdi Parent Form.
UI1 frm = UI1.GetInstance();
frm.MdiParent = this;
frm.Show();
frm.Focus();
frm.ShowLabelCoordinates();
UI2 frm = new UI2();
frm.MdiParent = this;
frm.Show();
frm.Focus();
Sample Application has been attached at this link
http://www.eggheadcafe.com/fileupload/1355103023_mdiTestApp.zip
Any immediate assistance will be highly appreciated.
Muhammad Noman
|
|
|
|
|
Hi peeps!
I've got a Windows Forms application that opens another Windows Form as a dialog (IE ShowDialog).
When the dialog is closed I call Dispose on the object, set it to null, and then call GC.Collect().
However when looking at the memory usage in the Windows Task Manager, the memory usage never goes back down to what it started at initially.
I know that you can't determine when garbage collection is done, but I thought that was the purpose of the GC.Collect() method.
For example it starts off at 6,360k; if I open and close the dialog say 10 times, the memory usage goes up to 7,104k
I leave it running in minimized state for half an hour and the memory usage is 7,080k.
(Interestingly if I maximise it, then memory usage goes up by varying amounts, and stays there.
Minimize then maximize and it does the same again. Keep doing this and it stops increasing after about 100k of extra memory increase, but the memory never goes down to what it was before I did the 'jiggle').
I've run FXCop on the assembly to see if I hadn't implemented any Dispose functionality correctly, but it didn't highlight anything.
There's nothing in the entire application that is accessing files or databases - just what I would call standard .net stuff.
Am I overlooking something, am I worried too much, or am I just being stupid?
I've done various searching and reading on google, but still seeing this effect.
Vague answers are fine - it's a fairly vague question
TIA
"If you can't explain it simply, you don't understand it well enough" ~ Albert Einstein
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." ~ Paul Neal "Red" Adair
Now reading: 'The Third Reich', by Michael Burleigh
|
|
|
|
|
Taking into account your
1.21 Gigawatts wrote: Vague answers are fine - it's a fairly vague question
the best answer to
1.21 Gigawatts wrote: Am I overlooking something, am I worried too much, or am I just being stupid?
most likely is: yes
|
|
|
|
|
Thanks Luc
I just can't see what it would be!
"If you can't explain it simply, you don't understand it well enough" ~ Albert Einstein
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." ~ Paul Neal "Red" Adair
Now reading: 'The Third Reich', by Michael Burleigh
|
|
|
|
|
your multiple choices aren't mutually exclusive, but I trust you're mostly worrying too much. What's another megabyte?
FYI:
- it all depends on where you look. Task Manager isn't a good place. My big apps typically show both clock time and Environment.WorkingSet in a status bar, updating at 1 Hz.
- a .NET app normally does not return any free memory to Windows; it does when getting minimized though.
- it may depend on Windows version and overall memory usage situation. More recent Windows (Vista, 7) tend to keep memory full of potentially useful data (similar to your app caching something with WeakReferences)
- AFAIK GC.Collect() isn't blocking, it just initiates (or suggests?) a collection. And one of those probably is insufficient to free all dead memory, as there are generations and a finalizer queue. If you must force GC, try a 3-iteration loop with Collect+wait100msec.
- You are aware calling GC.Collect in general isn't a good idea, it messes up the nice Microsoft machinery, well that is what they claim anyway.
|
|
|
|
|
Thanks Luc, that's helpful
Luc Pattyn wrote: - You are aware calling GC.Collect in general isn't a good idea, it messes up the nice Microsoft machinery, well that is what they claim anyway.
I wasn't aware of that, so will take it out.
Trouble with reading stuff on the internet is that a lot of what you read can be contradictory!
Another thing I have found is that it's not so easy to see tell what the developer should be disposing of in the safe way.
But I guess that's down to experience.
Anyway, thanks for the info.
"If you can't explain it simply, you don't understand it well enough" ~ Albert Einstein
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." ~ Paul Neal "Red" Adair
Now reading: 'The Third Reich', by Michael Burleigh
|
|
|
|
|
you're welcome.
see, it pays off not to fish for a vague answer...
this is what I wrote in my animation article: if you need to create some objects (Fonts, Pens, Brushes, ...) either create them inside the Paint handler and don't forget to call Dispose() on them (one must call dispose on instances of a class that offers such method), or better yet create them only once and keep them alive in class members, this avoids creating a lot of new objects, followed by disposing and collecting them.
|
|
|
|
|
1.21 Gigawatts wrote: when looking at the memory usage in the Windows Task Manager
Big mistake. Task Manager show you how much memory the .NET CLR has reserved for you application, not how much it's actually using. Think of the .NET CLR as a virtual machine, a kin to Java. You're seeing the memory that is allocated for the vm, not for what's running inside it.
The .NET CLR maintains a managed memory heap. This is memory that is allocated by Windows and handed to the .NET CLR. The CLR take that memory and allocates everything out of this heap. When your app is done using an object (it goes out of scope), that memory is returned to the managed heap, NOT to Windows. So, according to Task Manager, your app will be "using" 20-30MB of RAM, when it's really only using 10.
Instead of using Task Manager, use Performance Monitor (Start/Run -> Perfmon.msc). You'll find all kind of .NET memory counters you can use to see what your app is really using.
1.21 Gigawatts wrote: I know that you can't determine when garbage collection is done, but I thought that was the purpose of the GC.Collect() method.
No, it doesn't. GC.Collect only suggests that the Garbage Collector be run. It's really a bad idea to do this, unless you really understand why your doing it, how the GC works, and understand the side-effects of running it.
The GC is self-tuning. It watches how your app allocates and frees memory and tunes itself so it doesn't interfere with your app and can keep memory (free and used) organized with future performance in mind, such as allocating future object faster.
|
|
|
|
|
Thanks for responding Dave
Dave Kreskowiak wrote: Instead of using Task Manager, use Performance Monitor (Start/Run -> Perfmon.msc). You'll find all kind of .NET memory counters you can use to see what your app is really using
Ok, I will do that.
I guess I'll go and do some more background reading on how the CLR uses memory - I don't think I understnd it properly enough.
Thanks again, it's much appreciated.
"If you can't explain it simply, you don't understand it well enough" ~ Albert Einstein
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." ~ Paul Neal "Red" Adair
Now reading: 'The Third Reich', by Michael Burleigh
|
|
|
|
|
Excellent information, Dave. Thank you!
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|