|
put the three words in an list or array and then use the sort methode
Dim l As New List(Of String)<br />
l.Add("atest")<br />
l.Add("ctest")<br />
l.Add("btest")<br />
For Each s As String In l 'just for display perposes<br />
ListBox2.Items.Add(s)'just for display perposes<br />
Next'just for display perposes<br />
l.Sort()<br />
For Each s As String In l'just for display perposes<br />
ListBox3.Items.Add(s)'just for display perposes<br />
Next'just for display perposes<br />
<br />
Dim arr As New ArrayList<br />
arr.Sort()<br />
Dim arrr As Array<br />
arr.Sort()
|
|
|
|
|
hi
is there any way to create a crystal report dynamically with design layout?? or
can i repeat the detail section dynamcially???
Thanx
Jayesh Talsaniya
|
|
|
|
|
If you are looking to dynamically show different detail sections depending on the data returned, the way to do that is to create multiple detail sections, and set the "Suppress" criteria for each section so that under the appropriate condition one detail section is shown and the others are hidden, eg:
Detail 1 Suppress Criteria
TypeID <> 1
Detail 2 Suppress Criteria
TypeID <> 2
Detail 3 Suppress Criteria
TypeID <> 3
Will hide Detail 1 when it's TypeID is not 1, etc.
Will this help in your situation?
D.
-------------------------------------------
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Just bugger off and leave me alone!!
|
|
|
|
|
Hi,
I have been trying to make a control derived from System.Windows.Forms.Panel which would allow the use of the opacity property as in the form. I am new to VB.Net, so could anyone please help me as to how this would be possible?
Thanks,
Ahmad
|
|
|
|
|
The panel accepts semi transparent colors, why not have an opacity field and set it to take decimal format from 0.01 to 1 then do this :
me.backcolor = color.fromargb(math.floor(255(opacitypropertyvalue)),me.backcolor.red,me.backcolor.green,me.backcolor.blue)
|
|
|
|
|
This is giving multiple errors. Firstly, the fromargb method takes only one parameter, and secondly it is interpreting 255 as an array name. Is there any way around it?
Thanks
|
|
|
|
|
post your code so we can see it...also this method will only affect the panel's background opacity, not the controls the panel may contain.
|
|
|
|
|
This won't work. It will only work for the entire form. You cannot make individual controls opaque.
|
|
|
|
|
Thanks alot for the help guys!
|
|
|
|
|
I want to user pdf file format like other word,excel in my vb.net project.
please tell me how can I do this or send me url's for useful site.
Ashish K. Vyas
|
|
|
|
|
Ashish Kumar Vyas wrote: I want to user pdf file format like other word,excel in my vb.net project.
You want to 'user' them?
You want to 'user' them 'like other word,excel in my vb.net project'?
You might want to start by explaining what you want rather than throwing words at the textbox :P
I assume you mean you want to 'use' pdf files in your application. But you don't say how you want to use them. Read? Write? Send to your bosses email address in an infinate loop?
|
|
|
|
|
exactly I want to generate report in pdf format like excel and other file formats.
let me know for read and write pdf aslo....
Thank you....
Ashish K. Vyas
|
|
|
|
|
Hi,
I want to PDF for creating the files that will go as attachments to various users in mine project . To my knowledge VB.Net dosent have in built support for creating PDF files. There are some libraries which can be used to create PDF files but those are licensed version.
If you know some open source PDF libraries or other helpful information, please mail those details. Please explain other formats which can be used to create the files for mine project.
|
|
|
|
|
|
Hi,
Do you know any open source PDF libraries.
how to write in pdf using vb.net
|
|
|
|
|
the first link I provided is an open source way to create pdf's
for editing an existing one I havn't found any so far. I'v been looking for quite a while now since I could use it aswell but so far all the coude I'v found use the adobe library's and to be able to use them you need the full version
If I find a way I'll let you know but I'm afraid that for the moment I have to assume that it is not possible to do it without bying the full version of adobe (at least not legally possible)
|
|
|
|
|
Hi All,
I have one cheque printing module in my vb.net application. In that i am saving the x,y positions of different labels and setting label positions while previewing. Then I am printing the form as such. Since there is no form.print in vb.net, i am using the following code:
Private Print_Image As Image
'This is used to take the picture
Declare Auto Function BitBlt Lib "GDI32.DLL" ( _
ByVal hdcDest As IntPtr, _
ByVal nXDest As Integer, _
ByVal nYDest As Integer, _
ByVal nWidth As Integer, _
ByVal nHeight As Integer, _
ByVal hdcSrc As IntPtr, _
ByVal nXSrc As Integer, _
ByVal nYSrc As Integer, _
ByVal dwRop As Int32) As Boolean
Private Sub mnuPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuPrint.Click
'We make the form look pretty before its picture
Application.DoEvents()
Me.Refresh()
Application.DoEvents()
'Get a Graphics Object from the form
Dim FormG As Graphics = Me.CreateGraphics
FormG.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
'Create a bitmap from that graphics
Dim i As New Bitmap(Me.Width - 6, Me.Height, FormG)
'Create a Graphics object in memory from that bitmap
Dim memG As Graphics = Graphics.FromImage(i)
'get the IntPtr's of the graphics
Dim HDC1 As IntPtr = FormG.GetHdc
Dim HDC2 As IntPtr = memG.GetHdc
'get the picture
BitBlt(HDC2, 0, 0, Me.ClientRectangle.Width, Me.ClientRectangle.Height, HDC1, 0, 0, 13369376)
''Clone the bitmap so we can dispose this one
Me.Print_Image = i.Clone()
'Clean Up
FormG.ReleaseHdc(HDC1)
memG.ReleaseHdc(HDC2)
FormG.Dispose()
memG.Dispose()
i.Dispose()
'Show the PrintDialog
PrintDialog1 = New PrintDialog
PrintDialog1.Document = PrintDocument1
Dim r As DialogResult = PrintDialog1.ShowDialog
If r = DialogResult.OK Then
'Print the document
PrintDocument1.Print()
End If
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
e.Graphics.DrawImage(Me.Print_Image, 0, 0)
End Sub
All these are working fine.But now the problem is, all writings in the cheque are scattered and there is no clarity & smoothness. Anybody have any ideas to increase the clarity & smoothness? Or Is there any other ways to achive this?
Regards,
Hareesh
|
|
|
|
|
|
Thank u Jones 4 ur reply. But i am using VS2003 and Microsoft .Net Framework 1.0
|
|
|
|
|
i have one datatable contains price column
i need to calculate the sum of the prices
and then delete all the rows from the table
my code is :
dim total as decimal
total=dataset.tables("sourcetable").columns("price").experssion="sum(price)"
but when the code executed it generate exception
can not use experssion in an circual function
second:
i need to know how to delete all rows from datatable at run time
regards
|
|
|
|
|
Hi,
One possible way is to simply loop through the rows of your dataset and add the values from the column you need:
<br />
Dim rw as DataRow<br />
Dim Total as Decimal<br />
'First "save" any changes the user made before this bit of code is triggered<br />
Dataset.AcceptChanges()<br />
'Then loop through all rows in the dataset<br />
For Each rw In Dataset.tables("sourcetable").Rows<br />
'best to add some validation here:<br />
If IsError(Decimal.Parse(rw.Item("price"))) Then<br />
'someone wrote his name in the price field instead of a decimal<br />
'kick his ass<br />
Else<br />
'increase the value of variable Total<br />
Total += rw.Item("price")<br />
End If<br />
Next<br />
'and then for example:<br />
TxtTotal.Text = Total.ToString<br />
Hope this helps you,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
johan i'm really greatful for you
you helped me before and i really thank you for all
i'll try your code
and post you again
Regards
|
|
|
|
|
hi guy s
i am working in frame work 1.1 in which for generic lists i am inheriting
some of my classed from collection base class and all of that i am doing in c#,
i have a function here
public class EmployeeCollection:System.Collections.CollectionBase
public Employee this[int index]
{
get
{
return (Employee) List[index];
}
set
{
List[index] = value;
}
}
i simply need the above functionality code in vb.net,,
i couyld not get that sysnatx if i want the same function in vb.net
thanks in advance
best regards
hello
|
|
|
|
|
the following link will convert c# to vb.net (I use it alot and it works fine(somethimes some adjustments are needed dough)):
http://www.developerfusion.co.uk/utilities/convertcsharptovb.aspx[^]
for you'r code this is the output:
Public Class EmployeeCollection<br />
Inherits System.Collections.CollectionBase<br />
Public Default Property Item(ByVal index As Integer) As Employee<br />
Get<br />
Return DirectCast(List(index), Employee)<br />
End Get<br />
Set<br />
List(index) = value<br />
End Set<br />
End Property<br />
End Class
-- modified at 7:26 Tuesday 17th July, 2007
just noticed the code above will not compile
this will and I think it will work too (hope so )
Inherits System.Collections.CollectionBase<br />
<br />
Public Property employee(ByVal index As Integer)<br />
Get<br />
Return MyBase.List(index)<br />
End Get<br />
Set(ByVal value)<br />
MyBase.List(index) = value<br />
End Set<br />
End Property
|
|
|
|
|
i build a notepad in vb.net but i donot know the copy code source and copy class and cut code source please guide me.
thanks a lot;)
|
|
|
|