| rotating pictures on the fly |
|
 |
Index ‹ DotNet ‹ Net Framework
|
- Previous
- 1
- ADO >> How to INSERT pure <NULL> Into SmallDataTime Field (MS SQL Server)I need to insert NULL into the field with SmallDataTime datatype.
In .NET when I tried to use "" or DBNull.Value it insert "" what
will be automatically converted into '1/1/1900' by SQL Server...
I need to have the Insert statement like this:
INSERT tblTest (Name,smDate) Values ('John',NULL)
But using pure NULL without double quotes ("") is not allowed in .NET.
When I use double quotes ("NULL"), .NET interpreted it as
character string and I got the SQL converting error.
Thank you for the help.
Eugene
- 2
- ADO >> DataSet diffecencesHello,
is there a simple method to get Rows which differ in their values between
two different DataSets?
Ondra.
- 3
- Visual C#.Net >> Using C# to create a scheduled jobI need to create an executible that will run on a nightly basis.
The executible is a simple command line statement like:
OSQL -Usa -PmyPasword -n -Q "BACKUP DATABASE msdb TO DISK =
'c:\msdb.dat_bak'"
Is it possible to use C# to create an executible that will run this command
line statement on a scheduled basis?
If so, can anyone give me some general ideas on how to go about this?
- 4
- Winforms >> Refresh only the CurrentRow of a DataGridView?I have a DGV that is read only. When selecting a row, the item is edited in
individual controls elsewhere on the form, also bound to the same
bindingsource. The default behavior is that when the value is changed in a
textbox, it only repaints the value in the DGV cell after the textbox commits
the value to the underlying object. I want it to update the DGV cell's
display in real time. To do this, I have code in the textbox's TextChanged
event to update the underlying object's property and refresh the DGV. This
works ok. However, if there are more than a handful of records displayed,
this refresh is slow and distracting.
So two questions:
1) Am I approaching this the correct way? Is there a better way to have the
DGV reflect the changes in real time?
2)If this is the best way, is there any way to refresh/repaint only the
currently selected row?
Thanks for any ideas.
Barry
- 5
- Winforms >> Please help - how to call a web link in a windows form...Dear Experts,
I am asked to develop a Windows Application that calls to a given web link
(e.g. http://localhost/Test.aspx?id=1234) and catches the returned HTML from
this link (returned from web server of course). I really have no idea on how
to accomplish this. Could you please give me some hints on resolving this or
please indicate any resources/references that I can refer to?
Thanks a lot for your help.
Tigger
--
I am Tigger.
- 6
- ADO >> One Has Many relation via Dataset to XML questionHi,
I am trying to import/export XML from a database. For the purpose of
this posting I will keep the datastructures as simple as possible. Just
imagine a table 'User' and a table 'Roles', and then a table
'UserHasRole' that specifies what users have what roles (m:n relation).
The idea is that these tables store information about users and the
roles they have got assigned.
--- Tables start
Table User:
UserId
Name
Table Role:
RoleId
Name
Table UserHasRole:
UserHasRoleId
UserId
RoleId
--- Tables end
Now, what I would like is to export data from a database with the above
table layout to XML, let a (rather experienced) user edit the XML file
and then reimport the modified XML file. (Our system has no notion of
deleting users or roles, which significantly simplifies my task) Ideally
I would like to end up with an XML file similar to the following:
--- sample XML file start
<my_xml_io>
<Users>
<User id="1">
<Name>Foo</Name>
<HasRoles>
<Role id="1"/>
<Role id="3"/>
<Role id="4"/>
</HasRoles>
</User>
<User id="2">
<Name>Bar</Name>
<HasRoles>
<Role id="2"/>
</HasRoles>
</User>
</Users>
<Roles>
<Role id="1">
<Name>Admin</Name>
</Role>
<Role id="2">
<Name>Guest</Name>
</Role>
<Role id="3">
<Name>Developer</Name>
</Role>
<Role id="4">
<Name>Manager</Name>
</Role>
</Roles>
</my_xml_io>
--- sample XML file end
I.e. the m:n relation is represented implicitly in the 'User' element.
Now with all the DataSet automation support in VS.NET my first try,
was to visually design some typed datasets, fill them from the db and
then use 'WriteXML'. But the XML I get looks like this (simplified a bit):
--- generated XML file start
<my_xml_io>
<User id="1">
<Name>Foo</Name>
</User>
<User id="2">
<Name>Bar</Name>
</User>
<Role id="1">
<Name>Admin</Name>
</Role>
<Role id="2">
<Name>Guest</Name>
</Role>
<Role id="3">
<Name>Developer</Name>
</Role>
<Role id="4">
<Name>Manager</Name>
</Role>
<UserHasRole id="1">
<UserId>1</UserId>
<RoleId>1</RoleId>
</UserHasRole>
<UserHasRole id="2">
<UserId>1</UserId>
<RoleId>3</RoleId>
</UserHasRole>
<UserHasRole id="3">
<UserId>1</UserId>
<RoleId>4</RoleId>
</UserHasRole>
<UserHasRole id="4">
<UserId>2</UserId>
<RoleId>2</RoleId>
</UserHasRole>
</my_xml_io>
--- generated XML file end
What is the best way to archive my desired XML representation, instead
of the normalized one I currently get?
many thanks in advance,
Andreas
- 7
- Winforms >> Smart Client - IIS errorI'm writing the download stub for a Smart Client, following the QuickStart
samples that come with the Updater Block 2.0.
Tested against my local IIS, the stub works perfectly, but when I deploy it
to a server, I get "The system cannot find the file specified" in my browser.
Local Machine is IIS 6.0, Remote Server is IIS 5.0
Thanks for your help
- 8
- Visual C#.Net >> unhandled exception of type 'System.Net.WebException' occurred in system.web.services.dllI have a C# MRS application that uses the ReportingService's Render
method to retrieve a byte array containing a report.
The following error message occurs
An unhandled exception of type 'System.Net.WebException' occurred in
system.web.services.dll
Additional information: The operation has timed-out.
I saw the following post on MSDN
An unhandled exception of type 'System.Net.WebException' occurred in
system.web.services.dll Additional information: The operation has
timed-out.
To avoid this problem, set the timeout value for the XML Web service
call to infinite, as shown in this example:
Service1 obj = new Service1();
obj.TimeOut = -1; // infinite time out.
My question is how do I incorporate the code into my application - I get
a
Invalid token '=' in class, struct, or interface member declaration
Error message
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
- 9
- Winforms >> Newbie question: how to set focus to a usercontrolI have a usercontrol that contains another usercontrol,
which in turn contains a PictureBox control.
Under a certain condition, I need to set the input
focus on the outermost usercontrol. But once the PictureBox
control (the outermost usercontrol's grandchild) has got
the input focus, I cannot transfer the focus back to the
outermost usercontrol (at least not by simply invoking its
Focus() member function).
Why is this? What can I do to take away the keyboard input
focus from that grandchild, the PictureBox control, and
transfer it back to the outermost usercontrol? (I have tried
to find information about keyboard focus handling that seems
relevant to this question, but what I have found seems rather
far removed from what I need to understand here...)
Note: My application requires very little keyboard input:
mainly a few keyboard-accelerators, and the copy/paste/
cut/delete key. But the copy/paste/cut/delete key must
go to the right usercontrol, because copy/paste/cut/delete
must be handled differently, depending on which usercontrol
has the input focus (or, rather, should have it, from my
point of view). In essence, I am trying to base input
focus on the position of the mouse pointer: if that grandchild
PictureBox control does not have the mouse pointer within
its bounds, it should not receive keyboard input, i.e.
should not have input focus.
Regards and thanks in advance for any enlightenment on
this question,
Christian
- 10
- Visual C#.Net >> Display Linked-List in a DataGridView?How do I set a linked-list as a data source for a DataGridView control?
Should the linked list be a member on a form or its own global class
(or doesn't matter...???) Right now when I set the list as the data
source, the only columns I get are Count, First, and Last. I want data
from the nodes displayed but they are not available as columns to be added.
- 11
- Net Framework >> Memory leak in C#?????I have a button on a form, and when you click the button, it performs
the following:
using (FormMS f = new FormMS())
{
f.ShowDialog();
}
The new form that is shown (FormMS) has a DataGrid that gets bound to
a large DataTable. The DataTable is static so it only gets created
once. So I open FormMS as a dialog and then close it. I continue to
open and close it several times and each time, the memory used by my
application goes up a lot. It doesn't seem to deallocate the memory
needed by the DataGrid. I try calling GC.Collect() after the FormMS
closes and it doesn't do the trick. I tried letting the application
sit overnight to see if it would deallocate the memory and that
doesn't work. I try calling the DataGrid.Dispose method inside my
FormMS.Dispose method and that doesn't work. I have to restart the
application to get it to deallocate the memory. I keep opening it
again and again to see if I must use up all my physical memory before
it deallocates, and that doesn't work either.
Any ideas?
Thanks in advance.
- 12
- Visual C#.Net >> Need Help urgentdaer all...
i'm a new comer with C#, but i want to build a mobile application. does any body can tell me, where do i can start ?
what software needed ?
where i can find a good references to learn it ?
i have .Net installed on my PC, but when there is no Mobile Web Application template. Is there some thing missed with it ?
please help.....
best regards....
- 13
- Visual C#.Net >> Threading problem - Urgent HelpHi,
I have the following problem. I created a
Properties section:
private SerialComm oComm = new SerialComm(); // Wraps a DLL to handle Serial
//comms.
private Thread PrinterThread = null; // Serial Communications Thread
private void Form_load(...)
{
PrinterThread = new Thread(new ThreadStart(StartPrinter));
PrinterThread.Name = "SerialPrinter";
}
// The Thread is started in this procedure
private void button_click(....)
{
if (PrinterThread.ThreadState.ToString() == "Unstarted")
{
try
{
PrinterThread.Start();
Thread.Sleep(0);
}
catch (Exception Ex)
{
//Handle exception
}
}
// This is the procedure the for the Thread
private void StartPrinter()
{
Thread.Sleep(0);
LogInfo("Label Printing: printing thread started");
oComm.sendToPrinter(sFactor,false);
// Calls the serial printing process. It starts its own receiving Thread
within it.
// Returns to this procedure when done. The receiving thread must have
been
//aborted.
if (oComm.lStatus)
this.sMessage.Text = "Printing label has Finished";
// I got an Thread exeption here. After the aborting the receiving
thread
// If this.sMessage.txt is not there, it doesn't happen. Why????
// The exception says: ThreadException found while thread is being
aborted.
// I think it refers to the receiving thread.
this.cmdLabel.Enabled = true;
this.cmdReprint.Enabled = true
}
Thank you,
Carlos
- 14
- Visual C#.Net >> Binding problemHello!
at runtime, when the execution reaches this line:
oGetExpression.DataBindings.Add("Expression",myDataSet,"ADR.Condition");
where: <Expression> is a public property of type string
<myDataSet> is the datasource
<"Adr.Condition"> is the datamember from dataset:
table.tableField
this exception is thrown:
"Object type cannot be converted to target type."
why is this happening?
Thank you.
- 15
- Winforms >> Form control re-build when entering the MDI containerWe have a huge activex control embedded in a Form window. When the Form
has its MDIParent set to a mdi container, the window handle of the Form
is replaced by a new one, and our control has to be InPlaceActivate
twice plus one InPlaceDeactivate( The window handles of the standard
controls within are also replaced ), This causes side effects to our
activex control. The activation involves lengthy initializations such
as downloading data from internet and heavy rendering work, so it is
too expensive to do InPlaceActivate frequently. And our control has
some operations depending on the parent window. Is there any workaround
to avoid frequent inplace activation and window re-building, for
example, creating the mdi child form directly from the MDI container?
|
| Author |
Message |
(Bill

|
Posted: Sat May 12 20:30:33 CDT 2007 |
Top |
Net Framework >> rotating pictures on the fly
Is there a way in vb.net to, 1) detect if an image has been taken with a
> camera on a vertical axis, and 2) rotate the picture for display - across
> an
> intranet (asp.net), with huge files sizes (2 - 3 MB), that doesn't take
> too long?
> (LOL)
>
> Thanks,
> Jim
DotNet239
|
| |
|
| |
 |
Peter

|
Posted: Sat May 12 20:30:33 CDT 2007 |
Top |
Net Framework >> rotating pictures on the fly
On Sat, 12 May 2007 17:03:50 -0700, JimO <EMail@HideDomain.com>
wrote:
> Is there a way in vb.net to, 1) detect if an image has been taken with a
> camera on a vertical axis, and 2) rotate the picture for display -
> across an intranet (asp.net), with huge files sizes (2 - 3 MB), that
> doesn't take too long?
Unless you are dealing with a camera that has a built-in sensor that
detects orientation *and* the camera stores that information in a custom
EXIF field *and* that data is preserved in the copy of the image you're
looking at, you cannot do #1 without human assistance. I'm not aware of
any available general-purpose algorithm to detect picture orientation
based on the contents alone.
As far as #2 goes, that's pretty simple once you've read the image in.
You can use the Image.RotateFlip() method on a Bitmap that you've loaded
from a file.
I hate to break it to you, but even for compressed JPEGs, 2-3 MB isn't
that big anymore. :)
Pete
|
| |
|
| |
 |
JimO

|
Posted: Sun May 13 11:24:42 CDT 2007 |
Top |
Net Framework >> rotating pictures on the fly
I hate to break it to you, but even for compressed JPEGs, 2-3 MB isn't
that big anymore. :)
LOL well... yeah... but I have to display it on a web page. Although, given
the fact it would be accross a a gigabit wire within a small network (like 2
or 3 machines), it may not take that long. One the other hand, I would want
to resize the display to a thumbnail image (like maybe 200x300) onto kind of
a contact sheet. When paging through them, that might take a while if there
are more than a few per page. The camera would be either a Nikon D50 or a
D200. Other software I use will rotate the image, when needed, so, I
know the info is in there somewhere.
"Peter Duniho" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
> On Sat, 12 May 2007 17:03:50 -0700, JimO <EMail@HideDomain.com>
> wrote:
>
>> Is there a way in vb.net to, 1) detect if an image has been taken with a
>> camera on a vertical axis, and 2) rotate the picture for display -
>> across an intranet (asp.net), with huge files sizes (2 - 3 MB), that
>> doesn't take too long?
>
> Unless you are dealing with a camera that has a built-in sensor that
> detects orientation *and* the camera stores that information in a custom
> EXIF field *and* that data is preserved in the copy of the image you're
> looking at, you cannot do #1 without human assistance. I'm not aware of
> any available general-purpose algorithm to detect picture orientation
> based on the contents alone.
>
> As far as #2 goes, that's pretty simple once you've read the image in.
> You can use the Image.RotateFlip() method on a Bitmap that you've loaded
> from a file.
>
> I hate to break it to you, but even for compressed JPEGs, 2-3 MB isn't
> that big anymore. :)
>
> Pete
|
| |
|
| |
 |
| |
 |
Index ‹ DotNet ‹ Net Framework |
- Next
- 1
- Dotnet >> problem with user controlI am having problems setting a asp user control's property from code.
I have an asp.net page and have a user control "page_footer" which has
a property sFooterText. Here is the control:
<%@ Control Language="vb" AutoEventWireup="false"
Codebehind="page_footer.ascx.vb" Inherits="Site1.page_footer"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<script language="VB" runat="server">
Public sFooterText As String = ""
</script>
<table border="0" width="100%" cellSpacing="0" cellPadding="0">
<tr>
<td align="right"><font
class="copy"><%=sFooterText%></font> </td>
</tr>
</table>
The control is defined at the top of my aspx page as so:
<%@ Register TagPrefix="site1" TagName="page_footer"
Src="page_footer.ascx" %>
Everything works great when i set the property explicitly on the page,
such as:
<site1:page_footer id="page_footer_1" runat="server"
sFooterText="Copyright 2004"></site1:page_footer><br>
However if i try to set it from codebehind's Page Load with a line
such as:
page_footer_1.sFooterText = "Copyright 2004"
the "page_footer_1" is underlined in blue, with a message "Name
'page_footer_1 is not declared."
Help me, Obi Wan.
- 2
- Visual C#.Net >> To Mitchell S. Honnerthttp://groups.google.com.pk/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/a28a501a72dce06d?hl=en
Continued from above:
I check out your lib and sample but I was unable to find how to perform
my desired task.:( I would be really thankful to you if you write a
sample code where sound and ID3 tags are synchronized with each other.
Thanks in Advance for ur help.
With best regards
Qumer
- 3
- Visual C#.Net >> Why I always get 'The operation has timed-out.' exception from some pages?Hi all,
Please help me to look at the following code, I always get a 'The operation
has timed-out.' exception. But the URL can be opened in IE properly. I am
wondering if I missed some code. Any help would appreciate!!
HttpWebRequest httpReq;
HttpWebResponse httpResp;
try
{
httpReq =
(HttpWebRequest)WebRequest.Create("http://safety.live.com);
httpReq.Timeout = 10000;
httpReq.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.1; .NET CLR 1.0.3705";
httpReq.ContentType = "application/x-www-form-urlencoded";
httpResp = (HttpWebResponse) httpReq.GetResponse();
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
}
- 4
- Visual C#.Net >> Validating an .exe fileWhen I distribute my .exe assembly, I want to make sure that users get
the correct file. When someone has meddled with the contents, I want the
program to quit with a message. Is there a way to set some kind of
checksum in the .exe itself so that the .exe auto-validates itself? I am
not sure if I express myself clearly
- 5
- Visual C#.Net >> TLBEXP enum export & name manglingI'm trying to create a drop-in replacement for an existing COM library
in C# 2.0. The original library is unmanaged and my consumers are
customers' VB6 legacy apps, many of which rely on global constants. As
.NET doesn't allow global constants, and I have no member name control
over enums, I'm having problems emitting IDL with constants the VB will
consume without extensive code modification. A C# enum that looks like
this:
namespace MyNS
{
public enum MyEnum
{
ValueOne = 1,
ValueTwo = 2
}
}
gives me this IDL in the DLL and through tlbexp.exe:
typedef [uuid(...), version(1.0), custom({...}, "MyNS.MyEnum")]
enum {
MyEnum_ValueOne = 0,
MyEnum_ValueTwo = 1
} MyEnum;
The COM export docs on MSDN clearly state this is by design to prevent
name collision. My legacy apps are looking for ValueOne, and they're
not finding it because I'm emitting MyEnum_ValueOne.
Has anyone solved this problem?
Thanks,
Stephan
- 6
- 7
- ADO >> assigning null value to the Yes/No field of MS Access database tablehi
I want to assign null value to Yes/No field. So that the value of the field
of MS Access database table is neither YES nor NO. Is this possible? The
field properties show that there is a property called "Allow Null". I have
set it to TRUE. But this does not help.
I thereafter try to access this table from VB.NET and try to read the value
or insert a record with this field value as NULL. But when I read the record
as DBBoolean, I always get value as FALSE.
Can somebody throw some light on the same?
warm regards
Haresh Gujarathi
- 8
- Visual C#.Net >> Beginner Question. What does the > mean? Not greater than.I was looking at this code, and have seen it in other code (like it):
/// <summary>
/// Bitmap font class for XNA
/// </summary>
public class BitmapFont
{
private SpriteBatch m_sb;
private Dictionary<int, BitmapInfo> m_dictBitmapID2BitmapInfo;
and like:
m_dictBitmapID2Texture = new Dictionary<int, Texture2D>(); //what's
the paren mean too?
What does the < > mean? What do I search on to understand what the
angle bracket symbols mean in a context like this? Thank you for any
help.
- 9
- Visual C#.Net >> Find dll version numberI'd like to be able to loop through files in a directory and file the
version number of each .dll I find. Does somebody have an example of
how to do this?
Thanks,
JK
- 10
- Visual C#.Net >> about inheritanceHello!
Assume I have a base class called Base and a derived class called Sub.
Assume all the property for the Base class can't fit exactly for the Sub
class.
I mean some of the property for the Base class is wrong for the Sub class is
it then allowed
to inherit from class Base.
The main issue when using inheritance is that Sub is a Base.
//Tony
- 11
- Microsoft Project >> Percent Work CompleteWhat is the difference between % Complete and % Work
Complete? I have tasks where the two are wildly different
even though there are resources assigned. I have been
updating the % Complete only. Thanks for any advice.
- 12
- Visual C#.Net >> Help running scriptI am trying to force my machine to run the Cscript engine against a vbs
script file. Why would the two act differently.
When I run the following code it does not execute the vbs script the same
way as the second option.
scriptConsoleProcess = new Process();
scriptConsoleProcess.StartInfo.FileName = "CScript.exe";
scriptConsoleProcess.StartInfo.Arguments = scriptPath;
scriptConsoleProcess.StartInfo.CreateNoWindow = true;
scriptConsoleProcess.Start();
This option works when I have the CScript set as my default engine.
scriptConsoleProcess = new Process();
scriptConsoleProcess.StartInfo.FileName = scriptPath;
scriptConsoleProcess.StartInfo.CreateNoWindow = true;
scriptConsoleProcess.Start();
- 13
- Net Framework >> updating a shared files using Updater Applicatin BlockHi there,
I have about 20 applications.
There are many dll files that these applications share.
I want to avoid having the duplicated dll files.
Therefore, I crate a folder for these dll files.
Now I want to create an updater system using Updater Application Block.
I know that Updater Application Block is used to individually update
applications.
However, can I update an application along with some dll files in a shared
folder?
I would appreciate your feedback!
- 14
- Visual C#.Net >> Mouse move eventsHi,
I have an MDI app that allows user to create flowcharts.
User can drag flowchart objects (squares, rectangles,
elipses, etc) from the toolbar and put on a form. They
should be able to move the objects around on the form.
This is where the problem is, I have implemented this
using the mouse_down, mouse_up and mouse_move events of
the form. When user selects a object, I receive the
mouse_down mesg, in which I save the current mouse
coordinates. When user drags the object around I receive
mouse move events, in which I compute the distance that
the mouse has moved and move the object by that distance.
When the object is moved, that itself generates new
mouse_move events in the opposite direction. Why are these
events generated and how can I prevent them?
Thanks,
Suhas
- 15
|
|
|