|
If a mouse button is press down on a button control, before the button is release, how to respond repeatly to a button's mousedown event?
|
|
|
|
|
There is only one MouseDown event fired. It doesn't get fired continously as the button is held down.
Are you looking at doing something while the mouse button is held down and the mouse is moving? Check into the MoveMouse event. In there, you can check to see if the mouse button(s) are being held down and do whatever you need to based on their status.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
It seems there is only one mousedown event fired. Do you notice that when you set the clock and date in the windows operating system, when you hold down the button. the number will change continuously.
Thanks,
|
|
|
|
|
ds feng wrote:
It seems there is only one mousedown event fired.
You DID read my post, didn't you?
ds feng wrote:
Do you notice that when you set the clock and date in the windows operating system, when you hold down the button. the number will change continuously
Yes! But it doesn't work the way you think it does. Here's a simplified explaination of what's really going on:
The control has an internal timer, set for about 250 milliseconds, that is started when one of the button Click events fires. In this button's Click event handler, a flag is set to show which button is being clicked and the internal timer is started.
In the timers' Tick event, the number in the control is either incremented or decremented according to the flag that shows which button was clicked.
Now, when a MouseUp event fires, the timer is stopped and the flag is cleared, stopping the advancement of the number.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am designing a calendar in VB.Net without using the toolbox option calendars. The calendar has to display text like last name and date without displaying the day of the week. Then the program will have to calculate the number of entries for the given month. The user will have the option of choosing the month and year. If anyone can answer this, it will be of great help.
|
|
|
|
|
Answer what? You never asked a question, not gave a context on the type of question you want answered...
But, in general, this sounds like a candidate for a custom control. You'll, obviously, have to do all the drawing yourself as well as supplying the data for the controls data organization and management. This can either be an external datastore, supplied by the consumer, or an internal datastore, stored in the data structures of the control. In this case I would opt for an external implementation for greater flexibility and scalability. In order to do this you'll have to define an Interface that the consumer would have to implement so you have a set of known methods for your control to get at any data it needs at any time.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Are ther any examples on how to edit word documents?
Thanks,
Martin
|
|
|
|
|
|
we have double dim array
a[10][10]={(A,B,C),{D,E},{F,G,H}}
we want combination Like
ADF,ADG,ADH,AEF,AEG,AEH,
BDF,BDG,BDH,BEF,BEG,BEH,
CDF,CDG,CDH,CEF,CEG,CEH.
Please Help for this.....
|
|
|
|
|
2 things...
1) You posted C# code in a VB.NET forum. We're a little relaxed in this forum, so you probably won't get too much flak for it. But do the opposite and your likely to be doused in gasoline and set ablaze.
2) Since you posted C# code in this forum, this leads me to believe you posted the same question in multiple forums. Around the world, this is known a cross-posting, and is EXPRESSLY FROWNED UPON!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm trying to use OpenFile with a c++ resource file [project].rc with
DTE.ItemOperations.OpenFile("[project].rc", vsViewKindTextView)
The problem is that the file is always opened in resource explorer like vsViewKindTextView is ignored, so I can't use the selection object to edit the file within the macro.
Any suggestion?
Thanks.
|
|
|
|
|
Hi! I've noticed that my app is a bit slow-starter because i have hundreds of controls. I did a little test: I created a form with a couple of buttons and a TabControl with 6 tabpages. I ran the application and moved the form on top of another window (browser), and the cpu time for that browser window reached 50% !!!I don't know what´s causing the cpu burst...it's just a form with 2 buttons and a tabControl, i don't have any other code!!!
Can anybody tell me performance tips for UI optimization when the application is loading, because when the application is loading it takes to long to draw all the controls and then resizing them!!!
And what about at compilation time? Is there some options to enable (or disable) in order to make the app quicker?Another thing is the jit debugger. Doesn't it slow down the application?How to turn it off?
Never say never
|
|
|
|
|
<soapbox>Hundreds of controls on one form? Yuk! No, seriously, from a users standpoint, Yuk! Talk about information overload.</soapbox>
carlos_rocha wrote:
Can anybody tell me performance tips for UI optimization when the application is loading, because when the application is loading it takes to long to draw all the controls and then resizing them!!!
Let me guess... You stuck all these controls on various tab pages, layed everything out nice and neat and then setup every controls anchoring so that the resize and reposition themselves as needed.
Am I correct? Here's a hint on what you did. Let's say you have 600 controls on 10 tab pages. That's 60 controls per page. Now, when the user sits in front of your application, he/she only sees the first 60 controls and can only interact with those 60. But, whenever the form is resized, the layout engine has to call the resize event handler for all 600 controls, not 60. So, your forcing A LOT of calculation you don't want to do because you can't see those controls.
What to do...? What to do...?
Unfortunately, the only optimization technique is to break that massive form down into smaller forms and skip using tab pages. Search for ways to get the number of controls down. For example, if there are 3 out of those 10 tab pages that deal with a specifc subject matter, break those pages into their own form.
You're simply not going to get the performance you want because of the thousands of calculations you generated to figure out the new positions and sizes of controls you can't even see. So why reposition them?
carlos_rocha wrote:
And what about at compilation time? Is there some options to enable (or disable) in order to make the app quicker?
In a Release version compile, the optimations are already turned on.
carlos_rocha wrote:
Another thing is the jit debugger. Doesn't it slow down the application?How to turn it off?
You can't! When you launch the application, the Just-In-Time compiler turns your Intermmediate Language code (which won't run on a single processor in the world!) and turns it into machine specific code that the processor can run.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi! You were close!
I have a sort of treeView that has 3 levels where the third level is a panel(question) constitued by 5 controls.It's a tree of questions.I can have up to 40 questions, and several of these trees.So basically i´m f*#$d
You suggested turning the lowest level in a little form? I'll try it. I don't know what's the correct wat to design applications which has a lot of controls.
What about ngen.exe does it turn the application quicker?
Never say never
|
|
|
|
|
NGen compiles your application into processor native code. It doesn't speed up your application at all. The JIT compiler is extremely fast and only adds a very small amount of time to your applications startup time. It does this by only compiling the code that is needed at that time. If you have 100 forms in your application, it only compiles the one that it needs to start. The remaining forms don't get compiled until they are called. On top of that, once the code is compiled it stays that way for the duration of the applications session. That means the JIT doesn't have to compile the same code over and over again for each use.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi All,
I developed an application with crystal reports in vb.net(MS-Access).In my System its working Fine. But when i installed at client machine, the reports are not being loaded up.Its showing a clear page.
During Deployment in addition to the usual deployment, i added the four modules reportengine.msm, mapping.msm, rdcruntime.msm, rdcdesigntime.msm,crnetruntime.msm.
Still what might be missing.still What i need to check/add/...?
In What what scenarios, does this type of failure occurs and what's the appropriate solution
|
|
|
|
|
you need to install the proper stuff for Crystal reports to run. I found it on MSDN i think or off the crystal reports web site. cant remember but if it comes down to it i do have a working one, but you will need your own serial number for crystal reports you get it when you register
James Kennelly
|
|
|
|
|
Hello all...
I m trying to access my Access database from multiple user..Its giving me Error like "Database is Exclusively locked by other User."...well can i develope Client Server Application Using Access database...if yes how???????????????
thanks in advance
|
|
|
|
|
Welcome to the world of 'Access is crap'. If later versions allow multiple user access, certainly most of them do not. SQL Server is a real database, Access is not.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Christian Graus wrote:
Welcome to the world of 'Access is crap'. If later versions allow multiple user access, certainly most of them do not. SQL Server is a real database, Access is not.
This comment is what is a load of crap. "Certainly most of them do not?"
The only certainty in this post is you certainly don't know what you are talking about.
Access has supported multiple user access since at least version 2.0. (Maybe in 1.0, I never used it).
Certainly Access is not appropriate for dozens of users and tables with millions of rows.
But there is nothing wrong with using Access as long as the number of users is a handful and the data tables are relatively small. Access has no problems when working in terms of scale of 3-5 users and tens of thousands of rows.
And for small applications not only is SQL Server overkill, it is a poor choice for other reasons.
Case in point: Small operations can back up their Access data by a simple file copy. Any developer who really believes that a smaller operation without on staff IT support can actually reliably backup and if need be restore their SQL Server data should not be developing software.
The original poster does not supply enough information to determine what the issue is.
However, speaking in general terms multiple users can work with Access data concurrently using all the major releases of ADO including 2.1 through .NET. You just need to specify the type of locking you want. Optimistic, BatchOptimistic are the most commonly used.
Robert
|
|
|
|
|
You may ibe right, it could be stored procedures that most versions of Access does not support. All I know for sure is that Access is crap. I felt sure that others had said before that multi users was an issue.
rwestgraham wrote:
Small operations can back up their Access data by a simple file copy.
And so anyone with floppy can walk out with your data.
I use SQL Server even when I'll be the only user. Any DB system that doesn't support stored procs is just a nightmare.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Actually, Christian is right. Access is crap for any multiuser system.
Since its completely file based, it must be accessed using the underlying file system. This results in FAR more network traffic than using SQL Server, and is MUCH slower at doing the same job.
Since it's file system bound, a user from any machine that can see the database can grab a copy of it just by dragging and dropping it. Security is a joke.
You said all you have to do to backup it up is use a file copy? True, BUT!, in order to do so, everyone must disconnect from the database. Trust me, it happens every single day where I work.
Sure, SQL Server is overkill, but there's always MSDE and SQL Server Express to handle the smaller jobs, and they're FAR easier to upgrade to a full SQL Server than Access ever will be.
rwestgraham wrote:
Case in point: Small operations can back up their Access data by a simple file copy. Any developer who really believes that a smaller operation without on staff IT support can actually reliably backup and if need be restore their SQL Server data should not be developing software.
What case? I did it with a couple of small operations. If the backup operation is setup correctly, automated correctly, and stored in an appropriate site, it's not a problem. I could even fix any problem remotely, if needed.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote:
Actually, Christian is right. Access is crap for any multiuser system.
Since its completely file based, it must be accessed using the underlying file system. This results in FAR more network traffic than using SQL Server, and is MUCH slower at doing the same job.
When used properly - i.e a small system, both speed and network traffic are rarely issues with Access.
Security is not a major problem with Access if you set up work groups security. Even if a person copies the database they cannot access it outside of the workgroup.
If you are so anti-Access, what are you doing using it where you work. Surely you can sway everyone's opinion against Access since it is after all, "such a piece of crap"?
Dave Kreskowiak wrote:
What case? I did it with a couple of small operations. If the backup operation is setup correctly, automated correctly, and stored in an appropriate site, it's not a problem. I could even fix any problem remotely, if needed.
Backing up and restoring a single database is not particularly difficult. A full SQL Server restore? Different story. I would not want to have to try to walk a non-IT person through the process of a rebuilding an entire SQL Server. Good thing you can fix any problem remotely.
Many businesses successfully rely on Access every day.
I think some of you guys allow your personal prejudices about what's "good" and what's "crap" to allow you to make poor architectural decisions.
For every person out there who says Access is a piece of sh*t and SQL Server is a "real database" there is another person who will tell you that SQL Server is piece of sh*t and Oracle is a "real database". And it's true that SQL Servers choke on tasks that Oracle burns through in no time.
But so what? It's not about "faster" or "better". It's about picking tools and platforms that are appropriate for the end use.
I never give a client something that is much more complicated than they need or is less suitable for their operation's ability to support just because I think it is "better".
Robert
|
|
|
|
|
rwestgraham wrote:
When used properly - i.e a small system, both speed and network traffic are rarely issues with Access.
Security is not a major problem with Access if you set up work groups security. Even if a person copies the database they cannot access it outside of the workgroup.
Not to mention workgroups in Access are a pain in the ass to use and administer. BTW: On my wire around here, the more I can reduce the chatter, the better. And yes, I've been in client sites where that was a concern. Now, it's a mandatory consideration in all the development I do.
rwestgraham wrote:
If you are so anti-Access, what are you doing using it where you work.
I didn't say I was using it. I haven't used it in MY development work in years, and refuse to go back. I find the control and supportability of MSDE/SQL Server much easier to deal with, but more importantly, much less likely to screw up in the first place.
rwestgraham wrote:
Surely you can sway everyone's opinion against Access
I didn't develop the system. I just have to keep it running somehow. And, no, I can't sway the opinion to get off Access. Believe me, with all the problems this thing has, I'd love to be able to rip it out and replace it with an SQL Server solution.
rwestgraham wrote:
Backing up and restoring a single database is not particularly difficult. A full SQL Server restore? Different story.
Same goes for a machine hosting an Access database, so I fail to see your point here. Since a total machine failure would have me out there rebuilding it either way...
rwestgraham wrote:
I think some of you guys allow your personal prejudices about what's "good" and what's "crap" to allow you to make poor architectural decisions.
Actually, it's not out "personal prejudices", but our "personal experiences" that dictate our architectural decision. Reliability, Supportability, and Scalability are the biggest factors I have to deal with in my work.
rwestgraham wrote:
It's about picking tools and platforms that are appropriate for the end use.
Reliability, Supportability, and Scalability...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote:
Not to mention workgroups in Access are a pain in the ass to use and administer. BTW: On my wire around here, the more I can reduce the chatter, the better. And yes, I've been in client sites where that was a concern. Now, it's a mandatory consideration in all the development I do.
Workgroups are pretty easy to administer. People can do them in house easily. Much less difficult than setting up a SQL Server.
And if network traffic is an issue at a client site, then Access is probably not the correct choice anyway. You seem intent on ignoring the fact that I stress Access is only appropriate for small systems.
Dave Kreskowiak wrote:
Same goes for a machine hosting an Access database, so I fail to see your point here. Since a total machine failure would have me out there rebuilding it either way...
Absolutely not true. The person simply reinstalls Windows, reinstalls the application, pulls out the optical disk or whatever they copy their backups to, and copies the last Access backup to the working directory. If they have security they recreate the workgroups. The system is fully restored.
But I do agree about one thing. With MSDE or SQL Server yes, you are probably out there rebuilding it yourself. That's a luxury not everyone has. I am in Atlanta GA. Most of my clients are in Austin TX. If I had to fly out there to reinstall an application for a user group of 5 people because their hard drive crashed, somebody would be pissed, and rightfully so.
Dave Kreskowiak wrote:
Reliability, Supportability, and Scalability are the biggest factors I have to deal with in my work.
Key word YOUR work.
As far as reliability, I've had no real problems with Access. As far as supportability, as I've pointed out in length, my small application users can support themselves with Access. If I were to substitute MSDE this would no longer be the case.
My large application users have the either the resources in house to support a SQL Server or can afford the resources to have me support it for them.
Scalability is NOT a criteria in all systems. I recently did a pay-for-performance system for a client. It accesses their main database (A proprietary one that comes with their operations management system) and calculates some numbers and puts them into an Access database because that is a convenient way to spit out a report. The Operations manager can run it for the entire staff. An individual can run only their own data. It's not an application where scalability ever matters because the tasks run quickly, very little data is actually stored in Access, and there will never be more than a few people at most running reports at any given time.
This is exactly the sort of scenario where use of Access is appropriate.
What advantages would added by doing such an application with MSDE? None. The disadvantages? Well for starters I would have to create a more complicated build to install the MSDE service, plus create a build for the MSDE database itself, plus I would have additional support issues that my client would find unacceptable for such a simple application. MSDE is simply not appropriate for this particular application.
The key word is NOT always scalability. If scalability is a major criteria Access is not appropriate. The key word is always appropriate.
What part of the term appropriate do you not understand? You just don't get it do you?
|
|
|
|
|