|
How did the images get into the listview ? What have you tried ? It should be pretty trivial, but it's hard to know, without knowing what form the images take, are they icons, or are they the actual items in a styled view ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
actually what i am trying to do is something like winexplorer.I can select a folder(contains image files)using treeview.then the images from that particular folder is displayed in the listview not as icons but as the image itself.I have placed a picture box and when I select(or click-want this in the mouse-click event)an image it should be displayed in the picture box.
|
|
|
|
|
Hi
I am Creating a windows application, in that i want to show the Employee performance
by Graph........
I don't know how to include Graph in my application..
Pls Help me
Thanks in Advance
|
|
|
|
|
|
Thank You
|
|
|
|
|
As the title has stated ?
is there a way to do that using C# ?
using iReport to create the template of the report and able to print out in different printers without letting the alignment run out and be in position.
|
|
|
|
|
Dear All,
I have developed C# application to import data from CSV to SQL Server
using sqlBulkCopy. However I am facing couple of problems listed below
1. whole transfer fails when one record has column width issue (source column width is 30 and destination is 20) so how could I eliminate this row? or is there any work around?
2. my destination table has insert trigger defined. How could I manage to execute it as sqlbulkcopy dumps the whole bunch of records and not one by one record?
3. One column in destination table is computed column and is not included in the transfer, but the dependent column is included in source file (based on this column, computed column fills it data, while normal insert) but how do I fill values in computed column while dumping whole bunch of records?
4. If CDC(change data capture) is enabled on my target table, how SQLBulkCopy can log the data changes in the same?
regards
Jeet
|
|
|
|
|
With all that crap on your destination table and also the wrong data structure you are not going to be able to use bulkcopy. Bulkcopy is designed to move data quickly, therefore it bypasses the bulk of the nice processing of a normal insert.
1 is a showstopper and immediatley tells me you cannot use this
2 same as 1 - triggers don't fire
3 same as 1 - all the cutesy processing is eliminated by BC
4 blah WHY are you using bulkcopy (for speed) and bitching about it avoiding all your speed bumps.
Suggestion - load your data into a staging table that will accept everything (varchar fields), this takes care of getting the data to the server with no possible interuptions or failures.
Now use a stored proc to insert the records into the target table, making sure the data conforms to the table design. You get some benifit from BC and a proc without haveing to insert each row from the UI.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
In the msdn page [^]
it says "When a member of a class or struct is a property, field, method, event, or delegate, and that member either is a type or has a type as a parameter or return value, the accessibility of the member cannot be greater than the type. For example, you cannot have a public method M that returns a class C unless C is also public. Likewise, you cannot have a protected property of type A if A is declared as private. "
But in this code
class AccessSpecifier
{
private int wheels = 3;
protected internal int Wheels
{
get { return wheels; }
set { wheels = value; }
}
}
class Derieved : AccessSpecifier
{
public void fun()
{
Wheels = 90;
}
}
class main
{
public static void Main()
{
AccessSpecifier a = new AccessSpecifier();
a.Wheels = 4;
Console.WriteLine(a.Wheels);
Derieved d = new Derieved();
d.fun();
Console.WriteLine(d.Wheels);
d.Wheels = 99;
Console.WriteLine(d.Wheels);
Console.ReadKey();
}
}
How is this possible to access private members of a class jus becoz the property of the field is made protected internal ? And compiler is against the lines given in MSDN? Can u pls explain ?
|
|
|
|
|
"only derived types or types within the same assembly can access that member."
The key word is 'OR'. You are in the same assembly.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
You are accessing the property Wheels which is protected, and not the private field wheels. Nothing odd with that; indeed, that is the reason you use properties.
Cheers,
Vikram. Recent activities:
TV series: Friends, season 8
Books: Freakonomics, by Steven Levitt and Stephen J Dubner. Carpe Diem.
|
|
|
|
|
Actually, protected means he should not be able to see it. Protected internal, means he does, because it's internal.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
I was talking about him using it in the Derived class. You are right in that internal alone would work, but so would protected alone.
Cheers,
Vikram. Recent activities:
TV series: Friends, season 8
Books: Freakonomics, by Steven Levitt and Stephen J Dubner. Carpe Diem.
|
|
|
|
|
The statements you quote refer to the type of the class member.
A property in class Y can't return a value of type X if type X is private to class Y.
public class Y
{
private class X { ... }
public X P { ... }
}
|
|
|
|
|
Hi there,
I m working on Visual c# Windows & I want the coding for MouseHover event using which I want to stop the label which is scrolling in a horizontal direction. I m using Timer for scrolling the same.
|
|
|
|
|
OnMouseEnter, then timer stop.
OnMouseLeave, then timer start.
Surely, No?
(me thinks you didn't do the scrolling code yourself else you would have managed this small addition on you own)
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hi All,
I am trying to do something like this:
I have a C++ dll, this dll has a function which accepts filename(String) ,dataTobewritten(char array) and the length of the char array(long). The function then creates a file with the specified name and writes the data to it.
I am trying to call this function from C# code using P/Invoke.
The problem is that whenever the function is invoked it throws an exception as follows:
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
I have tried the following options:
1) Setting the application as a trusted application in application properties.
2) Checked the C++ code so as to make sure there are no memory leaks due to bad pointers or missing 'Dealloc' statements.
3) Verififed that the signatures match exactly.
I am at my wits end, as there seems to be no solution for this.
Can anyone please throw some light on any other options?
It would be of really great help.
P.S: I am using VS 2008 express edition (if that makes a difference, as I am aware that MS had released a patch for the same problem for its 2.0 version.)
Thanks in advance.
Siddy
|
|
|
|
|
The error means that memory is being stomped. Why would you call a C++ DLL, if all it does is create a file ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hi,
That was just a part of the functionality that I mentioned. It not only writes the file to the disk, but also compresses it using LZ Fast and encrypts it using AES algorithm. The C++ dll is used in the C# application as well as a C++ application, so as to keep the functionality as processing consistent.
Do you have any suggestions as how to overcome the 'memory stomping' problem?.
Thanks,
Siddy
|
|
|
|
|
It probably means that you're making a mistake in how you pass over the object, it's probably still being used by the managed system when the dll tries to play with it. Post your code, or look at examples at www.pinvoke.net on how to use pinvoke.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
hello ...
i am a newbie to the world of GUI .... Recently i been assigned the task of creating a interface .. which enables a user to send a Ethernet packet of user given data ...
I hve no idea n where to start ... kindly guide
if u tell me links to articles it would be very helpful
if somebody has done the same task earlier it would be very helpful if u can guide me.
Waiting for a REPLY
Thank you
Regards
Moinska
|
|
|
|
|
which type of protocol is you are using to send data???
is it TCP/UDP....
u can find so many examples in the codeprojet/google about this topic.
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Hello
I hve to send raw ethernet frame , with a predefined mac addresses.
All i hve to do is that : the user writes his data in text box , on hitting the Send button the ethernet raw frame is launched.
Hmm something like engage packet builder softwares , but i dont where to start and what to do .
Yes i hve seen some of the examples but they ar e all dos prompt and not according to my requirement.
Please tell me wht to do , if u hve documents or links you can share it would be most helpful.
I have never workes on C# let alone GUI interface .. so i need a lot of help.
Waiting for reply
Regards
Amna
|
|
|
|
|
Hi,
I have developed 2 applications.
1. Windows Service
2. Asp.net application (Control Panel for above application)
Windows Service has 3 main methods in the following manner.
method1 every 10 mins
method2 every 1hr after method 1
method3 every 3hrs after method 1 n 2.
These methods directly interacts with sql db (for timing the methods etc) and source file locations etc. These timings and locations are set via the asp.net control panel. The control panel also puts the service on and off.
My problem is that the control panel puts the service on successfully but while putting it off, it still remains running for quite a while. I think, this happens because my main method(onstart) runs in following fashion.
while(true)
{
if(method1_ellapse_time)
method1
if(method2_ellapse_time)
method2
if(method3_ellapse_time)
method3
load timing settings and source file paths
according to time settings, set method1_ellapse_time,method2_ellapse_time,method3_ellapse_time
Thread.Sleep(5sec)
//if settings are changed i want them to take effect in 5 secs
}
Stopping the service doesn't work as required because while(true) and thread.sleep.Correct me if i am wrong
Is there any better so that i can get rid of sleep and still windows service loads new settings, somehow make the process less cycles consuming and enable stopping as required. Is threading a solution? but why would any one use threading if one process is running? I want single thread exection at a time. Please provide help
Thankyou in advance
|
|
|
|
|
mark_me wrote: I want single thread exection at a time
Why are you using threading tin this case - doesn't make sense to me.
In your tick event I presume you disable the timer and then begin your processing, then enable you timer.
This method presumably checks the elapsed time from the last process event.
Manage your events in the tick method and read your durations from a DB settings table.
Have the tick fire every #n minutes and every #N times it checks the database.
No stopping/starting the service, ASP writes the settings to SQL, single thread, only down side is a regular read to the SQL to get the settings.
Never underestimate the power of human stupidity
RAH
|
|
|
|