|
As the title,
I would like to convert .DOC, .XLS, .PDF, .PPT(not important) to JPEG.
Any article or free API?
Thank you!
|
|
|
|
|
Hi
I have a problem in visual basic 6. I want to stop
a sequence of program (Loop) using a button clik (Externally)
thanx in advance
by
KK
|
|
|
|
|
You have to call DoEvents in the loop to handle the message queue, or the program won't respond to events.
---
b { font-weight: normal; }
|
|
|
|
|
If you state more specific questions you probably get more replies.
Anyway if you mean how to interrupt a loop from outside in VB6 this a way:
Declare a global variable like Alive as boolean
Your loop will be:
Alive=True
While Alive
(...)
DoEvents
End While
In your button event:
Alive=False
That's it.
|
|
|
|
|
Hi all
I want to show the data on Datagrid control and having group by faciltity
please give any hints idea to do it
|
|
|
|
|
Hello,
how can i find out the number of rows in a datagrid.
Thanx,
chitranjan
more dash than cash!!!
|
|
|
|
|
after binding the datagrid
use this
Dim i As Integer<br />
i = DataGridView1.DisplayedRowCount(True)<br />
MsgBox(i)
abhinav
|
|
|
|
|
here is datagridview1 the name of the datagrid?my datagrid does not have the property displayrowcount at all.
more dash than cash!!!
|
|
|
|
|
i m using vs.net 2005
i think u r using vs.net 2003
if u r filling the datagrid from database using dataset here is another way:
Dim i As Integer<br />
i = CInt(dst.Tables(0).Rows.Count)
abhinav
|
|
|
|
|
the method suggested by abhinish is the only way to do it in vs.net 2003.
With Best Regards,
Mayur
|
|
|
|
|
When we call some build-in function of VB.NET,
it will have a box to tell us what the method done,
what the result returns.
How can I make my own function have that description of function?
Besides, How to make a function parameter optionally?
Thank you!
|
|
|
|
|
Your first question has been asked lots of times just search this forum for it.
The second one is well documented in the official help but basically:
friend function X (optional byval s as integer = 1) as integer
|
|
|
|
|
how to execute a query in visual basic using a xml call..instead of using connection string.i also want to know the count of values from the executed query using xml
regards
shabari
|
|
|
|
|
Sir,i have created two dynamic controls and bind it to the grid .but the problem is i can't add these controls to the grid and after adding how could i get these controls in the next row of the grid and also i couldn't tke values from the control. hre i s code thsat ihve written.
Private Sub CreateTable()
If Session("DYNA") Is Nothing Then
dtTemp = New DataTable
dtTemp.Columns.Add("sct", GetType(Control))
dtTemp.Columns.Add("scr", GetType(Control))
Session("DYNA") = dtTemp
Else
dtTemp = CType(Session("DYNA"), DataTable)
End If
End Sub
Private Sub bindTable()
DataGrid2.DataSource = dtTemp
DataGrid2.DataBind()
End Sub
Private Sub FillGrid()
Dim sql As String
Dim DT1 As New DataTable
Dim obj As New clsValidation
sql = "SELECT Firstcol,Secondcol from Dynamic where code='1' "
DT1 = obj.ReturnDataTable(sql, strconnect, erpath)
Dim i As Integer
For i = 0 To DT1.Rows.Count
If Trim(DT1.Rows(0).Item(i)) = "TextBox" Then
createTextBox()
ElseIf Trim(DT1.Rows(0).Item(i)) = "CheckBox" Then
createchkbox()
ElseIf Trim(DT1.Rows(0).Item(i)) = "ListBox" Then
createListBox()
ElseIf Trim(DT1.Rows(0).Item(i)) = "RadioButton" Then
createRadBox()
ElseIf Trim(DT1.Rows(0).Item(i)) = "DropDown" Then
createDropDown()
ElseIf Trim(DT1.Rows(0).Item(i)) = "LinkButton" Then
createLinkButton()
End If
Next
bindTable()
End Sub
Private Sub createTextBox()
Dim i As Integer = 0
Dim z As Object
Dim tb As New System.Web.UI.WebControls.TextBox
tb.Visible = True
tb.BorderStyle = BorderStyle.Double
tb.BackColor = y
tb.ID = "TextBoxID" + i.ToString()
i = i + 1
display(tb)
End Sub
Private Sub display(ByVal ctrl As Control)
Dim dr As DataRow
dr = dtTemp.NewRow
dr(0) = CType(ctrl, Control)
dtTemp.Rows.Add(dr)
End Sub
Private Sub DataGrid2_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid2.ItemCommand
If TypeOf e.CommandSource Is LinkButton Then
Dim lnkTemp As New LinkButton
Dim btn As Button
Dim txtTemp As LiteralControl
Dim ctrl As Control
lnkTemp = CType(e.CommandSource, LinkButton)
Select Case Trim(lnkTemp.Text)
Case Is = "Add"
Dim drs As DataRow
drs = dtTemp.NewRow
ctrl = CType(e.Item.Cells(2).Controls(0), Control)
drs(0) = ctrl
dtTemp.Rows.Add(drs)
bindTable()
End Select
End If
End Sub
Private Sub DataGrid2_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles DataGrid2.ItemDataBound
Dim i As Integer
If e.Item.ItemType = ListItemType.AlternatingItem Or e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.Footer Then
If dtTemp.Rows.Count > 0 Then
For i = 0 To dtTemp.Rows.Count - 1
e.Item.Cells(i).Controls.Add(CType(dtTemp.Rows(i).Item(0), Control))
Next
End If
End If
End Sub
|
|
|
|
|
Hi Guys,
Can someone tell me how we can add tool tip text to a command button. This property was available in VB. When the cursor moves over a command button, some text would be displayed. Which is the property in VB.Net for a command buttonto set the same. Thnx.
With Best Regards,
Mayur
|
|
|
|
|
You can add a ToolTipProvider to your Form, then every control gets a property called ToolTipText or something.
HTH
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick || Fold With Us! || Pensieve || VG.Net ||
|
|
|
|
|
Hey Marc,
Thnx a lot. Is there a way to add the tool tip provider to the project so that we do not have to add it to each and every form.
With Best Regards,
Mayur
|
|
|
|
|
Uh i don't think so, but you can make a base form (let's call it ToolTipForm ). In the ToolTipForm you put a protected access ToolTipProvider. Then you let every other form in your project inherit from that ToolTipForm instead of Form. I think you get what you want this way.
Laters
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick || Fold With Us! || Pensieve || VG.Net ||
|
|
|
|
|
Thnx Marc. I guess I will manage with adding a tooltip ctrl to every form rather than adding a new form to the application. Thnx for your help.
With Best Regards,
Mayur
|
|
|
|
|
Hi there,
I am just trying to populate crystal report with customers data from
Northwind database. The below is the code.
It doesn't return any error and i can see the report in the front but
the report is empty. It doesn't have the data in it. i am i missing
some thing here?
Please help thanks
-L
**********************************
code*********************************************************
Dim rpt As New CrystalReport1
Dim myConnection As SqlConnection
Dim MyCommand As New SqlCommand
Dim myDA As New SqlDataAdapter
Dim myDS As New Dataset1
Try
myConnection = New SqlConnection("Data
Source=localhost;Integrated Security=SSPI;" & _
"Initial
Catalog=northwind;")
MyCommand.Connection = myConnection
MyCommand.CommandText = "SELECT * FROM Customers"
MyCommand.CommandType = CommandType.Text
myDA.SelectCommand = MyCommand
myDA.Fill(myDS, "Customers")
rpt.SetDataSource(myDS)
CrystalReportViewer1.ReportSource = rpt
Catch Excep As Exception
MessageBox.Show(Excep.Message, "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
**************************************** end of the code
******************************************
|
|
|
|
|
u didnt specify user name and password in the connection string
also check the dataset1 which u r using if populating or not.
abhinav
|
|
|
|
|
Hi,
Any suggestion on efficient way for importing data from Excel to Database by program?
Many thanks and regards,
WiL
|
|
|
|
|
Do you mean XLS files, or via Excel itself ? Would you accept a solution that involves Excel being on the target machine ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I mean local XLS files. I want to browse for the XLS files, read content and then import them to my database.
Many thanks and regards,
WiL
|
|
|
|
|
OK - if you want to do this on machines that don't have Excel, I'm not sure that there's a solution beyond learning the file format, and writing code to parse it.
Christian Graus - Microsoft MVP - C++
|
|
|
|