|
Yeah, there's really no answer to this vague question because you haven't spelled out what you mean by "a 3D form and button".
|
|
|
|
|
Please fellower friends I need help on how to restrict a label as an output to take floating point values with 3 decimal places
|
|
|
|
|
Really? A label has no way of limiting what is put into its Text property. You have call ToString on the value you're displaying and provide the number format string to limit the result to 3 places while formatting everything to the left of the decimal to whatever specification you want.
See Standard Numeric Format Strings[^] for more.
|
|
|
|
|
As Dave allready has written ...
But there is another possibility :
You create your own (customized) AnalogueLabel which derives from Label and has a Property 'Value' which type is for example single (or double).
If a legal value is assigned to this Property you can assign it to the Text-Property with the rerquired formatting :
Public Class AnalogueLabel
Inherits Label
Property Value As Single
Get
Return my_Value
End Get
Set(value As Single)
my_Value = value
Me.Text = my_Value.ToString("F3")
End Set
End Property
Private my_Value As Single = 0.0
End Class
|
|
|
|
|
I have a string...
<pre><add name="ConDB" connectionString="‘Ú·ÐŽÇáäޯΟ£‘ ª~«q œª¤ªµºÒÖÛÂÞ™Ú·ÐÚãÙ¬°ŽÀÇÛÈÚ»¿â§ÖÓ¯ÇâѾ‰«¶žØëˆÉ¤âáëááЉ³ÃÝÂäí®ªu¢©ÁÛÝŒœØÑÞÅâÇÞ€¤©ÁÓ猜ØÑÞÅâÇÞ€¥ž¯"
providerName="System.Data.SqlClient" />
How to change connection string above into regular string...
|
|
|
|
|
You need to know both the encryption algorithm and the key.
Cheers,
Mick
------------------------------------------------
A programmer is a person who always checks both ways when crossing a one-way street.
|
|
|
|
|
im newbie programmer... im not understand...
please advise...
|
|
|
|
|
The data is encrypted so if you do not know how it was encrypted there is nothing you can do.
|
|
|
|
|
Can i change the string with:
<add name="ConnDB" connectionString="Data Source=localhost; Initial Catalog=DB_WB; User Id=sa; Password=123456; Integrate Security=false"
providerName="System.Data.SqlClient" />
|
|
|
|
|
Try it and see what happens.
|
|
|
|
|
If you typed that into the code, sure, it might work, IF that connection string is appropriate for your database and database engine.
Also, if that is an appropriate connection string, using the SA account is a horrible idea and a huge security risk to your database and the database server, subjecting both to being destroyed. Google for "SQL Injection Attack" for more information on why that is.
|
|
|
|
|
good morning to all
any help me to do report card generation uing vb.net
|
|
|
|
|
Yes, but first you need to ask a proper question.
|
|
|
|
|
how create subreport with crystalReports in vb6 and access db=?
in my code i have error logon failed
please help me ,thanks
my code:
Private Sub lvButtons_H6_Click()
Dim Rs As New ADODB.Recordset
If Rs.State = 1 Then Rs.Close
' If Rs.State = 1 Then Rs.Close
If StrSQL = "" Then
Rs.Open "SELECT ID,GroupName,Fname,LName FROM tblMain ORDER BY ID ASC", Conn, adOpenStatic, adLockOptimistic
Else
On Error Resume Next
Rs.Open StrSQL, Conn, adOpenStatic, adLockOptimistic
End If
StrSQLPrint = Rs.Source
Set Me.VS.DataSource = Rs
PrintMember StrSQLPrint
End Sub
Private Sub PrintMember(StrSQL As String)
'On Error GoTo E_R
Dim Rs As New ADODB.Recordset
'Dim ObjApp As New CRAXDRT.Application
'Dim ObjRpt As New CRAXDRT.report
'Dim crDBTab As CRAXDRT.DatabaseTable
If Rs.State = 1 Then Rs.Close
'MsgBox StrSQL, vbCritical
Rs.Open StrSQL, Conn
Dim CrxApp As CRAXDRT.Application
Dim CrxRep As CRAXDRT.report
Dim crxSubreport As CRAXDRT.report
Dim crxSubreportObject As SubreportObject
Dim crxDatabase As CRAXDRT.Database
Dim crxDatabaseTables As CRAXDRT.DatabaseTables
Dim crxDatabaseTable As CRAXDRT.DatabaseTable
Dim crxSections As CRAXDRT.Sections
Dim crxSection As CRAXDRT.Section
Dim CRXReportObject As Object
Set CrxApp = New CRAXDRT.Application
Set CrxRep = CrxApp.OpenReport(App.Path & "\Reports\R.rpt")
CrxRep.Database.SetDataSource Rs
Set crxSections = CrxRep.Sections
For Each crxSection In crxSections
For Each CRXReportObject In crxSection.ReportObjects
If CRXReportObject.Kind = crSubreportObject Then
Set crxSubreportObject = CRXReportObject
Set crxSubreport = crxSubreportObject.OpenSubreport
Set crxDatabase = crxSubreport.Database
Set crxDatabaseTables = crxDatabase.Tables
For Each crxDatabaseTable In crxDatabaseTables
crxDatabaseTable.Location = App.Path & "\Database.mdb"
crxDatabaseTable.SetLogOnInfo "Local", "Database.mdb", "Admin", "123456"
Next
Set crxSubreport = Nothing
End If
Next
Next
Frm_Preview.CR.ReportSource = CrxRep
Frm_Preview.CR.ViewReport
Frm_Preview.Show vbModeless, MainForm
Set crxDatabase = Nothing
Set crxDatabaseTable = Nothing
Set crxDatabaseTables = Nothing
Set crxSections = Nothing
Set crxSection = Nothing
Set crxSubreportObject = Nothing
Set crxReport = Nothing
Set crxApplication = Nothing
End sub
modified 7-Apr-17 19:09pm.
|
|
|
|
|
hoomi_ghost wrote: please complete source for download
That's not how it works.
Even if you had provided a complete and actionable specification, this is not a "write-my-code-for-me" site.
We're happy to help with specific questions about code you have written. But nobody here is going to write the code for you.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
i edited my question
thanks
|
|
|
|
|
|
You're asking for source code written in a language that's been obsolete for 16 years now.
Yeah, good luck with that.
|
|
|
|
|
Hi,
i have a question like ..suppose i have a string= "help" and I want to sort it in an alphabetically order like=ehlp . i need a code for it.
|
|
|
|
|
Sorry, but this site does not offer code writing services.
Try it yourself first. If you then got stuck, post what you have done so far and we will try to help.
Another option is searching the web. It should be no problem to find something that can be at least used as starting point.
|
|
|
|
|
thanks for your reply can you please tell me from where i can get the code
|
|
|
|
|
By using an appropriate search term entered into the input field of your favorite search engine.
If this is some kind of homework you should be aware that your teacher might read here and has done similar research to identify copy and paste solutions.
So the option of doing it yourself is probably the best (and intended!) one.
|
|
|
|
|
|
So i have a accdb name itemdb with table name Products and i want to subtract the value input in the txtbox8 to the field name RegBal
so far i have this code
Imports System.Data.OleDb
Public Class Order
Public conString As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Landon-PC\Documents\Visual Studio 2010\Projects\Final\Final\bin\Debug\itemdb.accdb;Persist Security Info=False"
Public con As New OleDbConnection
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
con.ConnectionString = conString
If con.State = ConnectionState.Closed Then
con.Open()
MsgBox("Connected")
End If
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim sqlQuery As String = "SELECT itemdb.Products, Products.RegBal, Products.RegBal- " & TextBox8.Text & "
Dim sqlCommand As New OleDbCommand
With sqlCommand
.CommandText = sqlQuery
.Connection = con
.ExecuteNonQuery()
End With
MsgBox("SAVED")
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.Close()
Main.Show()
End Sub
End Class
|
|
|
|
|