|
try to use windows task manger and see which process is consuming more cpu and memory
Best Of Regards,
SOFTDEV
If you have knowledge, let others light their candles at it
|
|
|
|
|
I'll try it whan I go to my client office.
In the mean time we found out that if they leave a preview of the any report open and minimize they continue working normally, if you don’t have a preview screen open your computer start slowing down…that’s weird!
|
|
|
|
|
Hi,
Is there a way that you can check the state of the left mouse button inside a timer routine? I have a mouseup event but sometimes it seems like it doesn't go into the routine when i let go of the button.
Thanks
|
|
|
|
|
If you are having a handler then it should be executed when mouse up happens. Can you cite a scenario when it does not fires?
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
I'm basically making my own slider.
Dim mouseheight As Integer
Dim slidepos As Integer
Dim handletop As Integer
Private Sub sliderhandle_mousedown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles sliderhandle.MouseDown
handletop = sliderhandle.Top
If MouseButtons = Windows.Forms.MouseButtons.Left Then
SliderTimer.Enabled = True
End If
mouseheight = MousePosition.Y
End Sub
Private Sub sliderhandle_mouseup(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles sliderhandle.MouseUp
SliderTimer.Enabled = False
handletop = sliderhandle.Top
End Sub
Private Sub SliderTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SliderTimer.Tick
slidepos = handletop + MousePosition.Y - mouseheight
If slidepos >= EmptyBar.Bottom - 15 Then
sliderhandle.Top = EmptyBar.Bottom - 15
ElseIf slidepos <= EmptyBar.Top Then
sliderhandle.Top = EmptyBar.Top
Else
sliderhandle.Top = slidepos
End If
endTimer:
End Sub
End Class
So when i have the mouse down it is going through the timer routine and when i let go it should make sliderTimer.enabled = false
It works most of the time except for when i click and move the slider for a split second. Then what happens is it follows my mouse even though i do not have the button clicked. So i was thinking if i could check the mouse button state then i could force it to disable the timer.
|
|
|
|
|
Hi,
Control.MouseButtons contains the instantaneous value you want.
if ((Control.MouseButtons & MouseButtons.Left)!=0) ... would be C# code, VB must be similar.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Sorry if this has been answered, but I couldn't find it.
I'm in VS2005 but using win7 as my os. There are problems resizing forms (strange flickers) and the new win7 "tricks" (for instance, dragging the window off the top to maximize) don't work. Do I need to recompile with VS2008 or is there another solution?
Thanks
|
|
|
|
|
Works for me just fine on Win7 Ultimate
Tosch
|
|
|
|
|
OK, thanks, I see that a simple form does work OK. So I have done something to my form that stops it from working. Any ideas?
Thanks again
|
|
|
|
|
Lots of code in the Form.Resize handler?
I are Troll
|
|
|
|
|
Nice guess, but no -- I don't even have the handler instantiated.
I tested the obvious stuff -- autoscalemode, autosize, etc, but it's not those either that I can tell.
|
|
|
|
|
OK, it's just the strange flashing that is what I think is a bug that only happens in Win7. Can anyone replicate this?
Add a horizontal splitcontainer to a form. Then run the program and resize the form from the lower right corner of the form. The form will flash larger then move back to it's correct size.
Thanks
|
|
|
|
|
Have you played with the control property DoubleBuffered? does that make a difference? Also there are BeginUpdate and EndUpdate methods that can be used when populating controls to prevent/reduce flicker.
modified on Friday, September 11, 2009 4:00 PM
|
|
|
|
|
It's not really flicker, it's erroneous drawing of the form on resize. You can see what I mean here:
http://www.cstrader.com/untitled/untitled.htm
Althouh it doesn't look like it on the video, the mouse that is dragging is actually in the corner of of the form
As the form resizes it snsps big, then snaps back to normal size.
The form has only a full-docked splitcontainer on it.
Only happens in win7.
|
|
|
|
|
Is there a best way to report this issue to Microsoft? I simply cannot make it stop and it occurs on a form with only one control and no code.
Thank you.
|
|
|
|
|
HEllo To all
i want to thank every one that has help me out on this message board every one has been good here and i have been getting grate help
Thank You all
i got a other question
i am opening a excel template in my program but i am trying to make the file path shorter
xlWorkBook = xlApp.Workbooks.Open("C:\Documents and Settings\Dell Laptop\My Documents\Visual Studio 2008\Projects\Timer\Timer\Templates\log.xls")
Say the other computer is not called Dell Laptop its not going to work
i want it to be with the program no mater ware the program is it will save it in its template forlder
i have tryed this
xlWorkBook = xlApp.Workbooks.Open("\Templates\log.xls")
this did not work
anyone have any ideas ???
Thanks
|
|
|
|
|
Just for clarity, are you trying to open an existing document, or are you trying to create and open a new document?
If you need to open an existing document, which you have not created yourself earlier on in your application, and the user can save the document anywhere on his computer, the best way is to use an OpenFileDialog .
If you created the document yourself earlier on in your application, just store it to a shorter path to begin with. In that case you could just use xlWorkBook = xlApp.Workbooks.Open("log.xls")
My advice is free, and you may get what you paid for.
|
|
|
|
|
My program will do everything on its own
it will open the file log.xls from the template folder add data to it and then save the file to the log folder
by just putting the file name and no path it ends up in my documents i want it to be in the same folder as my program i added the folder in the solution exploer
Thanks
|
|
|
|
|
Bob Beaubien wrote: i want it to be in the same folder as my program
The folder where your application is running can be obtained over the Application class, it holds an ExecutablePath[^]-property.
You can use Path.Combine [^] if you want to refer to a subfolder thereof.
I are Troll
|
|
|
|
|
Okay, then use Directory.GetCurrentDirectory to get the path of your application.
This will get the path of the application, even if the user would have installed it elsewhere then the default directory.
My advice is free, and you may get what you paid for.
|
|
|
|
|
WRONG! GetCurrentDirectoty cannot be trusted to return the same path as the executable every time! Try launching an OpenFileDialog and navigating around with it, then see what GetCurrentDirectory returns.
|
|
|
|
|
You are ofcourse right, I actually didn't think of that until after your reply.
My advice is free, and you may get what you paid for.
|
|
|
|
|
if you create a desktop shortcut, you can choose the initial "current directory"; when you double-click it, the EXE gets launched with the chosen curdir, so it is totally unrelated to the exe path.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Hello to All,
Dim chArray As Char()
ChArray = a_string.ToCharArray
DirectCast((chArray((i - 1) + "`"c)), Char)
DirectCast((chArray((i - 1) - "`"c)), Char) // Error in the line
If you can think then I Can.
|
|
|
|
|
Is there a question here?
You say 'Error in the line'. What error?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|