|
Is this it :
[System.Drawing.ToolboxBitmap(typeof(WebCamCapture), "CAMERA.ICO")]
DaveyM69 wrote: It doesn't show at all if the control/component is in the same project.
So how can we set an icon to it ?
|
|
|
|
|
The below code is i tryed for ajax auto complete on my site..
plz say if their is any bugs...
default2.aspx
]]>
<title>
function IAmSelected(source, eventArgs) {
alert(" Key : " + eventArgs.get_text() + " Value : " + eventArgs.get_value());
}
<asp:scriptmanager id="ScriptManager1" runat="server" xmlns:asp="#unknown">
<services>
<asp:servicereference path="~/WebService.asmx">
<asp:textbox id="TextBox1" runat="server" xmlns:asp="#unknown">
<ajaxtoolkit:autocompleteextender id="AutoCompleteExtender1" runat="server" onclientitemselected="IAmSelected" xmlns:ajaxtoolkit="#unknown">
BehaviorID="AutoCompleteEx" TargetControlID="TextBox1" ServicePath="WebService.asmx" MinimumPrefixLength="3" EnableCaching="true" ServiceMethod="GetCompletionList">
autocomplete.cs
using System;
using System.Collections.Generic;
using System.Web.Services;
using System.Data;
using System.Data.SqlClient;
using System.Web.Script.Services;
///
/// Summary description for WebService
///
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class WebService : System.Web.Services.WebService
{
public WebService () {
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public string[] GetCompletionList(string prefixText)
{
{
string sql = "select Aname From Pincode Where Aname like @prefixText";
SqlDataAdapter da = new SqlDataAdapter(sql, "Server=sql346.mysite4now.com;uid=aitts_85478;password=aitts;database=aitts_85478");
da.SelectCommand.Parameters.Add("@prefixText", SqlDbType.VarChar, 50).Value = prefixText + "%";
DataTable dt = new DataTable();
da.Fill(dt);
// List<string> items = new List<string>();
string[] items = new string[dt.Rows.Count];
int i = 0;
foreach (DataRow dr in dt.Rows)
{
items.SetValue(dr["Aname"].ToString(), i);
//items.Add(dr["Location_Name"].ToString());
i++;
}
// return items.ToArray();
return items;
}
}
}
webservice.asmx
]]>
its not working for me....
|
|
|
|
|
First off there is an ASP.net forum that you may get more help with
Second please don't post so much code only the relevant problem areas
Third when posting code please use the code block then people can read it easier and follow the code.
and finally what error message are you getting?
|
|
|
|
|
Hi all,
Can someone tell me a way to add text and an image on a ListBox. Actually I want to add an icon in between text.
I can add text there, but stuck with the image.
Thanks all.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
You may be able to do it by setting DrawMode to one of the OwnerDraw modes and using the DrawItem event.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Sorry for disturbing.
Do you know any example link about that? If so please can you send it here.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Plenty on google[^]
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Hi All,
I wrote an application that reads web page contents and send to specified email addresses.
I want to make this configurable; i mean a user should be able to set/change at anytime the to,from,subject etc. details.
I am new to C# but i know that app.config is one way to do this, but what i have read in forums that people generally use it only for installation configs.
Is there any other way where a user would be able to provide input in key-value format?
Thanks,
AksharRoop
|
|
|
|
|
Use the application settings. Project|Properties|Settings. Create any fields you need making sure the scope is User.
You can then recall these using
Properties.Settings.Default.YourSettingName
and saved using
Properties.Settings.Default.Save();
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Add a "Settings" file (using the VS add new item option), name it something like "MySettings"
Open it up and add your various different settings, set a type for them, and provide default values. (Make sure they are set to "application" scope not "user".
In you program you can read the values by doing MySettings.Default.MySettingValue.
When you compile your app you'll find the defaults are added to the app.config file.
in the bin\debug\ directory you can edit the exename.config file and make changes. when you run it, it will use the value from the .config file.
(The default values are actually also compiled into the assembly, so if you delete the exename.config file, or remove any values it will still revert to the default ones that are compiled into the assembly.)
Alternatively, if you set the settings to "user" mode, you will be able to write changes to them in code, and call MySettings.Default.Save() to save the changes to a user.config file that is stored in "c:\documents and settings\username\localsettings\application data\appname\appversion\user.config". If you did this you would also need to provide a configuration form for the user to enter their values and hit save.
Simon
|
|
|
|
|
I want to write application which will run on Windows CE
& I want to use Idle processing but I am not able to handle Idle
processing for windows CE application
i.e I can not handle Application.Idle event.
How to do that.
thanks
|
|
|
|
|
saksp wrote: i.e I can not handle Application.Idle event.
Why not? According to the documentation[^] it's available on CE.
I are troll
|
|
|
|
|
saksp wrote: I can not handle Application.Idle event.
Why not? You have posted this question before and if you do not give any more information, most usefully the section of your code which fails to do what you think it should, then it is unlikely that anyone will be able to help you.
Alan.
|
|
|
|
|
Could anyone here please recommend a nice 3rd party control to replace the DataGridView in .Net (winforms).
It needn't be free.
Thanks!
|
|
|
|
|
Have you looked in the catalog?
|
|
|
|
|
|
I have developed a c# speech app using sapi 5.1..I use cfg..In my code I have a line where A messagebox is displayed..When this msgbox is displayed, the speech does not get accepted..it seems I have to hook the messagebox text to the grammar..I don't know how?? Anyone willing to help???
|
|
|
|
|
The MessageBox.Show is blocking, meaning that it will wait with execution until the user closes this messagebox. My guess would be that the agent only listens when the application can proces the information.
I are troll
|
|
|
|
|
Hello Frieds;
I want to read qr barcode from my windows mobile phone using its camera. How can i handle this using without external program.
Thanks in Advance
Best Regards
|
|
|
|
|
Well my first suggestion would be to try and get the contrast stable. Then attempt to convert to a binary image (i.e only either black or white pixels)
then you will need to produce some sort of scanning algorithm to detect black data and white space. then you need to research the formats of 2D barcode formats so you can make sense out of your data results.
Basically, its not an easy task so good luck!
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hello Tyler,
This is a heavy task.
I'm busy making a 2D barcode scanner for one and a half month now.
I'm working with java/j2me, but that's just because it is more compatible with the mobile devices.
In order to read QR-codes, you need to buy the standard (as it is an ISO).
If you would like to have it ready on instant, you could try use zxing, this is googles opensource implementation.
|
|
|
|
|
I don't know how to pass data from a child thread to the parent thread. I want to write a child thread that is reading data from a serial port and pass the data to the parent thread that updates a TextBox. I think I have to use callback with delegates, but I don't know how to do that. Does anybody have a code sample in C#.NET or C++.NET? If would be very grateful if somebody could help me.
|
|
|
|
|
number of sites are present dictating about your problem
you guys are realy lazy!!!! even you wont get time to do some googling!!!!!!!!!!!
please first search on the net if you dont find it then post the question.......................
|
|
|
|
|
In your serial port receive event, Test class,
add an event:
private void Test_DataReceived(object sender, EventArgs e)
{
OnEventRxCompleted(RxText);
}
public delegate void TestEventHandler(string Text);
public event TestEventHandler EventRxCompleted;
protected void OnEventRxCompleted(string RxText)
{
if (EventRxCompleted != null)
{
EventRxCompleted(RxText);
}
}
in Parent from:
add this in constructor,
Test.EventRxCompleted+= new Test.TestEventHandler(EventDataReceived);
and also,
void EventDataReceived(string Text)
{
SetText(Text);
}
delegate void SetTextCallback(string text);
private void SetText(string text)
{
if (txtParent.InvokeRequired)
{
SetTextCallback d = new SetTextCallback(SetText);
this.Invoke(d, new object[] { text });
}
else
{
txtParent.Text = text;
}
}
Kelvin
modified on Friday, March 20, 2009 5:14 AM
|
|
|
|
|
Hello everybody!
I was searching threw System.GC and System.Diagnostics.Process but couldn't find something usefull.
So I was wondering if it's possible to call the GC of an other managed process over an API or something I couldn't figure out?
The question is out of curiosity, because I was wondering how the ".Net Memory Profiler" does the GC.Collect over all generation, when it's performing a snapshot.
Thank you for taking time!
P.S.: The last year I was not an active member of the community, cause I changed job and domicile. I changed now to unmanaged programing.
All the best,
Martin
|
|
|
|