|
lsh486love wrote: lvi.ImageList.Images.Add(img);
the ImageList value is null.
You can try this:
string s= "1.txt";
Icon i = Icon.ExtractAssociatedIcon( s );
ImageList imageList = new ImageList();
imageList.Images.Add(i);
this.listView1.SmallImageList = imageList;
this.listView1.Items.Add(new ListViewItem(s, 0));
Hope this will help you~
I Love KongFu~
|
|
|
|
|
This thing is irritating me since morning...well, I inherit PictureBox in a class and add property of another class something like this
public class PBC : PictureBox
{
Testing Testing1;
public PBC()
{
Testing1 = new Testing(this);
}
public Testing Testing
{
get { return Testing1; }
set { Testing1 = value; }
}
}
[TypeConverter(typeof(ProperyConverter))]
public class Testing
{
Control Control = null;
string textHolder = "";
public Testing(Control control)
{
Control = control;
}
public bool IsInitiated
{
get { return Control != null; }
}
public string TextHolder
{
get { return textHolder; }
set { textHolder = value; }
}
}
all looks good but when I set the 'TextHolder' property in Design Mode it works but when run all gone...so to find the problem out I set the TextHolder and open the form's Designer.cs and found nothing about Testing and TextHolder. Then after some test I got to know its happening because of 'public Testing(Control control)' constructor...then I added new one
public Testing()
{ }
and when I set the TextHolder property and I saw something in Designer.cs.
VS created an instance of Testing class, set its property 'TextHolder' and then set that instance to the control.
Testing testing1 = new Testing();
testing1.TextHolder = "fgvhh";
this.pbc1.Testing = testing1;
One thing I do not understand...why VS making this is so complicated. It can be simple like this
this.pbc1.Testing.TextHolder = "A Test String";
any idea guys ?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Just had a quick look, and this sort of hit me straight:
[TypeConverter(typeof(PropertyConverter))]
Another thing, i wouldn't use the word "Testing" as a public proerty name of type Testing
I know it looks nice and stuff but it confused me already
var question = (_2b || !(_2b));
|
|
|
|
|
Greg Chelstowski wrote: [TypeConverter(typeof(PropertyConverter))]
it doesnt matter, just a typo
Greg Chelstowski wrote: Another thing, i wouldn't use the word "Testing" as a public proerty name of type Testing
it wont effect BTW...
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Xmen wrote: Greg Chelstowski wrote:
[TypeConverter(typeof(PropertyConverter))]
it doesnt matter, just a typo
Sorry dude, I thought you copy-pasted your code, that's all
Xmen wrote:
it wont effect BTW...
I know it won't, I was only pointing out it's confusing...
;>
var question = (_2b || !(_2b));
|
|
|
|
|
how one encrypted video and another normal video are embedded please send me the code for me if anyone hae that.
|
|
|
|
|
hi... how can i change this doc....etc to get file infor of just Image file....JPEG etc ???/
private void ProcessOfficeDocument(string fileName)
{
DSOFile.OleDocumentPropertiesClass docDSO = new DSOFile.OleDocumentPropertiesClass();
string docTitle = null;
string docModified = null;
string docAuthor = null;
string docKeywords = null;
try {
docDSO.Open(fileName, true);
DSOFile.SummaryProperties docSummary = docDSO.SummaryProperties;
docTitle = docSummary.Title;
docAuthor = docSummary.Author;
docKeywords = docSummary.Keywords;
docModified = (string)docSummary.DateLastSaved;
if ((!string.IsNullOrEmpty(docTitle))) {
_Title = docTitle;
}
if ((!string.IsNullOrEmpty(docAuthor))) {
_Author = docAuthor;
}
if ((!string.IsNullOrEmpty(docModified))) {
_DateModified = DateTime.Parse(docModified);
}
}
catch (Exception ex) {
}
finally {
if (((docDSO != null))) {
docDSO.Close();
}
}
}
A S E L A
|
|
|
|
|
Dear All,
I am trying to bind Data Grid in c sharp i am using code like
DataGrid.datasource = dataset.tables[0].toString();
But problem is if i try to bind it like
DataGrid.DataBind(); their is error DataBind()key word not come in intelisece
window and no data display in Data grid.
What should i do please do replay.
Sajjad
|
|
|
|
|
wowowo...its simple
DataGrid.datasource = dataset.tables[0]
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
thanks as i post message then i solved it in 1 mints.
|
|
|
|
|
ToString ? I suggest you buy a book on C# instead of making stuff up.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks for suggestion first of all tell me why you send me this type of answer i was one confusion thats why i send it on codeProject not specially to you understood.
|
|
|
|
|
while an application is running, I was looking for a way I can list the objects instantiated by that application, only live once. any help?
|
|
|
|
|
You mean what's not yet been garbage collected ? I'm not sure if you can do that.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
I have a GridView with a auto-generated column containing the edit and delete operations in the first column of the GridView.
I would like to move this column to the most right of the GridView.
Can anyone shine some light with this?
Thanks.
|
|
|
|
|
this may help
int columnIndex = 0;
int lastColumnIndex = 5;
DataControlField dcf = GridView1.Columns[columnIndex];
GridView1.Columns.RemoveAt(columnIndex);
GridView1.Columns.Insert(lastColumnIndex, dcf);
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi,
If anyone has some sample programs/documents for WebDAV protocols implementation using C# then please give it to me.
Thanks in advance ...
|
|
|
|
|
Hi,
I wrote this small WebDAV client in C# as a library to use. It may be of any use to you: http://kvdb.net/projects/webdav
|
|
|
|
|
the app A request (call a method )from the web service and the app B should receive the response for that request.as i think this is not possible, but want to make sure ,is there any possible way for doing this.
|
|
|
|
|
You're correct. I can't respond to anyone but the person who spoke to me, by definition.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I think there is another way...the Server push concept ! Though I've never implemented it I've read that it can be done using AJAX Comet or the FLEX control(Of course it uses an open connection).
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Even if it's possible to spoof the sender IP so that the response goes to a different computer, that computer would just ignore the response as it isn't expecting one.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi, I'm not fluent with C# (but i some how got forced into doing this). After form1 loads the user supplies information (Ip address, username ...etc), presses button 1, this connects them to a specialized video recorder. I then call the ExportImage() method to save the current frame to a bmp in a specified location.
What i would like to do is automatically go to ExportImage() every 5 seconds. The only way i can get it to call ExportImage() again is to press the button.
Any suggestions?
Thanks
Matt
static void Main()
{
Application.Run(new Form1());
}
private void button1_Click(object sender, System.EventArgs e)
{
IDVRSystem system = SystemFactory.FindOrCreateSystem<idvrsystem>(cmbSystem.Text, 18772, txtUserID.Text, txtPassword.Text);
system.Open();
if (system.ConnectionStatus == Integral.Client.Sources.ConnectionState.LoggedIn)
{
mRecorder = system.Recorders.FindByIPAddress(txtRecorder.Text);
if (mRecorder != null)
{
foreach (IStream stream in mRecorder.Cameras)
{
mInfo = stream.Render(picVideo);
if (mInfo != null)
break;
}
}
}
}
private void ExportImage()
{
Console.WriteLine("Export Image Method");
Bitmap bmp;
double aspectRatio;
System.Threading.Thread.Sleep(500);
mInfo.VideoOverlay.GetCurrentImage(false, out bmp, out aspectRatio);
Image img = bmp.GetThumbnailImage(800, 600, null, IntPtr.Zero);
img.Save(@"C:\Test.bmp");
img.Dispose();
bmp.Dispose();
}
</idvrsystem>
|
|
|
|
|
matty2desmara wrote: What i would like to do is automatically go to ExportImage() every 5 seconds.
Look up the different Timer classes in MSDN or Google. The System.Windows.Forms Timer class.
Marc
|
|
|
|