|
Where does a web page come into it ?
If you're launching a windows app, you can get it's handle, and set the window size/position with that and C APIs which you can p/invoke.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I am Thankfull for ur response.
Here I am facing 2 Problems.
1. From my ASP.Net web application I am calling an exe using javascript.
Here is my code.
var h;
h=new ActivexObject("wscript.shell");
h=run("c:\\sample.exe /v") ;
h=null;
So I am able to run it on client side. But as it is a third exe I am unable to set its location, size attributes. This was my question in ASP.Net message board. Here I pleed ur help.
2. In some other application I need to call a third party exe from my windows application. I am completely new to these C APIs, so suggest whate are the APIs to be used in what manner. Where from do I get this information.
I feel sorry for confusing you,
Thank U all,
kiran
|
|
|
|
|
From inside of a web browser? I seriously doubt you can call into the Windows API from JavaScript.
|
|
|
|
|
yes, inside a browser I am calling it, it works on client side.
|
|
|
|
|
I didnt even know it was possible to write Javascript to run an exe on the client side?
Lloyd J. Atkinson
"Logic will get you from A to B, but imagination will take you everywhere" - ALbert Einstein
I look at Microsoft, and turn to my poster on the wall saying: "Bang head here in case of stress".
|
|
|
|
|
I am using Crystal Reports 9 with Visual Basic 6.0 on Windows XP Pro.
My reports are working fine when I use them in VB IDE. But when I make an exe from the project and report button is pressed it gives "Load Report Failed" error
-----------------------------
A couple of notes:
-This is happening to all my reports
-The reports specified are added in vb6 project (reportname.dsr not and external reportname.rpt)
-This error "Load Report Failed" sometimes (rarely) appears inside vb6 IDE but when I close the project and reload the project and then first open the report in IDE and then re-run the project it (reports) again starts working fine.
Any ideas?
Thanks and regards
Kashif
|
|
|
|
|
I am using Crystal Reports 9 with Visual Basic 6.0 on Windows XP Pro.
My reports are working fine when I use them in VB IDE. But when I make an exe from the project and report button is pressed it gives "Load Report Failed" error
-----------------------------
A couple of notes:
-This is happening to all my reports
-The reports specified are added in vb6 project (reportname.dsr not and external reportname.rpt)
-This error "Load Report Failed" sometimes (rarely) appears inside vb6 IDE but when I close the project and reload the project and then first open the report in IDE and then re-run the project it again starts working fine.
Any ideas?
Thanks and regards
Kashif
|
|
|
|
|
Hi guys
I am trying to figure out why the following string is being truncated
<br />
sql = "SELECT Distinct [FundID],[Name],[Code],[Date],[ILDatabase],{fn LEFT([Code],5)},CHARINDEX({fn SUBSTRING([Code],6,1)}, 'R,U,I,C') FROM [Admin].[dbo].[ReconInstructions] A WHERE [Date] Between '" & Format(dtStartDate.Text, "DD MMM YYYY") & "' AND '" & Format(dtEndDate.Text, "DD MMM YYYY") & "' "<br />
sql = sql & "AND ILDatabase ='ILDB'"<br />
sql = sql & " ORDER BY({fn LEFT([Code],5)} ,[Date] ,CHARINDEX({fn SUBSTRING([Code],6,1)}, 'R,U,I,C') ASC)" <br />
What i get when the program runs is this
<br />
"SELECT Distinct [FundID],[Name],[Code],[Date],[ILDatabase],{fn LEFT([Code],5)},CHARINDEX({fn SUBSTRING([Code],6,1)}, 'R,U,I,C') FROM [Admin].[dbo].[ReconInstructions] A WHERE [Date] Between '01 May 2008' AND '01 May 2008' AND ILDatabase ='ILDB' ORDER<br />
The order by part of the string is being truncated. Can anyone tell me why this is happening.
|
|
|
|
|
Does VB have a max string length ? Perhaps you just think this is what you got b/c the debugger has a max string length ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Yes it is just the debugger that is truncating the string. I wrote the string to a file and debugged the sql in the query analyzer.
Thank you for the response
|
|
|
|
|
Dear all,
I have a problem with passing the return Boolean.This project is running with VB.NET 2003 with MySQL database. I'm using a Function to call a login verification as shown below:
Public Function FurtherUser_Authenticate() As Boolean
Dim FrmAuthen As New FrmAuthen
FrmAuthen.StartPosition = FormStartPosition.CenterScreen
FrmAuthen.Show()
End Function
And next I will prompup a form for the user to insert username and password for further verification. This will check
the user login name and password from MySQL database for verification. After success verification I would like to return
UserVerifySuccess = True to my function and the function will allowed the user to do some Setting on my window form application.
The following are the code for loading of the FormSetting which need a further user verification to login because of security issues
of the user:
Private Sub FrmSetting1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
blnMustAuthenticate = True
If blnMustAuthenticate Then
UserVerifySuccess = False
Me.Close()
Further_Authenticate()
If UserVerifySuccess = True Then
Me.Show()
End If
End If
End Sub
The code that used at FrmAuthen to check the user is allowed to do the setting is below:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x, pass As String
Try
ObjComm = New OdbcCommand("SELECT POS_CASHIER.LocationCode, CashierID, CashierName, Pwd, IF(POS_CASHIER.IsActive=1 AND POS_CASHIERGROUP.IsActive, 1, 0) AS IsActive, CanChangePwd, POS_CASHIER.GroupID, GroupName, IsFullAccess FROM POS_CASHIER INNER JOIN POS_CASHIERGROUP ON POS_CASHIER.GROUPID = POS_CASHIERGROUP.GROUPID AND POS_CASHIER.LocationCode = POS_CASHIERGROUP.LocationCode WHERE CashierID='" & TextBox1.Text & " ' ", ObjConn)
ObjConn.Open()
ObjRead = ObjComm.ExecuteReader
If ObjRead.Read Then
pass = ObjRead.Item(3)
x = ObjRead.Item(8)
ObjConn.Close()
If TextBox2.Text = pass Then
If x = "1" Then
Me.Hide()
Return (UserVerifySuccess = True) ' << I need to return this to my function. Thank you~!
Else
ObjConn.Close()
MessageBox.Show("Sorry. You are not allowed to run this task.")
End If
Else
ObjConn.Close()
MessageBox.Show("Your password is invalid.")
End If
Else
ObjConn.Close()
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
ObjConn.Close()
End Try
End Sub
Thats all I need someone can give me a guide whats the problem with my code here? Anyone can give me some idea/solution?
Thanks for reading.
Regards
Drex
|
|
|
|
|
drexler_kk wrote: Public Function FurtherUser_Authenticate() As Boolean
Dim FrmAuthen As New FrmAuthen
FrmAuthen.StartPosition = FormStartPosition.CenterScreen
FrmAuthen.Show()End Function
Well, this is obviously a disaster. Notice how your code doesn't return anything at all ? It's a travesty that this compiles.
Also, when you call Show(), you get a modeless form. Your app has essentially shown a login form, but lost control of it at this point. It should use ShowDialog, then check the form to find out if login succeeded, and return a bool to indicate the result.
drexler_kk wrote: ObjComm = New OdbcCommand("SELECT POS_CASHIER.LocationCode, CashierID, CashierName,.....
First of all, read up on SQL injection. This code means I can erase your database, any time I like. Second, why is it all on one line ? I guess having a variable called TextBox1 is the point at which your code stands no chance of being readable, but still.....
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello Mr. Christian Graus,
I have try to change my code to the following:
Public Function FurtherUser_Authenticate(ByVal UserVerifySuccess As Boolean) As Boolean
Dim FrmAuthen As New FrmAuthen
FrmAuthen.StartPosition = FormStartPosition.CenterScreen
FrmAuthen.Show()
End Function
But I still found the error for my window frmSetting for the line of my function FurtherUser_Authenticate(). The error message appeared: Argument not specified for parameter 'UserVerifySuccess' of 'Public Function FurtherUser_Authenticate(UserVerifySuccess As Boolean As Boolean)'.
Beside,can you give me some exaple how should I solve this problem here?
|
|
|
|
|
|
I don't see why this is an issue. If it is, try using the RenderToImage method of the form, then print that bitmap
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
tnks for ur reply i get something to make my form as an image but a bout the link i didnt get!
tnk u so much and if it is possible for you plz help me more to how make my form as an image!
N.Asgari
|
|
|
|
|
It's actually called 'DrawToBitmap'
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
tnx christian it helps me a lot
N.Asgari
|
|
|
|
|
|
that was so complite tnks
N.Asgari
|
|
|
|
|
Don't use VB much, whats up with TrimEnd() in VB2008
Here is my code to trim a space " " from the end of a path read from a file.
readline = readline.TrimEnd(cchar(" "))
But it does NOT remove the SPACE?
Searched the web and this is supposed to work? What am I missing?
|
|
|
|
|
what is cchar ?
From the MSDN entry:
' Trim whitespaces by passing Nothing.
Dim trimmedWhiteSpace As String = pathWhitespace.TrimEnd(Nothing)
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi all:
Several years ago I wrote an application which used Powerpoint 11 Object
Library. Now I'd like to update the application for Office 2007 users.
While using PPT 12 Library works fine in the app for users with Office 2007,
those still using Office 2003 receive an error (because, of course, they have
an older version of PPT.)
There doesn't seem to be a a way to install both Object Libraries in my app. Do I need
to create an installer that determines which version of Office a user has then installs the
app containing the proper reference?
TIA for any help.
Norm
|
|
|
|
|
Dear all,
I have some difficulties with a marco in VBA.
I have an excel-sheet (excel 2000) including some figures. These figures should be send via email (in rich-text format). The difficulty here is that the following order needs to be followed.
1) First part of the excel-sheet should be included in the mail as "paste special ->microsoft excel-worksheet"
2) One empty row
3) Second part of the excel-sheet should be included in the mail as "paste special ->microsoft excel-worksheet"
4) One empty row
5) I have to add an attachment to the mail
The order is important due to the fact that some of the receivers will print the mail as it is and this in only possible when it will be send in
the above mentioned order.
Could somebody please assist?
Many thanks in advance.
Kind regards,
Sabrina
|
|
|
|
|
With a VB application with 32 groups each with 3 radio buttons and a check box. The form is drawn slowly and even more slow when a background images is placed on the form. This is at runtime.
Also during designtime the form is again drawn slowly; i.e. 1/2 second for each group box.
ARe there any settings that is causing a form refresh it seems for each control on the form!
Many thanks,
Andy.
|
|
|
|