|
how about moving the code from the activate to the paint event...?
|
|
|
|
|
that worked!!! thank you very much for your help...
|
|
|
|
|
I have a datagrid that is not bound to a datasource. I write to the grid by inserting new rows. How can I clear the datagrid so that the inserts begin over again at row 0?
tia!
|
|
|
|
|
I'm guessing but have you tried
grd.Rows.Clear
|
|
|
|
|
Hi,
I am trying to download multiple file names of the same name from 100 differant locations to a single folder on my local server. To avoid over writing the previous file with the same name i want to append the ippaddress of the source file to the file name...... can this be done??
I hope someone can help me - i seem to be chasing my own tail here!!
Regards
Mac
|
|
|
|
|
you should be in total control of what you name the file that will be saved on your harddrive. Do a dns lookup per location to get the ipaddress and append it to the name of the file before you attempt the download. or is there more to it...?
the source may be xxxxxxx.txt but download method should let you rename it to xxxxxxx_999.999.999.999.txt
|
|
|
|
|
I know all of the ip addresses, i just want to automate the renaming to include the ip address it came from. And i have no idea how to do it in VB...
|
|
|
|
|
Pass each location into this function and append the result to the filename.
Ex:
Dim sFile as string = "downloadfile.txt"
sFile = Mid(sFile,Instrrev(sFile,".")-1) & "_" & sGetIP("www.yahoo.com") & _
Mid(sFile,Instrrev(sFile,"."))
sFile will equal "doadloadfile_209.73.186.238.txt"
Private Function sGetIP(ByVal sWebSiteName As String) As String
Dim o As System.Net.IPHostEntry = System.Net.Dns.GetHostEntry(sWebSiteName)
Return CType(o.AddressList.GetValue(0), System.Net.IPAddress).ToString.Trim
End Function
|
|
|
|
|
Using vb.net windows application
|
|
|
|
|
A fax is not sent via internet, it's sent via a phone line.
---
b { font-weight: normal; }
|
|
|
|
|
I do believe there are services on the internet that will convert an email to a fax and send it for you, for a cost
Steve Jowett
|
|
|
|
|
|
Not really the right forum for this question, is it? But anyway Real VNC turns off the wallpaper so that it has less data to tranfer to the client PC. It should restore the wallpaper after you termiate the connection.
If you check the setting for Real VNC, you can set an option not to remove the wallpaper and FX etc.
Steve Jowett
|
|
|
|
|
Hi,
I have a multi user application in ASP.NEt (vb.net). I want to put my print operations in a queue so that i can bulk-print at the end of the day. After searching through several engines, i am left with the option to convert the current page to PDF (using 3rd party components), save it in the file system and then execute print at the end of the day.
Do i have any other option besides converting my page to PDF?
Ritesh
|
|
|
|
|
Yes, you have other options...
We implemented a process years ago to bulk print reports to multiple printers.
If your application can print to file using the printer driver of the desired printer, a postscript file can be created.
Later, you can copy that file to the network path of the printer with the following DOS command: 'copy /b ' <filename> <printer-path>
Example: copy /b PrintThisStuff.prn \\ccdin25\ishp
Tim
|
|
|
|
|
Are there examples in vb.NEt that does the above? im very new to the "Printing" feature so an example would really help. Thanks
Ritesh
|
|
|
|
|
I have not done anything with printing in .NET, but, you should be able to find some examples by searching.
|
|
|
|
|
is there a way to set the label font to bold at runtime ?
I really do need help..... all this computer stuff is way over my head !!
|
|
|
|
|
try this
Label1.Font = New Font(Label1.Font, FontStyle.Bold)
Pete Newman wrote: I really do need help..... all this computer stuff is way over my head !!
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
glad some one knows how this stuff works
cheers
I really do need help..... all this computer stuff is way over my head !!
|
|
|
|
|
hello,
i want code following scenario
i've got a listview with many entries. when the user write "tom" (with the keyboard) the programm should find the first entry with tom and mark this entry. have somebaody an idear?
greetings from germany - can u rate by the way my english preferences???
|
|
|
|
|
I have something similar handling keypress event of the control, a combobox in my case.
Although not is a "beautiful" code, it works fine enough for my problem, find the first letter entry. I hope you can modify it for your owm problem solution:
Private Sub ComboBoxMacge_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress
Try
Dim cb As ComboBox = CType(sender, ComboBox)
Dim findString As String = String.Empty
If (Not e.KeyChar.IsLetter(e.KeyChar, 0)) Then Exit Sub
findString = Char.ToUpper(e.KeyChar)
If cb.DropDownStyle <> ComboBoxStyle.DropDownList Then
If cb.SelectedText <> cb.Text Then
findString = cb.Text & Char.ToUpper(e.KeyChar)
End If
End If
Dim IDX As Integer = -1
With cb
Dim ELE As Integer = 0
Dim R As DataRow
Dim DW As DataRow() = Nothing
Try
DW = CType(.DataSource, DataRow())
Catch
Try
DW = CType(.DataSource, DataTable).Select()
Catch ex As Exception
End Try
End Try
If DW Is Nothing Then
Dim s As String
For Each s In cb.Items
' Se distinguen los que tienen codigo o los que no:
Dim idxGuion As Integer = s.IndexOfAny("-")
Dim pos As Integer
If idxGuion < 0 Then ' no hay guion
pos = 0
Else
pos = idxGuion + 2
End If
If s.IndexOf(findString) = pos Then
IDX = ELE
Exit For
End If
ELE += 1
Next
Else
For Each R In DW
' Se distinguen los que tienen codigo o los que no:
Dim idxGuion As Integer = R(cb.DisplayMember).IndexOfAny("-")
Dim pos As Integer
If idxGuion < 0 Then ' no hay guion
pos = 0
Else
pos = idxGuion + 2
End If
If R(cb.DisplayMember).IndexOf(findString) = pos Then
IDX = ELE
Exit For
End If
ELE += 1
Next
End If
If IDX > -1 Then
.SelectedIndex = IDX
e.Handled = True
End If
End With
Catch
End Try
End Sub
|
|
|
|
|
first of all thx
i think i will modify this with a timer. when i'm done i'll post it in the articles.
|
|
|
|
|
I have a problem. I have a report that in design time link with database with an odbc (Oracle provider). In runtime if i don´t change connection it works fine. My problem is that if i change de odbc (i try other odbc with other name but with same dns) at runtime, it doesn´t work.
Only works if i change odbc connection in report at design time...but i need do it programtilly because i need user choose between two equals databases: real and testing.
I try with code like Me.rptDoc.DataSourceConnections.Item(0).SetConnection("ODBCNAME", "", False) and other codes like that:
Dim crConnectionInfo As ConnectionInfo
Dim crDatabase As Database
Dim crTables As Tables
Dim crTableLogOnInfo As TableLogOnInfo
Dim crReportDocument As ReportDocument = Me.rptDoc
crDatabase = crReportDocument.Database
crTables = crDatabase.Tables
crConnectionInfo = New ConnectionInfo()
crConnectionInfo.ServerName = "ODBCNAME"
crConnectionInfo.DatabaseName = ""
crConnectionInfo.UserID = "USER"
crConnectionInfo.Password = "PASSWORD"
For Each aTable As CrystalDecisions.CrystalReports.Engine.Table In crTables
crTableLogOnInfo = aTable.LogOnInfo
crTableLogOnInfo.ConnectionInfo.AllowCustomConnection = True
crTableLogOnInfo.ConnectionInfo = crConnectionInfo
aTable.ApplyLogOnInfo(crTableLogOnInfo)
Next
Could you help me?, thanks in advance
Cristina
|
|
|
|
|
I has just the solution!
I need to put a new line with table.location = "schemaName" & table.location after applylogoninfo!
I found solution here:
http://www.codecomments.com/Visual%20Basic%20Crystal%20Reports/message690985.html
Thanks for all
Cris
|
|
|
|