|
|
Thanks for the link. It solves my problem and it is a comprehensive source solutions.
|
|
|
|
|
Hi
Short time before I had the same problem. This worked for me. The
e.Handled = True
disables the sound.
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(13) Then
Me.SelectNextControl(Me.TextBox1, True, True, False, True)
End If
e.Handled = True
End Sub
CU
Dave
|
|
|
|
|
In VB 6, one can easily add in the API Viewer and then load up WIn32 API functions and constants in the viewer, so that it can be easily copy and pasted into our applications.In VB.Net, where can I find the APIs and its constants, so that I can cut and paste into my application.
|
|
|
|
|
www.allapi.net try there, there pretty good, examples and everything
"If i was king cigarettes would be free."
|
|
|
|
|
Purple Monk,
That site really helps.
You've given me a green light not purple.
Thanks.
|
|
|
|
|
In VB 6, one can easily add in the API Viewer and then load up WIn32 API functions and constants in the viewer, so that it can be easily copy and pasted into our applications.
In VB.Net, where can I find the APIs and its constants, so that I can cut and paste into my application.
|
|
|
|
|
There is no such app that and database that comes with VB.NET. Your best best for something like this is http://www.pinvoke.net[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Another guy point me to this www.allapi.net
It solved me problem.
|
|
|
|
|
can anyone pls tell me how to watch a video clip in VB.net once a button is clicked...
thx
|
|
|
|
|
With DirectX9. Be careful though, it's one big pathetic joke, read my article on all the bugs in it before using it.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Ok I've created a class that adds buttons, textboxes, checkboxes etc at runtime. I can move all these objects etc. What I would like to do is make the program smart. Basically what I want to is beable to add many buttons, textboxes etc (already working) and link them up ie.
if I click on button1 it writes to a textbox that I specify, which is on the child form
if I click on button2 it opens up a file dialog
if I click on button3 it creates a new Database
if I click on button4 it opens up another form.
also if I want to change these configurations for the buttons I can do so with in the program. Basically you control what you want to do like in vb.net
|
|
|
|
|
I dunno for what reason you want to do so, but here is one way!
first make a string array with dimention of the total commands:
ReDim Action(iButtonsCount)
for each time creating a new button.
then set the array value to some command to be done, e.g.
Action(iButtonsCount)="OpenFileDialog"
then in click button event add:
<br />
Private Sub arrButton_Click(Index as Integer)<br />
Select Case Action(Index)<br />
Case "OpenFileDialog"<br />
'.....<br />
End Select<br />
End Sub<br />
Also if some of your commands need some parameters, you can make the array 2D or more, and set the parameter in the second column in the array.
I hope this will help.
|
|
|
|
|
I am writing a simple VB .Net application that will open a form, establish a socket connection with a server and then display the received data in the forms DataGrid.
Upon startup of the application the form opens. In the Form1.vb form_load procedure I call the ClientSocket class to establish the connection to the server. This is successful. Then I send my login informaiton, again successfully. Then I start receiving data, once again I am successful. I can then pass the received data from a private sub ReceiveCallBacks in the ClientSocket Class to a new Class to parse the data and display it using msgBoxes. But what I really want to do is get the received data back to the form.
Can some one help guide me...If more information about the code is required please let me know and I will post it.
THANKS -
Jennifer
|
|
|
|
|
VB6 says the following expression is too complex
to be computed (provided by a genetic program):
(0.187385 +(0.149214 +oN1*(2.0092+oN1*(5.22783+1.9466*oN1)) +
oReu*(-0.0449582+oReu*(0.00420568+-0.000105206*oReu+0.0137505*oN1) +
oN1*(-0.361811+-0.34512*oN1)))*(-0.647353+(0.149214 +oN1*(2.0092+oN1*(5.22783+1.9466*oN1)) +
oReu*(-0.0449582+oReu*(0.00420568+-0.000105206*oReu+0.0137505*oN1) +
oN1*(-0.361811+-0.34512*oN1)))*(-5.2078)) +(0.0531293 +
oDP3*(0.260794+oDP3*(-0.0914714+0.00960239*oDP3)) +oOPT*(+oOPT*(+0.000904296*oDP3)
+oDP3*(-0.0286061+0.00372593*oDP3)))*(-5.25864+(0.0531293 +oDP3*(0.260794+oDP3*(-0.0914714+0.00960239*oDP3))
+oOPT*(+oOPT*(+0.000904296*oDP3) +
oDP3*(-0.0286061+0.00372593*oDP3)))*(37.8453+-71.5963*(0.0531293 +
oDP3*(0.260794+oDP3*(-0.0914714+0.00960239*oDP3)) +oOPT*(+oOPT*(+0.000904296*oDP3) +
oDP3*(-0.0286061+0.00372593*oDP3)))+-136.292*(0.149214 +oN1*(2.0092+oN1*(5.22783+1.9466*oN1)) +
oReu*(-0.0449582+oReu*(0.00420568+-0.000105206*oReu+0.0137505*oN1) +oN1*(-0.361811+-0.34512*oN1)))) +
(0.149214 +oN1*(2.0092+oN1*(5.22783+1.9466*oN1)) +
oReu*(-0.0449582+oReu*(0.00420568+-0.000105206*oReu+0.0137505*oN1) +
oN1*(-0.361811+-0.34512*oN1)))*(34.1411+55.7764*(0.149214 +oN1*(2.0092+oN1*(5.22783+1.9466*oN1)) +
oReu*(-0.0449582+oReu*(0.00420568+-0.000105206*oReu+0.0137505*oN1) +oN1*(-0.361811+-0.34512*oN1))))))
It contains several common bracketed sub expressions that could be simplified.
Is there any code to simplify this expression and compute it ?
Any suggestions?
aprx
|
|
|
|
|
And you needed VB6 to tell you this?
How are you getting this expression into your VB6 app? Are you cutting and pasting it directly into your code or are you sending the expression to something like VBScript to be evaluated?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi!
I got this expression from a genetic package, then
copied/pasted it in my VB written application.
It usually works but this time the expression is too large.
aprx
|
|
|
|
|
aprx wrote:
then
copied/pasted it in my VB written application.
Ewww... Your going to have to simplify it by hand, before you paste it in.
I suppose you could add expression evaluation support to your app, but that would be a massive undertaking almost as bad as rewriting the genetic package into your VB6 app directly. There are libraries out there that could probably do this, but you'll have to watch out for their capabilities because these libraries will also have limits on how complex the expression can be.
Yahoo search results for "vb6 expression evaluation[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have created my crystal report and binded it to a crystalreportviewer. Once called everything works great. The report shows everything in the database. I am surprised I have gotten this far considering this is my first time using crystal reports with vb.net.
I am trying to only pass one row in and display the one row only. How is this accomplished? I want to pass values of the one row and one row only to the report and display it.
Thanks in advance
Beginner in VB.Net
|
|
|
|
|
there are a few ways you could do this.
you could select the data that you wish to display out of your current data source and copy it to a different dataset with the same structure. then set the datasource of the report = the dataset with just the single row.
or...
you could just do everything the way you are currently doing it and create a parameter for the report. in your code you set this parameter = the unique id for the row which yuo wish to display.
next, create a Record Selection Formula and have it select only the rows which match the parameter value. i used this method when i designed our company's new packing slip that we are now using in production.
each way has it's +'s and -'s, try them and see which way works out best for yuor particular application.
hope this helps.
-jim
|
|
|
|
|
Jim Matthews wrote:
you could just do everything the way you are currently doing it and create a parameter for the report. in your code you set this parameter = the unique id for the row which yuo wish to display.
next, create a Record Selection Formula and have it select only the rows which match the parameter value. i used this method when i designed our company's new packing slip that we are now using in production.
I would like to do it the way explained above. Do you have any examples of this?
In my database, the primary key is an autonumber named contactID. Is it possible to pass that value to the report and use it in the record selection formula? That sounds simple to do but don't know how to start it.
Thanks again
Beginner in ASP.Net and VB.Net
|
|
|
|
|
no problem.
i actually should have provided some source code here as the crystal objects are not very intuitive. (imho)
1. in your report create a parameter field called "ContactId"
2. in your report right click an empty area in the field explorer. go to "Report", then "Selection Formula" and then finally "Records". This should open the formula workshop. enter a formula for selection criteria like the following:
{Contact.ContactId} = {?ContactId}
where Contact is your table name and ContactId is the field which holds your unique constraint.
3. Now what you're going to do is pass the parameter value into the report via code.
'top of your object...
imports CrystalDecisions.CrystalReports.Engine
imports CrystalDecisions.Shared
'load your report
dim myReport as New ReportDocument
with myReport
.Load("myReportTemplate.rpt")
.SetDataSource(myDataSet)
end with
'determine which row you want to display
dim drToDisplay as Datarow = myDataSet.Tables("Client").Select("ClientId = " & cstr(currentClientId))
'get a reference to the reports parameter field
dim prmClientIdParameter as ParameterFieldDefinition
prmClientIdParameter = myReport.DataDefinition.ParameterFields("ClientId")
'create a parameter values collection to set the parameter value
dim valsParClientId as New ParameterValues
'create an instance of a parameter value to add to the above parameter values collection
dim valClientId as New ParameterDiscreteValue
valClientId.Value = drToDisplay("ClientId")
'add the parameter value to the parameters collection
valsParClientId.Add(valClientId)
'set the current value of the reports parameter field
prmClientIdParameter.SetCurrentValues(valsParClientID)
'--- code to display/print report etc ---'
that's pretty much it. watch out for spelling or syntactual errors above as i was typing this off of the top of my head just looking at some of my code. i didn't actually type it into the editor.
another thing to mention is
Brian Bischoff's free online crystal reports e-book.
hope this helps.
-jim
|
|
|
|
|
This all seems like it would work but I have one problem. I am using a form just for the crystalreportviewer. So I don't have access to my dataset. Do I need to create another dataset on this form, or is there a way around it?
Isn't there just a simple way to pass a string, that I already have(contactID), into the report without using the dataset?, then set that string equal to the parameter?, then display that record? I thought all this would be simple coding but it turned out to be a bigger task than I thought. Thanks for that link for the free e-book. I am going to read up on it but I would like to knock out this assignment first.
Thanks again for all your help.
Beginner in ASP.Net and VB.Net
|
|
|
|
|
no problem tim. you could just setup a friend property on your display form and pass in a reference to your report document object.
-jim
|
|
|
|
|
Jim Matthews wrote:
you could just setup a friend property on your display form and pass in a reference to your report document object
Sorry to be such a pain but could you show me how do to this?
Thanks so much for all your help and knowledge
Beginner in ASP.Net and VB.Net
|
|
|
|