|
if i don't want to use the wizard how i can let the crystal Report see this dataset?
i need to do a report a the end
Thanks for help
Assaf
|
|
|
|
|
how i can assign it ???
Thanks a lot
Assaf
|
|
|
|
|
Hi,
I have a form which should work like a custom directory browser.
The form has a TreeView & ListView (like a windows explorer).
I managed to browse trough the TreeView.
But I also want to Activate files in the ListView.
Anyone an idea how to do this?
|
|
|
|
|
Hi!
What do you mean by "Activate files in the ListView"?
Entries in the ListView can be highlighted/activated by setting the Selected property of the corresponding ListViewItem to true, but I guess you mean something different.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
If i browse to a directory which has files....I want to be able to run these files with their related software by doubleclicking in listview.....e.g. an AutoCAD file: drawing.dwg (isn't that ItemActivate?)
|
|
|
|
|
ItemActivate is an event the ListView provides - it's up to you what to do once this event is fired.
You can use the Process class to run applications and if you give a non-executable file to run (e.g. Process.Start(@"C:\Temp\mytext.txt"); ), the default application for this type of document is started
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
I my case I only have to run files with their associated applications. So the code must provide the option to run all kind of files with extensions like: *.txt, *.jpg *.dwg, *.xls etc....I think about 10 types of files....a part of my code is like you mentioned to run files:
private void ListView1_ItemActivate(object sender, System.EventArgs e)<br />
{<br />
try<br />
{<br />
string sPath = TreeView1.SelectedNode.FullPath;<br />
string sFileName = ListView1.FocusedItem.Text;<br />
<br />
Process.Start(sPath + "\\" + sFileName);<br />
}<br />
catch (Exception Exc) { MessageBox.Show(Exc.ToString()); } <br />
}<br />
private void ProjectWindow_Load(object sender, EventArgs e)<br />
{<br />
this.ListView1.ItemActivate += new System.EventHandler this.ListView1_ItemActivate);<br />
}
But this code gives an error that the sytem cannot find the file when i double click it.
The code is split up in 2 parts...the path & the file. I think it can't find the fullpath of the SelectedNode....but there must be a SelectedNode otherwise i cannot see the file in the ListView??
What am i doing wrong?
|
|
|
|
|
Start a debugger and try to find it out
Put a breakpoint to your Process.Start() instruction and check sPath and sFileName.
Oh, and are you sure you want to use ListView1.FocusedItem instead of ListView1.SelectedItems[0] ?
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
I managed to run files....I placed a MessageBox to check what the path
was of the SelectedNode....It turned out not to be the Full Path but a Folder in the tree.
So I added also the string of the rootpath to that Folder....
Anyway it is running files now....however only known filetypes....when a filetype is not associated to a program by windows I get an error...is it difficult to solve that?
also folders are listed in the ListView.....when I double click them....an external explorer window of the selected item is opened outside my application....but the ListView should work like an explorer too....so it must browse when a folder is double clicked and it should run when a file is selected...
What is the difference between:
ListView1.FocusedItem and ListView1.SelectedItems[0] ?
Thanx for helping me out sofar....I am a beginner in programming.
-- modified at 6:33 Tuesday 30th October, 2007
|
|
|
|
|
I made a class of collection, i'm storing the object in the collection, while returning the object from the class, i want to use all the methods and properties of that perticular object e.g. 'TextBox'. But what happens is it is creating the new instance of the textbox object, and i failed to get my values that i had passed as an object in the collection.
Environment is as follows:
.Net 2.0
Language = C#.Net
Sasmi
|
|
|
|
|
Sasmi_Office wrote: it is creating the new instance of the textbox object
certainly not, unless you have a "new" keyword in there.
show us some code!
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
How could we get real time typing status in C#.NET Google Chat and Yahoo messanger
|
|
|
|
|
I don't understand the question.
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
I am developing an C#.NET application in which i need to get webpage HTML data in Listview control.
|
|
|
|
|
Well, when you get your response stream, you can read from it. And you can put this data into strings and other such variables.
Then you can put these strings and whatnot into your list view.
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
sunilwise wrote: its very urgent plz
Saying urgent and using textspeak doesn't really motivate people to help around here.
"I really like comments where I don't have to answer stupid questions" - stfx
|
|
|
|
|
Hi folks!
I'm having a hard time trying to explain a behaviour of one of my applications on a customer's PC.
In the app I'm using Control.BeginInvoke() to marshal a call to the main UI thread. In all of my tests, when I start my app manually (for example from a command line), this BeginInvoke call is executed within a few ms (20-90ms), everything works as expected.
On this particular customer's PC my app is being called from a third-party application (I was told they're simply using ShellExecute , as one would expect). In this case, the call to BeginInvoke() takes about 8 seconds (!). When I run the application from the command line on the customer's PC (and not have the third-party program call it), the response time is back to normal.
I don't have the faintest idea how this behaviour can be explained. Has anyone here an idea?
Thanks in advance!
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hi mav, that did not ring a bell; maybe you could tell some more about what the app is
about (database, networking, WMI, whatever), and which OS your particular PC and the others
are running?
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi Luc!
Thanks for your response.
The app is part of a dictation management system and is called by the other application to show a speech recognized dictation. It's using .NET remoting to communicate with a server application (running on the same machine in this case). All the PCs we're talking about are running XP SP2. The windows firewall is disabled as well as BitDefender, that has been reported (by a colleague of mine) as being installed on the customer's PC.
So nothing out of the ordinary, as far as I can tell...
I had a really vague suspicion about threadpool starvation (especially because the app is using .NET 1.1 and thus the ThreadPool is limited to 25 threads), because Control.BeginInvoke() is using a ThreadPool thread IIRC, but I cannot see how the different calling mechanisms (ShellExecute vs. command line) are supposed to influence the ThreadPool.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hi Mav,
AFAIK Control.BeginInvoke() causes execution on the same thread Invoke() does: the thread on
which the Control's handle got created; that should not be a ThreadPool thread...
On the other hand, if somehow the ThreadPool is involved, then maybe this statement
holds the clue: "There is one thread pool per process. The thread pool has a default size of 25 threads per available processor".
Maybe the failing PC has fewer processors than the others?
Regards,
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
There are actually two types of BeginInvoke[^], one for controls and one for delegates.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Hi Tom, thanks for clarifying this. It explains how the ThreadPool may get involved...
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
This may have something to do with Code Access Security[^], but I'm not positive. When using BeginInvoke, the calling thread's stack must be serialized (so the security permissions can be checked when the invoked method is actually run). If it's a single call you are having problems with, then this may not be it.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Hi Tom!
Thanks for your suggestion, this is one aspect I haven't checked yet.
But since all the applications are running on the same PC I didn't expect a problem with CAS. Besides - if some security permissions are not set correctly, wouldn't you expect a SecurityException instead of an 8 second delay?
But nevertheless, I'll check it tomorrow, thanks.
I'm really clutching at straws here
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
If it's running correctly then you probably have the correct permissions. I was thinking the checking of the permissions might be your issue. There are some gotchas with CAS that I do know about though (e.g. running a .Net application from a network share results in low trust).
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|