|
Dear all
I had installed new visual studio.net 2005 into my PC and I have tried to open my old program which was I made under visual studio.net 2003, everything was running well until I tried to run my report form which was connected to my report form made under crystal report sheet.
I couldn't run selectionformula, to present all my data from my database to my report sheet as I wanted. Here is I treid to give you a small part of my program
I have a textbox1 in my form which is I will use as my parameter to order crystalreport to present data as I need base on the contains of that textbox1. and the list of my program are :
If textbox1.text="ALL" then
crinv.SelectionFormula= ""
crinv.RefreshReport()
Else
crinv.SelectionFormula="{inventory.invcod)='" & Me.textbox1.Text & "'"
crinv.RefreshReport()
Endif
I can get all data from my data base if I type "ALL" into Textbox and I can get the data base on inventroy code which I typed on textbox1 as well when I still use Visual studio 2003, but now I could not get any data with the same command under visual studio 2005. My question is
Could you please to give me information how to use the right SelectionFormula command in Visual studio.Net 2005, that I can present all information from my database ?
I do hope you will understand what I mean with my poor english. Thank you for your attention
Best regards
ICE
|
|
|
|
|
Swiss Mantoro wrote: crinv.SelectionFormula="{inventory.invcod)='" & Me.textbox1.Text & "'"
I noticed that your string doesn't end with a curly bracket "}". Perhaps that's why it fails?
|
|
|
|
|
Thank you for your reply but actually I used the curly bracket in my real program, but for this line program was not problem, I just concern to program line which tell, crinv.selectionFormula="".
In my previous visual studio.net version whole those program was running well, but I have no Idea why it doesn't running in version of 2005.
Thank you
ICE
|
|
|
|
|
|
Hi there,
can anyone tell me how can i load the Package and Deployment Wizard in the Add-in Manager in VB.net?
This is to create an setup.
Thanks
|
|
|
|
|
I have the same problem!I pass to VB.net recently and i don´t know how to use the add-in manager!
In VB 6 it wasvery simply.
|
|
|
|
|
Hi every1, does anyone know if it is possible to capture an image of a form that is behind another form or window?
If this is possible I later want to turn it into video capture of the selected window.
TIA,
Brian
|
|
|
|
|
You want to capture video of a window, which is not visible ?
No - a window that is not visible is not being painted, so there's nothing to capture.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks for fast reply.
Then is there some way to paint this to a 'magical' spot that cant be seen and take the image capture from their?
thanks.
|
|
|
|
|
I dunno what would happen if you moved the window outside the bounds of the screen, but it would be a failure on the part of windows if it was painted there. I very much doubt it's easily achieved. If you could pass a DC to the paint event of the control, perhaps it would draw on it, but that would only be the client area, and it's just an idea, I dunno if it would work.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi again, fast response good. This solution seems to work:
<br />
Private Declare Function PrintWindow Lib "user32.dll" (ByVal _<br />
hwnd As IntPtr, ByVal hdcBlt As IntPtr, ByVal nFlags As _<br />
UInt32) As Boolean<br />
Dim screenGrab As Bitmap<br />
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click<br />
Me.SendToBack()<br />
screenGrab = New Bitmap(Me.Width, Me.Height)<br />
Dim g As Graphics = Graphics.FromImage(screenGrab)<br />
Dim hdc As IntPtr = g.GetHdc<br />
Me.PrintWindow(Me.Handle, hdc, Nothing)<br />
g.ReleaseHdc(hdc)<br />
g.Flush()<br />
g.Dispose()<br />
screenGrab.Save("C:\please.bmp", System.Drawing.Imaging.ImageFormat.Bmp)<br />
End Sub<br />
havent tested if thouroughly, but seems ok, howd anyone else run this?
|
|
|
|
|
OK - looks like the Windows API exposes this ability ( to force a paint event ). Cool.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Here is another method.
If you're using .NET 2.0, then you can call the new Form.DrawToBitmap() function.
|
|
|
|
|
thanks for another response, unfortunately cant test this out on .net 1.0.
How would I convert the previous code to remove the Title bar from that captures?
|
|
|
|
|
What you want is just the "client" area inside of the window. I don't know what managed calls you can make to access the handle of the client window.
I've found this on the Internet. Perhaps this will do the trick?
http://www.vbdotnetheaven.com/Code/Jul2003/2128.asp[^]
|
|
|
|
|
thanks, using screenGrab = New Bitmap(Me.ClientSize.Width, Me.ClientSize.Height) i do get the smaller area, but it cuts the bottom and right side area off rather then all edges.
|
|
|
|
|
I've just tried the code sample from the link I gave you. It works. It's only capturing the client area. Are you not using that code?
If you're calling your form's CreateGraphics() method like in the code sample, then it should only capture the client area and not the whole form.
|
|
|
|
|
I thought I tried it, if the window is hidden, didnt that just capture whatever else was ontop for the same region?
|
|
|
|
|
You're right. The code I gave you isn't going to work in this case.
Perhaps the thing to do is once you've got the captured image of the whole window, you could then copy only the inside portion to another bitmap. You already know how to get the client area's width and height. You can get its top/left position using the following code.
Dim clientOffsetPoint As System.Drawing.Point
clientOffsetPoint = Me.PointToClient(New System.Drawing.Point(Me.Left, Me.Top))
clientOffsetPoint.X *= -1
clientOffsetPoint.Y *= -1
|
|
|
|
|
|
Can anyone tell me how to Send/Read/Manage Email with VB 6.0? without any other dll or ocx, only with api function!!
|
|
|
|
|
No, but Google can
One search, first page.
http://www.freevbcode.com/ShowCode.Asp?ID=109[^]
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
My Blog[^]
|
|
|
|
|
Hi guys,
I try to find some informations for creating bitmap regions for forms in vb .net, but with no results! Only in C#: www.codeproject.com/csharp/bmprgnform.asp
So, I need little help from everyone who knows this in vb .net!
Thanx in advance..
|
|
|
|
|
It's the same in VB.NET, they both use the .NET framework, you just need to convert the code.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanx for reply Christian...but I am beginner...so, I need help to translate. Help me if you can..or anyone else..
|
|
|
|