|
so if i use something like createdelegatelist(1) then il be calling testmethod1?
or i use d.item(index)?
FUNGAS!
|
|
|
|
|
wuzzywezzer wrote: so if i use something like createdelegatelist(1) then il be calling testmethod1?
Notice that CreateDelegateList doesn't take a parameter?? So why would you pass one into it? CreateDelegateList just builds the list and returns it. It doesn't execute anything.
wuzzywezzer wrote: or i use d.item(index)?
You'd create a List(Of) to hold the list returned by CreateDelegateList , then use an index to Invoke the method the delegate points to:
Dim dl As List(Of TestDelegate) = CreateDelegateList()
dl(0).Invoke("This is a test string being passed to the TestMethod.")
|
|
|
|
|
ok i get it now thanks for your help and time
FUNGAS!
|
|
|
|
|
pls tll me what is the diff between these two declarations
dim i ,j as integer
//and
dim i as integer
dim j as integer
thanks
-- modified at 3:43 Wednesday 12th September, 2007
|
|
|
|
|
please verify your post once again and modify it.
|
|
|
|
|
nitin3 wrote: pls tll me what is the diff between these two declarations
dim i ,j as integer
//and
dim i,j as integerer
The second lacks a space between the i and comma. The second also contains a spelling mistake.
|
|
|
|
|
nitin3 wrote: dim i ,j as integer
//and
dim i as integer
dim j as integer
I don't see any differences!
In vb6 the first statement resulted in declaration of i As Variant and j as integer.
But in VB.NET both declarations are the same!
|
|
|
|
|
yah what u said is correct.
|
|
|
|
|
MohammadAmiry wrote: ..i As Variant and...
dim i ,j as integer ' i thought this declares both i & j as integer.
thanks again
|
|
|
|
|
both are one and the same thing what u suitable u can do it
if u write single line then this is smart work
|
|
|
|
|
in vb 6
-------
Dim a(10), k, j As Integer 'this will not work
'but thi will
Dim a(10) as integer
dim k, j As Integer
'input values 1-10
'-------------------
For j = 1 To 10
a(j) = InputBox("Enter a number")
Next
k = a(1)
For j = 1 To 9
If k < a(j + 1) Then
k = a(j + 1)
End If
Next
MsgBox k
thats why ask about it !!!
thanks for response
|
|
|
|
|
Hello.
When i open the "Project Properties" to change the startup object i get an error message "Value does not fall within the expected range"
I am not able to change the startup object.
Please help me out if anyone has any idea.
Please
Please
|
|
|
|
|
Hi,
People must be aware of the pivot table available in Excel.
I would like to create a pivot table in Vb.Net and allow the user to drag and drop the fields required for the report. (or atleast select the fields from a list), allow drill down, sorting, totalling, sub totalling etc
Is there any ActiveX or OCX control available to do this?
Any help would be of great appreciation.
|
|
|
|
|
Yes there is. One is infragistics>>NetAdvantage>>UltraGrid Control.
It does all you want plus lots of other benefits. Try the trial
|
|
|
|
|
Hi all,
This is the whole of my code, courtesy of Shawn Hall, my issue is olRFC822 is having an error ambiguous name detected. Whats wrong with my code? are there any other reference should I check?
Thanks,
Jj
'// ========================================================
Option Explicit
'[Constants]
Const kExportPath = "C:\My Email\" ' path must exist!
'// ========================================================
'[Support]
Sub ExportMessages()
' variables
Dim OL As Outlook.Application ' Outlook instance
Dim exp As Explorer
Dim ols As Selection
Dim mu As Redemption.MAPIUtils
Dim mi 'As MailItem
Dim lIter&
' toggle commenting on the following two lines to use
' from VB vs Outlook:
'Set OL = CreateObject("Outlook.Application") '// VB
Set OL = ThisOutlookSession '// Outlook
' ignore errors
'On Error Resume Next
' get handle to selection
If Outlook.ActiveExplorer Is Nothing Then Exit Sub
Set exp = Outlook.ActiveExplorer
Set ols = exp.Selection
Set mu = New Redemption.MAPIUtils
For lIter = 1 To ols.Count
Set mi = ols.Item(lIter)
' do it
SaveCDOMessage mi.EntryID
' clean up
Set mi = Nothing
Next lIter
' clean up
Set mi = Nothing
mu.Cleanup
Set mu = Nothing
Set ols = Nothing
Set exp = Nothing
Set OL = Nothing
End Sub
'// ========================================================
Sub SaveCDOMessage(sEntryID)
Dim mu As Redemption.MAPIUtils
Dim objMsg As Redemption.MessageItem
Dim sFilename$, sHeader$, sContents$, aContents
Dim fso As New FileSystemObject
Dim ts As TextStream
sFilename = kExportPath & sEntryID & ".mai"
On Error Resume Next
' export the message
Set mu = CreateObject("Redemption.MAPIUtils")
mu.MAPIOBJECT = Session.MAPIOBJECT
Set objMsg = mu.GetItemFromID(sEntryID)
objMsg.SaveAs sFilename, olRFC822
'objMsg.SaveAs sFilename, olRTF
'objMsg.SaveAs sFilename, olHTML
'objMsg.SaveAs sFilename, olMSG
'objMsg.SaveAs sFilename, olDoc
'objMsg.SaveAs sFilename, olTXT
'objMsg.SaveAs sFilename, olMSGUnicode
' update headers in exported file
sHeader = objMsg.Fields(8192030)
Set ts = fso.OpenTextFile(sFilename, ForReading, True)
sContents = ts.ReadAll
ts.Close
aContents = Split(sContents, vbCrLf & vbCrLf, 2, 1)
aContents(0) = sHeader
Set ts = fso.OpenTextFile(sFilename, ForWriting, True)
ts.Write Join(aContents, vbCrLf & vbCrLf)
ts.Close
Set ts = Nothing
' clean up
Set objMsg = Nothing
mu.Cleanup
Set mu = Nothing
Set fso = Nothing
End Sub
'// ========================================================
-- modified at 22:28 Tuesday 11th September, 2007
|
|
|
|
|
This is way too much code to post. Ambiguous usually means that the name is defined more than once in the same scope in your code.
|
|
|
|
|
how to cut an image in picturebox in VB.Net
like we do in paint setect a part of image and cut it
and keep it in memory........
wana to be a best coder
|
|
|
|
|
Use DrawImage method of Graphics object.
You may try following code –
-----------Start Code----------------
'Create a bitmap object where our picture will be stored
Dim a As Bitmap = New Bitmap(400, 300)
'Create a Graphics object g
Dim g As Graphics = Graphics.FromImage(a)
'Rectangle which has to be cut from the picture
Dim rect As Rectangle = New Rectangle(0, 0, a.Width, a.Height)
'Cut the portion of the image which we have in picturebox1
g.DrawImage(Me.PictureBox1.Image, 0, 0, rect, GraphicsUnit.Pixel)
'Put bitmap image in clipboard,
My.Computer.Clipboard.SetImage(a)
'this image may be accessed using My.Computer.Clipboard.GetImage
---------------End Code------------
I hope this helps .
- Dave.
Dave Traister,
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
In VB.Net how we will convert Image into Text
for example
we have an Image (JPEG) file in which some text is written like (ABCD)
then it should return a String "ABCD".
wana to be a best coder
|
|
|
|
|
You need to write or buy an OCR program. The fact that you're asking, makes it unlikely that you'd be able to write one.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Ok, so, I have a VB2005 Program linked to a database. I also have a datagrid on the form that displays a certain table in the database. Now, randomly the datagrid will rearrange the sort order for no apparent reason. I use PKeys that run off AutoNumbers, so you'd think it would not be that hard and 99.9 % of the time the code will load the correct order, 1,2,3,4,5,6,7,etc... But once in a while it will load up not just backwards or something but just all out of order, 2,5,4,1,6,3,7, etc...
The fill code looks like this :
"Me.TblFruitTableAdapter.Fill(Me.DbScreenDataSet.tblFruit, DatePro)"
Its pretty much computer generated except for i added in a variable for the Date of Production so that when the program loads it only grabs the records for that day, but the records get put in, in order so that day 1 hour 1 is record 1 of the day.
Can anyone explain why 99.9 % of the time it loads the records correctly but once in awhile it will load them distorted?
|
|
|
|
|
Does your SQL have an order by statement ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I'm sorry I forgot to mention that i am using MS Access for my database purposes.
|
|
|
|
|
OK, so build your SQL on each keypress, and filter your data direct from the DB.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
An SQL query is not guaranteed to return records in a specific order unless told to with an ORDER BY clause in the SELECT statement.
|
|
|
|