|
First, I'm trying to clarify your requirements. Correct me if that is not what you want. You want your application to have some virtual desktop feature so that when you switch to next window, you don't see any other windows, but you cannot minimize, hide or disable those unseen windows.
My solution is using virtual screen. Lets say your monitor has a resolution of 1280x1024. Your virtual screen will be 2560x1024.
-----------------------------------
| | |
| | |
| Monitor | Unused |
| | |
| | |
| | |
-----------------------------------
First, position all your windows in the UNUSED area. You can do so by changing the size/location property. Then, whatever window you want to switch to, just reposition that window to the MONITOR area. The key point is that whenever you open a window or draw anything in the UNUSED area, you will not see it, but your rendering logic remains functioning.
You may implement this directly to the screen, or in the memory (double buffering).
Hope this helps.
- It's easier to make than to correct a mistake.
|
|
|
|
|
Hi All
i had made a borderless and shaped window using this code
public Form1()
{
this.FormBorderStyle=FormBorderStyle.None;
}
protected override void OnPaint(PaintEventArgs e)
{
e.Graphics.SmoothingMode=SmoothingMode.AntiAlias;
GraphicsPath GP=new GraphicsPath();
//Codeing to get any shape
this.Region=new Region(GP);
}
it works but i got a problem there is some pixilation on the borders which looks very bad
is there any way to make AntiAliasing between the Form and the screen?
thx all
|
|
|
|
|
yes,
there are two kinds of "layered windows"
one of them is the one that .net uses to mask out a certain color to make it transparent
the other one can make the form antialiased , however that mode messes up the control rendering , so you have to paint every control yourself and if i recall correctly , even handle the mouse events.
so google for layered windows.
//Roger
http://www.puzzleframework.com
|
|
|
|
|
I got answer of my problem in this link http://blogs.msdn.com/mswanson/archive/2005/07/07/436618.aspx
but it gives me another problem that I cant but controls in this form , if any one can help in this problem ,he is welcome
|
|
|
|
|
How can i implement security in my web services other than using encryption decryption explicitly. Please keep in mind that this service is to be accessed from a mobile device.
Any method(the most easiest one) will be accepted...
Regards,
Wasif Ehsan.
|
|
|
|
|
|
hello,
i have a datagrid which i need to create dinamically in my code, whose data will be bound, and i also need the columns that conain the information to be tamplate columns (in order to put drop down lists in the footer). i was able to create the template columns but the data from the database does not populate them - anybody know how to do this?
thanks
mor
|
|
|
|
|
look into dataadapters in particular the fill method.
|
|
|
|
|
hi all,
i have a datagridview with 2 columns. one is StuID and the other is TermGrade. both are number fields.
example:
StuID TermGrade
----- ---------
2000 90
2001 80
2002 70
AVG: 80
i want to add a new row. which should contain the last row above. (AVG: under StuID field and 80 under TermGrade field)
for TermGrade field everything is fine. cos it is a NUMBER field and i add a number in that cell.
but for StuID field, i get type mismatch error since i try to add a STRING into NUMBER field.
how can i get rid of this error ?
is there a way to insert such a string (AVG to a number field ?
help please,
thanks in advance.
bye.
ps: how can i use footer in datagridview in windows forms with C# ? is possible to do what i want above with footer ?
|
|
|
|
|
Seems to me the easiest solution is to make the first column a STRING. All you are doing is using it for displaying data anyway. Verify that it is a valid value, convert it to a string for display in the datagrid. If you need to pull it out, all you have to do is cast it back to whatever numeric datatype you are using.
HTH
Gandalf
|
|
|
|
|
hi all,
i have a datagrid view with a few columns (data in datagrid read from access).
and i added a new row at the bottom to store some result operations like sum of some columns.
if one clicks on a column header to change sort order i want to remove the last row (which i added manually) and do sorting. when sorting completed then i want to add the same column again.
i mean i dont want that lastly added row to be sorted with other rows.
in which event i should write such kind of codes ?
help please,
thanks in advance.
bye.
|
|
|
|
|
If I understood it correctly, you need the last row only for display purposes.
If this is the case, then why to add it to the datagrid at all?
Store it separetely, and add manually when you need.
This way you can use standard sort event.
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
hi
i embedd my exe in vs.net project as resource . now in run time i want to run my exe and don't save it in hard . how to do ?
my idea is load exe (in resource) to stream and run it . byt how to run it ?
my exe is win32 application ..
thanks..
|
|
|
|
|
|
How to generate trape code with use of SNMP in C# if u know it plz give the code URGENT
Pradeep
-- modified at 12:41 Monday 12th June, 2006
|
|
|
|
|
Hello,
Can anybody tell me how to minimize the fullscreen window in javascript.
Regards,
Vivek Pokale
vivek
|
|
|
|
|
First, Iam sorry for the subject. I can't get any appropriate subject for this thread.
Now, the problem.
I have listview with checkboxes. when I double click on listview item, checkbox gets checked.
I was wandering how can I prevent checkbox to get checked on double click and instead of checking checkboxes to run an method or anything else, but to still have checkboxes and to check them by clicking on each one?
I've tried with
ListViewItem item = (ListViewItem)sender;<br />
item.Checked = false;
plased on doubleclick event of listview, but raises an error?
Is there any other resolution?
Iam working on Framework 1.1 - for now .
-- modified at 7:23 Monday 12th June, 2006
|
|
|
|
|
Kasic Slobodan wrote: ListViewItem item = (ListViewItem)sender;
item.Checked = false;
If you'd read the error then it'd tell you that sender cannot be cast to ListViewItem because sender is in fact an instance of ListView . In fact if you're running it inside the debugger then it'd even break on that line for you.
It'd be best to handle the ItemChecked event, if the checkbox wasn't suppose to be checked then invert it, otherwise leave it alone.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Yes, you'r right.
I get "Additional information: Specified cast is not valid." when casting ListViewItem to sender.
I will try something.
Thanks
|
|
|
|
|
Hi Folks,
I have 3 datagrids on a same webform. I want to assign a value to 3rd datagrid's specific cell on DataGrid2's SelectedIndexChanged event.
How can I do this?
Is it possible to do this on Runtime?
private void DataGrid2_SelectedIndxChanged(object sender, System.EventArgs e)
{
//Assign a specific value to DataGrid3
}
Thanks in advance and King Regards
|
|
|
|
|
i'm not sure about it for datagrid because am using datagridview. but any way try this:
datagrid.Rows[2].Cell[1].Value= "any value";
Best of Luck.
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
hi all,
on a tabcontrol, how do i know that if a different tab is clicked ?
am i able to check this ? how ¿
let's say i have 3 tabpages. how can i show a messagebox with tabpage's.text when clicked ?
thanks in advance,
bye.
|
|
|
|
|
Mehmet Fatih Akbulut wrote: on a tabcontrol, how do i know that if a different tab is clicked ?
am i able to check this ?
Yes. Write the following code in tabcontrol's Selected event.
if(e.TabPageIndex == 0)<br />
MessageBox(e.TabPge.Name);<br />
else if(e.TabPageIndex == 1)<br />
MessageBox(e.TabPge.Name);
Regards.
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
I use the tabcontrol quite a bit in my application, and although you CAN use the index of the tab pages, using the text property gives you a bit more flexibility IMHO. For instance, so far my users have added 3 different tab pages, and deleted 2 of them, and changed the order of them 3 more times. By using the tabControlName.SelectedTab.Text property instead of the index, I don't have to change NEARLY as much code when things change, and my maintenance programmers will have a much easier time too.
HTH
Gandalf
|
|
|
|
|
hy,
there is a very simple way to see which tab is selected. Use the SelectedIndex property.
for example:
if (tabControl1.SelectedIndex == 1)
{
MessageBox.Show("Tab1");
}
you can also use this property to select a tab page:
tabControl1.SelectedIndex = 2;
If I'm not mistaking the first tab has the index 1 (or 0). Try it.
|
|
|
|