|
I am converting a DELPHI application to VB 6.0. Language in the DELPHI Project is PASCAL. In the application coder has created a TMemoryStream type. I just want to know what is its equivalent in VB 6.0
The complete code is -
<br />
function TForm1.BackupFinger():integer;<br />
var<br />
bRet:boolean;<br />
iRet:integer;<br />
jh:integer;<br />
dwMachineNumber,dwEnrollNumber,dwEMachineNumber,dwBackupNumber:integer;<br />
d1,d3:longint;<br />
buf: array[0..800] of longint;<br />
m:TMemoryStream;<br />
begin<br />
jh := StrToInt(cbJh.Text);<br />
d1 := 0;<br />
d3 := 0;<br />
dwMachineNumber := jh;<br />
dwEnrollNumber := qfp.FieldByName('dwEnrollNumber').Value;<br />
dwEMachineNumber := qfp.FieldByName('dwEMachineNumber').Value;<br />
dwBackupNumber := qfp.FieldByName('dwBackupNumber').Value;<br />
bRet := FPKeeper1.GetEnrollDataB(dwMachineNumber,dwEnrollNumber,dwEMachineNumber,dwBackupNumber,d1,buf[0],d3);<br />
if bRet = true then<br />
begin<br />
m := TMemoryStream.Create;<br />
m.Position := 0;<br />
iRet := m.Write(buf,800);<br />
qfp.Edit();<br />
qfpdwEnrollData.LoadFromStream(m);<br />
qfp.FieldByName('dwPassWord').Value := d3;<br />
qfp.FieldByName('Memo').Value := 'Backuped';<br />
qfp.Post();<br />
m.Free;<br />
BackupFinger := 1;<br />
end<br />
else<br />
begin<br />
BackupFinger := 0;<br />
end<br />
end;<br />
Please help if someone has any idea about this.
Thanks
|
|
|
|
|
Hi,
I Have a window 2003 server machine. I Installed visual studio.NET 2003 on my machine.
In Microsoft visual studio .NET 2003 a error is occured ,
when I want to create a new project in ASP.NET Web
Application visual studio .net has dected that the web
server is runing ASP.NET version 1.0.
The web application you are creating or opening can be
configured to be complaint with ASP.NET 1.0 .
however , the application will not able to use new
features from ASP.NET 1.1 .
So I can't work on my machine for Dot Net .
Plz sugess me for this .
Thanks all off u .
nilesh
|
|
|
|
|
On the run or command prompt
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe
assuming that windows is installed on ur C:\ drive
this will update the framework version
Hope it would help
Best Regards
3ala2
|
|
|
|
|
Thanks , But Problem is same.
nilesh
|
|
|
|
|
hi,
Iam having an application with some text on a lable.
Displays pop-up box with text box when mouse appears over lable and we will make a note on the text box and close the popup.Next time when the mouse appears over the lable ,popup should open with text what we tiped Earlier. can any one help on this topic.
kamalnath
|
|
|
|
|
Solution1 :- Enable view state of the control,so that the value is retained.The popup containing textbox should in the same page where the label is present.This will help u in retaining the contents.
Solution2 :- Store the data in a hidden box and reload the control again with the contents.
|
|
|
|
|
Hi,
I want to split a sentence and put each word into a row of ListBox by using Javascript.
Does anyone know how to do that?
Thanks,
|
|
|
|
|
try this
for (var i = 0; i < states.Tables[0].Rows.length; ++i)
{
document.getElementById("ddlState").options[document.getElementById("ddlState").options.length] = new Option(states.Tables[0].Rows[i].StateName, states.Tables[0].Rows[i].StateId);
}
or
document.getElementById("ddlState").options[0] =value;
Ashutosh kumar
|
|
|
|
|
Hi Ashutosh,
Thank you for your reply.
Can I please know what "ddlState" is? Is it the name of the Listbox I want to display the words, or the control that has the sentance?
If it is the Listbox, where can I pass the sentance? And should I use something to split the sentance first?
Thanks,
|
|
|
|
|
yes ddlState is a id of dropdownlist.
value is a variable through which we can insert data into list.
Aashutosh Kumar
|
|
|
|
|
Hi Ashutosh,
Sorry, I'm still not very clear about these codes
Does it work the same for ListBox as well?
So what is "states"? Is it a name of a talbe or a DataSet or something?
Aashutoshkumar wrote: for (var i = 0; i < states.Tables[0].Rows.length; ++i)
What about "StateName" and "StateId"? Are these some kind of a property or it will be the Name and ID of the DataSet?
Aashutoshkumar wrote: document.getElementById("ddlState").options[document.getElementById("ddlState").options.length] = new Option(states.Tables[0].Rows[i].StateName, states.Tables[0].Rows[i].StateId);
How about the "or" is it a part of the code or it's the next line of the code will do the same thing as the codes above, so it is another option for me?
Aashutoshkumar wrote:
or
document.getElementById("ddlState").options[0] =value;
Thank you for answering me. And sorry about the trouble, without understanding them I can not modify them and customise into my codes.
Thanks again,
|
|
|
|
|
Hi,
I run a web portal where people buy tickets online. I am interested in taking their feedback 2 days after their journey. This requires me to send mails everyday to get their feedback.
I created a HTML format mail which can be sent. As of now, Everyday I use a small web page and a submit button to send mails to those who have travelled. But How can I automate or schedule so that these mails are sent regularly.
Is there any scheduler or can we do any automation in ASP.NET?
Thanks
-Sudhakar
|
|
|
|
|
Hi Sudhakar,
I have a suggestion. Create console application and write a code for Send Mail In C#
Like
using System.Web.Mail;
using System.Windows.Forms;
// Create a function
public SendMail()
{
MailMessage objMail = new MailMessage ();
objMail.From = "ABC@gamil.com"
objMail.To = "PQR@gmail.com;
objMail.Subject = "This is Test Mail;
objMail.BodyFormat = MailFormat.Html ;
objMail.Body = "Hi ,This is a test mail for you;
try
{
SmtpMail.Send (objMail);
}
catch (System.Web.HttpException exHttp )
{
MessageBox.Show("Exception occurred:- " + exHttp.ToString() ) ;
}
finally
{
objMail = null;
}
}
Write Body in HTML Format.A good idea is store all email who have travelled in XML and read from XML and send Mail to Client.
To schedule sending email every day .Windows schedule help you.I Mean to say you can shedule exe in windows schedular.If u need code then let me know i will send.
I hope this will you.
rajesh
|
|
|
|
|
How do u shedule exe in windows schedular.Colud u pls send code for the same.
Thanks Mini
|
|
|
|
|
To add the application to the Task Scheduler .Go to ControlPanel/ScheduledTasks.
Regards
rajesh
|
|
|
|
|
Hello Rajesh,
Is there any way we can achieve the same through coding instead of accessing the control panel
Thanks,
Mini
|
|
|
|
|
whn i press Enter Key in a textBox thn i call a particular Button_click. so how can i call give me suggestion.
Smile a lots its cost nothing so Keep smiling.
Deepak
|
|
|
|
|
Hi there,
You can set the defaultbutton for your page in the <form> tag. Whenever you press the Enter key in a web page (from you TextBox), You can call a particular Button's Click event.
Another way to fire a "click" event of LinkButton based on pressing enter in a text field. It works OK in IE and Firefox only. Here, LinkButton1 is a linkbutton .
TextBox.Attributes.Add("onKeyPress", "javascript:if (event.keyCode == 13) __doPostBack('" + LinkButton1.UniqueID + "','')");
Regards,
Jay
|
|
|
|
|
Hello,
I tried using your code ,I have written Response.write in the click event of button
private void LinkButton1_Click(object sender, System.EventArgs e)
{
Response.Write("I have pressed Enter Key");
}
However there is nothing displayed as i press enter key in Textbox.
Thanks,
Mini
|
|
|
|
|
Hi there,
Add an additional TextBox Web control to overcome the Enter problem in IE, but hide the TextBox so your users see only one:
<form id="Form1" runat="server">
<div>
Name: <asp:TextBox runat="server" id="txtName"/>
<br />
<asp:TextBox ID="TextBox1" runat="server" style="visibility:hidden;display:none;" />
<asp:LinkButton ID="LinkButton1" runat="server" <pre>OnClick ="LinkButton1_Click">LinkButton</asp:LinkButton>
</div>
In ur Code Behid:
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
<br />
txtName.Attributes.Add("onKeyPress", "javascript:if (event.keyCode == 13) __doPostBack('" + LinkButton1.UniqueID + "','')");<br />
<br />
}<br />
<br />
protected void LinkButton1_Click(object sender, EventArgs e)<br />
{<br />
txtName.Text = "Hai";<br />
}<br />
<br />
Now it works fine.
-- modified at 3:37 Wednesday 11th October, 2006
Regards,
Jay
|
|
|
|
|
Hi Jay,
I tried to write code as advised u,I even copy pasted the same code but it still isn't working.
What could b the problem?
Thanks,
Mini
|
|
|
|
|
Hi there,
+ I ve just given the idea only. I have just modified my previous post My Post[^]
Now you can copy and use it, it ll work fine. Try it and let me know.
Regards,
Jay
|
|
|
|
|
Thanks Jay now its working fine
Mini
|
|
|
|
|
Thats Good
Regards,
Jay
|
|
|
|
|
i have a datagrid(in c# asp.net) and i want select more than one record
e.g. i want to have a templete coulmn with checkbox and select more than one record for deleting. can any body help me?
do u know other way for multiselect?
-- modified at 3:48 Saturday 7th October, 2006
|
|
|
|