i import a crystal report dll "CRAXDDRT.dll" . and i want to connect report database to sqlserver using code vb.net . in that dll has a method is logonserver(pDllname,pServer,pDatabase,pUserID,pPassword). and i want to know what is "pDllname" ?
You will find here on CodeProject a bunch of articles that will introduce you into creating your own controls. The reason I say this is because I have absolutely no idea what the hell your question was about, and all I saw was the word 'button', which made me think you want a new type of button.
I am not very good in English, then I apologize for not being clear.
I just want a link or download site to get icons to put on and my Application, example icon to add the button to add, to look better on screen.
A google search for public domain icons will give you the results. These icons are in the public domain, so anybody can use them. They might put restrictions on them though - you may not be able to use them in commercial applications; however these restrictions are fairly few and far between
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
Weird question. why would it use memory ? ALL your code is in memory for the lifetime of the application. Any code that uses memory, static or not, will use memory when it runs. If it doesn't clean itself up properly, you have to close your eyes and pretend the GC will take care of it for you, but it probably won't.
memory usage is never a reason to not write a static method.
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
vb does not have 'static' functions? Do you mean 'shared'? If so, the routine is available without declaring a new instance of the class it belongs to but the content of the routine is not allocated until called.
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
I hope someone can help me out with the right idea how to solve a listbox issue. The challenge is to change the color of listbox items depending upon a flag (TRUE if successfully processed). I tried to integrate several snippets already, but there's always something that makes it fail...
Ok.. some important information in advance:
- The listbox 'lstTargetFiles' is bound to a List (Of FileInfo).
- It shows the filenames of all the files in that list.
- Due to databinding issues I can't use a listview control.
For changing the color of successfully processed files in that list I owner-draw the listbox. The drawitem event works fine on initialization:
Private Sub lstTargetFiles_DrawItem(ByVal sender As Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles lstTargetFiles.DrawItem
' Draw the background of the ListBox control for each item. Create a new Brush and
' initialize to a Black colored brush by default.
Dim myBrush As Brush = Brushes.Black
' Determine the color of the brush to draw each item based on the index of the item to draw.
Select Case e.Index
myBrush = Brushes.Red
myBrush = Brushes.Orange
myBrush = Brushes.Purple
' Draw the current item text based on the current Font and the custom brush settings.
e.Graphics.DrawString((CType(sender, ListBox)).Items(e.Index).ToString(), e.Font, myBrush, e.Bounds, StringFormat.GenericDefault)
' If the ListBox has focus, draw a focus rectangle around the selected item.
This results in the first three items colored.
But how can reach my particular goal? Can I pass something like a flag or a user argument which could be triggered? I couldn't even find a way how to raise the event manually when the flag is true...
One thing that would work for this is to create a separate List (call it processedFilesList) derived from List(Of String) and then file paths/names would be added to that list when they are successfully processed, and removed if necessary when they change. In this new list Override the Add, Insert, Remove etc methods so that you can trigger an event when the list changes. Handle that event in your Form and trigger a repaint. In your lstTargetFiles_DrawItem include something like:
Hello all,I need some help here on reading specified column and row of data from the Excel Sheet. I have manage to read the full sheet into my datagridview now,but what I need is to read specified column and row but not all.I'll try to explain it like below:
Its a table in my excel that the table start at location in the PO Detail spreadsheet of A4 until G4. And thats the Header of the table,the Header name of each column are Product Code, Description , Internal Product Code, Selling Price , Order Quantity, Amount and other.
But currently my code now read all the data into my datagridview which is not convenient for me to do further process with some unuseful details inside the PO Detail excel sheet. Can anyone teach me how could you retrieve only the column and row I need and put into the datagridview?
This is the code I have currently which read everything into my datagridview:
Imports System.Data<br />
Imports System.Data.OleDb<br />
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
Dim MyConn As System.Data.OleDb.OleDbConnection<br />
Dim DtSet As System.Data.DataSet<br />
Dim MyCommand As System.Data.OleDb.OleDbDataAdapter<br />
MyConn = New System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0; Data Source='c:\OrderingFormat.xls'; Extended Properties=Excel 8.0;")<br />
MyCommand = New System.Data.OleDb.OleDbDataAdapter("select * from [PO Detail$] ", MyConn)<br />
MyCommand.TableMappings.Add("Table", "TestTable")<br />
DtSet = New System.Data.DataSet<br />
DataGridView1.DataSource = DtSet.Tables(0)<br />
Catch ex As Exception<br />
End Try<br />
End Sub<br />
Thank you for reading and hope someone can give me some guidance on this issue.
Last Visit: 31-Dec-99 18:00 Last Update: 1-Oct-23 6:51