|
do you have XML program example?
please E-mail:michael_jjw@163.com
thinks!!
|
|
|
|
|
You didn't say what you were specifically looking for, so here[^] are some examples of the some of the basics from Microsoft.
RageInTheMachine9532
|
|
|
|
|
|
Is there a command to pause a script?
Thanks
|
|
|
|
|
I am currently working on a project for work. In this project we have a bunch of lessons, etc on .pdf(Adobe). As you all know it takes a long time for Adobe to open so I want to try and open it in the background when the project is opened. Can anyone tell me how to do this? I want to try and open it in minimized state so it doesn't cover up the project.
Any help would be greatly appreciated.
Michael Thompson
President, Founder
Coded Future
http://www.codedfuture.com
|
|
|
|
|
(digging into deep dark recesses of mind)... if you get the Adobe SDK (if I remember, you have to pay for the latest ?V6 version, but previous ones are free after registration), you can programmatically create an 'Adobe' object, load a document, and Im sure there's some way of doing this minimized in the background .. I could try to look tonight (currently 8:45am down here in Aus and Im at my office, whereas I played with this for an outside commercial contract at home)
If you want me to take a quick look, post back - your best bet is still go to the Adobe Website, and assuming youre using V5.x, download the SDK and read the docco (hard going but worth it)
hth, Garth
|
|
|
|
|
Thanks Garth,
If it wouldn't be much of a problem I would appreciate it. I am waiting for a response from Adobe as we speak (or type) about it as well as getting a "Go-Ahead" to put their .exe on the disk. I really appreciate the quick response. Thanks,
Michael Thompson
President, Founder
Coded Future
http://www.codedfuture.com
|
|
|
|
|
Michael - my feeling is it will do what you want - Im going to try to direct mail you, the relevant reference manual and one of the examples which (I think) demonstrates what you want ...
Garth
|
|
|
|
|
I need some help with the new 2003 following conventions:
1) DLL creation with abilities for code to be used by Visual Basic Native calls.
2) Reference code.
Thanks....
Marcus
|
|
|
|
|
Hi Marcus,
Are you referring to calling into a managed C++ control library used by a VB.NET application? If so, there shouldn't be much you need to know. If you are trying to create a C/C++ DLL with the same "__stdcall" calling conventions used by the Win32 API, that keyword itself should be what you need for your C++ DLL.
If you can describe exactly what you need (i.e. both languages, versions, etc.) I can be of more help.
Regards,
Joe
|
|
|
|
|
Here is my code
<br />
Shell("C:\Windows\Notepad.exe")<br />
AppActivate("Sans titre - Bloc-notes")<br />
'French computer ^^<br />
SendKeys("test")<br />
Doesn't work. I get an error on the AppActivate line
Please help
Thanks
~Michael
|
|
|
|
|
OK. First, it helps if you supplied what the error was. Without that, we just speculating as to what is wrong. What your doing is problematic at best. If the system launches another app or dialog, or the user clicks anywhere between the time the AppActivate and SendKeys statements are run, (and, YES it DOES happen!), your keystroke will end up going to another application. Now...
At first glance, the title of the application your activating doesn't match the title of any window. What you can do in place of the title is use the TaskID that is returned by the Shell function and use that in the AppActivate statement. On top of that, when you launched Notepad, it was launched, by default, minimized. To correct that:
Dim taskID as Long
taskID = Shell("C:\Windows\Notepad.exe", vbNormalFocus)
AppActivate taskID
SendKeys "test", True
RageInTheMachine9532
|
|
|
|
|
|
Hello all, I am developing a small activeX DLL that will simply be a wrapper for a function that takes a string as a parameter. This string represents a name to be resolved in the Outlook Global Address Book. I have created a group rproject in VB6 containing two project: one being my ActiveX dll and the other as a test program my ActiveX exe. When I built the ActiveX dll code it created a dll and registered it correct? Then I went ahead and built the exe test code this generated an executable. When I run the exe file on my development machine with Visual Studio 6 on it the exe runs fine. I transported this exe and my dll via floppy to a test machine without the Visual Studio 6 IDE and everytime I attempt to run the exe i get "error 429 ActiveX Control cann create object". I have already registered my dll on the test machine (its location is c:\winnt\system32 if that matters), and this method within the ActiveX dll uses MAPI to verify the names passed to it(i also made an attemp to register MSMAPI32.dll but it tells me it cannot find the entry point? is it protected? I also registered msmapi32.ocx which worked fine) I cannot seem to pin point why this exe will not run. I am not sure if One or more dll's are missing or they are not registered right and I have been using process tracking applications to try to pin point the missing libraries with little luck. If anyone has had this problem before or has some advice on how to locate the absent files I need on the test system I would greatly appreciate the help. Thanks for helping out a newbie.
Frank
|
|
|
|
|
Hi Frank,
Did you make sure that you had all of the required dependencies for your component installed including the Visual Basic runtime DLL required by your component? Also, if your component references others, they may have references to not only other components, but perhaps versions (or different versions) of DLLs which they require. If those aren't installed, they will most likely fail to load. Sometimes it takes a bit of investigation to determine all dependencies and even the dependencies of those required for them to be used.
Regards,
Joe
|
|
|
|
|
I have looked at this for a while now and I really cant seem to find what Dll's or Ocx's my exe is missing. I have tried refreshing the files on the client maachine eliminating the possibility that they are corrupt, and I have also registered them all numerous times. I beleive the exe hangs when I try to do the following in the code within the exe project.
Dim Instance As MyActiveXDllName.ClassName
Set Instance = New MyActiveXDllName.ClassName 'This line causes it to hang
So i think the problem is with the DLL that I created with VB. I have this dll in the C:\winnt\system32 directory on the client machine and i made sure to register it within the directory. I am not sure what I need to do, as I really do not want to install VB 6 on the client machine, which would defeat the whole purpose of this application. I curerntly have SP5 on VB 6.0 so I think I have the mose current runtimes in the development machine and I made sure that MSVBVM60.DLL was on the client machine and registered and it is. I am really running out of ideas. If anybody has suggestions or an idea that I have missed please help I would greatly appreciate it. Thanks for helping out a newbie.
Frank
|
|
|
|
|
From your problem description, it sounds like you definitely have a dependancy issue. You can use the Dependancy Walker tool (C:\Program Files\Microsoft Visual Studio\Common\Tools\DEPENDS.EXE) on your DLL to make sure you have all the files you need.
If your depending on the Package and Deployment wizard to find the dependant files for you, it does a lousy job. I highly recommend using the DW to get a definitive list. Also, since we can't see your code, we can't tell you what your missing.
One thing that hits me as strange - you said that your test project is an ActiveX EXE? Why? Is this some kind of server?
RageInTheMachine9532
|
|
|
|
|
No that was my mistake my test code is simply a standard exe. As for as the depends.exe goes how do I use the information it gives me? Thanks for your quick replies guys, another reason why I love this site and the people who use it.
Frank
|
|
|
|
|
I have come across a design issue (programming in vb.net) . It would be helpful if any one share their opinion about this .
I am trying to design a class and I wanted to make sure I am in the right path...
A 'Rate' is an interest rate at a specific maturity (Term on X-axis and Rate on Y-axis) example...5.2% for 15 year loan.
A rate can be a simple rate as simple as 5.6% for 3 years term or it could be a complex rate where it is combination of two or more simple rates. For complex rate or simple rate the attributes, methods or exactly same. No difference absolutely except that for a complex rate we need to add 1 or more simple rates.
I think I am thinking along the lines of creating a generic class (non-abstract) called as 'RATE' class and create an "RateComposer" class (which will know by accessing database wheather it is a simple rate or a complex rate) which will create multiple instances of 'Rate' class and gets the rate for each simple rate and sums it to get the final complex rate.
Pls comment..
thank you
|
|
|
|
|
You might want to think about implementing an ICollection interface with your "RateComposer" class. It will make subsequent operations on the class much easier.
"if you vote me down, I shall become more powerful than you can possibly imagine" - Michael P. Butler.
Support Bone
|
|
|
|
|
thank you. I will think about that.
|
|
|
|
|
I certainly appreciate your response to my problem, Mike. However, I'm still left with the same delima. I've been unable to determine which line on the grid I'm attached to. The following code was intended to accomplish that determination but causes an error.
Private Sub dgAttorney_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dgAttorney.SelectedIndexChanged
Dim source As Object
Dim y As System.Web.UI.WebControls.DataGridCommandEventArgs
'Dim X As String
'X = y.CommandName
Session("County") = y.Item.Cells(0).Text
Session("AttNo") = y.Item.Cells(1).Text
Response.Redirect("frmAttyDetail.aspx")
End Sub
I should be able to use the variable 'e' to make this determination, but that gives me an undefined variable error. The above code (when I click on the button) causes:
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 116: 'Dim X As String
Line 117: 'X = y.CommandName
Line 118: Session("County") = y.Item.Cells(0).Text
I've tried everything I could think of. Any other ideas?
Thanks in advance, Jim
|
|
|
|
|
Hi Jim. Okay - without a doubt the "Object reference not set to an instance of an object" error is happening because your variable y is never instantiated. You define the variable with the line:
Dim y As System.Web.UI.WebControls.DataGridCommandEventArgs
but y is never set to an actual object.
I'm wondering if you want to use the ItemCommand event (which uses DataGridCommandEventArgs) instead of SelectedIndexChanged... I'm not sure why you would want the SelectedIndexChanged event to do what you described in your original message, but that just may be because I never thought to do it that way. Can you post the full .aspx page?
|
|
|
|
|
Well, I can sure give that a try, Mike. I'm using the defaults created when I double clicked on the button I had created on the form, it created the SelectedIndexChanged event. It's entirely possible I could use the ItemCommand event. That might very well resolve my problem, however....when does that execute?
Public Class WebForm1
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
Me.SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand
Me.SqlConnection1 = New System.Data.SqlClient.SqlConnection
Me.SqlInsertCommand1 = New System.Data.SqlClient.SqlCommand
Me.SqlDataAdapter1 = New System.Data.SqlClient.SqlDataAdapter
Me.Attorneys1 = New AttorneyMaintenance.Attorneys
CType(Me.Attorneys1, System.ComponentModel.ISupportInitialize).BeginInit()
'
'SqlSelectCommand1
'
Me.SqlSelectCommand1.CommandText = "SELECT ATCTY, ATTTP, ATMOD, ATCODE, ATNAME, ATALPH, ATADD1, ATADD2, ATCITY, ATSTA" & _
"T, ATZIP1, ATZIP2, ATARCD, ATEXCH, ATPHN, ATFAX1, ATFAX2, ATFAX3, ATFIL FROM ATT" & _
"YMF"
Me.SqlSelectCommand1.Connection = Me.SqlConnection1
'
'SqlConnection1
'
Me.SqlConnection1.ConnectionString = "workstation id=JIMNEW;packet size=4096;user id=sa;password=wolverine;data source=" & _
"SQLServer;persist security info=False;initial catalog=SWCG_Circuit_Import1"
'
'SqlInsertCommand1
'
Me.SqlInsertCommand1.CommandText = "INSERT INTO ATTYMF(ATCTY, ATTTP, ATMOD, ATCODE, ATNAME, ATALPH, ATADD1, ATADD2, A" & _
"TCITY, ATSTAT, ATZIP1, ATZIP2, ATARCD, ATEXCH, ATPHN, ATFAX1, ATFAX2, ATFAX3, AT" & _
"FIL) VALUES (@ATCTY, @ATTTP, @ATMOD, @ATCODE, @ATNAME, @ATALPH, @ATADD1, @ATADD2" & _
", @ATCITY, @ATSTAT, @ATZIP1, @ATZIP2, @ATARCD, @ATEXCH, @ATPHN, @ATFAX1, @ATFAX2" & _
", @ATFAX3, @ATFIL); SELECT ATCTY, ATTTP, ATMOD, ATCODE, ATNAME, ATALPH, ATADD1, " & _
"ATADD2, ATCITY, ATSTAT, ATZIP1, ATZIP2, ATARCD, ATEXCH, ATPHN, ATFAX1, ATFAX2, A" & _
"TFAX3, ATFIL FROM ATTYMF"
Me.SqlInsertCommand1.Connection = Me.SqlConnection1
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ATCTY", System.Data.SqlDbType.VarChar, 2, "ATCTY"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ATTTP", System.Data.SqlDbType.VarChar, 1, "ATTTP"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ATMOD", System.Data.SqlDbType.VarChar, 1, "ATMOD"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ATCODE", System.Data.SqlDbType.Decimal, 5, System.Data.ParameterDirection.Input, False, CType(6, Byte), CType(0, Byte), "ATCODE", System.Data.DataRowVersion.Current, Nothing))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ATNAME", System.Data.SqlDbType.VarChar, 40, "ATNAME"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ATALPH", System.Data.SqlDbType.VarChar, 20, "ATALPH"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ATADD1", System.Data.SqlDbType.VarChar, 30, "ATADD1"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ATADD2", System.Data.SqlDbType.VarChar, 30, "ATADD2"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ATCITY", System.Data.SqlDbType.VarChar, 15, "ATCITY"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ATSTAT", System.Data.SqlDbType.VarChar, 2, "ATSTAT"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ATZIP1", System.Data.SqlDbType.Decimal, 5, System.Data.ParameterDirection.Input, False, CType(5, Byte), CType(0, Byte), "ATZIP1", System.Data.DataRowVersion.Current, Nothing))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ATZIP2", System.Data.SqlDbType.Decimal, 5, System.Data.ParameterDirection.Input, False, CType(4, Byte), CType(0, Byte), "ATZIP2", System.Data.DataRowVersion.Current, Nothing))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ATARCD", System.Data.SqlDbType.Decimal, 5, System.Data.ParameterDirection.Input, False, CType(3, Byte), CType(0, Byte), "ATARCD", System.Data.DataRowVersion.Current, Nothing))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ATEXCH", System.Data.SqlDbType.Decimal, 5, System.Data.ParameterDirection.Input, False, CType(3, Byte), CType(0, Byte), "ATEXCH", System.Data.DataRowVersion.Current, Nothing))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ATPHN", System.Data.SqlDbType.Decimal, 5, System.Data.ParameterDirection.Input, False, CType(4, Byte), CType(0, Byte), "ATPHN", System.Data.DataRowVersion.Current, Nothing))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ATFAX1", System.Data.SqlDbType.Decimal, 5, System.Data.ParameterDirection.Input, False, CType(3, Byte), CType(0, Byte), "ATFAX1", System.Data.DataRowVersion.Current, Nothing))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ATFAX2", System.Data.SqlDbType.Decimal, 5, System.Data.ParameterDirection.Input, False, CType(3, Byte), CType(0, Byte), "ATFAX2", System.Data.DataRowVersion.Current, Nothing))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ATFAX3", System.Data.SqlDbType.Decimal, 5, System.Data.ParameterDirection.Input, False, CType(4, Byte), CType(0, Byte), "ATFAX3", System.Data.DataRowVersion.Current, Nothing))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ATFIL", System.Data.SqlDbType.VarChar, 83, "ATFIL"))
'
'SqlDataAdapter1
'
Me.SqlDataAdapter1.InsertCommand = Me.SqlInsertCommand1
Me.SqlDataAdapter1.SelectCommand = Me.SqlSelectCommand1
Me.SqlDataAdapter1.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "ATTYMF", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("ATCTY", "ATCTY"), New System.Data.Common.DataColumnMapping("ATTTP", "ATTTP"), New System.Data.Common.DataColumnMapping("ATMOD", "ATMOD"), New System.Data.Common.DataColumnMapping("ATCODE", "ATCODE"), New System.Data.Common.DataColumnMapping("ATNAME", "ATNAME"), New System.Data.Common.DataColumnMapping("ATALPH", "ATALPH"), New System.Data.Common.DataColumnMapping("ATADD1", "ATADD1"), New System.Data.Common.DataColumnMapping("ATADD2", "ATADD2"), New System.Data.Common.DataColumnMapping("ATCITY", "ATCITY"), New System.Data.Common.DataColumnMapping("ATSTAT", "ATSTAT"), New System.Data.Common.DataColumnMapping("ATZIP1", "ATZIP1"), New System.Data.Common.DataColumnMapping("ATZIP2", "ATZIP2"), New System.Data.Common.DataColumnMapping("ATARCD", "ATARCD"), New System.Data.Common.DataColumnMapping("ATEXCH", "ATEXCH"), New System.Data.Common.DataColumnMapping("ATPHN", "ATPHN"), New System.Data.Common.DataColumnMapping("ATFAX1", "ATFAX1"), New System.Data.Common.DataColumnMapping("ATFAX2", "ATFAX2"), New System.Data.Common.DataColumnMapping("ATFAX3", "ATFAX3"), New System.Data.Common.DataColumnMapping("ATFIL", "ATFIL")})})
'
'Attorneys1
'
Me.Attorneys1.DataSetName = "attorneys1"
Me.Attorneys1.Locale = New System.Globalization.CultureInfo("en-US")
CType(Me.Attorneys1, System.ComponentModel.ISupportInitialize).EndInit()
End Sub
Protected WithEvents txtAttorney As System.Web.UI.WebControls.TextBox
Protected WithEvents lblAttorneyName As System.Web.UI.WebControls.Label
Protected WithEvents btnAdd As System.Web.UI.WebControls.Button
Protected WithEvents dgAttorney As System.Web.UI.WebControls.DataGrid
Protected WithEvents SqlSelectCommand1 As System.Data.SqlClient.SqlCommand
Protected WithEvents SqlInsertCommand1 As System.Data.SqlClient.SqlCommand
Protected WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection
Protected WithEvents SqlDataAdapter1 As System.Data.SqlClient.SqlDataAdapter
Protected WithEvents Attorneys1 As AttorneyMaintenance.Attorneys
Protected WithEvents btnSubmit As System.Web.UI.WebControls.Button
'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Public Sub FillDataSet(ByVal dataset As AttorneyMaintenance.Attorneys)
dataset.EnforceConstraints = False
Me.SqlConnection1.Open()
Me.SqlDataAdapter1.Fill(dataset)
dataset.EnforceConstraints = True
Me.SqlConnection1.Close()
End Sub
Private Sub Showdetailgrid()
If (Me.dgAttorney.SelectedIndex <> -1) Then
Dim attyrows As System.Data.DataView
Dim currentattyrow As System.Data.DataRowView
attyrows = New DataView
attyrows.Table = Me.Attorneys1.Tables("Attorney")
currentattyrow = attyrows(Me.dgAttorney.SelectedIndex)
End If
End Sub
Private Sub dgAttorney_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dgAttorney.SelectedIndexChanged
Dim source As Object
Dim y As New System.Web.UI.WebControls.DataGridCommandEventArgs
'Dim X As String
'X = y.CommandName
Session("County") = y.Item.Cells(0).Text
Session("AttNo") = y.Item.Cells(1).Text
Response.Redirect("frmAttyDetail.aspx")
End Sub
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
Response.Redirect("frmAttyDetail.aspx")
End Sub
'Create a new DataSet to hold the records returned from the call to FillDataSet().
'A temporary dataset is used, because filling the existing DataSet would
'require the databindings to be rebound
Public Sub LoadDataSet()
Dim objdatasettemp As AttorneyMaintenance.Attorneys
objdatasettemp = New AttorneyMaintenance.Attorneys
Me.FillDataSet(objdatasettemp)
Attorneys1.Clear()
Attorneys1.Merge(objdatasettemp)
End Sub
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Dim strSql
strSql = "SELECT ATCTY, ATTTP, ATMOD, ATCODE, ATNAME, ATALPH, ATADD1, ATADD2, ATCITY, ATSTAT, ATZIP1, ATZIP2, ATARCD, ATEXCH, ATPHN, ATFAX1, ATFAX2, ATFAX3, ATFIL FROM ATTYMF where (((ATALPH) Like '%" & txtAttorney.Text & "%'))"
SqlDataAdapter1.SelectCommand.CommandText = strSql
Me.LoadDataSet()
Me.dgAttorney.SelectedIndex = -1
Me.dgAttorney.DataBind()
Application("Attorneys") = Me.Attorneys1
End Sub
Private Sub txtAttorney_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtAttorney.TextChanged
End Sub
End Class
|
|
|
|
|
Hi,
I'm using MS Access 2000, and I need to a form that consists of dynamic objects (i.e., the objects (text boxes) in the form are dependent upon data, and may need to change)
Example- The form is illustrating the client's current currency positions. I may need more text boxes in the form if its recordsource increases that types of currency the client possesses. Thus, it the client decides to increase the types of currency's he/she trades, I need the form to dynamically create a new field illustrating that currency.
Using VBA, is there a way to programmatically create a form, so it can store dynamic objects/content?
Please let me know if I have not explained this in great enough detail
I'd appreciate any help at all,
Thanks
Nick
|
|
|
|
|