|
|
Hi,
I have a producer, and each producer has a number of different facilities. I can manage to get the producer to select his different facilities and writing this to a database. But when retrieving the producer facilities and setting the items he selected to true is what I'm struggling to do. The SelectionMode is set to Multiple.
Can someone please share some advice. I have searched Google yesterday and today, but can't find anything.
If there any good articles, please let me know.
Regards,
ma se
|
|
|
|
|
hi friend i building application by C# to webBrowser
i want edit proxy and some attribute (process bar when load web site to computer) of internet Explore
i hope someone help me
AnhTin
-- modified at 1:58 Thursday 4th May, 2006
|
|
|
|
|
hi all,
how can i use win api to get the active program on the system please.
if am trolling through alot of sites and not finding anything. I can get the window from it text and activate it and a hand full of other things but not able to find the active window.
does anyone know a function to achieve this?
kind regards,
g00fy
|
|
|
|
|
Try this:
[DllImport("user32.dll")]
private static extern IntPtr GetForegroundWindow();
DigitalKing
|
|
|
|
|
thanx DigitalKing,
the reference i was looking at said that took and IntPtr as param, apparently not cause it works perfect.
thanx again
g00fy
|
|
|
|
|
Hi everyone,
I created a C# Windows Service that references Microsoft Outlook 11.0 Object Library. The service got registered and run fine except that it failed whenever it tried to refence this object. I had the exact same code running completely fine in Windows Application.
I did google and found some recommendation on using CDO or MAPI but I don't quite know what they are and how to use them to solve this problem.
Any help is strongly appreciated.
Thanks,
Bunnycool
|
|
|
|
|
Getting tired now but my first thought is that it is a session problem ( windows account ). The service is probably running under the system account and the Outlook DOM being COM is probably not registered for that account. While it might be possible to register Outlook under the system account, there are security issues raised when running a service under the system account. So probably the best thing to do is run the service under a user account that Outlook is registered for.
Or that could be totaly wrong.
led mike
|
|
|
|
|
1) Outlook won't run without a desktop to show it's little warning boxes.
2) Outlook won't run with more than one session on one machine.
Try and use CDO 1.21 in your service. CDO can do the same things Outlook does.
You'll need this site for constant declarations and examples: http://www.cdolive.com/[^]
_________________________________
Please inform me about my English mistakes, as I'm still trying to learn your language!
|
|
|
|
|
Thanks so much for you guys's response.
I will try your suggestion tomorrow.
|
|
|
|
|
Hello,
In my WinApplication, Sometimes I get error "Concurrency Violation" When I try to Update the datagrid after manipulating a datagridview. Well, when it happens, I see no way to restore regular state of the application other than closing the application and restarting again. I can handle the Excpeption and show my user that an error occurred, well, but then what, is not there any well managed way to avoid this problem and restore the state of the application ? This data table was not being modified by any other thread. So, I was wondering why sometimes I am getting this error and how to avoid it,
Thanks and regards
Emran
|
|
|
|
|
One reason I believe is if you have your database engine creating unique key column values for rows. In SQL Server it is an IDENTITY type in MS Access I think they call it AutoNumber type, not sure.
So a DataSet generates it's own value for these columns since it is disconnected. Then the engine assigns it's value and if they are different it breaks. Search MSDN for key words DataSet and @@IDENTITY to see example of how to use the RowUpdate event etc. to solve this problem.
Another might be if you used the Visual Studio Schema Generator to create a Typed DataSet the generated Command object SQL Statements for Update and Delete may contain where clauses for every column. You can edit those Statements (in the Properties window of the DataSet) and remove all those extra clauses.
Hope that helps
led mike
|
|
|
|
|
Well im going to try to ask this question in the most understandable way... This is what im trying to do: I have a Rich Text Box on a form. When you drag a file onto the rich text box (Presumably a text file) it opens it and copies all of the text onto the rich text box. Im thinking that it will somehow have to find out the location of the file, open it and use stream reader to read it. If anyone has ANY suggestions please write a message. Thank You
MWA HAHAHAHA I AM A NOOB AND WE NOOBS WILL KILL YOU ALL. JK
Whats intresting is that im only 12 years old :P
|
|
|
|
|
You are correct. Do something like this:
public Form1()
{
InitializeComponent();
richTextBox1.DragEnter += new DragEventHandler(richTextBox1_DragEnter);
richTextBox1.DragDrop += new DragEventHandler(richTextBox1_DragDrop);
}
void richTextBox1_DragDrop(object sender, DragEventArgs e)
{
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
if (files.Length > 0)
{
try
{
System.IO.StreamReader r = new System.IO.StreamReader(files[0]);
richTextBox1.Text = r.ReadToEnd();
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine("Error opening file " + files[0] + ":\n"+ex.Message);
}
}
}
void richTextBox1_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop, false))
{
e.Effect = DragDropEffects.All;
}
}
Hope this helps,
DigitalKing
|
|
|
|
|
What are the realtime scenarios where Preprocessor Directives are required?
San
|
|
|
|
|
Conditional compilation, for one.
Keep in mind that C# does not have a preprocessor per se.
Cheers,
Vikram.
I don't know and you don't either.
Militant Agnostic
|
|
|
|
|
Hi,
I have MSDE,if instance is local then database is restoring properly.
If iam trying to restore any other particular instance of MSDE ,error is coming.
it is adding database to my particular instance,but while restoring it is searching for local instance log and mdf files.
iam using SQLDMO.Restore object to restore,i searched a lot.
any one give me the solution.
Thanks in advance.
|
|
|
|
|
When the Handle of the control of another application is known,
I can get Font object of a win32 control of another application(Different process) by SendMessage(hwnd,WM_GETFONT....) & Graphics class.
But when the target control is a WinForm control(.Net control) of another application, I can't get the HFont from SendMessage(hwnd,WM_GETFONT).
So, I guess the font is not stored in the Device Context(HDC) for a winForm control. Am I Right?
Then How Can I get the Font from that winForm control?
The purpose to do so is that I want to measure the string size of controls in other applications.
Any idea?
|
|
|
|
|
Hello
I have a problem with binary image segmentation in c#.
First, I have to open it, display and then divide into blocks of size m*n.
A binary container image F is regularly partitioned into small pixel blocks Fi of a size m×n (for simplicity, assume that F’s size is a multiple of m×n). Then I have to make some operations on these blocks( matrices of size m*n) such as XOR. Next,I have to generate random matrix of size m*n and XOR it with all the blocks of image F.
So, these are the steps I have to make:
1.Open and display binary image
2.Image segmentation into blocks of size m*n
3.Generate random matrix k ( size m*n) and XOR with all blocks of F (size of m*n)
All help will be very helpful because now Have no idea what to start with
Thanks
Peter
Pete
|
|
|
|
|
hi all
I have this code:
foreach (PropertyInfo pi in this.GetType().GetProperties())
{
if (pi.Name != "Ds" && !pi.Name.Contains("nmv") && !pi.Name.Contains("Nmv") && pi.Name != "NewId" && pi.Name != "SpeakerID")
nmvParams.Add("@" + pi.Name, pi.ToString());
}
"this" is my object that contains all the properties. I need to put the name & values
of each property into a namevaluecollection nmvParams.
pi.Name gives me the name of the property. How do I get the actual value?
pi.ToString() just gives me the name of the property in string.
thanks
M
|
|
|
|
|
object propval = pi.GetValue(this, new object[0]);
|
|
|
|
|
thanks. I figured it out, its actually
pi.GetValue(this, null)
but you have to check for null before you run it.
M
|
|
|
|
|
Hi i was wondering if someone can help me with getting the data of a subkey and storing it in a string. I understand how to get the value but i need to have it shown in a textbox (or string)
RegistryKey rk = Registry.LocalMachine.OpenSubKey("Software\\mysoftware");
rk.GetValue("aPath","C:\\music\\");
thanks for your help
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
RegistryKey rk = Registry.LocalMachine.OpenSubKey("Software\\mysoftware");
string text = (string)rk.GetValue("aPath","C:\\music\\");
myTextBox.Text = text;
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
thanks alot man i appreciate it!
Don't be overcome by evil, but overcome evil with good
|
|
|
|