Dealing with Timezones
In .Net 2.0, I can get the standard name of the current timezone by:
System.TimeZone.CurrentTimeZone.StandardName
The problem I'm having is that I have datetimes that are serialized as a UTC
time, with a named timezone. I keep looking for a way to say:
System.TimeZone tz = new TimeZone("PST");
tz.ConvertToLocalTime(utcTime);
Problem is there doesn't seem to way to do this. Anyone got any suggesting
for dealing with TimeZones?
--
Chris Mullins MCSD.Net, MCPD Enterprise
http://www.coversant.net/blogs/cmullins Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120849
Windows Defender
I got A virus and the Defender was doing its job..but when all these windows
started popping up I clicked on some "Ignore" buttons by accident..It finally
cleaned the puter but when it runs the scheduled scan I wind up having to
reboot to clean the puter. I realize there is still a problem, but when I go
to the "Allowed Items" to delete the problems there is nothing there. I want
this to go away! Can someone plz advise on what is the best solution.
Thanks Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120847
ANN: ZipForge.NET 1.00 is released
ZipForge.NET lets a .NET application create and manipulate Zip files and
perform a
wide variety of data compression operations. This includes an ability to
add, move,
extract, delete, update, test, refresh a group of files or folders by a single
operation; save or load zipped data from stream; add compressed data from
stream.
What's more, ZipForge.NET allows compressing files, buffers, streams,
strings and
repairing corrupted archives. Users will also benefit from its unique
Transaction
System. This technology delivers a very fast and easy way to update archive
files,
while providing data integrity like a reliable database system.
ZipForge.NET is written entirely in 100%-managed native C# code and takes
advantage
of all the safety and reliability benefits of the .NET framework. There is a
well-designed component interface, plenty of code samples and demos for C#,
VB.NET
and Delphi.NET. Thanks to all this, the component is easy to incorporate
into an
application. At any stage of using the component, customers can rely on a
quick and
knowledgeable response from the technical support team that will help to
resolve any
problem in less than a few hours.
Read the detailed information at
www.componentace.com/.NET_zip_component_zipforge.htm Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120846
Get day name given year, month and day number
Hmm.
Is there a way to get the day name (ie Monday) given a year, month and
day number?
Thanks,
Chris Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120842
The security alert dialog does not appear when my program sends UD
I would like the user to be able to choose "Unblock" on the security alert
dialog when my application attempts to send a UDP packet for the first time.
However, the securlty alert dialog does not appear. I have to tell the user
(when running the app for the first time) to manually add my app to the
exceptions list in the firewall. Why isn't windows prompting the user with
the security alert dialog? I have the "Display notification..." check box
checked, and it still doesn't appear. Is there something I should do before
sending the packet?
Doesn't the security alert work with UDP packets?
Thanks Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120841
Saving a locally created Bitmap
Seems like this ought to be an easy one. Essentially, using managed
C++, I'd like to be able to create a Bitmap locally, set the pixels to
particular colors, and save the result. Everything seems to work fine
except that upon calling the Bitmap's Save function I always get a
status of "FileNotFound" and it creates a file with 0 size.
The Code:
void CChildView::Test()
{
Gdiplus::Status stat;
Bitmap bmp(2048,2048,PixelFormat24bppRGB);
Color red,grn;
red.SetFromCOLORREF(RGB(255,0,0));
grn.SetFromCOLORREF(RGB(0,255,0));
int i,j;
for(i=0;i<2048;++i)
{
for(j=0;j<2048;++j)
{
if(i==j)
stat=bmp.SetPixel(i,j,grn);
else
stat=bmp.SetPixel(i,j,red);
}
}
CString sPath("c:\\test.png");
WCHAR wszPath[256];
MultiByteToWideChar( CP_ACP, 0, sPath,
sPath.GetLength()+1, wszPath,
sizeof(wszPath)/sizeof(wszPath[0]) );
stat=bmp.Save(wszPath,&ImageFormatPNG);
}
I should mention that yes, Gdiplus is initialized prior to entering
this function. Status (stat) remains "OK" until the Save operation,
where it changes to "FileNotFound". What am I missing here? I've had
the same problem with different file types (BMP rather than PNG, for
instance). Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120839
Select Data Source Dialog - Odbc
Hi,
I am creating my own customize ODBC dialog box (in Vb.NET) just like as we
have when we run MSDASC-> DataLinks -> Prompt New(). To acheive this I am
using Odbc32.dll and Odbccp32.dll by this I can create DSN by using
SQLCreateDataSource and can fetch the name of the available DSNâ??s but I am
facing problem in case of Build Connection Stringâ?¦ In the standard DataLink
window when we click on the Build button it will open a dialog from where
user can choose there DSNâ??s or can create a new oneâ?¦ and after the completion
of this operation it returns a connection string thatâ??s became visible in
connection string text box of the Datalink window... the same functionality I
want from my code.
If any one knows which API method should I need to call here or what will be
the process for getting the same. It will be very very helpful to me.
Thanks Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120834
Unable to install DotNet 2.0 Framework on W2k3 Standard Server
After initial page of installer comes up, it shifts to the following
message:
The following error occurred during setup:
The installation package or a needed file could not be opened. Verify that
the package
exists and that you can access it.
I have used this particular installer (dotnetfx.exe) on several different
servers successfully.
Does anyone have a clue as to what is missing?
How can I determine what is missing?
Thanks,
Bill Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120833
ILASM for Compact Framework 2
I already asked in CF group, but nobody was able to help me - I hope
someone here would know the answer...
I need to compile some IL code to CF2 class library (.dll). I just
tried it, got the dll using something like
"c:\WINNT\Microsoft.NET\Framework\v2.0.50727\ilasm.exe /DLL mycode.il".
The DLL looks ok on first sight (I can see all the classes using
reflector), but if I add the assembly to my SmartDevice CF2 project in
VS2k5, I'm not able to use the classes. The reference is added without
any error messages, but the compiler doesn't recognize names of the
classes in the assembly if I try to use them...
If I try to use the assembly from WinForms project, everything works
ok. So it looks like the ilasm generates just full-framework compatible
assembly.
Is there any special ilasm.exe tool for compact framework? Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120830
Datagrid Update
Any body please send me information regarding datagrid data Update in .net 2.0 Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120829
Auto mail from SQL
Hi
can any one tell me that how i can send email to my registered clients
from sql store procedure if they meet some specific critaria. and this
store procedure will automaticelly execuate after every 10 minutes and
check the database. if any client meet the critari specified a mail
will be send to that client.
thanx Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120825
How to improve performance of Queue accessing between 2 threads?
Dear Guys,
I write program that sharing Queue between 2 threads which 1 thread add data
to Queue. And another thread get data from Queue to process. My situation
is if there are alot of data to add (like loop to add). The 2nd thread which
try to get data from Queue cannot access or rarely to access that Queue which
make the program has low performance.
How can I do to improve this situation? I want 2nd thread can access as
fast as possible once Queue is not empty.
Here is some snippet code:-
Thread#1
For i as Integer = 1 To 1000
SyncLock _queue.SyncRoot
_queue.Enqueue(i)
_newItemEvent.Set()
End SyncRoot
Next
Thread#2
Dim item As Integer
While _queue.Count <= 0
Thread.SpinWait(0)
End While
While _queue.Count > 0
SyncLock _queue.SyncRoot
item = DirectCast(_queue.Dequeue(), Integer)
....
End SyncLock
End While
Thanks,
Thana N. Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120824
.NET Snippets
Hello,
I would like to show you my new web page. On this site you can publish
and download .NET code - snippets for free.
Please tell me your opinion, and have much fun to publish new snippets.
This is the Link: http://www.dotnet-snippets.de/dns_en/Default.aspx
Jan Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120822
.NET Codesnippets
Hello,
I would like to present my new web page to you. On this site you can
publish and download .NET code - snippets.
Please tell me your opinion, and have fun to publish new snippets.
This is the Link.
Jan Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120821
Dirty property value persist problem in asp.net custom control
Hi,
I created a custom control, and encountered a dirty property value
persistence problem.
I created a property with a custom class type, call SQLSettings which
holds the SQL connection parameters, the class as follows:
public sealed class SQLSettings
{
private string serverName;
.......
public SQLSettings()
{
this.serverName = string.Empty;
......
}
[NotifyParentProperty(true)]
public string ServerName
{
get
{
return this.serverName;
}
set
{
this.serverName = value;
}
}
..................
And, I also created an mapping TypeConverter and UITypeEditor classes
to handle the design-time founctinality. The property I created in my
conbtrol as follows:
[BrowsableAttribute(true)]
[CategoryAttribute("Behavior")]
[BindableAttribute(true)]
[NotifyParentProperty(true)]
[EditorAttribute(typeof(SQLSettingsUITypeEditor),
typeof(UITypeEditor))]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[TypeConverter((Type)typeof(SQLSettingsTypeConverter))]
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
public SQLSettings SQLSettingsData
{
get
{
return this._sqlSettings;
}
set
{
this._sqlSettings = value;
}
}
They all works fine when first set value to this property, I can see
the persisted data showed in .aspx file. When I go back to design view
and update the property value via my UITypeEditor, I can see the value
already updated in VS.NET properties browser. But when I turn to see
.aspx file in code view, I didn't see the dirty property value updated
in .aspx file. When I turn to design view, the updated property value
is lost, it remain keep the first persisted value.
How about to solve this problem? Any idea?
Thank you for your kindly help. Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120820
WebRequest Exception: "The attempted operation is not supported for the type of object referenced"
We have written an asynchronous download class that uses the WebRequest
to perform downloads. Things are working fine in-house, and it's fine
for the vast majority of our users, but there is an increasingly large
of people who are getting the following exception:
Exception Type: System.Net.Sockets.SocketException
ErrorCode: 10045
SocketErrorCode: OperationNotSupported
NativeErrorCode: 10045
Message: The attempted operation is not supported for the type of
object referenced
Doing a search on that phrase ("The attempted operation is not
supported for the type of object referenced") almost immediately led me
to this page: "How to determine and recover from Winsock2 corruption"
http://support.microsoft.com/kb/811259
Using the instructions on that page has worked for 100% of the users
with the problem! At first I though, "Great!" But now we're seeing a
lot of these, and I'm starting to think that since it's not that
isolated, it might not really be a true "problem" on their machines.
It might be a firewall program or some other incomptaibility. Have
other people seen this before? Do you know of something "innocuous"
that could be causing the SocketException?
Any hints, guesses, or shots in the dark would be greatly appreciated.
Many thanks,
Taylor Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120817
'System.InvalidOperationException'
An unhandled exception of type 'System.InvalidOperationException' occurred
I am getting this error when running the built executable directly from the
bin folder -- however, it doesn't give me the error when I run from within
the IDE
(DEBUG or RELEASE).
It does seem to run fine on another computer.
System.InvalidOperationException was unhandled Message="An error occurred
creating the form. See Exception.InnerException for details. The error is:
The type initializer for 'Falcon.PrintConsole.modGlobal' threw an
exception."
Source="Falcon.PrintConsole"
StackTrace:
at Falcon.PrintConsole.My.MyProject.MyForms.Create__Instance__[T](T
Instance)
at Falcon.PrintConsole.frmMain.Main()
Help? Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120816
Cannot create ActiveX object (on Windows 2000)
I have made a small interop function that uses Acrobat Distiller.
It works smothly on all the XP machines, but when I try to run it on a
Windows 2000,I get this error:
System.Exception: Cannot create ActiveX component.
at Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String
ServerName)
at MediaBuilder.Utils.PDFCreator.PDFCreator.Main(String[] args) in C:
\Visual Studio Projects\Utilities\PDFCreator\Main.cs:line 31
And line 31 looks like this:
objDist = (ACRODISTXLib.PdfDistiller)
Microsoft.VisualBasic.Interaction.CreateObject
("PdfDistiller.PdfDistiller","");
What is the difference between running this under XP and 2000?
The odd thing is, that I can compile it with out errors on the 2000, it is
just when I run it, I get this error.
Could it be because of the call/use of
Microsoft.VisualBasic.Interaction.CreateObject, that should work W2KSP4.
I have also tried DCOM configuration
(http://support.microsoft.com/kb/q183607), but even with even with this, I
still get the error. Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120814
Problem with ColorDialog and MenuStrip
Hi,
problem #1 : I have a MenuStrip on my Windows form and it doesn't get
painted (is transparent) unless I move the form... Anyone ever encountered
this? Anyone knows what could cause it?
problem #2 : I want to make a ColorDialog appear, but everytime I want to
show it, it appears behind my form so I have to go to another application
and go back to my application to see it. Is it a bug? Here's the code
(can't be simpler)
ColorDialog cd = new ColorDialog();
cd.ShowDialog();
Can anyone help please?!? These are the last two known bugs in my
application.
Thanks
ThunderMusic Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120813
MSIL Inquiry involving boxing
Hi,
I'm following a tutorial and they translate this C#:
object[] a = {1, "Hello", 123};
to this IL:
.entrypoint
.locals (class System.Object[] V_0,class System.Object V_1,class
System.Object[] V_2,int32 V_3)
ldc.i4.3
newarr [mscorlib]System.Object
stloc.2
ldloc.2
ldc.i4.0
ldc.i4.1
stloc.3
ldloca.s V_3
box [mscorlib]System.Int32
stelem.ref
ldloc.2
ldc.i4.1
ldstr "Hello"
stelem.ref
ldloc.2
ldc.i4.2
ldc.i4.s 123
stloc.3
ldloca.s V_3
box [mscorlib]System.Int32
stelem.ref
But when I compile similar code, I get a big difference. Instead of putting
the integers in a local variable, they are stored directly and boxed via:
IL_0006: stloc.2
IL_0007: ldloc.2
IL_0008: ldc.i4.0
IL_0009: ldc.i4.1
IL_000a: box [mscorlib]System.Int32
IL_000f: stelem.ref
IL_0010: ldloc.2
IL_0011: ldc.i4.1
IL_0012: ldstr "Hello"
IL_0017: stelem.ref
IL_0018: ldloc.2
IL_0019: ldc.i4.2
IL_001a: ldc.i4.s 123
IL_001c: box [mscorlib]System.Int32
IL_0021: stelem.ref
The big difference is that the number is pushed directly on the stack and
boxed, rather than the number going into a local variable and the address
being pushed and then boxed.
So 2 questions:
1) Why would there be a difference? I tried both 1.1 and 2.0 compilers, but
can't seem to get the ldloca.s version?
2) The more interesting question is how does the box instruction work on a
"transient pointer?" Here's the interesting segment:
ldloc.2 <- push address of array
ldc.i4.0 <- push index 0
ldc.i4.1
stloc.3 <- store number one in local integer variable V_3
ldloca.s V_3 <- Put address of local variable on stack
box [mscorlib]System.Int32 <- I guess Box will be able to work with
the address??? and make a box based on the dereferenced address?
stelem.ref
For those curious, the tutorial I'm following is:
http://www.vijaymukhi.com/documents/books/ilbook/chap12.htm
And do a search for the text "It is in stelem.ref and we are not privy to
this code". (It's the following example, after this text)
Thanks all...
-Ben Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120812
HttpModule not working with GAC
Hi All,
I am facing this strange problem here.
I have created a custom HttpModule to filter the response. It worked
fine when i tested it as a part of my existing project. But when I
created a new project and got a dll after strong naming it and putting
into GAC, it wouldn't work any more. I have added a new entry in
machine.config under <httpModules> tag to make it filter each asp.net
response.
But I have no clue why its not workig now.
Any help would be highly appreciated.
Thanks.
VD Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120810
Framework Install Error
Hi Folks,
I've hit the dreaded Error 25015 installing Framework 2.0 on WinXP :
---------------------------
Microsoft .NET Framework 2.0 Setup
---------------------------
Error 25015.Failed to install assembly
'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.VisualBasic.Vsa.dll'
because of system error: The process cannot access the file because it
is being used by another process.
I've tried the tips online - virus checker, permissions, cleanup tool
etc. No luck. Only process accessing the file is the installer itself.
Any suggestions?
Thanks,
Davy Mitchell Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120805
'System.InvalidOperationException'
An unhandled exception of type 'System.InvalidOperationException' occurred
I am getting this error when running the built executable directly from the
bin folder -- however, it doesn't show when I run from within the IDE
(Debug).
I've not tried it using Release - as I'm not wanting to "fix" the problem
inadvertantly simply by switching modes (if that makes sense).
I'm seeing lots of posts regarding this, but all seem general - and none of
them, that I found, relate to running under the IDE vs the EXE.
I sent the EXE to a collegue who seems to be able to run it just fine. I'd
like to find out what it will take to get it working on my dev box, as I'm
sure the first customer we install this on will have the same problem (don't
ask me how I know, I just do -grin )
Help? Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120803
unrecognized attribute xmlns
I get this error accessing a 2.0 site on a web server previously running .net
v1.1.
I've installed v2.0. I've run aspnet_regiis -i. I've changed the ASP.NET
version on the ASP.NET tab in IIS. But it still uses the v1.1 framework.
Any suggestions? Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120793
Diagnosing System.IO.IOException
I have an application that generates and moves 1000s of small text files.
Every so often for some unknow reason I start to get the following 2
exceptions:
System.IO.IOException: Not enough quota is available to process this
command. at System.IO.Directory.GetFiles(String path, String searchPattern)
and (if the first exception does not happen we get a bit further and try to
move the files we found)
System.IO.IOException: Insufficient system resources exist to complete the
requested service. at System.IO.File.Move(String sourceFileName, String
destFileName)
I can see no problems with available memory, the app does not use huge
chunks of resources as far as I can tell from taskman and process explorer,
restarting the application clears the problem. Load on the app does not seem
to cause it as I can hit it VERY hard and it does not fail.. this leads me to
think it is down to another application or the OS.
Has anyone else seen this or got any good ideas on how to track the cause? Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120789
DataTable.Select Aggreate function
Hi Newsgroup
I've the following problem:
i have a statement on a DataTable thats looks like:
BKD.Select(string.Format("{0} = MIN({0}) AND {1} = {2} AND {3} = {4}",
BKD.PeriodeVon.ColumnName,
BKD.HerkunftsRefNr.ColumnName, rowBKD.HerkunftsRefNr,
tmBKD.BKD.StatusCd.ColumnName, BKDStatusCd.Differenziert)
I always get an Array back with length zero but the Data i'm looking for are
in the DataSet.
Is it not possible to do an aggregate function and other filtering in the
same statement?
Thanks in advance
Stefan Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120782
Not able to run Quick start application in Enterprise library 2.0
Hi,
I just read the article about Enterprise Library 2.0 , well its
intresting and am new to it ... and happen to see the examples that was
given in quick startapplicaion about
Caching Application Block.
Cryptography Application Block.
Data Access Application Block.
and others too..
but when i run the application like (Open-> website->CS (caching
program) , and i re-built it
and when i run it the page displays:
[CODE]
Directory Listing -- /CS/
--------------------------------------------------------------------------------
Monday, August 14, 2006 02:37 PM <dir> CryptographyQuickStart
Thursday, January 05, 2006 09:58 AM 3,600
CryptographyQuickStart.sln
Tuesday, August 22, 2006 07:24 PM 1,585 Web.Config
--------------------------------------------------------------------------------
Version Information: ASP.NET Development Server 8.0.0.0
[/CODE]
why is that ..? this happens for all the quick start samples...
waiting for ur reply ... Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120780
Dns resolve failure
http://www.codeproject.com/vb/net/VbNetExpTree.asp
3:41 today (23/8/06) Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120779
system.badimageformatexception returned from custom installer
I have a web project that I have converted from VS 2003 to VS 2005. The
installer is configured to use detect a newer version and if found to
uninstall the old version before installing the new version.
The installer in the new version VS 2005 contains custom actions that are
compiled with VS 2005. For launch conditions, I have configured the .NET
Framework to be at 2.0.50727 and Allow Later Version si set to True.
When I run the installer I receive the system.badimageformatexception which
references the dll that contains the custom installer code.
If I uninstall the 2003 version of the software and then do an install of
the 2005 version everything works fine. But if I have the 2003 version
installed and then run the installer for the 2005 version I receive the error
about the bad image.
Is this a bug? Am I doing something wrong? Are there workarounds? Will my
customers have to uninstall the old version manually before installing the
new version?
Thanks,
Leslie Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120777
Credientials to an HTTP POST request.
I am trying to post an HTTP request to a site that requires a user name and
password. I am trying the following:
objRequest =
DirectCast(System.Net.HttpWebRequest.Create(urlString),
System.Net.HttpWebRequest)
Dim credentials As New CredentialCache()
credentials.Add(New Uri(urlString), "Basic", New
NetworkCredential("user", "password"))
'Dim credentials As NetworkCredential = New NetworkCredential()
objRequest.Credentials = credentials
But using Fiddler I don't see any of the security authorization header
information so I am wondering if the user name and password is getting
passed. First does the above look correct?
Thank you.
Kevin Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120776
Problem with simple calculation
I am currently using the following
Studio 2005: 8.0.50727.42 (RTM.050727-4200)
.NET Framework: Version 2.0.50727
When doing the following in C#
double a = 11.08;
double b = 11.04;
double c = a - b;
I get 0.0400000000000009 instead of 0.04. Why is this?
Am i missing something?
Thanks Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120771
System.Net.Mail.SmtpClient
I am using SmtpClient.Send method to send emails from a windows service
running under LoacalSystem credential. This program does not receive an
exception when the Send method is called for a bogus email address. I am
using my email address as FromAddress. The Host property is referencing a
SMTP server on the network. I receive a delivery failure email in my Inbox.
How can make it work so that I receive a SmtpFailedRecipientsException when
the target email address is invalid?
Thanks. Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120768
saving common settings/data without administrative privileges
I am trying to find a way to save common data in my program that will not
change from different users. I tried both HKEY_LOCAL_MACHINE and writting to
an ini file and storing it in my Program directory. However, in order for
this to work, all the users need administrative privileges.
Is there a proper way to store common data that I am not aware of?
For example, I have a test number that I need to increment. And this test
number must not change when the user changes. Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120760
Windows Service project and how to debug
Hi,
I created a Windows Service project, the installers and the setup project
for the service. Now I have the service installed but once I start it up,
it's taking 100% CPU and not doing anything. I tried attaching the visual
studio debugger to the win service process but it's not stopping at any
breakpoints.
Does anyone have any idea about why it's taking the 100% CPU.
And how can I debug and see what's going on?
Thanks very much in advance!!
Agnes Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120759
saving common settings without non-administrative privileges
I am trying to find a way to save common data in my program that will not
change from different users. I tried both HKEY_LOCAL_MACHINE and writting to
an ini file and storing it in my Program directory. However, in order for
this to work, all the users need administrative privileges.
Is there a proper way to store common data that I am not aware of?
For example, I have a test number that I need to increment. And this test
number must not change when the user changes.
Thanks Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120755
CrystalReportViewer - Missing Group Headers in Preview
I have a VS2005 C# windows application that uses the CrytalReportViewer
(Crystal Reports XI Release 2 w/SP1) to view a report. I have two development
systems;
System1: Windows XP Pro x64 (desktop)
System2: Windows XP Pro (laptop)
When I run the app on System 1, the group headers and any lines are not
visible when previewd on the screen. When exported to pdf or printed, all
headers and lines are printed as expected.
When I run the app on System 2, the preview is shown as expected.
Any one run into this issue, and even better, have an idea of how to resolve
it?
thanks
--
dchman Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120754
HttpCFG DS Mapping not working
I'm trying to configure DS Mapping with httpcfg. I have a test application
using HttpListener which is listening on port 8001 ssl.
To configure the ssl certificates I used httpcfg. This is my command:
httpcfg set ssl -i 0.0.0.0:8001 -f 3 -c "MY" -h <Certificatehash>
-f 3 : Should take care of mutual authentication and with DS Mapping. But
it is not working.
I know for sure the certificates are fine, and my AD mapping is ok, because
if I test with IIS, it works perfect, and authenticates the client with the
Windows user. But as soon as I move to my application and httpcfg, it
validates the certificates, but it does not authenticate the client with a
windows user. I'm using Thread.CurrentPrincipal.Identity.IsAuthenticated
to see if it is working.
http query ssl shows this:
------------------------------------------------------------------------
IP : 0.0.0.0:8001
Hash : 669b8ab4172fd790d8d5c9aca643f8fbd7 332b1
Guid : {00000000-0000-0000-0000-000000000000}
CertStoreName : MY
CertCheckMode : 0
RevocationFreshnessTime : 0
UrlRetrievalTimeout : 0
SslCtlIdentifier : (null)
SslCtlStoreName : (null)
Flags : 3
Can anyone help me??
Tks
--
Oliver Quixchan
Developer Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120745
XmlSerializer usage
1) I have an XSD that defines a document structure
2) I have a business object whose internal state can be represented by an
XML document that is conformant to the XSD specification
Many times, the first thought a lot of folks have is, "Silly, just run your
XSD through xsd.exe and you can get a dataset or a class model!" That's not
going to work for me, though. My business object contains a good bit of
logic and the lightweight zero-method classes that are generated by xsd.exe
are not appropriate for what I'm doing.
So, I decided to take the approach of implementing the IXmlSerializable
interface instead. Life is good. I'm curious, though, how folks insulate
their business object from changes in the schema? This object's state is
being persisted as an XML string. There will come a time when I have to
change the XSD to encance the feature set. So, my class will have to be able
to Deserialize its state from either of 2 (or more) different XSD Schemas
because there may be older persisted versions (and yes, I want to validate
the XML).
How do people generally handle this scenario? (no...just not validating the
XML is not an option)
Here's my approach:
If the Class is called Person, then
The Class Person Implements the IXmlSerializable interface
The Person class has a number of private nested classes (so they have access
to the Person class's state fields). These are called
DeSerializationFactory
Version1Deserializer
Version2Deserializer
Version3Deserializer
...
VersionNDeserializer
Serializer
When ReadXml is called on the Person Class, the NamespaceURI property is
checked. Based on the value of that property a Version[1 2 or 3]Deserializer
is created via the DeSerializationFactory. The resultant serializer
deserializes the state and then life is good.
When WriteXml is called, the default Serializer instance is created and the
state is written as XML (always the latest version).
This seems to be working for me, but I was curious how other folks mitigate
this. Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120742
javascript to datagrid itemtemplate textbox
hi,
How do i pass a javascript value to datagrid itemtemplate textbox using
javascript. Kalaivanan Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120738
Command Line Compailation
Hi,
My Vb.net solution file contain 3 projects. There are Client ,Business
Logic, Data Access.
I want to compail my total solution from command line.
Can any one help me for this.
--
Regards,
R.Sathiamoorthy Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120735
Setup and deploy project in Visual Studio 2005
Is there any way to have versionnumber autoincrement of a setup and
deploy-project? Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120730
Component One TrueDB Fetch row style
I knew how to do it in VB6 but I can't figure it out in VB.NET
In vb6 I did this
Private sub TGDB_FetchRowStyle(...)
dim RStemp as recordset
RStemp = RSMaster.clone
RStemp.bookmark = RSmaster.bookmark
if rstemp!somefiled = "something" then TGDB.rowstyle=something
SET RStemp=nothing
End Sub
And i don't know what to do in VN.NET
I use DataTable to fill the grid TGDB.SetDataBinding (DataTableName,
Nothing, True)
I can't find a example...
Thanks
--
You're not paid to think. A mindless worker is a happy worker. Shut up
and do your job!
- Tata Feudalac!
--------------------------------------------------------
http://www.fotozine.org/index.php?stranica=clan&uid=1352
http://www.thinkgeek.com/brain/gimme.cgi?wid=81d35dc8f
http://groups.google.com/group/fejkneraddangub
-------------------------------------------------------- Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120723
How To: Setup project Custom dialog boxes
Hi
In my setup project I need a custom dialog box containing a drop down
list box. Since this is not avaialble from standard user interface
dialog boxes that visual studio supplies, I am using Installer class.
This installer class inturn displays the custom dialog box i need. but
the problem is this custom dialog box is displayed as a popup window
during installation. But I want this custom dialog box to be shown as
one of the wizard pages during installation.
Has any one done this before? I know some few setup programs that do
this. However I am not sure that they used visual studio setup and
deployment project to create their setup programs.
Thanks
Gancy Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120721
Drawstring inserts spurious linebreak after character #132
I am using DotNet v1.1.4322.
This issue can be replicated with various text fonts - but is easiest to see
using WingDings.
1) Create a string which includes character #132
2) Draw it to a Graphics object with DrawString
S := #130+#131+#132+#133+#134+#135+#136+#137+#138+#139;
F := System.Drawing.Font.Create('WingDings', 16);
G.DrawString(S, F, Brushes.Black, 0, 0);
The output always wraps immediately after character #132, regardless of font
size, StringFormat settings, etc.
Is this a bug in DrawString, or is it due to some other setting of which I
am not aware?
Does it happen in DotNet v2? Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120720
ControlToValidate = Page?
Is there a way to make a custom validator that will act as a client
side (run time) validator for the entire page (.aspx)? I would like to
show a short validation message without having to postback to check if
the page.Isvalid = true. Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120712
.Net x64 / x32 incompatibility "is ambiguous in the namespace"
I ma trying to compile my XP x32 build after reboot into XPx64 as native x64
application. In VS2005 I changed my VB.net configuration to x64 and changed
the reference path to point to c:\windows\microsoft.net\framework64 (before
it was without the 64). Most things fell into place after these changes, but
several classes are no longer available in the interllisense completion list
and they are listed as errors as well. Even simple things such as
Debug.Assert() are no longer available. Sample error: 'Debug' is ambiguous in
the namespace 'System.Dosagnostics'.
Do those classses really not exist as 64 bit version?
What is the best way to resolve this?
Thanks, Ingmar Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120710
Seemingly simple regex question
I'm using the following regex expression where "searchword" is a string:
string regrexstr = @"( |^)\b" + searchword + @"+( |\b)"
My goal is to use this string to ultimately replace all occurances of
searchword as long as:
a) it has a preceeding space or it's the beginning of a line AND
b) it is suffixed with a space or a newline character
The problem right now is that using the above string and calling
Regex.Replace also replaces the leading/trailing spaces. I want the spaces
to count during the match, but be ignored during the replace. Is that
easily do-able?
I'm probably going about this the wrong way. In short, I want to do a word
replacement throughout a large file.
TIA!
-sb Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120706
Wanted: .NET Infrastructure book
Hi folks,
I work in IT, but on the infrastructure/engineering side. At work I'm now
being asked to design infrastructure solutions to support new .NET
applications. Typically, this infrastructure must be highly available and
support things like load balancing etc.... the only problem is I don't have
a thorough understanding of how to accomplish this. Is the infrastructure
tiered? How does the presentation layer talk to the middleware? These are
the types of questions I have.
I want to get a grounding how infrastructure wraps around the .NET framework
and how enterprise solutions are designed. Can anyone point me in the right
direction? eg... a good book or the like.
cheers, froowstie Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120705
Error with SqlSmlCommand
I am attempting to read XML data directly from a table in SQL Server
2000 using VB.Net 2003. When I run the code shown below, I get the
following error:
"SQLXML: invalid direct object (dbobject) query -><-"
I applied SqlXml 3.0 Service Pack 3 to both client and server. My
project references Microsoft.Data.SqlXml. Client is Windows XP Pro,
Server is Windows Server 2003 with SQL Server 2000. All service packs
and patches are current.
'----------------------------------------------------------------------------
Imports Microsoft.Data.SqlXml
Private Sub ReadXML()
Dim CS As String = "Provider=SQLOLEDB; Data Source=MyServer;
Initial Catalog=MyDB; User Id=MyUser; Password=MyPassword"
Try
Dim cmd As New SqlXmlCommand(CS)
cmd.CommandType = CommandType.Text
cmd.CommandText = "Select parent_ID from tblData _
FOR XML AUTO, ELEMENTS"
Dim xr As XmlReader
xr = cmd.ExecuteXmlReader '<------Error happens here
xr.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
End Try
End Sub
Can anyone figure out what I'm missing? Specifying column names in the
SQL also has no effect. I tried adding a root tag to the command using
the code below before executing the reader but it had no effect.
cmd.RootTag = "xmlns:sql=""urn:schemas-microsoft-com:xml-sql"""
Thanks,
John Tag: How can i create the function of ScreenCapture in the windows service????? Tag: 120701
How can i create the function of ScreenCapture in the windows service?????