|
So you want Sub Test(ctl As {Control, IComparable}) ?
There's no way to define a method like that.
In some cases, you might be able to use a generic method
Sub Test(Of T As {Control, IComparable})(ctl As T)
but unfortunately, that isn't always possible - e.g. you cannot have a List(Of {Control, IComparable}), as using generics for that would always limit you to a specific T.
|
|
|
|
|
In some cases, you might be able to use a generic method
Sub Test(Of T As {Control, IComparable})(ctl As T)
I don't think I'd ever noticed a method coded like that--only classes and interfaces (and I never really understood how the latter worked). I'll have to think about whether that's sufficient, or whether it will be better to define an interface which returns a control (which in most cases should just be an item returning itself). I can see advantages both ways.
|
|
|
|
|
I have been looking for a program that will dial an office extension and then play a MP3 or WAV file (prefer MP3) and then hangup on a specified time interval. I have yet to find this so I have been looking into possibly creating one myself. I have limited VB 2008 Express experience, but i have looked over a couple of the TAPI examples but they do not cover the timing or the MP3/WAV playing. The following are the components of the program. I do not know how to do the timer or the TAPI programing to play the file over the phone, so any help would be appriciated. Thanks.
TextboxExt = Extension #
TextboxTime = minutes between dial/play
TextboxMP3 = MP3/WAV location
CmdButtonPlay = Manually dial/play, stop timer
CmdButtonStart = Start timer for playing, repeat until stopped
CmdButtonStop = Stop timer
LabelTimer = When timer is started, count down time until next dial/play (min/sec)
Jason
|
|
|
|
|
Hi,
I am running web application in debug mode. I have put some breakpoints but control doesnt stop at break points. I am using :----
Code Behind: Vb.Net
Frame Work: 1.1
IE: 7.0;
IIS: 5.1
I have gone through all the option of Virtual Directory Properties.
Your suggestion will be highly appreciated.
Thanks
Binod K.
(Miles to go before I sleep)
|
|
|
|
|
Check Active Solution Configuration from 'Configuration Manager' which is under Build Menu of IDE. Set it to Debug mode. if Configuration Manager is not displayed under Build menu, then Perform the following action
Go to Tools-->Options-->Projects and Solutions--->General
now from the Right hand panel Check the option 'Show Advanced build Configurations'
hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
|
Explore your problem bit more.
whether you use CrystalReportViewer or DataReportViewer or any other?
I think the Paper size, you define at design time is Bigger than the Paper you can insert into printer.
other possibilities is that Field size is smaller than the contents so it can not display the all the contents.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
I have some Hard Coded data which is printed .Also at the end of the page whatever i am displaying is being printed.But the Details in the middle of the page is not Printed. And No i am not using CrystalReportViewer.
|
|
|
|
|
Can you post the code snippet of your printing procedure so i can analysis where may be problem arise ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
I'll tell You How I am Printing
In the Top of the Page,I'll Print the Date ,Time ,Name etc using e.graphics.drawstring
In the Middle of the Page I am Running a Loop to Display Some Details.
Then At the end of the Page,I am Printing Some other Details.
i am Using only draw string and also draw line to draw some Boundary.
Now In the Print Preview i am able to see all the details.In the Printout, The Details which i am Printing from the Loop is not visible.
|
|
|
|
|
Thanks.I Got the Solution
|
|
|
|
|
Did you forget to reinitialise your data pointer type variables in the BeginPrint event so when you did print previerew followed by print the data was off the end?
The beginners guide to printing in .NET[^] may be of use/interest to you.
|
|
|
|
|
Hi
i have managed to populate dropdownlist from database so i want to select a value from dropdownlist and insert it into database.The problem is when ever i select a value it always select the first value regardless of what i choose.everything is working except dropdownlist
here is my code
cmdEmployee.Parameters.Add("@Emp_No", SqlDbType.Int).Value = TextBox1.Text
cmdEmployee.Parameters.Add("@Location_ID", SqlDbType.Int).Value = DropDownList1.SelectedItem.Value
cmdEmployee.Parameters.Add("@Tel", SqlDbType.VarChar).Value = txtTel.Text.ToString()
cmdEmployee.Parameters.Add("@Fax", SqlDbType.VarChar).Value = txtFax.Text.ToString()
cmdEmployee.Parameters.Add("@Cell", SqlDbType.VarChar).Value = txtCell.Text.ToString()
cmdEmployee.Parameters.Add("@Alternative", SqlDbType.VarChar).Value = txtAlternative.ToString()
cmdEmployee.Parameters.Add("@Block", SqlDbType.VarChar).Value = txtBlock.Text.ToString()
cmdEmployee.Parameters.Add("@Floor1", SqlDbType.VarChar).Value = txtFloor.Text.ToString()
cmdEmployee.Parameters.Add("@Room_Number", SqlDbType.VarChar).Value = txtRoom.Text.ToString()
cmdEmployee.ExecuteNonQuery()
Mamphekgo
|
|
|
|
|
It sounds like you are rebinding the dropdown list on postback. That would remove everything in it that came from the postback, including the selection, and the first item gets selected by default.
Use the IsPostback property to determine if the page is loading for the first time or not, and only bind the dropdownlist on the first load.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I am trying to generate simple Crystal Report. To do so I have configured datas set and i have set this data set as reports's data source.
If I check the table name of data set then It gives that right. But on the next line where I have set this dataset as report's data source it gives Error "Report has No tables"
Code is as follow:
Dim i As New CrystalReport1
Dim ds As New System.Data.DataSet
Dim ObAdp As New SetDatasetClass' here dataset get configured
ds = ObAdp.getDataset("Select * from Employee" )
MsgBox(ds.Tables(0).TableName)' Shows table name as Employee
i.SetDataSource(ds.Tables(0))
Is the method is right?
|
|
|
|
|
I think you are not set any table to CrystalReport1 at design time. If Yes then,Let me explain how can you set the table for report
1 Open Report CrystalReport1 in IDE.
2.From the Field Explorer window,Right click on Database Fields and Select Database Expert option (Or you can also Select the 'Database Expert' option from Menu CrystalReports-->Database)
3.A new window is open(Database Expert) from which you can select the Table(Employee) for you Report and click on OK button.
4. Now in Field Explorer window, A + sign is appear in Front of 'Database Fields' Option. Expand this sign
5. After expanding, Employee table is appear which you select in Database Expert window.
6. Place fields of Employee table in Appropriate section of Crystal Report
7.Now run you application
Hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
I want to stop and restart service when service is started.
|
|
|
|
|
|
Hai all ,
i need to create(result will be xml) by using querystring
xyz.aspx?customer_id=&first_name=&last_name=&email=sun@sun.com&phone=
it will display xml like
<?xml version="1.0" encoding="utf-8"?>
<livelookup version="1.0" columns="first_name,last_name">
<customer>
<customer_id>sunnyb</customer_id>
<first_name></first_name>
<last_name></last_name>
<email>sun@sun.com</email>
<phone</phone>
<organization></organization>
<password></password>
</customer>
</livelookup>
Thanks in advance
Thanks
Subbu.
Thanks
Subbu.
|
|
|
|
|
What is the problem when you create XML file ?
simply Split the Querystring(on the basis of '&' ) and fetch the field and add it to xml file with or without value.
if you don't know how can create XML file with vb.net then try Googling[^]
hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Hi,I want to ask how can I get data from an excel database and how should I write the settings?Can anybody give me a related link?I am very appreciate for your kind helping.
Thank you.
|
|
|
|
|
try Googling.
you can get lot of way to read excel file data
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
I have searched in Google, but I couldn't get the answer I want. Anyway, thank you all the same.
Have a nice day.
|
|
|
|
|
Hii
This code project link provide you sample project and code to use excel as data base. May be this links helps you to solve your problem.
<a href="http://www.codeproject.com/KB/vb/Excel_Connectivity.aspx">http:
Thanx
~Khatri Mitesh
modified on Monday, July 7, 2008 2:55 AM
|
|
|
|
|
Ok, thank you for your kind helping.
Have a nice day.
|
|
|
|