|
He was making fun of you by suggesting a complex project, on the basis that you gave him no information to go on. Surely it would be best that you decide, based on where your strengths are, what your project should be ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi
tx
so plz giude me atlist for subject which i impliment in vb.net
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
You didn't read what I said at all, did you ? I have no idea what you're studying, where, what fields you're familiar with. You need to decide on your project.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
HI
I am building a camera control app -
I am getting
Error 3 Value of type 'System.Windows.Forms.TextBox' cannot be converted to 'Decimal'. C:\Documents and Settings\Compaq_Owner\My Documents\Visual Studio 2005\Projects\CameraControlV1\CameraControlV1\Form1.vb 288 25 CameraControlV1
I have a field defined on a form as a textbox (no mask)but I could change it to a masked box
Private Sub AltitudeAGL_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AltitudeAGL.TextChanged
AltitudeAGLIn = AltitudeAGL
End Sub
I want to move this into the following variable and use for calculations . . .
Dim AltitudeAGLIn As Decimal = 0
So I can use it in the following where all variables are dim'ed as Decimal
Private Sub CalculateAngularVelocity(ByVal GPSSpeedIn As Integer, ByVal AltitudeAGLIn As Integer)
'This uses a HP9100 encoder, 500 counts per motor revolution, 303.366 counts per degree
'Formula W (Rads per sec) = V (Ft Per sec) / R (Ft)
Dim CountsPerRad As Decimal = 17379.79D
GroundVelocity = GPSSpeedIn * FeetPerNauticalMile * SecondsPerHour
AngularVelocity = Decimal.Divide(GroundVelocity, AltitudeAGLIn)
CountRate = AngularVelocity * CountsPerRad
End Sub
As I said - this must be simple - but the Visual Studio help system is not helping !
|
|
|
|
|
What you have tried to do is to convert the entire control into a number, which is impossible. You have to take the value of the Text property and convert to a number, preferrably by using Decimal.Parse or Decimal.TryParse .
---
Year happy = new Year(2007);
|
|
|
|
|
What camera are you controlling ?
You should use Decimal.TryPArse, it returns false if the value can't be converted.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Well thanks !
It took me a while but I managed to suss out the following . . . and the values are correct - I wound up declaring\f every6thing as double
I am using a Canon EOS with a Canon SDK, and an Allmotion servo control and a Garmin GPS
Next is to scan the com ports to get the location of the serial usb devices
Any Ideas ??
Thanks Again !!
bob
Private Sub CalculateAngularVelocity(ByVal GPSSpeedIn As Double, ByVal AltitudeAGLIn As Double)
'This uses a HP9100 encoder, 500 counts per motor revolution, 303.366 counts per degree
'Formula W (Rads per sec) = V (Ft Per sec) / R (Ft)
ConvertSuccessful = Double.TryParse(AltitudeAGL.Text, AltitudeAGLIn)
If Not GPSPresent Then
ConvertSuccessful = Double.TryParse(GPS_GroundSpeed.Text, GPSSpeedIn)
End If
GroundVelocity = GPSSpeedIn * FeetPerNauticalMile / SecondsPerHour
AngularVelocity = GroundVelocity / AltitudeAGLIn
MsgBox("GS " & GroundVelocity)
MsgBox("alt " & AltitudeAGLIn)
Dim AngularVelocityDegrees As Double
AngularVelocityDegrees = Math.PI * 2 * AngularVelocity
MsgBox("Angular Velocity" & AngularVelocityDegrees)
CountRate = AngularVelocity * CountsPerRad
MsgBox("CountRate" & CountRate)
End Sub
|
|
|
|
|
i got this error when running an VB.Net application which developed in VS2003, in a pc which installed window server 2003.
Application has generated an exception that could not be handled.
Processid=0xb88(2952), Thread id=0x172c(5932)
This pc is installed with .Net Framework 1.1. I'm able to login to this application. When application is loading, i get this error message.
Anyone has any idea what's going on ?
Need you help! Thanks in advance!
|
|
|
|
|
Hi merlynml,
Have you used a third party control or DLL in your appllication???
|
|
|
|
|
Hi Nilesh Hapse,
yes, I did. Janus control dll is included in the project.
|
|
|
|
|
Okay!!!
Please make sure that the DLL is registered on the machine on which you are trying to run the application.
I was facing same problem when i was using GO Diagram DLLs in my application and installing it on a machine with no GO Diagram installed. I installed GO Diagram on my target machine and the problem was solved.
Hope this helps you out..
|
|
|
|
|
Thanks Nilesh Hapse!
Yeah, this application is using Go Diagram DLL also. But it's running fine at another pc with window server 2003 also.
You mean we need to install Go Diagram DLL at every pc which running this application? How can we know whether this DLL is registered on the machine or the reference path is correct ?
|
|
|
|
|
I think it needs GO Diagram.
They (Northwoods software ppl) say that you don't need Go Diagram installed on each and every machine. They have mentioned this in under Deployment section of GoWinIntro.doc document which will be in your samples folder of Go Diagram.
I am still working on that.
But i got rid of that error by installing GO Diagram temporarily on test machine.
But i hope that we don't need to install GO diagram on every machine.
You can also try installing GO Diagram on the machine where you aer getting this error message...
|
|
|
|
|
Hi
I have set width for each column in the Datagrid through Property Builder--AFormat--Columns--Setting the width for each column....
My problem is,though i have set width for the columns,the cell width increases if the data in any of the cell is lengthier...
How to retain the width and wrap the text within the cell? (i have checked 'Wrap textbox within the cell' textbox in the Property Builder--AFormat--Columns)
Please help me!
Thanks!
|
|
|
|
|
halllo Everyone,
will anyone tell me how to see changes in my datagridview on updating records.
i wrote following code on my update commandButton. it is affecting the database & showing updated values in related textboxes of that form also.
But it is not updating my datagridview on same form.
'' *****************************************************
Dim cmd As MySqlCommand
cmd = New MySqlCommand("UPDATE cust_mast c SET CustName='" & txtCustName.Text & "' where
custid=" & Val(txtCustId.Text) & ";", conn)
cmd.ExecuteNonQuery()
MyDataAdapter.SelectCommand = cmd
MyDataAdapter.Fill(ds, "cust_mast")
''---------------------------------------------
DgvCustList.DataSource = ds.DefaultViewManager
DgvCustList.DataMember = "Cust_mast"
'' *****************************************************
priya
|
|
|
|
|
|
Through utilities on your PC, you can use Task Manager or Process Viewer.
Through VB.Net, you can look at the My.Computer namespace.
Shreekar
|
|
|
|
|
hi,
i m using mysql & vb.net(winforms) in my application
will anyone help me in my Udate Query?
If conn.State = ConnectionState.Closed Then
Connect()
End If
Dim da As MySqlDataAdapter = New MySqlDataAdapter()
Dim cmd As MySqlCommand
Dim parm As MySqlParameter
' Create the SelectCommand.
cmd = New MySqlCommand("SELECT * FROM cust_mast WHERE CustName=?name", conn)
cmd.Parameters.Add("?name", MySqlDbType.VarChar, 45, txtCustName.Text)
da.SelectCommand = cmd
da.Fill(ds, "cust_mast")
If editFlag Then ''---------------Update Logic---------------
' Create the UpdateCommand.
cmd = New MySqlCommand("UPDATE cust_mast SET Address=?addr where custname=?
name;", conn)
cmd.Parameters.Add("?addr", MySqlDbType.VarChar, 200, txtAddr.Text)
parm = cmd.Parameters.Add("?custname", MySqlDbType.VarChar, 15, txtCustName.Text)
da.UpdateCommand = cmd
da.Update(ds, "cust_mast")
da.Fill(ds, "cust_mast")
Above code i wrote on my Update button,it is not giving any error but not affecting database.
Will u tell me how shuld i update my receords
priya
|
|
|
|
|
From my limited knowledge of parameterised SQL queries/statements,
priya_p233 wrote: WHERE CustName=?name", conn)
cmd.Parameters.Add("?name", MySqlDbType.VarChar, 45, txtCustName.Text)
this seems a bit wrong. It should read something like this:
WHERE CustName=?", conn)
and
cmd.Parameters.Add("name", MySqlDbType.VarChar, 45, txtCustName.Text)
Similarly for the update statements.
I may be wrong, so for better help, read up MSDN on parameterised SQL queries/statements.
Shreekar
|
|
|
|
|
You can use this sub
Public Sub ExceCommand(ByVal SqlCommand As String)
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim Sqlcom As SqlCommand = New SqlCommand(SqlCommand)
Sqlcom.CommandType = CommandType.Text
Sqlcom.Connection = conn
Sqlcom.ExecuteNonQuery()
conn.Close()
End Sub
then you can call your sql statement as :
ExceCommand ("UPDATE cust_mast SET Address=..... where custname=.....")
-- modified at 0:28 Monday 22nd January, 2007
jooooo
|
|
|
|
|
hi,
Thnx for help. but if i m using above execute commant to update my table which contains many fields, it would be tedious to maintain txtbox & double cotes values...so i wrote tht code.
-thnx Regards Priya.
priya
|
|
|
|
|
Hi,
I want to show dynamically designed html page in the vb.net form using webbrowser control. I have the code like this,
Dim doc As mshtml.HTMLDocument
doc = AxWebBrowser1.Document()
But when I option strict on, it gives me error as
"Option Strict On disallows implicit conversions from 'System.Object' to 'mshtml.HTMLDocument'."
How do I resolve this any luck, If i switch off option strict then it works fine.
Regards,
Rams.
-- modified at 23:59 Sunday 21st January, 2007
Be simple and Be sample.
|
|
|
|
|
What do you mean by 'dynamically designed' - do you want to write a web designer ? You'll need to manipulate the HTML of the control for that.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
You can use the CType statement like below:
doc = ctype(AxWebBrowser1.Document(),mshtml.HTMLDocument)
However, you should be using the Web Browser Control that comes with .Net, not the COM one.
Hope this helps.
Shreekar
|
|
|
|
|
Thanks,
I had another problem, how do i set the left and top margin for the webbrowser control. Also, I need the focus to be always on last line.
Regards,
Rams.
Be simple and Be sample.
|
|
|
|