Click here to Skip to main content
15,892,298 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: .net 2.0 to .net 1.1 Pin
Nouman Bhatti28-Oct-07 21:38
Nouman Bhatti28-Oct-07 21:38 
QuestionClick on disabled control Pin
topcatalpha24-Oct-07 4:29
topcatalpha24-Oct-07 4:29 
AnswerRe: Click on disabled control Pin
Dave Kreskowiak24-Oct-07 7:07
mveDave Kreskowiak24-Oct-07 7:07 
GeneralRe: Click on disabled control Pin
topcatalpha24-Oct-07 20:35
topcatalpha24-Oct-07 20:35 
GeneralRe: Click on disabled control Pin
Dave Kreskowiak25-Oct-07 1:45
mveDave Kreskowiak25-Oct-07 1:45 
GeneralRe: Click on disabled control Pin
topcatalpha25-Oct-07 2:07
topcatalpha25-Oct-07 2:07 
GeneralRe: Click on disabled control Pin
Dave Kreskowiak25-Oct-07 13:01
mveDave Kreskowiak25-Oct-07 13:01 
GeneralRe: Click on disabled control Pin
topcatalpha25-Oct-07 21:06
topcatalpha25-Oct-07 21:06 
Dave Kreskowiak wrote:
It sounds like you're trying to put your entire app on one form, which is not a good idea. If you do any data binding of controls, you'll find that becomes a headache in an environment like this.


You're right there, not for my usercontrols, but i had this problem with databindings for controls on tabpages. Seems controls are not created the first time, after showing the tabpage the binding remains...

Dave Kreskowiak wrote:
If this is true and you are putting every on a single form, you've increased the time is takes to create that form. There's nothing you can do about it. Creating a control is a very expensive process. Multiple that by a couple of hundred times and it takes forever.


I use a mainform and usercontrols in a splitpanel. it takes indeed more time to startup the app (about 2 seconds including DB connection), therefore i have a splash/login screen. but after creating it remains very fast, i don't have to create them each time.

i guess this is a choice, fast startup and slow switching or slow startup and fast switching between screens.

Dave Kreskowiak wrote:
Also, I see no reason to use UserControls. It's probably the second most abused class next to a PictureBox control. UserControl is designed to make it easier to make "composite" controls. Say a TextBox and a Button combine to make something like a Browse control. You can either type a path in the TextBox or click the Button to browser for a filepath.


I use them because they can be placed on controls and are reusable. In delphi i could give a form a parent and the form docks on that panel, but that doesn't work in C# dotnet. forms are not dockable on a splitpanel. are am i wrong here?

Dave Kreskowiak wrote:
Did you know that the Form class derives from Control?? Yes, you can treat a Form just like any other control, like a TextBox or Button. Design each "page" of your notebook as a seperate form, setting the FormBorderStyle to None to get rid of the title bar. Then you from your TreeView you can create and destroy each form and place it in the right side of your screen just like placing a control. When you click a new item in the TreeView, Dispose the last form created and create a new one. Just remember to set the Form's TopLevel property to False before you add it to a container controls collection.


Guess this is the solution to my question. Smile | :)

Do you think using a form instead of a usercontrol will be faster ? or what is the advandage for using a form instead of a usercontrol?


Dave Kreskowiak wrote:
Say a TextBox and a Button combine to make something like a Browse control.


Indeed in my case some buttons a grid and detailsfields no code behind it except for the inputfields.

I thought a usercontrol was the same like a frame in delphi. Place controls on it and make it availabe in the toolbar, just drag and drop it in designtime

Thx again.

Kurt
GeneralRe: Click on disabled control Pin
Dave Kreskowiak26-Oct-07 2:27
mveDave Kreskowiak26-Oct-07 2:27 
GeneralRe: Click on disabled control Pin
topcatalpha26-Oct-07 2:55
topcatalpha26-Oct-07 2:55 
GeneralRegEx Question: Matching a Quoted String Pin
Brady Kelly24-Oct-07 1:01
Brady Kelly24-Oct-07 1:01 
GeneralRe: RegEx Question: Matching a Quoted String Pin
TJoe24-Oct-07 2:38
TJoe24-Oct-07 2:38 
GeneralRe: RegEx Question: Matching a Quoted String Pin
Brady Kelly24-Oct-07 3:09
Brady Kelly24-Oct-07 3:09 
GeneralRe: RegEx Question: Matching a Quoted String Pin
TJoe24-Oct-07 3:54
TJoe24-Oct-07 3:54 
GeneralRe: RegEx Question: Matching a Quoted String Pin
Brady Kelly24-Oct-07 4:03
Brady Kelly24-Oct-07 4:03 
QuestionSystem Databse Path CR XI R2 .NET Pin
rturner00323-Oct-07 21:56
rturner00323-Oct-07 21:56 
QuestionFiring events from COM to .NET, leaks problems!!! Pin
jonnynolimits23-Oct-07 21:11
jonnynolimits23-Oct-07 21:11 
QuestionDataGridView V Scroll trouble Pin
MDem23-Oct-07 19:53
MDem23-Oct-07 19:53 
AnswerRe: DataGridView V Scroll trouble Pin
MDem24-Oct-07 0:07
MDem24-Oct-07 0:07 
Questionupload image file from mobile devices to server using vb.net cf Pin
jasmine112623-Oct-07 17:35
jasmine112623-Oct-07 17:35 
QuestionHow to run EXE thru network in VB .NET 2005 Pin
kkb_200122-Oct-07 23:22
kkb_200122-Oct-07 23:22 
AnswerRe: How to run EXE thru network in VB .NET 2005 Pin
kubben24-Oct-07 2:02
kubben24-Oct-07 2:02 
QuestionData Grid in visual studio 2005 error Pin
solarthur0122-Oct-07 11:57
solarthur0122-Oct-07 11:57 
AnswerRe: Data Grid in visual studio 2005 error Pin
tim63723-Oct-07 5:52
tim63723-Oct-07 5:52 
QuestionPost a html fields to a specific url????????? Pin
Nithin Krishna21-Oct-07 21:10
Nithin Krishna21-Oct-07 21:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.