|
I can see a number of drawback (read nightmares)
Manage what a user can change on the "design mode" form seems to be the showstopper
RyanEK wrote: what if somehow
I don't think this is feasible withiout VS installed
RyanEK wrote: save the settings as a 'template'
I have no experience with templates in VS so cannot comment other than Huh!
RyanEK wrote: Do you think that's feasible?
Nope - absolutely not - I would not even entertain the idea, seems to me you would be making a rod for your own back and a support nightmare.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Let me clarify what I mean, a (high level) user will have the option to launch the windows app in 'design mode' which means they have the ability to move controls, set properties etc. eg. http://www.codeproject.com/KB/miscctrl/MovableControls.aspx[^]
Once designed, the layout of the form can be saved as an XML and loaded as needed. This XML will determine which controls users has access to.
Again... thanks for all the help! 
|
|
|
|
|
It is feasible, though not in the way of putting the control into designer mode. Doing this will put the control to the user on what can or can not be access by a user group.
We did one of the web application using javascript (only activated for admin logon) to bring up a dialog box to set the read/write/etc access.
On desktop application, you can probably sub class the controls, use mouse right click to bring up a context menu or a dialog box to set the access.
|
|
|
|
|
So far have not found any "standard practice" from MS, so, was using the brute force way to loop through the controls & menu items (they are not part of form :\) and visible/enable each of them manually.
|
|
|
|
|
This was what I was afraid of... I've been using this method since back in my Delphi days. Thanks anyways 
|
|
|
|
|
Hi all
I have added table fields from the table in the crystal report viewer but when I execute that form it doesn't show me that records.
But in preview it shows me all values.
|
|
|
|
|
Hi,
Am trying to create a new excel workbook by combining many worksheets(Different excel files) through programatically(c#.net). i did the same successfully. But, i have a issue as, The target Excel file changes the color format of the source files, that change the background color like dirty green, red... am not able to get the exact output.
The procedure i wrote the code is:
open source file->select the worksheet-> copy the content->create and open new excel file-> paste -> save and close.
Note: If i do the above procedure by manually, the same error arrives
Thanks in advance
Bagyaraj P
|
|
|
|
|
I have basically about 25 pages of questions ranging from multiple choice (radio buttons) to check all that apply (check boxes). I started to incorporate it into a tabbed form but after 4 pages, I already have 8 tabs, and it seems to load slow as well. IS it ok to do this. IS there a better way? Maybe can you possibly keep the controls from being loaded on each tab until that tab is opened????
|
|
|
|
|
bfis108137 wrote: basically about 25 pages of questions ranging from multiple choice (radio buttons) to check all that apply (check boxes). I started to incorporate it into a tabbed form but after 4 pages
Yikes. You might want to look at a more efficient design if possible.
bfis108137 wrote: IS there a better way?
Not sure, without being there to actually see what's going on. You could probably have all those pages get trimmed down and use forms for each page only when they are needed.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
What do you mean by trimmed down?
|
|
|
|
|
Simplify the problem, if possible.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Yikes, what happen if the user ask you to add 1 question between question 4 and 5? Reorganize the whole thing again?
You can consider having the question defined in database, with section-page-question kind of hierarchy. On the application, dynamically creates the controls base on the type of question (radio or checkboxes). When user goes to next page (detecting tab change or some event), recreate the next page, so on and so forth.
|
|
|
|
|
What? You mean use data to drive a dynamic User Interface Design rather than hard coding everything? No, that would never work.
must type code... if...then .. else
Must Type Code.... loop... while... switch .... MUST TYPE CODE AAAARRRRRRGGGGGGGGG!!!!!!!!
Ok, it's late, I'm getting punchy, better go to sleep.
led mike
|
|
|
|
|
led mike wrote: Must Type Code.... loop... while... switch ....
real coder doesn't use loops 
|
|
|
|
|
darkelv wrote:
real coder doesn't use loops
I don't know, there are LOOP instructions in x86 assembler?
led mike
|
|
|
|
|
I have no problem typing code. I am just trying to establish the best way to accomplish such an app. I thought tabs would work but it's going to be very big. It also is currently taking about 3 seconds to load. I am not sure if it's the dataset that is slowing it down, or the controls. Considering though that I haven't really changed the dataset, but I have added many controls, I am assuming that it's the controls that are taking a long time to load. Is there any way to make the tabs load only the controls on the tab that is open? Now I was thinking that I could do many forms, but that would be quite a bit of work. And it would mean that I would have like a zillion forms in my app. Please someone give me so clear direction here before it gets too late in my app and will be even more difficult to change it.
|
|
|
|
|
Controls are very expensive to create, so the more controls you put on a form, the more the form code has to create upon instantiation and the longer the form takes to create. This will happen regardless of which tab the controls are on. There is no way to design everything and then tell the code to just create this set of controls. It's all or nothing. Lesson: Keep the number of controls you put on a form to a MINIMUM.
Like you were told, you create a dynamic user interface that is driven by data comming from a database. Every approach your mentioning will result in an app that takes quite a long time to write, is difficult to maintain, and as mentioned, requires you to do way too much to add a question to it.
|
|
|
|
|
So what is the recommended path to take because right now I have a lot of work ahead of me and no direction. If I could just decide which way to go I could implement it. I should let you know that I am thinking to just make a lot of small forms connected at the main form where when a next button is clicked, the form will close and a new one will open. Also, if there was a new item to be added later, then I could just insert a new form and change the code a little. I would be open to dynamically creating the controls, but correct me if I am wrong, but I would have to basically manually code all of my controls which would be veeeery time consuming. These controls are varying in size so it's not as if I could say put 5 on each page. There are some questions where they type it into a text box and other that have many radio buttons as well as check boxes. Not to mention if let's say one would fit on a page if I just moved it up one pixel then the code would not do this. Anyways I know c# and winforms but I have never come across this kind of dilemma before and if someone could just point me in the right direction so I can move forward with this.
|
|
|
|
|
bfis108137 wrote: I should let you know that I am thinking to just make a lot of small forms connected at the main form where when a next button is clicked, the form will close and a new one will open. Also, if there was a new item to be added later, then I could just insert a new form and change the code a little.
What did I say?? You do NOT do this. You make a single form that can display any question you want, then you just feed this form the data and it takes care of displaying it. You're going about this all wrong and can't seem to break from it and see that there is a much simpler solution.
You may not have a single form to display all types of questions. You may have to code a different form for each question type.
|
|
|
|
|
Dave Kreskowiak wrote: What did I say??
Told you.
led mike
|
|
|
|
|
First of all, in the end isn't this going to actually take more time?? Secondly, I cannot play with the order. This is a legal thing. Thirdly, most of the questions are simple either a text answer or multiple choice, but there are some that just really complicated that include basically many parts that are more or less like all of the types. And if it doesn't come out all together on the form, then it won't even make sense. That could be as much as 10 parts. The more I think about it the more I think that maybe it might be easier but I am at a loss as to how to implement it. Do you have any examples? I have searched all over the net for some code examples for this kind of program and have found nothing.
|
|
|
|
|
Dave Kreskowiak wrote: Controls are very expensive to create
Hence why I told him earlier to simplify the task at hand.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hence why I never bothered replying to him. See your John Simmons quote.
led mike
|
|
|
|
|
led mike wrote: See your John Simmons quote
Yep. That's why I have it. So I always remember it
I love the looks I get from people when I use that sig. They stop, process for some certain amount of time, then finally laugh. I wonder what goes on during the delayed laughs.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Dave Kreskowiak wrote: Lesson: Keep the number of controls you put on a form to a MINIMUM.
Lesson: If you have to explain that to someone, nuf said.
led mike
|
|
|
|