|
Are you sure this is a solution to the problem at hand? To me, this just shows how to convert an IP to a hostname, which can be done using .NET code[^]. I think he's looking for an efficient way to loop through a block of IP addresses.
|
|
|
|
|
I had previously written VBA forms to interact with different excel sheets in a workbook. I wrote code in each sheet's module to display a different form depending on which sheet is activated. Now I would like to recreate these forms to control excel sheets using VB.NET. My question is this
Would it be possible to program a VB.NET application to respond to changes of sheet in Excel?
Thanks,
Craig
"That rug really tied the room together."
|
|
|
|
|
|
Or he can buy a component from ComponentOne
|
|
|
|
|
Can the VSTO be used with Visual Basic 2008 Express?
"That rug really tied the room together."
|
|
|
|
|
Hey all,
I'm a little new to VB and I'm working in VB6. We have an application with about 3-8 mini-windows that all float separately and have code written to keep them from overlapping. My boss wants to put all these windows into a container window or master window in order to minimize the windows calls going on and hopefully clear up some crash bugs we have.
The trick is that he does not want me to use MDI but only "standard VB6 controls".
My next thought was maybe a docking framework would work for this but I'm having trouble finding one for VB6 that only uses standard VB6 controls?
Any thoughts or suggestions? I just need to be pointed in the right direction.
Thanks!
|
|
|
|
|
You should be able to use the SetParent[^] API to make those mini-windows children of the main form. Something like this example[^].
|
|
|
|
|
Will that cause the parent to become a container window that allows all to be minimized and moved at once?
modified on Wednesday, August 27, 2008 12:34 PM
|
|
|
|
|
Yes, but you will have to enumerate the children of the parent window to get their handles. (When you make a window a child of the parent, you could save its HWND in an array. That way you wouldn't later have to enumerate the parent's children to get their HWNDs.)
|
|
|
|
|
MDI is standard in VB6!
====================================
Transvestites - Roberts in Disguise!
====================================
|
|
|
|
|
Hi All,
Just one curious question whats the starting index of System.Collection object would be if I add few objects to it.
Thanks,
Aleem Mohammad,
NIIT technologies
abdul.aleem@niit-tech.com
|
|
|
|
|
|
Can you pls. confirm it. Yeah many people who do programming since a long time dont concerntrate it . Please can anybody confirm it
NIIT technologies
abdul.aleem@niit-tech.com
|
|
|
|
|
Find the kind of collection you want on MSDN and you'll see a line like this:
Indexes in this collection are zero-based.
If you want absolute definite confirmation you need to go to the source. You can also write some code to see.
|
|
|
|
|
It is starting with 1 I am expecting. I guess its correct. Thanks for the help.
NIIT technologies
abdul.aleem@niit-tech.com
|
|
|
|
|
If you're unwilling to write some code to test something so simple, you probably do your employer a disservice by naming them in your sig.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Ditto to JZ.
Pretty much everything is zero based. If there's any doubt in your mind, simple create the collection and add items to it. Then do your own testing iterating through the collection.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
Why don't you just try it? Create an instance of the object and loop through it in your debugger?
|
|
|
|
|
As you suspected, those previous replies are all wrong. They're trying to mislead you for fun - don't listen to them. Fortunately, i'm here to give you the straight dope no problem: the starting index of a System.Collection object is 143 . Always 143 . Except in leap years on odd-numbered days of the month: then it's 2 - this is a subtle bug in many programs, so be sure you add code to test for it. You can usually speed up these checks by storing all such dates in a database table (i recommend using Access), and just querying for them before you start iterating on your collection.
That's it - no big deal, eh? Carry on, brother man!
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
Let's discuss something similar. Are integers are integers?
I'm too lazy to test int i="sdafsaf"; too.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
Whenever you have such questions in your mind, Just try accessing
Console::WriteLine(yourObject[0]);
Make sure you enclose it with try{}catch{}.
If an exception gets caught, and if the message looks something like "Bloody s*cker you can't touch my a**", it's definitely 1 based.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
Hi there i am a newbie in VB .Net, I am getting this error on my Page_Load DataModule is not a member of 'System.Security.Principal.IPrincipal' and I do not have any roles yet on my application, just a simple class to populate a datagrid, is there a way i can turn this security off? what is wrong? i am using VS 2008 with v3.5sql server 2005. Please help
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Web.Security
Imports System.Security.Principal
Imports System.Web
Imports System.Web.UI
Public Class User
Dim mDataPath As String
Public Shared DataModule As User
Function GetConnection() As SqlConnection
Return New SqlConnection("Server=GMPROD13\GMFE;Integrated Security=True;Database=GM_Escheatables")
End Function
'Public Overloads Function GetUsers() As DataSet
' Return Me.GetAllUsers("USER_EMPL_NO")
'End Function
Public Overloads Function GetAllUsers() As DataSet
Dim conn As SqlConnection = GetConnection()
Try
Dim cmd As New SqlCommand("Escheatables_GetAllUser", conn)
Dim ds As New DataSet
Dim adpt As New SqlDataAdapter(cmd)
Try
adpt.Fill(ds, "users")
Finally
adpt.Dispose()
End Try
Return ds
Finally
conn.Close()
conn.Dispose()
End Try
End Function
Public Sub New(ByVal sDatapath As String)
MyBase.new()
Me.mDataPath = sDatapath
User.DataModule = Me
End Sub
End Class
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Collections.Generic
Imports System.Security.Principal
Partial Class Escheatables_UserList
Inherits System.Web.UI.Page
Private dsUsers As DataSet
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
dsUsers = User.DataModule.GetAllUsers
Me.GridView1.DataSource = dsUsers
Me.GridView1.DataMember = "users"
'Me.GridView1.ReadOnly = True
Me.GridView1.DataBind()
End Sub
End Class
|
|
|
|
|
Hello everybody,
I am calling crystal report file i.e .rpt file from desktop application which is in vb.net 1.1 > On click Print button, It display result in crystal report and after click on option export from crystal report file , i gets result in pdf file.
Now, i want whenever i click print , i want directly get result in pdf instead getting result in crystal report then export .
Regards
Shailesh Kavalkar
|
|
|
|
|
Imports CrystalDecisions.Web
Imports CrystalDecisions.Shared
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.CrystalReports.Engine.ReportDocument
Partial Class test
Inherits System.Web.UI.Page
Dim cn As OledbConnection
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Call ShowReport()
End Sub
Sub ShowReport()
''***************************************************************************************
''Don't change any line in the below code or the report will not work as expected
''***************************************************************************************
Dim ConnInfo As New ConnectionInfo
With ConnInfo
.DatabaseName = "test"
End With
Dim rpt As New ReportDocument
rpt.Load(Server.MapPath("Abc.rpt"))
Dim ParamFields As ParameterFields = Me.CrystalReportViewer.ParameterFieldInfo
Dim ParamField As New ParameterField
Dim ParamField_Value As New ParameterDiscreteValue
ParamField.Name = "frmdt"
ParamField_Value.Value = Session("FROMDATE") ''frmDate ''"30-Oct-2007 12:00:00"
ParamField.CurrentValues.Add(ParamField_Value)
rpt.ParameterFields("frmdt").CurrentValues.Add(ParamField_Value)
ParamFields.Add(ParamField)
ParamField = New ParameterField
ParamField_Value = New ParameterDiscreteValue
'Here todt is the parameter name Created in Report
ParamField.Name = "todt"
ParamField_Value.Value = Session("TODATE") ''ToDate ''"31-Oct-2007 12:00:00"
ParamField.CurrentValues.Add(ParamField_Value)
rpt.ParameterFields("todt").CurrentValues.Add(ParamField_Value)
ParamFields.Add(ParamField)
''*********** VERY IMPORTANT ''*****************
''Whenever using Parameter passing to CR :- Assigning the ParameterFields object to the ParameterFieldInfo of the CrystalReportViewer object programmatically will also suppress the default dialog asking for parameters that normally appears when you open a report with parameters.
Me.CrystalReportViewer.ParameterFieldInfo = ParamFields
For Each cnInfo As TableLogOnInfo In Me.CrystalReportViewer.LogOnInfo
cnInfo.ConnectionInfo = ConnInfo
Next
'========================================================================================================
'To Open Report In PDF
'========================================================================================================
'Dim ms As System.IO.MemoryStream
'ms = CType(rpt.ExportToStream(ExportFormatType.PortableDocFormat), System.IO.MemoryStream)
'rpt.Close()
'Response.ClearContent()
'Response.ClearHeaders()
'Response.ContentType = "Application/pdf"
'Response.AppendHeader("Content-Dispositon", "attachment;filename=DatewiseReport.pdf")
'Response.Buffer = True
'Response.BinaryWrite(ms.ToArray())
'Response.End()
'========================================================================================================
''*********** VERY IMPORTANT ''*****************
'' Error message "Thread was being aborted" - Solution - If your are using Try...Catch block then remove it.
End Sub
End Class
Darshana Pathak
|
|
|
|
|
hi did u tried it?
Darshana Pathak
|
|
|
|