Windows services opens a win application form.
Windows services opens a win application form.
Hi,
How do I get my Windows service opens form in windows application ?
I have this bit of code :
Service1.cs
===========
using System.Windows.Forms;
protected override void OnStart(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form2());
eventLog1.WriteEntry("Start DONE.");
}
This does not work. When I start my service it just times out.
Any ideas ?
cheers.
Andrew Tag: MODI drag drop - Microsoft office document imaging Tag: 139029
windows service opens form in windows application
Hi,
How do I get my Windows service opens form in windows application ?
I have tis bit of code in :
protected override void OnStart(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form2());
eventLog1.WriteEntry("Start DONE.");
}
This does not work. When I start my service it just times out.
cheers.
Andrew Tag: MODI drag drop - Microsoft office document imaging Tag: 139028
identity does not have write access to Temporary ASP.NET Files'.
Hi Friends,
I created one ASP.Net 2.0 application and deployed that in IIS.
When I tried to access that through IE, it is giving following error.
The current identity (ComputerName\ASPNET) does not have write access
to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files'.
I have done following things
run C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
run aspnet_regiis -ga "ComputerName/ASPNET"
But still i am getting same error.
Please help me.
Thank you
Naveen G Tag: MODI drag drop - Microsoft office document imaging Tag: 139024
Is AJAX Extension needs Visual Studio .Net 2005
Hi,
Do Visual Studio .Net 2005 need to be installed for installing AJAX
Extension.
Thank you
Naveen G Tag: MODI drag drop - Microsoft office document imaging Tag: 139022
How to write a .NET attribute which does just like ObsoleteAttribute...
Hi,
In .NET there is attribute named ObsoleteAttribute which is derived from
System.Attribute Class. This attribute when applied to a target (class or
method etc.) gives a compiler warning/error. I know we can write our own
attributes by inheriting the System.Attribute but I want to make it give
compiler warning or error when it is applied on the defined attribute
target.
How can we write such an attributes?
Regards,
Ashok G Tag: MODI drag drop - Microsoft office document imaging Tag: 139021
download file from IIS 7.0 using httpwebrequest problem
hello
i made an application that connects to a http server (iis 7.0 on vista) and
downloads/uploads a file using httpwebrequest (.net 2.0).
i have a problem when uloading files. i have write permissions and i think
that all it's set ok. the error i get is 404 file not found. when i make the
upload i set the method property of the request as "PUT". with the same code
on an XP machine it works.
has anyone any idea about how to set my iis 7.0 website to accept that file?
and why the message is file not found?
andrei Tag: MODI drag drop - Microsoft office document imaging Tag: 139019
CodeBase and Dependent Assemblies
Hi
I have a question or two which I'm pretty sure of the answers, but wanted it
confirmed by those who know more than me!!
Basically we want to share assemblies across many applications and allow for
side by side execution, but for reasons that I donâ??t quite agree with the GAC
is ruled out! These applications are essentially scheduled tasks hence using
the GAC means deploying to many boxes.
So that leaves me with adding a CodeBase element for each dependent
assembly. This works fine except when the referenced assembly also depends
on another assembly in the CodeBase directory, in this case the application
fails with a FileNotFoundException.
Using FusLogVw it's clear that the CodeBase is not used when probing for
this dependent assembly that is not directly referenced by the application.
If I add another dependentAssembly element for this assembly then all is good.
So at last I get to my questions:
When loading an assembly via a CodeBase why doesn't Fusion use the CodeBase
to find any of its dependent assemblies?
Other than the GAC is there an alternative?
Thanks for your help.
Cheers
Doug Tag: MODI drag drop - Microsoft office document imaging Tag: 139018
VLAN, Socket and network configuration
In our company we have touchscreen in appartment in a building.
We want to 'secure' the touchscreen from each other, and we set each of them
in a VLAN.
Now we have security cameras and intercom (on other VLAN) and we need to
share them across the appartment, for that we have a firewall whic does
routing as well.
Also I'm new to this company and I don't really understand very well how all
of this work.
Currently it's all TclTk and Linux.
We are going (thanks to my evangelism) to .NET/WPF (and probably Windows
Server as well).
Now I wonder about:
1. how do I write a program on the intercom machine which access the flat?
(they are on different VLAN and there is some tagging of the network packet
going on as far as I understood)
2. what do you think of that architecture?
it's just that VLAN are mysterious to me and I wonder why not having all the
machines on the same network? Yet I'm sure with a bit of explanation it will
all become clear,any MS link on the topic? andadvice about the config?
3. Also does Windows server could act as a router for this kind of
configuration? Tag: MODI drag drop - Microsoft office document imaging Tag: 139013
How to use in .Net path longer than 260 characters
Hello all,
I'm trying to use paths longer than 260 characters, but the classes
I've used like System.Directory seems to lack support of NTFS long
paths like:
\\?\d:\test
or
\\?\UNC\testmachine\testshare
Can anybody give me any clue on that?
Thanks in advance Tag: MODI drag drop - Microsoft office document imaging Tag: 139004
System.Diagnostics.Process.CloseMainWindow(), WM_CLOSE, SC_CLOSE
My application runs minimized from a system tray and when
CloseMainWindow() is invoked the application does not get the close
request. When the applications displays a dialog box then
CloseMainWindow() works fine. In general this is not good since I can
not predict/force the application out of the system tray.
System.Diagnostics.Process.CloseMainWindow() is essentially a Native
Win32 SendMessage/PostMessage with WM_CLOSE
On the other hand if I use unmanaged code to call SendMessage with
SC_CLOSE, my application running minimized in the system tray gets the
request and closes gracefully.
My question what piece of the .NET framework will send SC_CLOSE?
TIA,
Jeff Tag: MODI drag drop - Microsoft office document imaging Tag: 139001
Windows Service & System.Timers.Timer production issue...
I'm looking into a production issue related to a windows service and
System.Timers.Timer. The background is the windows service uses a
System.Timers.Timer to periodically poll a directory location on a
network for files and then copies these files to another location (on
the network) AND then updates a record in the database. The file
copying is performed before the database update because the file
system is not transactional.
The code C# .Net (2.0) has the required try/catch/finally to capture
any exception that might be generated during the Timer Elapsed event -
any errors that are generated are logged. I also know about the issue
relating to System.Timers.Timer swallowing unhandled exceptions. The
code also logic (locks) to prevent to Timer Elapsed event being
processed at the same time, the files are processed in a synchronous
manner.
The issue that is arising is intermittently files are being copied BUT
the database record is not being updated as expected AND there is no
error message in our logs. As I said this is an intermittent fault
that I can't reproduce on the development server even when I chuck a
large number of files (large file size as well) at it.
I want to know has anyone had any similar experiences.
Next step is to investigate the hardware & software configuration of
the production server.
Cheers
Ollie Riches Tag: MODI drag drop - Microsoft office document imaging Tag: 139000
Xml File Reading Issue
Hi
I am trying to read a large xml file (about 69mb in size) using ReadXML()
method of DataSet, it takes very long to do so, i there some other way to
read such large XML files.
TIA
Barry Tag: MODI drag drop - Microsoft office document imaging Tag: 138996
Hook web service call
Hello,
A windows forms client connect to an ASP.NET 2.0 web service.
A proxy class is generated by Visual Studio 2005.
How can I simply store (on client side) the time of the last call to the
web service, without modifying the proxy generated class file ?
Thanks for yout help.
--
Fred
foleide@free.fr Tag: MODI drag drop - Microsoft office document imaging Tag: 138989
How can I verify .NET 2.0 installation???
I have found ways by checking the registry, but we have hundreds of
computers. I have a powershell script that can verify the presence of
folders and files. Is there one specific file or folder that .NET 2.0
installs that I can check for? Tag: MODI drag drop - Microsoft office document imaging Tag: 138988
Regex help
6Nov08
6Nov2008
26Nov08
26Nov2008
Will someone please give me the Regular Expression from the above 4 items, i
need to extract
day , Month and Year
TIA
Barry Tag: MODI drag drop - Microsoft office document imaging Tag: 138987
Error Message When I Bring Up Media Center
When this error appears it's also difficult to get out of both the error
message and media center. Here is the error:
WINDOWS - NO DISK
exception processing message c00000135 parameters 75b6bf9c 475b6bf9c 75b6bfac Tag: MODI drag drop - Microsoft office document imaging Tag: 138982
CryptographicException from System.Security.Cryptography.Protected
Hi there,
On some computers running Windows XP, the ProtectData() method sometimes
throws the following CryptographicException:
Type: System.Security.Cryptography.CryptographicException
Message: The system cannot find the file specified.
Source: System.Security
Stack Trace:
at System.Security.Cryptography.ProtectedData.Protect(Byte[] userData,
Byte[] optionalEntropy, DataProtectionScope scope)
...
This is how the method is being called:
byte[] encrypted = ProtectedData.Protect(plain, null,
DataProtectionScope.CurrentUser);
I can't find an answer to why this would be happening. Can anyone think of a
possible reason?
Thank you! Tag: MODI drag drop - Microsoft office document imaging Tag: 138979
.NET winform repainting issure
I have a winform application, and forms with several nested controls
incl. tab controls, tablelayoutpanel, groupboxes and the controls. I
also have some usercontrols that I am adding dynamically. All together
I have more than 300 controls on the application. The problem is that
when I scroll, the form is repainted and my controls disapper for 2
seconds, Many times I see the drag effect as well. I does get annoying
to see the controls disappearing from the screen and reappering.
I have used the SuspendLayout and ResumeLayout when adding the
controls dynamically. I also set the Form.DoubleBuffered property to
true, but it didn't help much.
Please help me with the solution. Thank you. Tag: MODI drag drop - Microsoft office document imaging Tag: 138968
.NET winform repainting issure
I have a winform application, and forms with several nested controls
incl. tab controls, tablelayoutpanel, groupboxes and the controls. I
also have some usercontrols that I am adding dynamically. All together
I have more than 300 controls on the application. The problem is that
when I scroll, the form is repainted and my controls disapper for 2
seconds, Many times I see the drag effect as well. I does get annoying
to see the controls disappearing from the screen and reappering.
I have used the SuspendLayout and ResumeLayout when adding the
controls dynamically. I also set the Form.DoubleBuffered property to
true, but it didn't help much.
Please help me with the solution. Thank you. Tag: MODI drag drop - Microsoft office document imaging Tag: 138967
DateTime
I want to copy a DateTime value to/from an byte[] array. However, when I try
to get the size of DateTime by using sizeof(DateTime), the compiler complains:
'System.DateTime' does not have a predefined size, therefore sizeof can only
be used in an unsafe context (consider using
System.Runtime.InteropServices.Marshal.SizeOf)
Why I cannot get the size just like other integer values? How do I convert a
DateTime to/from byte[]? I have no problem to do it for other types like
short... Tag: MODI drag drop - Microsoft office document imaging Tag: 138958
Missing .Net Framework Configuration utility
I installed VS 2008 with the .Net framework and the Configuration
utility doesn't seem to be installed. How can I install this?
thanks for your help
john Tag: MODI drag drop - Microsoft office document imaging Tag: 138956
Problems Background Printing PDF from C# Application
Hello,
We are having a lot of problems trying to print a PDF file in the background
using a C# application that is executed via SQL Server Agent. The output
should be printed to a local printer (HP Color LaserJet 1600) connected via a
USB port.
We have a C# application that calls System.Diagnostics.Process to run
Acrobat Reader (weâ??ve tried both v8.0.0 and v8.1.2), open an existing PDF
file, and send it to the local printer. The code is shown below.
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.Refresh();
process.StartInfo.Arguments = "/t C:\Temp\TestPDF.pdf"; // and tried "/t
C:\Temp\TestPDF.pdf PrinterName"
process.StartInfo.CreateNoWindow = false;
//process.StartInfo.Domain;
//process.StartInfo.ErrorDialog = false;
process.StartInfo.FileName = "C:\\Program Files\\Adobe\\Reader
8.0\\Reader\\AcroRd32.exe";
//process.StartInfo.Password;
//process.StartInfo.UserName;
process.StartInfo.UseShellExecute = false;
//process.StartInfo.Verb = "Print";
process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
process.StartInfo.WorkingDirectory = new
System.IO.FileInfo(m_PDFPathFile).DirectoryName;
process.Start();
Weâ??ve tried just about every combination of the process objects properties
trying to get the PDF file to print. But, it never works. The code executes
without error, just nothing ever shows up on the printer.
More infoâ?¦ Weâ??re executing our custom C# application via a SQL Server Agent
job. SQL Server Agent is running as Local System account. The Job Step Type
is Operating System (CmdExec), with Run as set to SQL Server Agent Account.
The command is simply the path and file name of our custom C# application
(e.g., C:\Temp\PrintPDF.exe).
Again, we get no errors/exception and no job failures, but the PDF never
gets printed.
How can we re-code or fix our situation?
What can be done/tried?
All help is appreciated. We are stuck.
Thanks. Tag: MODI drag drop - Microsoft office document imaging Tag: 138948
Wholesale Chanel H1628 J12 Diamonds Unisex Watch Replica
Wholesale Chanel H1628 J12 Diamonds Unisex Watch Replica
Chanel H1628 J12 Diamonds Unisex Watch Wholesale Link :
http://www.wholesale-watches.org/wristwatch-2073.html
Wholesale Replica Watches : http://www.wholesale-watches.org/
Buy the cheapest Chanel H1628 J12 Diamonds Unisex Watch in toppest
Replica . www.wholesale-watches.org helps you to save money! chanel-
watch-h1628 , Chanel H1628 J12 Diamonds Unisex Watch , Replia ,
Cheap , Fake , imitation , Chanel Watches
Chanel H1628 J12 Diamonds Unisex Watch Information :
Brand : Chanel Watches (http://www.wholesale-watches.org/
chanel-watches.html )
Gender :
Model : chanel-watch-h1628
Case Material :
Case Diameter :
Dial Color :
Bezel :
Movement :
Clasp :
Water Resistant :
Crystal :
Our Price : http://www.wholesale-watches.org/wristwatch-2073.html
Chanel H1628 J12 Diamonds Unisex Watch in Chanel Watches series won't
be wholesale in China Replica Watches Wholesale, If you want to order,
please contact with us at wholesalewatch@hotmail.com
Thank you for choosing www.wholesale-watches.org as your reliable
dealer of quality waches including Chanel H1628 J12 Diamonds Unisex
Watch . we guarantee every watch you receive will be exact watch you
ordered. Each watch sold enjoy one year Warranty for free repair.
Every order from aaa-replica-watches is shipped via EMS, the customer
is responsible for the shipping fee on the first order, but since the
second watch you buy from our site, the shipping cost is free. Please
note that If the total amount of payment is over $600(USD), the
customer is required to contact our customer service before sending
the money in case failed payment. If you have any other questions
please check our other pages or feel free to email us by
wholesalewatch@hotmail.com. Cheapest chanel-watch-h1628
The Same Chanel Watches Series :
Chanel H0682 J12 Quartz Ladies Watch :
http://www.wholesale-watches.org/wristwatch-2074.html
Chanel H0968 J12 Quartz Ladies Watch :
http://www.wholesale-watches.org/wristwatch-2075.html
Chanel H1634 J12 Diamonds Mens Watch :
http://www.wholesale-watches.org/wristwatch-2076.html
Chanel H1626 J12 Diamonds Mens Watch :
http://www.wholesale-watches.org/wristwatch-2077.html
Chanel J12 Diamonds Black Ceramic Ladies Watch H1625 :
http://www.wholesale-watches.org/wristwatch-2078.html
Chanel Superleggera Ceramic Chronograph Automatic Mens Watch H1624 :
http://www.wholesale-watches.org/wristwatch-2079.html
Chanel J12 Chronograph White Ceramic Mens Watch H1007 :
http://www.wholesale-watches.org/wristwatch-2080.html
Chanel J12 White Ceramic Automatic Midsize Watch H0970 :
http://www.wholesale-watches.org/wristwatch-2081.html
Chanel J12 Chronograph Black Ceramic Mens Watch H0940 :
http://www.wholesale-watches.org/wristwatch-2082.html
cheap ,lowest price , Wholesale Best Chanel H1628 J12 Diamonds Unisex
Watch Tag: MODI drag drop - Microsoft office document imaging Tag: 138947
Wholesale Omega Seamaster Aqua Terra 150M Co-Axial Mens Watch 2517.80
Wholesale Omega Seamaster Aqua Terra 150M Co-Axial Mens Watch 2517.80
Replica
Omega Seamaster Aqua Terra 150M Co-Axial Mens Watch 2517.80 Wholesale
Link : http://www.wholesale-watches.org/wristwatch-3185.html
Wholesale Replica Watches : http://www.wholesale-watches.org/
Buy the cheapest Omega Seamaster Aqua Terra 150M Co-Axial Mens Watch
2517.80 in toppest Replica . www.wholesale-watches.org helps you to
save money! Omega-2517.80 , Omega Seamaster Aqua Terra 150M Co-Axial
Mens Watch 2517.80 , Replia , Cheap , Fake , imitation , Omega Watches
Omega Seamaster Aqua Terra 150M Co-Axial Mens Watch 2517.80
Information :
Brand : Omega Watches (http://www.wholesale-watches.org/
omega-watches.html )
Gender : Mens
Model : Omega-2517.80
Case Material : Stainless Steel
Case Diameter : 2517.80, 2517.80.00, 2517-80, 2517-80-00, 2517/80,
251780, 2517
Dial Color : Blue
Bezel : Fixed
Movement : Quartz
Clasp : Stainless Steel
Water Resistant : 150m/500ft
Crystal : Scratch Resistant Sapphire
Our Price : http://www.wholesale-watches.org/wristwatch-3185.html
Availability: Contact Us For Availability Omega Seamaster Aqua Terra
150M Co-Axial Mens Watch 2517.80 Quartz movement. Stainless steel
bracelet & strap. Stainless steel case. Blue dial. Date Displays at 3
o'clock. Scratch resistant sapphire crytstal. Water Resistant 150
meter/500 feet. Case Diameter 38 mm. Omega Seamaster Aqua Terra 150M
Co-Axial Mens Watch 2517.80 Brand OmegaSeries Omega Seamaster Aqua
TerraGender MensCase Material Stainless SteelCase Thickness 11.2mmCase
Diameter 38mmDial Color BlueBezel FixedMovement QuartzClasp Push
Button DeploymentBracelet Stainless SteelWater Resistant 150m/
500ftCrystal Scratch Resistant SapphireWarranty Warranty service for
this watch will be offered through Weholesale-watches.org and not the
manufacturer. Omega watches have a 2 year Weholesale-watches.org
warranty. Please click here for additional watch warranty
information.Matching Watch Omega Seamaster Aqua Terra 150M Ladies
Watch 2577.80Item Variations 2517.80, 2517.80.00, 2517-80, 2517-80-00,
2517/80, 251780, 2517Omega watches have been a standard for quality
and excellence for over 150 years, when the company began as
Switzerland's first watch manufacturer. When elegance and strength
come together to form an extraordinary timepiece, the result can only
be an Omega wristwatch. Wholesale-Watches is proud to offer a full
line of Omega watches; featuring the Constellation series as endorsed
by model Cindy Crawford. The Omega Cindy Crawford Constellation watch
series is renown for elegance, beauty, and sophistication. Wholesale-
Watches is proud to offer a full line of other Omega watches,
including Omega Seamaster, Omega Aqua Terra, Omega Speedmaster, Omega
double eagle, Omega Broad Arrow, and Omega Co-Axial at competitive
prices.Omega Seamaster Aqua Terra 150M Co-Axial Mens Watch 2517.80 is
brand new, join thousands of satisfied customers and buy your Omega
Seamaster Aqua Terra 150M Co-Axial Mens Watch 2517.80 with total
satisfaction . A Weholesale-watches.org 30 Day Money Back Guarantee is
included with every Omega Seamaster Aqua Terra 150M Co-Axial Mens
Watch 2517.80 for secure, risk-free online shopping. Weholesale-
watches.org does not charge sales tax for the Omega Seamaster Aqua
Terra 150M Co-Axial Mens Watch 2517.80, unless shipped within New York
State. Weholesale-watches.org is rated 5 stars on the Yahoo! network.
Omega Seamaster Aqua Terra 150M Co-Axial Mens Watch 2517.80 in Omega
Watches series won't be wholesale in China Replica Watches Wholesale,
If you want to order, please contact with us at
wholesalewatch@hotmail.com
Thank you for choosing www.wholesale-watches.org as your reliable
dealer of quality waches including Omega Seamaster Aqua Terra 150M Co-
Axial Mens Watch 2517.80 . we guarantee every watch you receive will
be exact watch you ordered. Each watch sold enjoy one year Warranty
for free repair. Every order from aaa-replica-watches is shipped via
EMS, the customer is responsible for the shipping fee on the first
order, but since the second watch you buy from our site, the shipping
cost is free. Please note that If the total amount of payment is over
$600(USD), the customer is required to contact our customer service
before sending the money in case failed payment. If you have any other
questions please check our other pages or feel free to email us by
wholesalewatch@hotmail.com. Cheapest Omega-2517.80
The Same Omega Watches Series :
Omega Seamaster Aqua Terra 150M Co-Axial Mens Watch 2517.50 :
http://www.wholesale-watches.org/wristwatch-3186.html
Omega Seamaster Aqua Terra 150M Co-Axial Mens Watch 2517.30 :
http://www.wholesale-watches.org/wristwatch-3187.html
Omega Seamaster Aqua Terra 150M Co-Axial Mens Watch 2503.80 :
http://www.wholesale-watches.org/wristwatch-3188.html
Omega Seamaster Aqua Terra 150M Co-Axial Mens Watch 2503.30 :
http://www.wholesale-watches.org/wristwatch-3189.html
Omega Seamaster Aqua Terra 150M Co-Axial Mens Watch 2502.80 :
http://www.wholesale-watches.org/wristwatch-3190.html
Omega Seamaster Aqua Terra 150M Co-Axial Mens Watch 2502.50 :
http://www.wholesale-watches.org/wristwatch-3191.html
Omega Seamaster Aqua Terra 150M Co-Axial Mens Watch 2502.30 :
http://www.wholesale-watches.org/wristwatch-3192.html
Omega Seamaster Aqua Terra 150M Co-Axial Mens Watch 2502.52 :
http://www.wholesale-watches.org/wristwatch-3193.html
Omega Seamaster Aqua Terra Mens Watch 2817.80.37 :
http://www.wholesale-watches.org/wristwatch-3194.html
Omega Seamaster Aqua Terra Mens Watch 2817.50.37 :
http://www.wholesale-watches.org/wristwatch-3195.html
Omega Seamaster Aqua Terra Chronograph Large Mens Watch 2812.52.37 :
http://www.wholesale-watches.org/wristwatch-3196.html
Omega Deville Prestige Mens Watch 4510.52 :
http://www.wholesale-watches.org/wristwatch-3197.html
cheap ,lowest price , Wholesale Best Omega Seamaster Aqua Terra 150M
Co-Axial Mens Watch 2517.80 Tag: MODI drag drop - Microsoft office document imaging Tag: 138946
EIL Logging to Custom Event Log?
Can anyone post an example of how to log to a custom (new) Event Log?
I don't want to use Application or System or any of the other built-in
ones. I want to write to a new log called "CustLog".
I think I just need to see what the .config snippet should look like,
right?
Thanks. Tag: MODI drag drop - Microsoft office document imaging Tag: 138940
OLE call STAThreadAttribute exeception on
I was having the same issue and found on another post that this was not an issue when run in release mode - only in debug mode. That got me to thinking... so I went out in the bin file and deleted all files in the Debug and Release directory, did a clean and rebuild. After that, set to run in debug mode and ran just the way I expected - no errors and savedialog poped up without a hitch.
Hope this helps. Tag: MODI drag drop - Microsoft office document imaging Tag: 138937
Overrides WinProc
Hi
I'am Trying to overrides WinProc to change the NonClient Area to use
my own skin
once i start the Debugging i can see the the changes, and then the
form will paint the standard windows nonClient Area
and form will be frozen
the code looks something like that
Public Class Form1
' API Declarations
Declare Function ScreenToClient Lib "user32" (ByVal hwnd As
Integer, ByRef lpPoint As Point) As Integer
Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Integer)
As Integer
Declare Function GetWindowRect Lib "user32" (ByVal hwnd As
Integer, ByRef lpRect As Rectangle) As Integer
<System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Demand,
Name:="FullTrust")> _
Protected Overloads Overrides Sub WndProc(ByRef m As
System.Windows.Forms.Message)
'handle hits here
If m.Msg = 132 Then
ElseIf m.Msg = 133 Then
' (WM_NCPAINT)
Dim g As Graphics =
Graphics.FromHdc(GetWindowDC(Me.Handle))
Dim aRect2 As New Rectangle()
GetWindowRect(Me.Handle, aRect2)
Dim pt As New Point(aRect2.Left, aRect2.Top)
ScreenToClient(Me.Handle, pt)
Dim pt2 As New Point(aRect2.Right, aRect2.Bottom)
ScreenToClient(Me.Handle, pt2)
Dim aRect As New Rectangle(0, 0, aRect2.Right -
aRect2.Left, aRect2.Bottom - aRect2.Top)
Dim imgTopLeft As Image = Image.FromFile("c:\skins
\TopLeft.png")
Dim imgTopMid As Image = Image.FromFile("c:\skins
\TopMid.png")
Dim imgTopRight As Image = Image.FromFile("c:\skins
\TopRight.png")
Dim imgBottomLeft As Image = Image.FromFile("c:\skins
\BottomLeft.png")
Dim imgBottomMid As Image = Image.FromFile("c:\skins
\Bottom.png")
Dim imgBottomRight As Image = Image.FromFile("c:\skins
\BottomRight.png")
Dim imgRight As Image = Image.FromFile("c:\skins
\Right.png")
Dim imgLeft As Image = Image.FromFile("c:\skins\Left.png")
g.DrawImageUnscaled(imgTopLeft, 0, 0)
g.DrawImage(imgTopMid, imgTopLeft.Width, 0, (Width -
(imgTopRight.Width + imgTopLeft.Width) + 2), imgTopMid.Height)
g.DrawImage(imgTopRight, Width - imgTopRight.Width,
aRect.Top, imgTopRight.Width, imgTopRight.Height)
g.DrawImage(imgBottomLeft, aRect.Left, Height -
imgBottomLeft.Height, imgBottomLeft.Width, imgBottomLeft.Height)
g.DrawImage(imgBottomMid, imgBottomLeft.Width, Height -
imgBottomMid.Height, Width - imgBottomLeft.Width, imgBottomMid.Height)
g.DrawImage(imgBottomRight, Width - imgBottomRight.Width,
Height - imgBottomRight.Height, imgBottomRight.Width,
imgBottomRight.Height)
g.DrawImage(imgRight, Width - imgRight.Width,
imgTopRight.Height, imgRight.Width, Height - imgBottomRight.Height)
g.DrawImage(imgLeft, Left, imgTopLeft.Height,
imgLeft.Width, Height)
g.Dispose()
Else
MyBase.WndProc(m)
End If
End Sub
End Class
thnaks
a_pess Tag: MODI drag drop - Microsoft office document imaging Tag: 138936
File Information of media files
Hi,
I'm using Windows XP/SP2 C#2005 / .NET 2.0
I'm trying to access (read and possibly write) the information in media
files (mp3 and wma) using C#. I noticed that if I browse to the â??My Musicâ??
folder using the windows explorer the folder properties can be set to â??Best
For Music Filesâ?? and the explorer than displays artist name and so on. Is it
possible to access this feature of getting the media file information with
C#? I imagine something like accessing the file using FileInfo, declaring it
a media file and than read all the info like artist and so on the same way
one can get file size and creation dates. Is this Possible? Tag: MODI drag drop - Microsoft office document imaging Tag: 138934
Binding a generic List to GridView
Hi there,
sorry for crossposting, it's getting late in the evening here in Europe :-(
I have a little problem binding a generic list to a GridView. The List gets
filled
with data from textboxes (via properties in class Person, see below) and I
want the grid to show each new set of textbox strings to show up as a new
row in the grid. i mahaged to do this by definig a little sessionmanagement
but the really problem now is that each time I post the strings to the
server, the previus set of data/strings in my grid (and also in the List)
gets overritten with the last input of strings. In the end i get thre or
four or more rows in my dataset with the strings of the textbox input.
Any idea about this?
Thanks very much, Andi
CODE:
Public Class Person
Public lpers As New List(Of Person)
Private vorname As String
Private nachname As String
Private alter As String
Private geburtsort As String
Public Property GetPersVorname() As String
Get
Return vorname
End Get
Set(ByVal value As String)
vorname = value
End Set
End Property
Public Property GetPersNachname() As String
Get
Return nachname
End Get
Set(ByVal value As String)
nachname = value
End Set
End Property
Public Property GetPersAlter() As String
Get
Return alter
End Get
Set(ByVal value As String)
alter = value
End Set
End Property
Public Property GetPersGeburtsort() As String
Get
Return geburtsort
End Get
Set(ByVal value As String)
geburtsort = value
End Set
End Property
End Class
Dim p As New Person
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
If IsNothing(Session("Person")) Then
Session("Person") = New Person
End If
p = Session("Person")
End Sub
Public Sub arrFill()
p.GetPersVorname = TextBox1.Text
p.GetPersNachname = TextBox2.Text
p.GetPersAlter = TextBox3.Text
p.GetPersGeburtsort = TextBox4.Text
p.lpers.Add(p)
GridView1.DataSource = p.lpers
GridView1.DataBind()
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
arrFill()
End Sub Tag: MODI drag drop - Microsoft office document imaging Tag: 138933
Receiving Socket Close event in .NET Sockets
How do you recognize a Socket Close event in .NET. From what I have read on
the internet, it is done by checking if the byte count is zero in the
EndReceive() callback function in an Asynchronous type of connection. What I
can't seem to find out is how you do this if you are using a Synchronous
connection. Does anyone know how this is done?
Thanks,
Phil Tag: MODI drag drop - Microsoft office document imaging Tag: 138925
Framework 2.0 to Framework 3.5
I'm using VS 2005, and have a dll in some code (system.core.dll) that
was included in something someone sent me to run on my system.
I have production on a server using Framework 2.0 that I want to keep
intact.
Will upgrading my development box to Framework 3.5 preclude any
development or functionality in the 2.0 environment I am responsible for?
BC Tag: MODI drag drop - Microsoft office document imaging Tag: 138921
Duplicate 0xFF in Socket.Receive(Byte[])???
I use Socket.Receive(Byte[]) to receive data in server from client over
TCP/IP. All byte values of 0xFF sent by client are showing up DUPLICATED in
server receive. In other words, if client sends [0xFF, 0x01], then server
receives [0xFF, 0xFF, 0x01]. It's as if bytes having values 0xFF are treated
as some sort of DLE that needs to be repeated to get through. Any idea what's
going on here? Tag: MODI drag drop - Microsoft office document imaging Tag: 138920
Form not disposing due to lingering reference
Hi everyone,
i've got a problem with a Form, because it is not being disposed of when I
close the form. Nevertheless, callback methods registerd to the
"Form.Disposed" event of this very Form are being called. But when the
callback method are being executed the "Form.IsDisposed" property is still
"false".
Obviously there must still be a reference to this Form instance. But this
reference is not explicitly created or managed by my code. I analysed my app
with the YourKit Profiler for .NET and found out, that the "control" member
of a "System.Windows.Forms.Control/ControlNativeWindow" instance is
referencing my Form.
Can anyone please give me a clue on
(a) what this ControlNativeWindow is
(b) how / when / why it is created
and most important (c) how I can get rid of this reference to my Form.
Any input welcome!
Thank you! Tag: MODI drag drop - Microsoft office document imaging Tag: 138918
Binding to a datagrid
Ha all.
I have a my custom class with few strings. Then i have a List of
my custom class. I' m adding data to list with "mylist.Add(mycustmclass)"
I wnat to bind that list to a GridView but i get an exeption
" The data source for GridView with id 'GridView1' did not have any
properties or attributes from which to generate columns. Ensure that your
data source has content."
Where is the problem? Tag: MODI drag drop - Microsoft office document imaging Tag: 138912
typed dataset
Hi all,
I need to make a typed dataset cause i import a dataset from foxpro
I use this code
Dim oDbcommand As New SqlDataAdapter(Sql, Conn_SqlServer)
oDbcommand.MissingSchemaAction = MissingSchemaAction.AddWithKey
oDbcommand.Fill(Me.DataSet, Me.TableName)
My Problem is vs 2005 or Framework 2.0 don"t return the well definition
a numeric field
(from sql server 2000)
the xsl returned for the numeric Field
<xs:element name="cli_pricemin" type="xs:decimal" minOccurs="0" />
for the string field
<xs:element name="cli_email" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
I would like to have the maxlength and the decimal,
for the numeric field , pricemini <xs:maxLength value="10" />
Have you an Idea ?
Olivier Tag: MODI drag drop - Microsoft office document imaging Tag: 138902
Uri and the %2f and %5c escape codes.
We need to be able to use the following URL that is given to us by a test
harness.
hTTps://000.000.000.000:000/59B9F4F20E2911DDA2C7E519FDF7B25D;59B9F4F30E2911DDA2C79DE1971E1E45/@%5C%A1%38jzrF%88K6czQq%2A~%bc%e0HMn%027Cxh:Kc)R+z%0EAPySaroF%19b-0X2G%06F)%3du%c2%55eOQY%03DZd*:8cviSj.A~CYRe.H.$%4CMp%CBCr'xm!y%D3HW%F2%5D+7@JvR%B7Z
I cannot construct a Uri and use that Uri in a web request. I always get 404
not found. One thing I noticed is that the %5C is converted to a forward
slash ("/") and I don't think it is supposed to be with respect to what the
server is expecting.
Others have passed the harness and have been able to use the above URL but I
don't know what platform they are using.
I am pretty sure it has to do with the %5c. Another URL that fails has the
%2f escape sequence in the path. From what I understand the Uri class ALWAYS
unescapes those two to conform with rfc 3986.
If I understand everything correctly the escape codes %5c and %2f cannot be
used in the path segment when using the Uri class. They can be used in the
query segment, however.
First, can somebody confirm my suspicions?
Secondly, does anybody know how I can work around this? Tag: MODI drag drop - Microsoft office document imaging Tag: 138901
Subclassing a Singleton C#
If you must, here is some code:
http://www.geocities.com/jeff_louie/OOP/oop40.htm
Regards,
Jeff
*** Sent via Developersdex http://www.developersdex.com *** Tag: MODI drag drop - Microsoft office document imaging Tag: 138893
ThreadPool.SetMaxThreads
Does the ThreadPool in framework 3.5 honor the SetMaxThreads method? The
reason I ask is that I started a program that queued 256 worker threads in
the threadpool and after a few minutes, task manager (and the console
output) showed all of them working. I have situations where I need to limit
the number of active tasks because they are resource intensive on a
different system but not on the local workstation and I need to ensure I
don't kill the other system's responsiveness.
Thanks,
Mike. Tag: MODI drag drop - Microsoft office document imaging Tag: 138891
Check in server code if Javascript is enabled/disabled in browser
I am writing a composite web control. My control will have different
sets of child controls based on whether JS is enabled/disabled in
browser.
So i need to know if Javascript is enabled/disabled before the control/
page is rendered even once. All methods I have found that check if JS
is enabled are Javascript methods so they'll only work when the
control/page has been rendered to browser atleast once.
I tried HttpContext.Current.Request.Browser.JavaScript and
HttpContext.Current.Request.Browser.EcmaScriptVersion.Major >= 1 but
they indicate whether browser supports Javascript not whether
Javascript has been explicitly enabled/disabled. Tag: MODI drag drop - Microsoft office document imaging Tag: 138890
Brand Watches Wittnauer Montserrat Mens Watch 12D01 Discount,
Brand Watches Wittnauer Montserrat Mens Watch 12D01 Discount, Replica,
Fake
Browse our Wittnauer Montserrat Mens Watch 12D01 replica watches,
which is sure the watch you are looking for at low price. There are
more high quality designer watch replicas for selection
Wittnauer Montserrat Mens Watch 12D01 Link :
http://www.watches-brand.com/Replica-Wittnauer-18904.html
Brand : Wittnauer ( http://www.watches-brand.com/Wittnauer-Replica.html
)
Model : Wittnauer-12D01
Description : Stainless steel two-tone case and bracelet. Sapphire
crystal. Silver dial with gold-tone hands. 8 diamonds on the dial.
Water resistant to 30 meters (100 feet). Quartz movement.
Sale Price : $ 210.00
Wittnauer Montserrat Mens Watch 12D01 Details :
<ul><li>Brand: Wittnauer</li><li>Dial Color : White</li><li>Clasp :
Two-tone Stainless Steel</li><li>Water Resistant : 30m/100ft</
li><li>Case Material : Two-tone Stainless Steel</li><li>Movement :
Quartz</li><li>Dial Color : White</li><li>Crystal : Scratch Resistant
Sapphire</li><li>Gender : Mens</li></ul>
Wittnauer Montserrat Mens Watch 12D01 is new brand replica, join
thousands of satisfied customers and buy your Wittnauer with total
satisfaction. A watches-brand.COM 30 Day Money Back Guarantee is
included with every Wittnauer Replica Series for secure, risk-free
online shopping. watches-brand.COM does not charge sales tax for the
Fake Wittnauer Montserrat Mens Watch 12D01.
All of our replica watches are shipped via EMS to worldwide. Normally
it takes 3days to prepare the fake watch you ordered and 5-10days to
transmit depending on the different destination.We pay for the free
shipping cost for total quantity over 20 pcs. The EMS tracking NO.
will be sent by email when an order is shipped from our warehouse. No
more other charges from watches-brand.com such as the tax. If you have
any other questions please check our other pages or feel free to email
us by sales@watches-brand.com.
The Same Replica Wittnauer Watches Series :
Wittnauer Montserrat Ladies Watch 10P03 :
http://www.watches-brand.com/Replica-Wittnauer-18905.html
Wittnauer Montserrat Ladies Watch 10P02 :
http://www.watches-brand.com/Replica-Wittnauer-18906.html
Wittnauer Montserrat Ladies Watch 10M03 :
http://www.watches-brand.com/Replica-Wittnauer-18907.html
Wittnauer Ladies Watch 5174401 :
http://www.watches-brand.com/Replica-Wittnauer-18908.html
Wittnauer 11D16 Rectangular Black Dial Mens Watch :
http://www.watches-brand.com/Replica-Wittnauer-18909.html
Wittnauer 11D17 Rectangular Black Dial Mens Watch With 12 Diamonds :
http://www.watches-brand.com/Replica-Wittnauer-18910.html
Wittnauer Barrymore Ladies Watch 10R12 :
http://www.watches-brand.com/Replica-Wittnauer-18911.html
Wittnauer Barrymore Ladies Watch 12R23 :
http://www.watches-brand.com/Replica-Wittnauer-18912.html
Wittnauer Belasco Moonphase Mens Watch 10E09 :
http://www.watches-brand.com/Replica-Wittnauer-18913.html
Wittnauer Belasco Ladies Watch 10R10 :
http://www.watches-brand.com/Replica-Wittnauer-18914.html
Brand Watches Wittnauer Montserrat Mens Watch 12D01 Discount, Replica,
Fake Tag: MODI drag drop - Microsoft office document imaging Tag: 138888
Jaeger-leCoultre Master Compressor Chronograph Womens Black Dial
Jaeger-leCoultre Master Compressor Chronograph Womens Black Dial
Stainless Steel Watch q1748170 - Replica Watch Fake
Jaeger-leCoultre Master Compressor Chronograph Womens Black Dial
Stainless Steel Watch q1748170 Link : http://www.watchesprice.net/Replica-Jaeger-LeCoultre-9289.html
Replica Watches Home : http://www.watchesprice.net/
Replica Jaeger LeCoultre Brands : http://www.watchesprice.net/Jaeger-LeCoultre-Replica.html
Replica Jaeger-leCoultre Master Compressor Chronograph Womens Black
Dial Stainless Steel Watch q1748170 --- one of best selling replica
watches, it is crafted in high quality, please click image 'buy now'
to buy this chic but inexpensive replica to save you a lot of money .
Jaeger-leCoultre Master Compressor Chronograph Womens Black Dial
Stainless Steel Watch q1748170 Description:
no
Jaeger-leCoultre Master Compressor Chronograph Womens Black Dial
Stainless Steel Watch q1748170 Details:
Brand: Jaeger-LeCoultre
Model: 1748170
Band material: Stainless Steel Bracelet
Bezel material: Stainess Steel Bezel
Case material: Stainless Steel Case
Clasp type: Deployant Buckle
Dial color: Black Chronograph Dial
Dial window material: Scratch Resistant Sapphire Crystal
Movement type: Swiss Quartz Chronograph Movement
Water-resistant to 330 feet
Thank you for choosing www.watchesprice.net as your reliable dealer of
quality waches including Jaeger-leCoultre Master Compressor
Chronograph Womens Black Dial Stainless Steel Watch q1748170 . we
guarantee every watch you receive will be exact watch you ordered.
Each watch sold enjoy one year Warranty for free repair. Every order
from aaa-replica-watches is shipped via EMS, the customer is
responsible for the shipping fee on the first order, but since the
second watch you buy from our site, the shipping cost is free. Please
note that If the total amount of payment is over $600(USD), the
customer is required to contact our customer service before sending
the money in case failed payment. If you have any other questions
please check our other pages or feel free to email us by
service@watchesprice.net. Cheapest Jaeger-leCoultre Master Compressor
Chronograph Womens Black Dial Stainless Steel Watch q1748170
The Same Jaeger LeCoultre Series : Tag: MODI drag drop - Microsoft office document imaging Tag: 138887
performance - xf.server vs .net 3.5 async sockets
Hi, I know that Socket class performed poorly in .NET 2.0, was it fixed in .NET 3.5?
Can you give an expert advice regarding xf.server component(http://www.kodart.com) that pretends to be a better solution for network programming in .net
Thanks,
Gregory Tag: MODI drag drop - Microsoft office document imaging Tag: 138886
cs0165 - the error that keeps on giving
I'm an unashamed C coder learning C#, and in my first 24 hours with
the language I've already found my first TIDL (thing I don't like),
the inane "error cs0165." I'm sure that this has been discussed and
argued over at great length, but I'm having trouble finding useful
information about why this is considered to be an error and not a
warning. The compiler is often not bright enough to account for the
application logic (flow analysis my eye) and I find that perfectly
valid, error-free pieces of code refuse to compile because C# thinks
I'm too stupid to assign to a local variable before I use it.
The fact is, in my very first C# program (rewriting one of the C
examples I teach with in class) I get this error in two places: both
times the code is perfectly good and the variables hold proper values,
but csc doesn't seem to think so. If this would compile with merely a
warning I could live with that, because unassigned variables are a
Very Bad Thing, but to stop the compile for spurious problems based on
faulty flow analysis seems to me to be overkill.
Is there any intelligent reason for this design, or any intent to
change it in the future? I don't like stray pointers any more than the
next guy, but by gum, when I assign to my variables I don't expect to
be told that they are "unassigned" by some lazy compiler that won't do
as its been told.
RR Tag: MODI drag drop - Microsoft office document imaging Tag: 138880
catching VSYNC or BLANK
Is it possible to catch these video signals from C#? I want to control
internal task timing with display updates.
Thx
Marc Tag: MODI drag drop - Microsoft office document imaging Tag: 138876
Are primitive types like bool threadsafe ?
Are primitive types like bool threadsafe ? Or do we need to use
synchronization when multiple threads concurrently access a value type ?
Thanks,
Ramesh Tag: MODI drag drop - Microsoft office document imaging Tag: 138874
DateTime Adding Parse Help
I have a Datetime of "2008-04-17 00:00:00.000" and a Datetime of
"2008-04-18 16:55:28.000", and I need to join them to be
"2008-04-17 16:55:28.000"
What is the best way to parse that?
Thanks. Tag: MODI drag drop - Microsoft office document imaging Tag: 138872
IE hosted user control events
I'm trying to get a web (browser) hosted winforms usercontrol to raise a
custom event, but the event is always null. I keep thinking that I'm not
seeing something, and have left something out.
This control works as desired when placed in a Windows Form, but not within
a browser.
What am I doing wrong?? Tag: MODI drag drop - Microsoft office document imaging Tag: 138871
Setup project - Silent Uninstall.
Here's the context. We have a setup program that will deploy an application
to our clients. The exe deletes all of its files when the user exists from
the application (I know this is odd, it's a requirement of the project). To
run the application again, the user must run the msi twice. The first time
to remove the previously installed application. The second time to install
the application again.
In the setup project I've set the RemovePreviousVersions property to True.
In this context, the msi will actually do a silent unstall before the
reinstall as long as the version number of the setup project has been
incremented. How can I replicate this same behavior (silent uninstall then
reinstall) without incrementing the version number of the setup project?
Seems like CustomActions might be a possible solution. Has anyone had any
similar experiences?
Thank you! Tag: MODI drag drop - Microsoft office document imaging Tag: 138868
Is it possible to drag a thumbnail from a tiff file open in a MODI
application onto a c# 2.0 winform which would then pull the bitmap from a
drag drop event?