|
hi there ,
I am trying to wrap all the rpoject file to setup file . how to do that in vb.net (2003)
thanks in advance.
bharath.s
|
|
|
|
|
http://msdn2.microsoft.com/en-us/library/2kt85ked(vs.80).aspx
Adair
|
|
|
|
|
Is there anything i have to Consider it befor,output msg from thread to label windows control ?
because i made code but it give me this exception->(Cross-thread operation not valid: Control 'Label1' accessed from a thread other than the thread it was created on.)
i want to know why exactly this?,also what solution for it?
|
|
|
|
|
|
is there any simple example doing this?
|
|
|
|
|
' This is an example from msdn of microsoft
Imports System
Imports System.ComponentModel
Imports System.Threading
Imports System.Windows.Forms
Public Class Form1
Inherits Form
' This delegate enables asynchronous calls for setting
' the text property on a TextBox control.
Delegate Sub SetTextCallback([text] As String)
' This thread is used to demonstrate both thread-safe and
' unsafe ways to call a Windows Forms control.
Private demoThread As Thread = Nothing
' This BackgroundWorker is used to demonstrate the
' preferred way of performing asynchronous operations.
Private WithEvents backgroundWorker1 As BackgroundWorker
Private textBox1 As TextBox
Private WithEvents setTextUnsafeBtn As Button
Private WithEvents setTextSafeBtn As Button
Private WithEvents setTextBackgroundWorkerBtn As Button
Private components As System.ComponentModel.IContainer = Nothing
Public Sub New()
InitializeComponent()
End Sub
Protected Overrides Sub Dispose(disposing As Boolean)
If disposing AndAlso Not (components Is Nothing) Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub
' This event handler creates a thread that calls a
' Windows Forms control in an unsafe way.
Private Sub setTextUnsafeBtn_Click( _
ByVal sender As Object, _
ByVal e As EventArgs) Handles setTextUnsafeBtn.Click
Me.demoThread = New Thread( _
New ThreadStart(AddressOf Me.ThreadProcUnsafe))
Me.demoThread.Start()
End Sub
' This method is executed on the worker thread and makes
' an unsafe call on the TextBox control.
Private Sub ThreadProcUnsafe()
Me.textBox1.Text = "This text was set unsafely."
End Sub
' This event handler creates a thread that calls a
' Windows Forms control in a thread-safe way.
Private Sub setTextSafeBtn_Click( _
ByVal sender As Object, _
ByVal e As EventArgs) Handles setTextSafeBtn.Click
Me.demoThread = New Thread( _
New ThreadStart(AddressOf Me.ThreadProcSafe))
Me.demoThread.Start()
End Sub
' This method is executed on the worker thread and makes
' a thread-safe call on the TextBox control.
Private Sub ThreadProcSafe()
Me.SetText("This text was set safely.")
End Sub
' This method demonstrates a pattern for making thread-safe
' calls on a Windows Forms control.
'
' If the calling thread is different from the thread that
' created the TextBox control, this method creates a
' SetTextCallback and calls itself asynchronously using the
' Invoke method.
'
' If the calling thread is the same as the thread that created
' the TextBox control, the Text property is set directly.
Private Sub SetText(ByVal [text] As String)
' InvokeRequired required compares the thread ID of the
' calling thread to the thread ID of the creating thread.
' If these threads are different, it returns true.
If Me.textBox1.InvokeRequired Then
Dim d As New SetTextCallback(AddressOf SetText)
Me.Invoke(d, New Object() {[text]})
Else
Me.textBox1.Text = [text]
End If
End Sub
' This event handler starts the form's
' BackgroundWorker by calling RunWorkerAsync.
'
' The Text property of the TextBox control is set
' when the BackgroundWorker raises the RunWorkerCompleted
' event.
Private Sub setTextBackgroundWorkerBtn_Click( _
ByVal sender As Object, _
ByVal e As EventArgs) Handles setTextBackgroundWorkerBtn.Click
Me.backgroundWorker1.RunWorkerAsync()
End Sub
' This event handler sets the Text property of the TextBox
' control. It is called on the thread that created the
' TextBox control, so the call is thread-safe.
'
' BackgroundWorker is the preferred way to perform asynchronous
' operations.
Private Sub backgroundWorker1_RunWorkerCompleted( _
ByVal sender As Object, _
ByVal e As RunWorkerCompletedEventArgs) _
Handles backgroundWorker1.RunWorkerCompleted
Me.textBox1.Text = _
"This text was set safely by BackgroundWorker."
End Sub
#Region "Windows Form Designer generated code"
Private Sub InitializeComponent()
Me.textBox1 = New System.Windows.Forms.TextBox()
Me.setTextUnsafeBtn = New System.Windows.Forms.Button()
Me.setTextSafeBtn = New System.Windows.Forms.Button()
Me.setTextBackgroundWorkerBtn = New System.Windows.Forms.Button()
Me.backgroundWorker1 = New System.ComponentModel.BackgroundWorker()
Me.SuspendLayout()
'
' textBox1
'
Me.textBox1.Location = New System.Drawing.Point(12, 12)
Me.textBox1.Name = "textBox1"
Me.textBox1.Size = New System.Drawing.Size(240, 20)
Me.textBox1.TabIndex = 0
'
' setTextUnsafeBtn
'
Me.setTextUnsafeBtn.Location = New System.Drawing.Point(15, 55)
Me.setTextUnsafeBtn.Name = "setTextUnsafeBtn"
Me.setTextUnsafeBtn.TabIndex = 1
Me.setTextUnsafeBtn.Text = "Unsafe Call"
'
' setTextSafeBtn
'
Me.setTextSafeBtn.Location = New System.Drawing.Point(96, 55)
Me.setTextSafeBtn.Name = "setTextSafeBtn"
Me.setTextSafeBtn.TabIndex = 2
Me.setTextSafeBtn.Text = "Safe Call"
'
' setTextBackgroundWorkerBtn
'
Me.setTextBackgroundWorkerBtn.Location = New System.Drawing.Point(177, 55)
Me.setTextBackgroundWorkerBtn.Name = "setTextBackgroundWorkerBtn"
Me.setTextBackgroundWorkerBtn.TabIndex = 3
Me.setTextBackgroundWorkerBtn.Text = "Safe BW Call"
'
' backgroundWorker1
'
'
' Form1
'
Me.ClientSize = New System.Drawing.Size(268, 96)
Me.Controls.Add(setTextBackgroundWorkerBtn)
Me.Controls.Add(setTextSafeBtn)
Me.Controls.Add(setTextUnsafeBtn)
Me.Controls.Add(textBox1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub 'InitializeComponent
#End Region
<stathread()> _
Shared Sub Main()
Application.EnableVisualStyles()
Application.Run(New Form1())
End Sub
End Class
Adair
|
|
|
|
|
is this simple example ? if yes , what about complex one hehehe
i searched befor , i found MSDN example but it is so long, what i want is real simple example because i dont have time for my project.
|
|
|
|
|
hi there ,
how to add the controls while the loading of the form . the number of each and every control will be dynamic.
thanks in advance.
bharath.s
|
|
|
|
|
write code when you want to add
Adair
|
|
|
|
|
Dim Lbl(1 As Label
Lbl1 = New Label()
With Lbl1
.SendToBack()
.AutoSize = True
.Location = New System.Drawing.Point(iX, iY)
.Text = finsSubjReg.dsStudCls.Tables(0).Rows(iCtr).Item("cls_type_code")
End With
Me.Controls.Add(Lbl1)
raj
|
|
|
|
|
im using acces 2000 as my database and i need to search
some words. but to search i have to use exact case as i input it.
anyone know sql statement to query with case insensitive ?
|
|
|
|
|
Your subject says "case insensitive" but your post asks about "case sesitive" - which do you want?
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
i want to search with case insensitive but right now i only know how to search case sensitive.
|
|
|
|
|
as has been suggested below, if you change the input to lowercase, and the database value to lowercase - you have a case insenitive search.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
Alternately, force all text to upper or lower case, then case is no longer an issue.
|
|
|
|
|
I am going to read AD in VB.NET using directoryService.
I find there is lack of acticle to talk about these field,
All of them are in c#,
Does anyone can provide me some information in VB.NET?
Thank you!
|
|
|
|
|
It is quite simple to convert C# code to VB.NET code. And the theory is the same, so what is the probblem?
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I am making a chat application in VB.NET. I want to implement the smiley communication. Can anybody suggest the approach? If with code, then it is the best.
Regards,
Sandip Kansara
Software Engineer
India.
|
|
|
|
|
Make a list of charachters or group of charachters that represent smileys. And then when you recive them on the client you simply convert that to a image.
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
i have put my code below.
the problem im facing is that i want to store my query results in variables. however the method i used below deosnt seem to work. how can i get my query results returned stored in variables so i can use them as appropriate.
While (_startMonitoring = True)
Dim conn As System.Data.OracleClient.OracleConnection = connection()
Dim cmdORA As New System.Data.OracleClient.OracleCommand
_ds = New DataSet
cmdORA.Connection = conn
conn.Open()
cmdORA.CommandType = CommandType.Text
cmdORA.CommandText = "SELECT * FROM (SELECT datetime,threadid,log_level,logger,message,remoteuser,remoteip," _
& "sessionid,machine,os,url,host FROM log where ROWNUM <= :RN ORDER BY datetime DESC)"
Dim oraParam As New OracleClient.OracleParameter("RN", System.Data.OracleClient.OracleType.Int32)
oraParam.Value = CType(Me.txtNumber.Text, Integer)
cmdORA.Parameters.Add(oraParam)
'Dim oraParamDatetime As New OracleClient.OracleParameter("DTIME", System.Data.OracleClient.OracleType.DateTime)
'oraParamDatetime.Value = _lastDatetime
'cmdORA.Parameters.Add(oraParamDatetime)
Dim ThreadId As New OracleClient.OracleParameter("threadid", System.Data.OracleClient.OracleType.VarChar)
ThreadId.Value = CType(_ThreadId, String)
cmdORA.Parameters.Add(ThreadId)
Dim loglevel As New OracleClient.OracleParameter("log_level", System.Data.OracleClient.OracleType.VarChar)
loglevel.Value = _loglevel
cmdORA.Parameters.Add(loglevel)
System.Windows.Forms.MessageBox.Show(loglevel.Value)
Dim da As Data.OracleClient.OracleDataAdapter = New Data.OracleClient.OracleDataAdapter(cmdORA)
da.Fill(_ds, "Log")
If _ds.Tables(0).Rows.Count > 0 Then
Me.Invoke(New RefreshGridHandler(AddressOf RefreshGridMethod), New Object() {"test1"})
_lastDatetime = _ds.Tables(0).Rows(0).Item(0)
End If
MessageBox.Show(ThreadId.Value)
MessageBox.Show(oraParam.Value)
MessageBox.Show(loglevel.Value)
conn.Close()
System.Threading.Thread.Sleep(5000)
End While
|
|
|
|
|
U can use oledbdatareader object
code would be
dim dr as new OleDbDataReader
conn.open
dr.read()
dr=cmdORA.ExecuteReader
<var_name>=dr(0)<this will="" give="" u="" result="" of="" the="" 1="" st="" cell="">
<var_name>=dr(1)<this will="" give="" u="" result="" of="" the="" 2="" nd="" cell="">
conn.close
|
|
|
|
|
I would like to copy data from my datagrid and paste into excel.
A select all function button or drag over selection to highlight would be fine.
I can select info but right click will not product a context menue..
Help Please
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
how do i incorporate a barcode printing module in a vb6 or vb.net program
tunde aransiola
|
|
|
|
|
How can I convert the image or my picture in ole object data type in access database using the vb6 codes? can you give me a sample code? thank you.....
regards
|
|
|
|
|
when i try to upload the file it gives me
error.
"Access Denied."
what should be the solution.
|
|
|
|