|
It is a grey area. It appears that many articles use the terms tier and layer interchangeably.
Some people distinguish the two as multi-layer describing the separation of code into functional areas such as GUI, Business Logic and Data Access; and multi-tier describing a physical separation by process boundary, sometime accompanied by distribution of the tiers on separate hardware. This distinction is moot, as the code in each tier is the same code as in each layer, just separated by process boundary. Therefore a multi-tier application is also multi-layer, and many multi-layer applications are multi-tier. I would argue that whether or not there is a process separation is irrelevant, and often confuses matters. The big question from an architectural point of view is are you using a client-server architecture.
Multi-tier architecture[^]
|
|
|
|
|
Hi
I've noticed a performance problem in my application. My application does some calculation inside a 'for' loop and show that answer on the canvas. When I minimize the application it executes fast.If it is in maximized then it takes too much time to finish the for loop.
Inside the for loop I've used Control.Invalidate(). Will it make the performance changes when it is minimized and maximized?
Thank You.
Regards,
R.Sumanan
|
|
|
|
|
Absolutely.
Control.Invalidate causes the visible portions of the control to redraw. As the app is minimised there is therefore nothing for it to do at that point. When maximised the work load increases due to paint event processing. You will get the same effect by bringing another window to the front of the display stack.
Unless you really need to show the calculation in progress don't invalidate until you have finished processing.
|
|
|
|
|
It's exactly the same if the form was minimized or not.
Invalidate does NOT cause the control to be repainted. Invalidate (simplified description) tells Windows that the control NEEDS to be repainted and (optionally) what region of the control needs it. Windows will eventually send a WM_PAINT message to the app's message pump which will eventually get around to your control so it can repaint the specified region of the control. If the control is not visible, the WM_PAINT message doesn't get processed, so no painting gets done.
|
|
|
|
|
Hi!
I have a Motorola MC7090 that runs a .Net Compact Framework - application.
On the mainform i catch the "KeyDown"-Event, which work fine for "regular" keys.
As the MC7090 (as most Windows Mobile devices) has some custom keys, two for volume (+/-) on the left side, and another key on the right side.
When i open the application i get a key-down-event from this key on the right side.
After klicking a button on the touchscreen the event is not longer thrown.
All other keys (keypad 1-9, etc...) work fine.
Just this one key is not working.
Unfortunately my customner wants exacly this key to work.
Does anyone have any idea how i could make this key work?
Thanx!
J.
|
|
|
|
|
Try overriding WndProc and checking for the message manually?
|
|
|
|
|
That was my emergency-solution.
The big question is why an event is raised in the beginning, but not after a button was pressed...
That´s kind of strange to me...
|
|
|
|
|
Hi folks
Would higly appreciate your help on this.
Suppose a C# Windows Service is running with some domain user login/password...
Now suppose the user's password expires...
Will the service keep running? or will it stop as soon as the password expires?
|
|
|
|
|
I don't know for sure but I would suspect the service will continue to run since it had already started and authenticated, however, if it restarts it should not.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Domain services should run under the Network service account or a domain account with no password expiry duration. If you use any other account service will stop running not start once the password expires.
modified on Tuesday, March 23, 2010 11:48 AM
|
|
|
|
|
d@nish wrote: will stop running once the password expires
are you sure? It seems to me it would keep running until restarted. The process has already been started and I'm not aware of a mechanism that continues to check if the service has been authenticated
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Yes. It won't happen suddenly. But it will not run start once password is expired.
Still, I guess it would depend on the kind of the service. I guess if the service tries to do any kind of file operations, since the account has already expired it should not be allowed to.
|
|
|
|
|
d@nish wrote: if the service tries to do any kind of file operations, since the account has already expired it should not be allowed to
Makes sense to me also.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I'm not sure about that, I think that a file operation on local machine may still work after the password has expired.
A network operation, on the other hand, should probably fail.
|
|
|
|
|
AFAIK, any time you do a file operation, windows will check if you right to do so. Now, since the account itself has expired, it should have no rights to do anything. Hence the operation would fail and service will either not work as expected or might stop as well.
|
|
|
|
|
I have a activex control written in C++ (Visual Studio 6). I have used AxImp to get the required assembly out so that I can use this as Windows Forms Controls in my C# application on a Windows Form. I have changed the generated .cs file to cater to my requirement. The constructor of the class (which is derived from AxHost) is getting called. But the AttachInterface() is not getting called at all. I am not able to figure out why. I have message boxes in the constructor and the AttachInterface method. I get the messagebox in the constructor during run time but NOT the one in AttachInterface.
Please help.
Thanks much in Advance.
|
|
|
|
|
Does anyone know of a CHM viewer control that could be integrated into a .NET application? I'd like to be able to integrate a CHM help file into my application, but I developed a custom look for all of my dialog box frames, so I don't want to launch the default Windows CHM viewer.
Thanks.
|
|
|
|
|
You could always look at using this[^] article as a basis for writing your own.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Yeah, I saw that article before I even posted this. Just thought I would post to see if there were any .NET components out there so I wouldn't have to reinvent the wheel.
|
|
|
|
|
I have a custom control, MyControl . It has a property, SubControls , of type SubControlCollection .
When I drop a new instance of MyControl on a form, I want the InitializeComponent method to create two SubControl s and add them to the new instance. By way of example, dropping a TabControl on a form will generate the two starting TabPage s and add them to the TabControl .
Can anyone point me to examples of how this is managed? VB.Net would be preferred, but I can translate from C#.
Added: See the response EUREKA! below for the solution.
modified on Tuesday, March 23, 2010 1:14 PM
|
|
|
|
|
|
I guess that would be helpful information The control is based on System.Windows.Forms.Panel .
Actually, I have found some code -- A Multipanel Control in C#[^] -- that has something similar to what I want. This example serializes through the designer; what I ultimately want is to start off with a few components whether or not the designer is invoked at design time.
|
|
|
|
|
Lovely town on the northern California coast; I lived theren when I went to college. But in any case, I have a solution. It is based on liron.levi[^]'s article from last year, A Multipanel Control in C#[^]
The answer turned out to be in the designer. In the CodeProject article linked directly above, the AddPage method gets a reference to IDesignerHost , then calls CreateComponent to create a new instance of the object (in this case, an untabbed "tab" panel.) Called without the name parameter, the created object is given a default instance name, which solves a different problem I had been trying to figure out.
My solution for serializing two child controls into InitializeComponent was to replicate this part of AddPage into the Initialize method. The whole method (translated into VB, sorry) looks like this:
Public Overrides Sub Initialize(ByVal component As IComponent)
MyBase.Initialize(component)
Dim iccs As IComponentChangeService = _
DirectCast(GetService(GetType(IComponentChangeService)), IComponentChangeService)
If iccs IsNot Nothing Then AddHandler iccs.ComponentRemoved, AddressOf ComponentRemoved
Dim s As ISelectionService = DirectCast(GetService(GetType(ISelectionService)), ISelectionService)
If s IsNot Nothing Then AddHandler s.SelectionChanged, AddressOf sSelectionChanged
'Attempt to add two pages
Dim DH As IDesignerHost = DirectCast(GetService(GetType(IDesignerHost)), IDesignerHost)
If DH IsNot Nothing Then
Dim MPP As MultiPanelPage = _
DirectCast(DH.CreateComponent(GetType(MultiPanelPage)), MultiPanelPage)
MPP.Text = MPP.Name
_MPanel.Controls.Add(MPP)
_MPanel.SelectedPage = MPP
MPP = DirectCast(DH.CreateComponent(GetType(MultiPanelPage)), MultiPanelPage)
MPP.Text = MPP.Name
_MPanel.Controls.Add(MPP)
End If
End Sub
With this, dropping a MultiPanel control onto a form causes the form's InitializeComponent to declare the control, two autonamed panels, initialize everything and assemble them properly.
If this is confusing, don't worry: I'm working on a simplified version which will become a new article.
|
|
|
|
|
|
Hi Guys,
I am trying to send bytes over TCP/IP using the StreamWriter and/or the BinaryWriter.(visual Studios 2008 - VB)
I am so confused, and tried various other ways.
what I want to do:
send 1st data packet as a Long (47, 4, 0)
get a reply (automatic one)
then send long (001)
I can open a connection using the Client connect....
using Dim Client as new Net.sockets.TCPclient
then just send the packets as above!
Really could do with some help!
Cheers,
James
|
|
|
|