|
Thanks for the answer, but the problem is when user swipe the card, it's read in keypress event of the textbox, therefore, you can actually see the moving text. My problem is while it's reading, user can type on the keyboard, creating extra text, and that would cause error in parsing credit card info. I'm looking for a way to temporary disable (lock) keyboard until the reading credit card is done. If anyone has any other solution, I appriciate it. Thanks.
|
|
|
|
|
How i can draw an graph in Excel page if i insert it as ACTIVEX ?????????????
==> How i can implement the tab while i writing in excel page ???????????
=>how i can open excel file from code in micrsoft excel ????
all of these how can done inside the code ????????????
|
|
|
|
|
|
am trying to use javascript to set values from a newly opened window on a dynamically created vb.net listbox with no sucess
heres the code..
Parent aspx code
<A HREF=""javascript:GetUpload('imageList');"">click here to upload images</A>
function GetUpload(CtrlName)
{
ChildWindow = window.open('upload.aspx?FormName=' + document.forms[0].name + '&CtrlName=' + CtrlName, "upload", "width=650,height=550,top=100,left=500,toolbars=no,scrollbars=yes,status=no,resizable=no");
}
-----------------------------------------------------------
child aspx code initiated by a button click
function doUpload()
{
var o = document.createElement("option");
o.text = "test";
o.value = "test";
window.opener.document.forms['Form1'].imageList.options[0] = o;
window.close();
}
throws a javascript:unknown exception when it adds the option
am really stuck on this one so any advice would be great.
|
|
|
|
|
I am not sure but just a hit. I think that
o.value will take numeric number instead of character. try
o.value=1;
and if you already have the value in the combo as you said you want to display the value then use selectedIndex=0,1 or what ever you want.
Rizwan Bashir
|
|
|
|
|
was able to crack it anyway, though it might have been an issue with a vb.net listbox
found out it was that you cant pass option varibles from child window back to parent window.
thanks anyway
|
|
|
|
|
You wont acheive anything by posting your message in the wrong Forum.
|
|
|
|
|
Is it possible to open a form, and then immediately set the focus to a specific tab?
For example, I have a form which has a tab for employees and a tab for departments. If I choose the 'Departments' option from the menu, I want it to open this particular form, and give the Departments tab the focus.
|
|
|
|
|
You can change the tab selection like this.
myTabControl.SelectedTab = myDepartmentTabPage
|
|
|
|
|
Thanks for this.
It seems to work fine if that particular form (with the department tab) is open already.
What I'm doing, from the menu item, is ....
Dim frmCompany As New Form CompanyDetails
frmCompany.ShowDialog()
How would I send your line of code at the same time as showing the dialog so that when the dialog opens, it opens on the Department tab?
-- modified at 16:32 Sunday 14th May, 2006
Hi - I just worked it out ....
Dim frmCompany As New Form CompanyDetails
frmCompany.TabControl1.SelectedIndex = 1
frmCompany.ShowDialog()
|
|
|
|
|
Do it in the load event of CompanyDetails form because it is not recommended to make your control modifier PUBLIC.
_mubashir
-- modified at 4:57 Monday 15th May, 2006
|
|
|
|
|
"_mubashir" is right. You should be setting the Tab focus in your form's Load event handler. That's where all form initialization is supposed to go.
|
|
|
|
|
OK - thanks for the feedback guys - but once I've actually opened the form, how does that form know which menu item triggered it - and so open the appropriate tab?
|
|
|
|
|
You should create a public method in your form class used to select which tab you want selected. I recommend that you create an enum that the calling code can use for the selection.
Public Class MyTabForm : Inherits Form
Public Enum TabSelect
Employees
Departments
End Enum
'
Public Sub SelectTab(tab As TabSelect)
If (tab = TabSelect.Employees) Then
myTabControl.SelectedTab = myEmployeeTabPage
Else If (tab = TabSelect.Departments) Then
myTabControl.SelectedTab = myDepartmentTabPage
End If
End Sub
End Class
Your calling code would then look like this.
Dim myForm As New MyTabForm
myForm.SelectTab(MyTabForm.TabSelect.Employees)
myForm.ShowDialog()
|
|
|
|
|
Thanks Joshua, this works well.
However, what I'm a little confused about (and please excuse my naivety - I've still got loads to learn yet!), is why is this better than my previous 'discovery' - which was basically a one-liner, as opposed to the extra lines of code that you've kindly suggested?
|
|
|
|
|
penguin5000 wrote: and please excuse my naivety - I've still got loads to learn yet!
No problem. There's always something new to learn. I'm learning something new all the time too. That's part of the fun in software development.
penguin5000 wrote: why is this better than my previous 'discovery'
Providing public access to your form's controls is considered bad practice. Why? Because if later down the road you want to...
- Use different controls to display the same info. (Like not a TabControl.)
- Change how you use your existing controls. (Ex: Change the tab order.)
...then you would have to update all of your form calling code too. This becomes a big issue if your app is huge and your form is called from several places.
The suggestion I provided allows you to change your form without effecting your calling code. That means less maintenance work in the future.
I hope this helps!
-- modified at 3:30 Friday 19th May, 2006
|
|
|
|
|
Thanks - yes, it does help. Its a bit of short term pain, for long term gain!
|
|
|
|
|
How i can draw an graph in Excel page if i insert it as ACTIVEX ?????????????
==> How i can implement the tab while i writing in excel page ???????????
=>how i can open excel file from code in micrsoft excel ????
all of these how can done inside the code ???????????? doh: :zz
|
|
|
|
|
hi all,
how can i create dsn runtime for sql server in vb.net.
pls help with code.
thanks
vipin paliwal
|
|
|
|
|
|
because i have many database in my sql server. these database are store different infromation for different company.
and most important part i don't know how many database user create in database. because i give the user facility.he can create many database in my database.
i want to dsn only for report because i not copy all the report for per database.
vipin paliwal
|
|
|
|
|
Hi, im dynamically creating an vb.net listbox at runtime and am trying to set the visibility of this
control at a later point using javascript. The listbox control is also added to the control list
of an <asp:panel>
heres the javascript code that im using
document.getElementById('imageList').style.visibility = 'visible';
it throws an "error:object required"
how do i access a dynamic control using javascript?
any help would be muchly appreciated
thanks
geoff
-- modified at 6:48 Sunday 14th May, 2006
|
|
|
|
|
You listbox has to have a ID, trough which you can acces it with getElement...
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
this is how i added the object
Dim list As New ListBox
list.ID = "imageList"
panel.Controls.Add(list)
it broke on this line of code when i was trying to display it after i clicked on a link
document.getElementById('imageList').style.visibility = 'visible';
I think the error happened because the ListBox control exists on the control list for the panel and
not the main controls list, if thats correct how would i access this list from javascript..
and in turn set values on it etc..
any example code would be really helpfull or a point in the right direction.
-- modified at 9:40 Sunday 14th May, 2006
|
|
|
|
|
Check your HTML and see what is the actuall ID of the control.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|