|
I’ve implemented a GUI for a tabletop device using C# and the .NET framework 1.1. At the moment, my interface consists of a collection of virtual sheets of paper in which you can draw. Those documents can be rotated and moved. For the first prototype, I implemented all the graphics by myself in the code. But now I have to reengineer this system in order to add functions. I’m planning to use the standard components, like buttons, textbox, panels, etc. Then, as the second step, I will use activeX, video players, PowerPoint documents, Excel documents etc. Of course, all those things should rotate as well.
So, the question is: Can I extend components, or forms (or generic Windows components...), in order to rotate them? As to as I now, it seems to be impossible to change the orientation of a Component’s ClipRectangle in C#, even if it’s only possible to rotate their graphic interface.
Are there some MS developers who can help me?
Here is the video of the first prototype:
CHILpromo_small.avi
|
|
|
|
|
You can rotate a graphics device using Graphics.Transform, then draw as you usually would, resulting in a transformed image.
using System.Drawing;
using System.Drawing.Drawing2d;
...
Matrix m = new Matrix();
m.Rotate(90);
graphicsSurface.Transform = m;
Any remotely useful information on my blog will be removed immediately. There are 10 kinds of people in the world. Those who have heard of the ubiquitous, overused, worn-out-like-an-old-shoe binary "joke" and those who haven't.
Judah Himango
|
|
|
|
|
to rotate only graphics is not enough. The client rectangle doesn't change, so the Hit-testing algorhythm is wrong.
|
|
|
|
|
|
I normally don't make post like this but PLEASE search before you ask a question. If you would have simply typed "datagrid checkbox" without the quotes into the CP search box you would have found your answer in a few seconds.
Besides The Code Project[^] another good link is http://www.datagridgirl.com[^]
-Richard
|
|
|
|
|
Sorry i meant to ask if i can do this using windows forms not asp .net
|
|
|
|
|
DataGridBoolColumn
CP and Google are your best friend...
|
|
|
|
|
Hi all,
I am living in the UK, using UK time format dd/mm/yyyy, both in the program and the database (MSAccess), but when I use the the comand text such as:
"SELECT ... WHERE(TheDate BETWEEN #"+startdate+"# AND #"+enddate+"#)"
the sql engin get confused between day and month fields and gives wrong result.
Is there any way to set the time format as a default to the UK format?
Thanks,
|
|
|
|
|
Use parameters instead:
"SELECT ... WHERE(TheDate BETWEEN ? AND ?)"
comm.Parameters.Add("startDate",OleDbType.Date);
comm.Parameters.Add("endDate",OleDbType.Date);
comm.Parameters[0].Value=startdate;
comm.Parameters[1].Value=enddate;
|
|
|
|
|
I know this is a RTFM kind of question, but I can't find the answer in the FM.
I have a C# project that uses libraries from an external application.
The instructions I have read:
you will need to change your project settings to include the following folders:
include paths:
[drive]:\Program Files\Blah\Blah\SDK\Include
executable paths:
[drive]:\Program Files\Blah\Blah\Bin
How do I do that?
Thanks.
|
|
|
|
|
Hi )
I'm making a small pocket pc application, and would like it to access the Contact Database.
I have searched the net for days but can't find out how.
I don't know if it's a sqlce database.
Any help would be appreciated.
Steen
|
|
|
|
|
Hi,
I've put a datagrid in a tabPage. As in most cases the number of collumns exceed the width of the screen.
How can I make a scrollbar appear in this case ? (so horizontal,vertical)
More info. The tabControl holding the tabpage is put in an Panel.
Thanks in advance
|
|
|
|
|
I have a rather complex project in C# - that contains, among others, a Panel on which I have a number of objects of the same UserControl Type. The UserControl contains 4 PictureBoxes on it. Each PictureBox has an image associated to it, from the resources.. Sometimes, very rarely, but it happens, I get the following error:
System.ArgumentException: Invalid parameter used.
at System.Drawing.Image.get_Width()
at System.Drawing.Image.get_Size()
at System.Windows.Forms.PictureBox.GetPreferredSize()
at System.Windows.Forms.PictureBox.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
at System.Windows.Forms.LayoutManager.LayoutDockedControls(Control container, LayoutEventArgs levent)
at System.Windows.Forms.LayoutManager.OnLayout(Control container, LayoutEventArgs levent)
at System.Windows.Forms.Control.OnLayout(LayoutEventArgs levent)
at System.Windows.Forms.ScrollableControl.OnLayout(LayoutEventArgs levent)
at System.Windows.Forms.Control.PerformLayout(Control affectedControl, String affectedProperty)
at System.Windows.Forms.Control.PerformLayout()
at System.Windows.Forms.ScrollableControl.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.WmShowWindow(Message& m)
I am not quite sure, but I think I ususally obtain this error when scrolling the panel on which the user controls are situated. The error, as I've said, happens only very seldom. I can't provide the code, since it is very large.
Any help would be greatly appreciatedly - maybe someone got into the same problem.
|
|
|
|
|
Hello, a simple question (or not), I want to register more than 1 channel http at the same application. I just want to do something like this:
System.Runtime.Remoting.Channels.Http.HttpChannel ch1 = new System.Runtime.Remoting.Channels.Http.HttpChannel(8100);
System.Runtime.Remoting.Channels.Http.HttpChannel ch2 = new System.Runtime.Remoting.Channels.Http.HttpChannel(8101);
System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(ch1);
System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(ch2);
Or a way for change the channel name.
tks
Wender Oliveira
.NET Programmer
|
|
|
|
|
Hello everyone
I'm just starting a project in C# sending data back and forth from a Pocket PC to a desktop machine.
I'm using sockets at the minute and it seems pretty straight forward to do this over WIFI or in a cradle via activesync but I'm struggling to find much to help me move this to use GPRS on say an XDA II.
I'm sure it can be done but I've not seen any examples or instructions in any books or on the web - can any of you guys point me in the right direction? I've seen examples of "Connection Manager" but it all seems to be C++ - can this be used in C# somehow?
Many Thanks
Matthew
|
|
|
|
|
Hi guys,
I have just been fiddling with a DataGrid for the first time and have managed to display pretty much what I want, except that it always highlights cell 0,0.
Is there an option somewhere that will stop this as it makes the grid look really nasty. The only option I could find that stopped it was DataGrid1.enabled = false but of course this has lots of other unwanted side-effects such as the columns cannot be resized by the user.
Any ideas would be much appreciated
Mike
|
|
|
|
|
I am programming in C# and I want to get direct access to the harddrive to read data and maybe later also write data.
I have looked at msdn but I dont really know what to search for. Maybe someone know what native functions I should call?, or point me in the right direction.
Thanks! // Anders
------------------------------
http://www.anderslinder.se
|
|
|
|
|
It's not accessing the hard drive directly, but you could call functions from the Win32 API. The page below covers the functions you can use. If you go to http://www.pinvoke.net/ you ought to be able to find the P/Invoke signatures to let you use them. Alternatively, you could created a class wrapper in Managed C++ that called the functions directly, and then consume that within your C# app.
http://jan.netcomp.monash.edu.au/ssw/files/win32.html[^]
--
Paul
"Put the key of despair into the lock of apathy. Turn the knob of mediocrity slowly and open the gates of despondency - welcome to a day in the average office."
- David Brent, from "The Office"
MS Messenger: paul@oobaloo.co.uk
Download my PGP public key
|
|
|
|
|
Thanks for the fast answer. I think I know what I should do now.
// Anders
------------------------------
http://www.anderslinder.se
|
|
|
|
|
|
I've not got any experience with Gentle.NET, have you considered NHibernate? It's still in Alpha but I believe that what it does provide is pretty stable and reasonably well tested (i.e. production quality), and I also believe it supports cascading deletes. As for a default mapping of commands to stored procedures, I don't know. You may also want to take a look at iBATIS.NET.
--
Paul
"Put the key of despair into the lock of apathy. Turn the knob of mediocrity slowly and open the gates of despondency - welcome to a day in the average office."
- David Brent, from "The Office"
MS Messenger: paul@oobaloo.co.uk
Download my PGP public key
|
|
|
|
|
Seems like there're plenty of Object-Relational mapping tools around. Some of the desirable features includes:
1. transaction
2. referential integrity, cascade deletes...
3. auto-increment, uid generation
4. inheritance
5. supports used of stored procedures
6. database/provider independent access
7. generation of SQL scripts from UML
...
What important feature have I omitted here? For our project, [1], [2], [3] are basic requirements. [4], [5], [7] are "nice-to-have". [6] ... we're just working with SQL server, but the rest of our application are built pretty robustly that ... we'd prefer OR mapping tools to be data provider independent... so, let's say [6] is also a requirement.
Anyway, anyone familiar with history of OR mapping tools? Which are the most popular OR tools around?
Norman Fung
|
|
|
|
|
Hi Everyone,
i got a big problem here. I need to reproduce the behaviour of the Photoshop layer blending mode "Hard Light". If I use Photoshop load up a picture and put a layer with a solid color on top of that picture and set this layers Blending Mode to "Hard Light" then the Color of the layer seems to be mixed with the lights and darks of the underlying picture.
Then i went to my c# application:
I thought well take the overlapping pixels of the picture and the layer and mix the HSV Values together. But whatever i do i can't make it look like photoshop.
Does anyone have a clue or hint that could point me into the right direction to be able to reproduce that blending in C# ???
Any help greatly appreciated !!!
Thanks,
Oliver
|
|
|
|
|
|
Hi All,
I've a class file written using VB 6.0.
The class file has some complex methods.
Now I need to use that methods in my C# project.
It is too hard to convert the Vb code to C#.
By googling I came to know that, we can create interop wrapper to attain this goal.But I'm not aware of interop wrapper even what is that.
Pls. can anyone give me the urls or sample code on this topic ?.
Your help would be greatly appreciated.
DHARMA.R
|
|
|
|