|
my VB6 application which calls and uses Excel works fine in Windows NT,2K and XP , but experiences problems when running on Windows 98. The system hangs and the message "System is dangerously low on resources" appear. I am assuming that this happen because Win98 does not have very secure Resource Management compared to NT based OS. Does anyone have any idea how to make my app work in Win98 ?
|
|
|
|
|
I'm trying to use drag & drop with a multiselection. I would like to copy the listview selected items on an other listview. I tried that :
<br />
Private Sub lstAllRole_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lstAllRole.MouseDown<br />
lstAllRole.DoDragDrop(lstAllRole.SelectedItems, DragDropEffects.Copy)<br />
End Sub<br />
<br />
Private Sub lstRole_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles lstRole.DragEnter<br />
' If e.Data().GetDataPresent("System.Windows.Forms.ListView.ListViewItemCollection", False) Then<br />
If e.Data().GetDataPresent(lstAllRole.SelectedItems.GetType().ToString(), False) Then<br />
e.Effect() = DragDropEffects.Copy<br />
Else<br />
e.Effect() = DragDropEffects.None<br />
End If<br />
End Sub<br />
<br />
Private Sub lstRole_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles lstRole.DragDrop<br />
Dim obj As ListViewItem<br />
Dim objCol As Object<br />
<br />
<br />
For Each obj In e.Data.GetData(lstAllRole.SelectedItems.GetType().ToString(), False)<br />
lstRole.Items.Add(obj)<br />
Next<br />
End Sub<br />
The drag & drop works but not the copy. Does someone already do it ?
Thanks
|
|
|
|
|
How do i declare & use "HttpSendRequest" in VB.NET
Thanks in advance
|
|
|
|
|
Vipul,
You have now sent me three email messages asking how to do this. As I have previously pointed out, I do not reply to questions sent by email unless they relate to an article or code sample I have published.
You have posted the question to several different forums. If someone knows the answer, they will no doubt post a response. If you continue to email this question to me, I will report you for sending Spam.
Richard
|
|
|
|
|
Hi,
I am trying to access password and aliases or for that matter every thing related to microsoft exchange users i am able to retrieve only usernames using mapi.session object,
Please help in retrieving other things if any body has code plesae post it here.
I have tried using ADSI also.
Thanks,
Amit Gupta
|
|
|
|
|
Hello guys/gals,
Any idea how can i check printer status in vb.net. I am trying return a boolean value if printer is out of paper. Thank you in advance for your help. Cheers and have a good weekend.
Zulfikar Ali
|
|
|
|
|
hi ppl!!1
i am faing problems.. regarding the registration of crystal reports in vb.net
|
|
|
|
|
how to use print previiew control or how to use that to print a form in VB.NET?
or to print a document in VB.net using Print Preview control?
bye
--Aakash
|
|
|
|
|
like we had data reports in VB6 so what do we do for making reports in Vb.net
what to do?
--aakash
|
|
|
|
|
drmzunlimited wrote:
what to do?
Unfortunately Crystal Reports [^] has integrated with VS.NET. There is a lot of nice things about Crystal Reports, however they tend to have a lot of design flaw in previous versions of their software (e.g. 8.5).
Nick Parker
The greatest lesson in life is to know that even fools are right sometimes. - Winston Churchill
|
|
|
|
|
does anybody knows how to import data from excel file and store it in a Microsoft Access Database Table.
plz help me with this.
thnx
Aakash
|
|
|
|
|
look up the Access command:
docmd.tansfertext
|
|
|
|
|
does anybody knows how to import data from excel file and store it in a Microsoft Access Database Table.
plz help me with this.
thnx
Aakash
|
|
|
|
|
Open a blank DB
Go to New
Import table
Navigate to the excel file you want imported
Click import
A wizard will now open asking things like "use top row as headings", etc. Follow the wizard and your table will be there
I've always heard that there was an idea behind Win ME... I still can't figure out what that was... anyboy know??? I;ve herad the idea was that it was supposed to be n operating system but I doubt this. - Brian Delahunty
|
|
|
|
|
Hmmm... you emailed me, but no message here.
Oh well - hopefully this helps. Sorry, I didn't realise you were asking for code, as your question only asks how to do it.
What I do (but perhaps I shouldn't spread this possibly bad practice) when I need code for VBA is open the program (in this case Access) and start recording a Macro. Then perform all the actions for importing the excel spreadsheet to an Access table. Stop recording the Macro, view the Macro code - it will give you everything
Hope that is of more use to you
I've always heard that there was an idea behind Win ME... I still can't figure out what that was... anyboy know??? I;ve herad the idea was that it was supposed to be n operating system but I doubt this. - Brian Delahunty
|
|
|
|
|
does anybody knows how to import data from excel file and store it in a Microsoft Access Database Table.
plz help me with this.
thnx
Aakash
|
|
|
|
|
You can use the OleDb ADO.NET classes to access both MS Access and Excel datasources... it's works in pretty much the same way as the SqlDb classes when accessing a SQL Server database. The hard part is the connection, everything else is pretty much the same as importing/exporting data from other datasources...
See these knowledge base articles if you need more information and sample code...
HOW TO: Query and Display Excel Data by Using ASP.NET, ADO.NET and Visual Basic .NET - http://support.microsoft.com/default.aspx?scid=kb;en-us;Q311731
HOW TO: Use the ODBC .NET Managed Provider in Visual Basic .NET and Connection Strings - http://support.microsoft.com/default.aspx?scid=kb;en-us;Q310985
The last one is an example of connection strings for many different db types. It uses OdbcDb but can easily be changed to OleDb, if you please.
steve
|
|
|
|
|
can anybody plz tell me how to provide environment similar to Microsoft Excel in VB.net.
for ex :
how to make data entry form in vb.net similar or like excel.
bye
Aakash
|
|
|
|
|
if there is a form in Vb.net then how to disable the close button in that.
and there is one form1 which is starting form of my application and I want to start it maximized . how do I do that ?
plz help
thnx
aakash
|
|
|
|
|
To disable the close button in a form, add this module to your project...
<br />
Option Explicit<br />
Option Private Module<br />
<br />
Public Declare Function GetSystemMenu Lib "user32" _<br />
(ByVal hwnd As Long, _<br />
ByVal bRevert As Long) As Long<br />
<br />
Public Declare Function RemoveMenu Lib "user32" _<br />
(ByVal hMenu As Long, _<br />
ByVal nPosition As Long, _<br />
ByVal wFlags As Long) As Long<br />
<br />
Public Const MF_BYPOSITION = &H400&<br />
<br />
Public Function DisableCloseButton(frm As Form) As Boolean<br />
<br />
Dim lHndSysMenu As Long<br />
Dim lAns1 As Long, lAns2 As Long<br />
<br />
lHndSysMenu = GetSystemMenu(frm.hwnd, 0)<br />
'//remove close button<br />
<br />
lAns1 = RemoveMenu(lHndSysMenu, 6, MF_BYPOSITION)<br />
'
<br />
lAns2 = RemoveMenu(lHndSysMenu, 5, MF_BYPOSITION)<br />
'//Return True if both calls were successful<br />
<br />
DisableCloseButton = (lAns1 <> 0 And lAns2 <> 0)<br />
<br />
End Function<br />
Then in the form_load() event, add this
<br />
Private Sub Form_Load()<br />
Dim retval as boolean<br />
<br />
retval = DisableCloseButton(frmName)<br />
<br />
End Sub<br />
as for starting the form maximized, there should be a property window for the form with an option labeled "WindowState", just set that to "2-Maximized"
or add this to the form_load() event as well
<br />
frmName.WindowState = 2<br />
|
|
|
|
|
Hi,
I am using Mapi session logon method to logon to exchange and sc server.I have to select a profile with which i logon to servers.For this there is a dialog box.On ok click of this box two more boxes appear asking inputs for SC and exchange.
How can i avoid these 3 boxes and still be able to communicate to both the servers and retrieve there infostores.
Thanks in advance,
Amit Gupta
|
|
|
|
|
Hi can someone help me i want to skin my VB.net App can some one show me how i can do this or give me a control that will do it ??
|
|
|
|
|
Hi!
I want to read some information stored in a file.
I mean such as Comment, Title, Author or Keywords.
Are there some APIs that do that ... or must I access the file directly?
Maybe somebody have some code example for me?
Furthermore I want to write (change) this information...
Thanks
Martin
|
|
|
|
|
For MS Office documents, look at Q224351[^]
|
|
|
|
|
i am trying to print word document in VB .net. it is printing the document but it is priting couple of lines of boxes in the beginning. any idea why is doing so. here is the code:
Public Sub PrintDoc()
Dim strPCLPrint As String
strPCLPrint = Trim(lblPCLPrinter.Text.ToString)
'ByVal strDocFile As String
'pcl Print driver
Try
StreamToPrint = New StreamReader("C:\temp\6031044.doc")
Try
Dim pr As New PrinterSettings()
pr.PrinterName = strPCLPrint
MsgBox(pr.PrinterName)
printFont = New Font("Arial", 10)
Dim pd As PrintDocument = New PrintDocument()
'sets the PCL printer for doc printing
AddHandler pd.PrintPage, AddressOf Me.pd_PrintPage
'pd.CreateObjRef()
pd.DocumentName = "C:\temp\6031044.doc"
pd.Print()
Catch ex As Exception
MessageBox.Show(ex.ToString)
Finally
StreamToPrint.Close()
End Try
Catch ex As Exception
MessageBox.Show("An error occurred printing the file - " + ex.Message)
End Try
End Sub
Private Sub pd_PrintPage(ByVal sender As Object, ByVal ev As System.Drawing.Printing.PrintPageEventArgs)
Dim lpp As Single = 0
Dim yPos As Single = 0
Dim count As Integer = 0
Dim leftMargin As Single = ev.MarginBounds.Left
Dim topMargin As Single = ev.MarginBounds.Top
Dim line As String
'Work out the number of lines per page
'Use the MarginBounds on the event to do this
lpp = ev.MarginBounds.Height / printFont.GetHeight(ev.Graphics)
'Now iterate over the file printing out each line
'NOTE WELL: This assumes that a single line is not wider than the page width
'Check count first so that we don't read line that we won't print
line = StreamToPrint.ReadLine()
While (count < lpp And line <> Nothing)
yPos = topMargin + (count * printFont.GetHeight(ev.Graphics))
'Print Preview control will not work.
ev.Graphics.DrawString(line, printFont, Brushes.Black, leftMargin, _
yPos, New StringFormat())
count = count + 1
If (count < lpp) Then
line = StreamToPrint.ReadLine()
End If
End While
'If we have more lines then print another page
If (line <> Nothing) Then
ev.HasMorePages = True
Else
ev.HasMorePages = False
End If
End Sub
Thank you.
Zulfikar Ali
|
|
|
|