|
Hi!
Is it possible to force an application (WPF) to be shown on a specific monitor?
I need this because my three applications are windowstate maximized without border, each one should be shown on another monitor.
thx in advance,
eza
|
|
|
|
|
If you get an answer can you reply on this thread too, I would be interested in this as it is an issue with my company's app. We have a crude solution, but something elegant would be cuwel.
Thanks
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
I don't know about in WPF, but in WinForms you can get an array of all the available screens using the static
Screen.AllScreens readonly property. So long as the form's StartPosition is FormStartPosition.Manual then you can use the desired screen's bounds to make sure it goes to the right place.
If nothing similar exists in WPF, I believe you can still add a reference to System.Windows.Forms which should allow you to do this.
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,
I have done such things many years ago, and can't test it right now. This is how I remember it:
- AFAIK there is no single command to do it;
- assuming the desktop extends across all monitors, the virtual desktop has boundaries much larger than the normal 1280*1024 or whatever resolution you use;
- open your window in normal mode (not maxed/mined) and keep its size below one screen full;
- now move it around by setting its topleft corner, move it to a point that is near the topleft of the monitor you want;
- only then maximize it.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Found only System.Windows.Forms.AllScreens which can be used but is not how I really like it to be done. The reason is I'm using WPF, and just for this using the Windows.Forms is a pain.
Has anyone an idea of how much extra RAM I need for using Windows.Forms just for one function?
As far as I've ssen there aren't really any alternatives (except using unmanaged code and p/invoke) but this is the least think I really want to do (beyond using e.g NVIDIA APIs).
More ideas are welcome!
greets,
eza
|
|
|
|
|
Hi
I have some Web Service Question
I work whit VS2005 , and I need to build WS
1. Is WS can copy/move/delete files or folders ?
2. Is Ws can make SDF Database file ?
thank's in advance
|
|
|
|
|
E_Gold wrote: 1. Is WS can copy/move/delete files or folders ?
On the server the Web Service runs on, yes (security considerations notwithstanding). On the client it would depend on what the consumer of the Web Service is built to do, which you won't necessarily be in control of.
E_Gold wrote: 2. Is Ws can make SDF Database file ?
On the server, yes. And this could be serialized and sent to consumers of the Web Service.
print "http://www.codeproject.com".toURL().text
Ain't that Groovy?
|
|
|
|
|
It seems that you need to read a bit more about web services. They are nothing but a Web application programming interfaces software system that supports interaction over a network.
In your web service, you can do whatever you want to do.
E_Gold wrote: 1. Is WS can copy/move/delete files or folders ?
Yes, you can work with files and folders
E_Gold wrote: 2. Is Ws can make SDF Database file ?
yes you can work with any database.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Has anyone successfully integrated ImageMagick with vs.net 2008? I am currently using c#, but as long as I can compile the code in 2008 I should have a working DLL to reference. Any pointers on where to get the source code and what to do to get it compiled would be wonderful.
Thanks in advance
|
|
|
|
|
Are you trying to compile IM in VS2008? No I have not tried that, but it works like charm in VS2005.
you can get all you need to know about Image Magic at imagemagick.org[^]
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Yes, I am trying to compile IM in vs 2008. Had it working for over a year in vb.net 2005, now updating code to c#2008 and so far it's a bear!
imagemagick.org has nothing of use on using it in vs 2008.
Thanks for the reply
|
|
|
|
|
Hi Folks,
I made a test app with sql server 2008 and vc# 2008.
Used dataset, bindingsource, table adapter, bindingnaviagator
When i am displaying data on the form in textbox, combobox, text area
i found that the data is added with extra whitespace upto the width of the
column in table. if my db column size is char(30), and it actually has a value
of 10 chars...when i retrieve record it displays 10chars +20whitespace on text
box and the text goes hidden to left side in textbox etc....
Is there a way to fix this????????? Coz i am using bindingsource and tableadapter
i cant handle it at db level trimming....pls help.....These whitespaces are
really irritating.......
regards
shafi
|
|
|
|
|
You could trim your string before entering into the database,
example:
string str = "my blank spaces ";
str = str.Trim();
This will trim all whitespace from front or back of the string.
Hope that helps.
|
|
|
|
|
Hi there,
Trim() i used ......
Its the first time...........like a form with a binding navigator directly picking db values. we use trim when we are sending the records to db........
Using binding navigator it calls a Fill() function on tableadapter..and retrieves records from dataset
Is there a way to edit default fill query in C#....I think if i can edit the default query i can add DB Trim function and my problem will be solved........Can anybody know how to edit Fill query of a binding navigator or dataset
pls help
|
|
|
|
|
I run the query in access and it populates results fine. It is a simple select command. I think I might just have the code wrong somewhere just can't figure it out. Please help. The headers populate in the datagridview but none of the data does.
private void QueryTest()
{
pcDataConn = Utility.DBConnection();
try
{
OleDbCommand cmd = new OleDbCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.Connection = pcDataConn;
cmd.CommandText = "FHD_qry";
DataSet ds = new DataSet();
OleDbDataAdapter adapter = new OleDbDataAdapter(cmd);
adapter.Fill(ds);
DataTable dt = ds.Tables[0];
pcDataview.DataSource = dt;
int totalResults = dt.Rows.Count;
Resultslabel.Text = "Results: " + dt.Rows.Count.ToString();
if (totalResults > 0)
{
Exportbutton.Enabled = true;
}
else
{
Exportbutton.Enabled = false;
}
}
catch(Exception ex)
{
Console.WriteLine(ex.Message.ToString());
}
pcDataConn.Close();
}
|
|
|
|
|
I figured it out. It was the whole wildcard through the OleDb connection. I just changed the ?'s to #'s in the stored procedure and it worked fine.
|
|
|
|
|
Hello all,
I'm building this app. that stores list of files in a directory in a database (called an image in the app's terminology) and then lets you browse the directory even if it has been deleted. Now my problem is that, I want to provide search facility, so that a user can search the files. The user would be able to search within as many images as he likes simultaneously.
Now I can't figure out, how to implement the UI for the search results. The search input will be taken through a separate dialog box. But I really can't decide about the UI mechanism. I mean, I want everything to be very clear & concise. Further, I want the search results to be visible in the same window. Please don't suggest using tabs . Please help
Here[^] is a pic of the current UI.
Thanks in advance.
Excuse me for buttin' in, but I'm interrupt driven.
|
|
|
|
|
keep data in any source like DataTable, XML...then when user search read the data from source and add only those you want. And in DataTable you can use Select() to filter the result.
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)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi Xmen
My problem is not how to implement searching but, how to display the search results. I've already formulated the background searching algo. but, I can't think of how to integrate the search results in the main window.
Excuse me for buttin' in, but I'm interrupt driven.
|
|
|
|
|
whats the problem...you can use DataGridView to show the result.
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)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi There
I am using win form in C#, Access database for my project.
I have a situation whereby I need to update a primary key.
In my table, I have these columns:
[U]UserID[/U], FName, LName, Address
I have the following method
private void btnUpdateCigreID_Click(object sender, EventArgs e)
{
OleConn.Open();
string updateSql = "UPDATE Membership SET Membership.UserID = '" + txtUserId.Text + "' Where ((Membership.UserID )= ' " + txtTempID.Text + "' )";
OleDbCommand OleCmd = new OleDbCommand();
OleCmd.CommandText = updateSql;
OleCmd.Connection = OleConn;
OleCmd.ExecuteNonQuery();
int R = OleCmd.ExecuteNonQuery();
OleConn.Close();
}
I wonder why I see int R = 0. There is one record execting with old UserID. I don't get any error, but table is not updating.
Is there any other methods to update a primary key using the old primary key? Thank You in Advance.
Thank you
|
|
|
|
|
mistake
((Membership.UserID )= ' " + txtTempID.Text + "' )";
correct
((Membership.UserID )= '" + txtTempID.Text + "')"; // removed space
more correct
Membership.UserID = '" + txtTempID.Text + "'";
plus use SqlParameter instead
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)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Make sure you have not kept the ID as the primary key , as primary key may not be updated...
But I am not that damn sure...
But I havent came across such .....
Now for this its better to use a better way to code...
This should be something like this...
I am writing for SQL but its similar for OLE DB...
SqlCommand cmd = new SqlCommand();
cmd.Connection = cn; //Anything you have as SqlConnection object
cmd.CommandText = "Update Membership SET UserID = @UserID";
cmd.Parameters.AddWithValue("@UserID",txtuserid.Text);
int R = cmd.ExecuteNonQuery();
cn.close();
|
|
|
|
|
hi there,
a want to write a simple program that can do auto-Completion in word or notepad, but i don't have an idea of where to start with the auto-Completion, can anyone point me to an article or beter yet tutorial ?
thank's in advance .
|
|
|
|
|
here[^]
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)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|