|
Hi,
Dim Table1 As DataTable
Table1 = New DataTable("Customers")
What would be the other way to write this statement??
Please Suggest
Thank You
Nitin
Nitin Jenwal
|
|
|
|
|
Dim table1 As New DataTable("customer")
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
i have a datagridview with a button column ,
i want to get the information in same row with abutton i clicked
help me plz
|
|
|
|
|
hi..,
see this code .., this may help u
Private Sub DataGridView1_CellMouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles dgOnlineTrains.CellMouseClick
Select Case e.ColumnIndex
Case 0
MsgBox("1 Clicked")
Case 1
MsgBox("2 clicked")
Case 2
MsgBox("3 clicked")
End Select
End Sub
Thanks & Regards
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Hi,
i have developed one activeX component which will be used in web page.
I want control of that web page so that i can give some values to java script which is in that web page.
my question is : how can i access java script from activeX component which is developed in VB6.
thanks
ravi
|
|
|
|
|
am developing an application using vb.net, i created a user control which used in the another application.
am passing parameters to the user control using public properties from files.
i specified a folder , when a new file is created in the folder. in the timer control code am adding the new user control dynamically if the usercontrol is not exists, if it's already exists am updation the values.
problem is when am updation the one usercontrol. the total usercontrols values are changing (as like reference), but am creating new instants every time.
Here is the code :
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Timer1.Enabled = False
Try
Dim Files As String() = Directory.GetFiles(Application.StartupPath & "\data")
Dim Filename As String
For Each Filename In Files
Dim line As String
Using sr As StreamReader = New StreamReader(Filename)
line = sr.ReadToEnd
End Using
Dim cntrllop As Integer, cntlflg As Boolean = False
For cntrllop = 1 To mycontrolcoll.Count
If (UCase(mycontrolcoll.Item(cntrllop).Name) = UCase(Split(Filename, "\")(Split(Filename, "\").Length - 1))) Then
parse_data(mycontrolcoll.Item(cntrllop), line, Filename)
cntlflg = True
End If
Next
If cntlflg = False Then
SyncLock mycontrolcoll
mycontrolcoll.Add(New UserControl1, UCase(Split(Filename, "\")(Split(Filename, "\").Length - 1)), Nothing, Nothing)
mycontrolcoll.Item(mycontrolcoll.Count).name = UCase(Split(Filename, "\")(Split(Filename, "\").Length - 1))
FlowLayoutPanel1.Controls.Add(mycontrolcoll.Item(mycontrolcoll.Count))
parse_data(mycontrolcoll.Item(mycontrolcoll.Count), line, Filename)
End SyncLock
End If
'My.Computer.FileSystem.DeleteFile(Filename)
Next
Catch ex As Exception
MsgBox(ex.Message)
End Try
Timer1.Enabled = True
End Sub
Private Sub parse_data(ByRef MYcontrol As CAMR_Control.UserControl1, ByVal data As String, ByVal filename As String)
MYcontrol.Name = Mid(Split(data, ",")(0), 2)
MYcontrol.Pow_ctrlstart = True
MYcontrol.Pow_v1 = Split(data, ",")(1)
MYcontrol.Pow_v2 = Split(data, ",")(2)
MYcontrol.Pow_v3 = Split(data, ",")(3)
MYcontrol.Pow_i1 = Split(data, ",")(4)
MYcontrol.Pow_i2 = Split(data, ",")(5)
MYcontrol.Pow_i3 = Split(data, ",")(6)
MYcontrol.Pow_p1 = Split(data, ",")(7)
MYcontrol.Pow_p2 = Split(data, ",")(8)
MYcontrol.Pow_p3 = Split(data, ",")(9)
Dim fileData As FileInfo = My.Computer.FileSystem.GetFileInfo(filename)
MYcontrol.Pow_lastread = Format(fileData.LastWriteTime, "dd-MMM-yyyy HH:mm:ss")
'MYcontrol.Pow_nodenumber = Mid(Split(data, ",")(0), 2) & " ,"
MYcontrol.Pow_nodenumber = MYcontrol.Name & " ,"
MYcontrol.Refresh()
FlowLayoutPanel1.Refresh()
End Sub
Please help me ..,
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
|
hi
i am useing crystal 7 file in vb.net
thru crystal report cantrol i geting hresult exection on logonserver
dim axcr as crystalreportcntrol
With axcr
.ReportFileName = "D:\D.NET\Marfatiya\report\billoutstanding.rpt"
i = .LogOnServer("p2ssql.dll", server01, REP00, userxx, passxx)
.set_ParameterFields(0, "P1 ;" + conmxx + ";TRUE")
.Action = 0
.Destination = Crystal.DestinationConstants.crptToWindow
End With
|
|
|
|
|
Standard Question #1: What's the error message, exactly??
|
|
|
|
|
Hi,
Thank's
i don't know actule error but i getting this error Exception from HRESULT: 0x800A5038
i am getting
|
|
|
|
|
From what little information I can find on the result, it looks like either the .DLL isn't where it should be or the server name can't be resolved. I also found a possible reference to the username/password being bad.
|
|
|
|
|
Hi,
In my project, Code is written for an event in the application level to display a dialog box after a fixed interval of time. I don't have that code I have only the reference for that code.
So when that event is getting fired i want to handle that event not to display that dialog box. How can i do that.
Thanks & Regards
Mishra
|
|
|
|
|
You can run these code with a separate Thread.
|
|
|
|
|
If the event isn't exposed to you but is only handled internally in the code, you can't handle the event. You'll never see it.
Otherwise, you'll need the signature of the event handler that the code is expecting you to implement. After that, it's a simple matter of writing the event handler and wiring it to the event using the AddHandler statement.
|
|
|
|
|
I'm trying to implement IShellExtInit:Initialize using VB 2005 and have been able to successfully handle the IDataObject, but I'm at a loss as to how to handle the LPCITEMIDLIST. What I really need is a simple function (or a walkthrough) to convert a LPCITEMIDLIST to a path.
While there are some great resources out there if you know C++ (I know very little), I have yet to find this answer for VB programmers. Any help is appreciated!
Thanks,
-Tom
modified on Tuesday, September 9, 2008 4:26 PM
|
|
|
|
|
Tom,
You may have seen this page, Visual Basic Shell Programming[^], but about midway down it says:
Consider the first parameter of the Initialize method, which is an LPCITEMIDLIST. The documentation for the interface states that this is an address of an ITEMIDLIST.
Did you try casting it as an IntPtr ? A further down, there is ByVal pidlFolder As VBShellLib.LPCITEMIDLIST , which sounds like what you want. I believe this[^]is the source for that library. I'd figure a compiled version is out there somewhere, too.
Maybe not helpful, but maybe it will be.
|
|
|
|
|
Yes, I've got all this information and, in fact, own the book! However, beyond getting the pointer, I can find nothing that helps me understand what to do with the ITEMIDLIST - that's the heart of this question.
The JZ wrote: You may have seen this page, Visual Basic Shell Programming[^], but about midway down it says:
Consider the first parameter of the Initialize method, which is an LPCITEMIDLIST. The documentation for the interface states that this is an address of an ITEMIDLIST.
Did you try casting it as an IntPtr? A further down, there is ByVal pidlFolder As VBShellLib.LPCITEMIDLIST, which sounds like what you want. I believe this[^]is the source for that library. I'd figure a compiled version is out there somewhere, too.
Thanks,
-Tom
|
|
|
|
|
Ah, right in front of me the whole time! The answer for all interested is the SHGetPathFromIDList API function.
Thanks,
-Tom
|
|
|
|
|
Hello All,
How do I convert the following C# code to VB.net:
( e.State & DrawItemState.Focus ) == 0,
box.CheckState ? CheckBoxState.CheckedNormal :
CheckBoxState.UncheckedNormal )
Thank You.
|
|
|
|
|
|
Mika,
I understand that it would translate to :
IF e.state & drawitemstate.focus = 0 then
checkboxstate = checkednormal
else
checkboxstate = uncheckednormal
but I need to pass in the checked state as a parameter and it is expecting a statement where I cannot have an IF statement.
Thanks
|
|
|
|
|
I don't quite follow. I would have believed that e was referring to event arguments passed to an event handler and that State would have been a property for the argument instance.
Or is the problem that in C# & is AND operator and if I remember correctly, in VB & means concatenation?
|
|
|
|
|
Mika,
The whole statement in C# is like this:
CheckBoxRenderer.DrawCheckBox(
e.Graphics,
new Point( e.Bounds.X, e.Bounds.Y ),
e.Bounds,
box.Text,
this.Font,
( e.State & DrawItemState.Focus ) == 0,
box.CheckState ? CheckBoxState.CheckedNormal :
CheckBoxState.UncheckedNormal )
Thanks
|
|
|
|
|
|
ByVal e As DrawItemEventArgs
|
|
|
|
|