|
Hi
I'm struggling to create a crystal report in a VB project,
The objective of the report is to return one row of multiple database tables.
This is working by a parameter selecting an ID number in a CASE table, the CASE table contains some forgien keys related to CUSTOMER,ORDER tables etc.., i want to select these forgien keys and return the one row that they relate to in the different tables i.e get all the data from the CUSTOMER table, from using the forgien key, without having to enter another parameter.
but am struggling with the syntax.
This needs to be dynamtic, as any ID number able inputed.
so far all i have got is ...
({?CaseID} = "ALL" OR {Case.ID}={?CaseID})
which simple reurns the single row in the CASE table.
Hope this makes sence! :-S
Many Thanks
|
|
|
|
|
i want to add a "select all check box in the header column of datagrid" at runtime.i'm using vb.net 2003 & msaccess 2003.
also when user checks this checkbox all checkboxes under this columns should check & vice versa.based on this i need to update the database.i've used datagridtablestyles
& using datagridboolcolumn.pls guide me.urgent.
thanks
|
|
|
|
|
|
Hello,
Could Someone help...
I would like a certain number of lines and a certain section of text copied from an external application's window.
Trying to parse the section after getting the text from the window has been a nightmare.
However I am having a problem of highlighting text using the mouse event.
Here is as far as i have been able to go
REM ////////This activates the window
Call SendMessage(hwnd, WM_ACTIVATE, 1, 0&)
REM This is setting the cursor to the correct position i want from
SetCursorPos e + 25, b + 305
mouse_event MOUSEEVENTF_LEFTDOWN, 0&, 0&, 0&, 0&
???????????????????????????????????
REM There is something missing here which i haven't been able to
figure out.
What I need here is from the current position i need text highlighted for a rect size of from lets say.. Top = 125 Bottom = 250
Right = 350 and Left = 150...I might have the top and left mixed up...but you get the idea...
I only need text highlighted from this section and copied to the clipboard.
???????????????????????????????????
SetCursorPos e + 25, b + 307
Call SendMessage(hwnd, WM_LBUTTONDOWN, 1, 0&)
mouse_event MOUSEEVENTF_MOVE, 0&, 0&, 0&, 0&
Tried the send keys but didn't work...
REM SendKeys ("^A")
REM 'SendKeys ("^C")
Call SendMessage(hwnd, WM_LBUTTONUP, 1, 0&)
|
|
|
|
|
This solution is worse than parsing the text to get what you want. You really cannot do this using this method. Remember, Windows is a shared system, where multiple applications can run at the same time. Your technique doesn't take into account that the focus can change from your target application at any time, with, or without, the user actually doing anything.
|
|
|
|
|
Yes, you are absolutely right. Thats why i am using "Call SendMessage(hwnd, WM_ACTIVATE, 1, 0&"
to activate before i do the mouse event..
Its the my first line in the code i pasted...I knew i will get that from someone. I appreciate the feed back.
Oh Well I guess I am on my own with this..
|
|
|
|
|
And the focus can change between your call to Activate and your SendMessage statements. And can change again before, or during, your calls to SendKeys. This is not an atomic operations, so your code can stop running anywhere in these statements and/or lose the focus at any time. There is no way to prevent this from happening.
You're also convertly using the clipboard when the user could have something on it that needs to be retained for another application.
|
|
|
|
|
Thank You. Never thought of that. even though I tried to address the issue.
I guess back to parsing the file.
|
|
|
|
|
Hi friends,
I make a project using vb.net. I want to make exe file for this project so I can run it without opening vb.net. I want to run it without seeing the source. I want to put the exe file on a CD so I can run it on any PC.
plz help me friends
thanks
wafaa
![Rose | [Rose]](https://codeproject.global.ssl.fastly.net/script/Forums/Images/rose.gif)
|
|
|
|
|
Publish your App - on the Build menu.
I don't speak Idiot - please talk slowly and clearly
I don't know what all the fuss is about with America getting it's first black president. Zimbabwe's had one for years and he's sh*t. - Percy Drake , Shrewsbury
|
|
|
|
|
First, pickup a beginner book on VB.NET and work through it.
Every time you run your app from the IDE, it's building an .EXE file. You find it in your project folder, typically under your profile in Visual Studio Projects\Project Name\bin\Release.
wafaajaradat wrote: I want to put the exe file on a CD so I can run it on any PC.
You'll only be able to run the .EXE on any machine that has the appropriate .NET Framework installed. You cannot run the app without it.
|
|
|
|
|
Thank you
In vb6 I used to choose "make exe file" from file menu
and it was enough .
what do I need to put on the CD so that my exe file will run on any PC?
plz help
thanks alot
wafaa
|
|
|
|
|
To reiterate - buy a book and read it. Your app needs the .NET framework, and you must have an exe, for your app to run at all, it just needs .NET, to run.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I already told you waht you need.
You cannot run a VB.NET or C# app without the .NET Framework installed on the machine.
|
|
|
|
|
you aren't the sharpest knive in the drawer. you asked that question already on 2nd of march, got an answer then and still you come back asking the same question again. also your question shows, that you haven't got the slightest clue about working with visual studio, so before doing anything at all, you should teach yourself the basics and not repeat the same stupid question.
off you are, buy a book, read it. learn to walk before you run.
|
|
|
|
|
Hi All,
I upgraded a project from VB to VB.net ( ActivexDll). After converting while debugging I am getting an error "E_nointerface". Can any one please tell me why do we get this error? Through goggling I found some results telling it may be due to threading conflicts. If so please tell me how to set threading in VB.Net.( In VB I found that threading mode is set to "Apartment" in project properties similarly how do we do it in Visual studio 2003 )
|
|
|
|
|
Well, I think you'd have a hard time converting this project using the Conversion Wizard. Something like this is usually going to be rewritten by hand.
You can check out this article[^] about using the STAThread and MTAThread attributes.
And, if you're starting a new thread, you can set the apartment state by setting the Thread object's ApartmentState property before you Start the thread.
|
|
|
|
|
Thanks Dave for your reply.
I tried the following
1)<STAThread()> _ and <MTAThread()> _ before the class is intialized. Is it the correct place ?
2)System.Threading.Thread.CurrentThread.ApartmentState = Threading.ApartmentState.STA
But still no luck. I verified after changing threading model in Registry. It is getting reflected and the Guid is matching with my code.
Any more suggestion please.
|
|
|
|
|
BINO VARGHESE wrote: )<STAThread()> _ and <mtathread()> _ before the class is intialized. Is it the correct place ?
From your description, and not being able to see any code, I seriously doubt it. Those attributes don't go on classes.
BINO VARGHESE wrote: 2)System.Threading.Thread.CurrentThread.ApartmentState = Threading.ApartmentState.STA
That won't work as you can't change the apartment state after a thread is started.
Somehow, I don't even think your starting a new thread.
There are no other suggestions. Without knowing anything about your code, what it looks like, what this component is doing, there's really nothing I can say.
|
|
|
|
|
Hello everybody,
as a beginner in VB.NET I'm looking for a functionality like OptionGroup in VBA. In particular, I want a form to react if the user clicks another radio button in a group of three - which seemed to be a simple task but there doesn't seem to be something like option groups... or it's been renamed?
Maybe someone can give me a good hint?
Thank you
Michael
|
|
|
|
|
GroupBox or Panel from the containers tab in the toolbox.
|
|
|
|
|
Tried that out. But they don't seem to supply a changed-event for the controls within, do they?
One pretty smart solution I found:
Private m_GroupSelectedFileType As RadioButton
Private Sub gbFileTypes_CheckedChanged(ByVal sender As Object, _
ByVal e As EventArgs) Handles _
optAll.CheckedChanged, _
optPicOnly.CheckedChanged, _
optDpxOnly.CheckedChanged
Dim SourceControl As RadioButton = DirectCast(sender, RadioButton)
If SourceControl.Checked Then
m_GroupSelectedFileType = SourceControl
MsgBox("Another RadioButton checked!")
End If
End Sub
it works just fine with a little problem: It already fires when the form is loading.
How can I prevent from that?
modified on Tuesday, March 3, 2009 4:52 PM
|
|
|
|
|
This way it works - maybe it helps someone else:
Private m_gbFileTypesButton As RadioButton
Private Sub gbFileTypes_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles _
RadioButton1.CheckedChanged, _
RadioButton2.CheckedChanged, _
RadioButton3.CheckedChanged
If Not Me.IsHandleCreated Then Exit Sub
Dim SourceControl As RadioButton = DirectCast(sender, RadioButton)
If SourceControl.Checked Then
m_gbFileTypesButton = SourceControl
MsgBox("Another radio button has been checked!")
Select Case SourceControl.Name
End Select
End If
End Sub
|
|
|
|
|
I use datagridview with last column type button. How I delete last button in datagridview?
|
|
|
|
|
simply use this statement
DataGridView1.Columns.Remove(DataGridView1.Columns(DataGridView1.Columns.Count - 1))
|
|
|
|