|
Hi,
At the time of report generation you can set the path of Crystal Report which you want.
Example are given below.
Dim rpt As CRAXDRT.Report
rpt = crx.OpenReport(application.startuppath & "\Report3.rpt")
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
thax for the reply,. So should I copy the report file also to the bin folder before the set up creation?
|
|
|
|
|
Good Morning
I have a query related to DLINQ. I have a datagridview with a combo box in the one field. The user may select categories from the drop down box.
Only one category can exist (no duplicates). What I want to do is using LINQ to get a new dataset containing all the records that is not selected (by the datagridview) and the value of the current selected one and gives that as a datasource for the combo box.
This way the user doesn’t have multiple options that they shouldn’t select anyway but only the ones they can select.
I have problems defining a query to get the data. Has anyone tried doing this before?
I have played around and this is what I have currently but it doesn't include the current row aswell.
(I am new to LINQ and don't understand the full meaning of the queries - any one can translate it in normal word will great - The code snippet below is by looking at examples)
Dim query = From t1 In dataset1.tblLookup.AsEnumerable() _
Group Join r In dataset2.tblMainDisplayDGV.AsEnumerable() _
On r.Field(Of String)("CommonField") Equals t1.Field(Of String)("CommonField") _
Into x = Group _
From r2 In x.DefaultIfEmpty() _
Where r2 Is Nothing _
Select t1
Regards,
Christiaan
|
|
|
|
|
hello this thread is a little old...sorry had to revive it..as i haven't yet found a solution...
the name if the thread is 'How to update form control from an embedded form'
I have two forms,one is added as a control to another an I need to update a listbox in parent from the child form.
This code is in the parent form,I have added this in the form load event of the parent form
Dim obj1 As New childform
AddHandler obj1.addtolist, AddressOf addtolistbox
and this is sub that is subscribed to the event..
Private Sub addtolistbox(ByVal str As String)
ListBox1.Items.Add(str)
End Sub
In the child form....
Public Event addtolist(ByVal s As String)
and in the sub where I want to add to listbox in parent form,
RaiseEvent addtolist(ds1.Tables(0).Rows(0)("Reader_location").ToString & " Connected ")
I have tried this and it doesnt work,the debugger just goes to next line.Can't understand why.
The code of the parent form has some BGW threads.Infact the child form is invoked from the BGW.Is this a problem?
|
|
|
|
|
Don't start a new thread. Keep responding to the same thread so people can see what'sbeen going on.
Sohaib_A wrote: The code of the parent form has some BGW threads.Infact the child form is invoked from the BGW.Is this a problem?
Great! NOW you mention the child form is on a background thread. First, this is a bad idea. ALL GUI objects (forms included) should only be created on the UI thread. Any work that needs to be done can go on a seperate thread.
Since the BGW is NOW the case, what you've been told is not going to work. You cannot modify controls created on the UI from another thread. You can pretty much scrap half of the things you were told and start looking into the ReportProgress method of the BGW. This is pretty much going to be the easiest method of getting periodically generated data out of the code that the BGW is running. You're looking for this[^] version of the method.
|
|
|
|
|
Ok..so I got it to work.Had to get rid of the BGW.You were right,they were a bad idea.But i wonder why I wasn't getting any cross-threading errors.
Actually what i was trying to do is,I have a snippet code in which there are several API calls for a certain hardware device and the data that i get from this device has to be dispayed on a form and also manipulated in a database.
I want to run several instances of this code at the same time as I have more than device running at the same time performing the same operation.Also the devices will perform this operation at specific intervals.
Currently I am doing this using timers for the operation interval and lists for the multiple forms.All these forms are added as control to a parent form.
I want to try to get this to work using threading,i:e; each 'device' or instance would be running in its own thread.And all the threads would be running and instance of the code in parallel.
I tried using BGW lists to create forms and run the code,but there were many complications one of which you know.
I don't know much about threading as i haven't done it before,all I know is stuff I've read online.
My questions are
1.As threading is known to improve performance and response of an application,will it do the same in this case or just make it more complicated and slower?
2.If threading is the way to go,will there be issues of thread synchronization and can all these threads run in parallel?
|
|
|
|
|
Hello I want to add a Checklistbox in Datagridview in vb.net.
How can i do this?
Pls help me.
Thanks in advance
|
|
|
|
|
did you mean you want a checkbox column on you datagridview?
if you mean this, you can create a checkbox column in two ways:
1-create a template column and insert a checkbox control on it
2-your datasource field have a boolean/bit type
Human knowledge belongs to the world
|
|
|
|
|
By default it is not in vb. You can virtually create a checklistbox and at the time of gotfocus you can call it and set datagridcell property to according checklistbox property.
Best Regard
Anubhava Dimri
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
Hi all...
I used Interop.wmplib.dll file to play songs.
Now I want to record song that is playing in my program.
How can I do this??
Thanks.
Gagan
|
|
|
|
|
Recording happens through the microphone or line in, your sound goes through the line out. I'm not sure if DirectX gives you a way to record the sound that is being fed to the line out, but that's where I would look.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
You can record sound by using Windows API
Microsoft provides an API mciSendString to recording sound
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer
Thanks
ANubhava Dimri
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
I don't want to record voice through microphone but I want to record song that is being played by wmp in my program.
Thanks.
Gagan
|
|
|
|
|
Hey,
I got the following code for a Mouse Hook
(http:
Imports System.Runtime.InteropServices
Imports System.Reflection
Imports System.Drawing
Imports System.Threading
Imports TestMouseHook
Public Class Class1
Private f As New Form1()
Public Structure POINTAPI
Public x As Long
Public y As Long
End Structure
Public Structure MSLLHOOKSTRUCT
Public pt As POINTAPI
Public MouseData As Long
Public Flags As Long
Public Time As Long
Public dwExtraInfo As Long
End Structure
Constants
Public Const WM_RBUTTONDOWN = H204
Public Const WM_RBUTTONUP = H205
Private Const WH_MOUSE_LL = 14 Hook Flag
Private Const HC_ACTION = 0
Public mHandle As Integer
Public Declare Function UnhookWindowsHookEx Lib "user32" _
(ByVal hHook As Integer) As Integer
Public Declare Function SetWindowsHookEx Lib "user32" _
Alias "SetWindowsHookExA" (ByVal idHook As Integer, _
ByVal lpfn As MouseHookDelegate, ByVal hmod As Integer, _
ByVal dwThreadId As Integer) As Integer
Private Declare Function GetAsyncKeyState Lib "user32" _
(ByVal vKey As Integer) As Integer
Private Declare Function CallNextHookEx Lib "user32" _
(ByVal hHook As Integer, _
ByVal nCode As Integer, _
ByVal wParam As Integer, _
ByVal lParam As MSLLHOOKSTRUCT) As Integer
Public Function MouseCallback(ByVal Code As Integer, _
ByVal wParam As Integer, _
ByRef lParam As MSLLHOOKSTRUCT) As Integer
If (Code = HC_ACTION) Then
Debug.WriteLine(wParam.ToString())
Select Case wParam
Case WM_RBUTTONDOWN, WM_RBUTTONUP
Debug.WriteLine(wParam.ToString())
Return 1
End Select
End If
Return CallNextHookEx(mHandle, _
Code, wParam, lParam)
End Function
Public Delegate Function MouseHookDelegate( _
ByVal Code As Integer, _
ByVal wParam As Integer, ByRef lParam As MSLLHOOKSTRUCT) _
As Integer
<marshalas(unmanagedtype.functionptr)> _
Private callback As MouseHookDelegate
Public Sub HookMouse(ByRef ff As Form)
f = ff
callback = New MouseHookDelegate(AddressOf MouseCallback)
mHandle = SetWindowsHookEx( _
WH_MOUSE_LL, callback, _
Marshal.GetHINSTANCE( _
Assembly.GetExecutingAssembly.GetModules()(0)).ToInt32, 0)
End Sub
Public Sub UnHookMouse()
Call UnhookWindowsHookEx(mHandle)
End Sub
End Class
I created a Class called Class1, just as in the example.
When I execute the following code the hook is actually set, but when I click outside my application the click isn't registered.
Dim MouseHook as New Class1
MouseHook.HookMouse(Me)
I think that this is happening because there is no event for an "outside application click". Now my question is: How can I make an event that is fired when the mouse is clicked outside my application using the functions declared in the class? I never "made" an event before, if it's even possible
I was hoping you guys could help me out
All help is appreciated,
--Zaegra--
|
|
|
|
|
Hi All,
i want to know that how can i create video of system activities.
Like : Keylogger capture keys which you are typed same i want to capture video which i am working in system.
Pls help it is needful.Thanks
Best Regard
Anubhava Dimri
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
Well, you build a Windows-service, and depending on the resources you create a streaming video or you take some simple screenshots.
There are multiple samples here and on Google on creating Services and on capturing the desktop as an image.
Good luck \o/
I are troll
|
|
|
|
|
It's very unlikely you're going to get much help with a project like this. Writing a keylogger has serious security issues attached to it and there's just about no legitimate uses for such an app.
|
|
|
|
|
The other day I read Windows Movie Maker was just fine for this (screen shots+audio).
|
|
|
|
|
Hi,
Please help me for creating video by using picture.
Best Regard
Anubhava Dimri
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
You can use the System.Drawing namespace for your screenshots
some sample code is available here[^], or you can go to here[^] for a broader search to begin.
As for the keylogger, no I won't really help you out on that one.
|
|
|
|
|
Hi,
How many time intervel is sufficent for getting screenshot for creating video. and How to create video by using screenshot.
Best Regard
Anubhava Dimri
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
eg_Anubhava wrote: How many time intervel is sufficent for getting screenshot for creating video.
Minimal 48 frames/second, anything else is unacceptable!
eg_Anubhava wrote: and How to create video by using screenshot.
You show the pictures reeelly fast, one after another
I are troll
|
|
|
|
|
Did you mean something like this[^]? If not, check out this[^].
|
|
|
|
|
Is Windows Media Encoder is necessery for this application.
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
I don't know, I would check by doing some research[^]
|
|
|
|