all groups > c# > june 2007 > threads for friday june 8
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Getting the default printer in 64-bit Vista
Posted by Mark Rae at 6/8/2007 11:36:17 PM
Hi,
I have used the code below to return the default printer in 32-bit WinXP
Pro, but now that I am running 64-bit Vista Business I'm getting an error:
using System.Drawing.Printing;
using (PrintDocument objPrintDocument = new PrintDocument())
{
string strDefaultPrinter =
objPri... more >>
Net documentation with XML doc
Posted by kenshiro2000 at 6/8/2007 10:14:49 PM
Hi,
I am seeking a simple XSLT to do a trasformation of the XML produced
for documentation purpose from C# comment and CSC.
Netdoc is old and doesn't support NET 2.0. Have you any suggestions?
thanks
... more >>
White space issue when parsing datetime Options
Posted by parez at 6/8/2007 8:15:58 PM
Hi All,
i have two accepted formats.
expectedFormats = New String() {"%M/%d/yyyy", "%M/%d/yyyy hh:mm:ss
tt"}
dt = DateTime.ParseExact(txtInpDateString.Text, expectedFormats,
culture.DateTimeFormat,
Globalization.DateTimeStyles.AllowWhiteSpaces)
and i get 05/14/200711:22:33 AM ... more >>
Why using command parameters?
Posted by BLUE at 6/8/2007 7:20:28 PM
DbParameter dateAndTime = this.factory.CreateParameter();
dateAndTime.ParameterName = "@DateAndTime";
dateAndTime.DbType = DbType.DateTime;
string utcDtString = nameValueCollection.Get("dateAndTime").TrimEnd('Z');
dateAndTime.Value = DateTime.ParseExact(utcDtString, "s",
CultureInfo.InvariantC... more >>
Find the type of the exception
Posted by greg at 6/8/2007 7:07:41 PM
I have been struggling with the following issue:
How can one find the type of the exception? In other words I would
likes to come up with piece of code that does the following (written
in pseudo code):
if (exception.Type() == outOfMemoryException)
then
......
Note that I can't use catch... more >>
Problem with custom web server control
Posted by billsahiker NO[at]SPAM yahoo.com at 6/8/2007 6:51:16 PM
I need help diagnosing an error that occurs on the web server where my
web site is hosted, but
it does not occur when I run it under VS2005. I have an errors.aspx
page that captures unhandled application errors. The error I get from
Server.GetLastError() is:
"The server cannot fulfill your re... more >>
using SMO to detach a database
Posted by Rogelio at 6/8/2007 4:32:00 PM
so I notice to detach a database you use
Server svr = new Server();
svr.DetachDatabase("MyDatabase");
but is there a way you can set where its saved after detaching ? thansk
... more >>
.Net CF 2.0 SerialPort DataReceived
Posted by Simon at 6/8/2007 4:13:34 PM
Hi all,
I'm writing a PocketPC / CE application which communicates with a
Bluetooth GPS reciever that is paired to a serial port but I'm
experiencing odd behaviour from the CF 2.0 SerialPort class.
Everything is fine first time around, but if I quit my application and
restart a few times, p... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
multiple default buttons in a form, one per group control, possible?
Posted by Zytan at 6/8/2007 3:56:05 PM
Is it possible (I doubt it) to have multiple default buttons in a
form? I have several group controls in a single form, and when the
focus is within one of the group controls, I want a specific button to
be the default button.
For this to work, the default button would have to be set in each
... more >>
Retreiving the logon account username for a particular windows service
Posted by tsmojver NO[at]SPAM gmail.com at 6/8/2007 3:33:25 PM
Does anyone know how to retreive the logon account username for a
particular windows service? Or the current user that is running this
service as a process. C# is the prefered language of choice.
Apparently, the managed classes don't seem to offer this easily (and
for good reason). However, I ... more >>
datagrideview...I need three textbox's in a sincle cell...help please...
Posted by trint at 6/8/2007 2:00:51 PM
I have a datagridview which must have 3 textbox's in a single cell per
row:
textbox1 for Length
textbox2 for Width
textbox3 for Height
Any help is very much appreciated.
Thanks,
Trint
... more >>
problem with threads
Posted by _nabuchodonozor at 6/8/2007 1:59:26 PM
Hi, its me again:P
I'm writing my own mp3 player. I have loop which looks:
while (trackBar1.Value != TrackLength)
{
TrackBar1.Value = TrackPosition();
}
This loop set position to the TrackBar and when finishes a next track
is played from the palylist. Everything works correct but t... more >>
Screen resolution and screen resolution.
Posted by Mufasa at 6/8/2007 1:41:37 PM
I have some machines that apparently are having the screen resolution
changed based on group policies ( this is what my Network Engineer is
telling me ). These machines are at customer sites so we can't see what it
going on.
The problem is, or at least appears to be, that the code is return... more >>
How C#.Net query Oracle database?
Posted by winlin at 6/8/2007 1:23:01 PM
I read that C#.Net can query an Oracle database. How can I setup C#.Net to
query an Oracle database?
--
I have been using Microsoft products for years.... more >>
Convert "Non Serializable" object to byte array
Posted by at 6/8/2007 12:49:26 PM
How to convert a "Non Serializable" object to byte array. The object
is a dynamically created Excel workbook. As per my understanding an
object can be written and read from a stream Only if it's serialized.
Any ideas?
Thanks in advance.
... more >>
how to simulate a different time zone?
Posted by Ricardo Quintanilla at 6/8/2007 12:08:02 PM
how to simulate a different time zone?
¿is it possible by code to simulate that i am in a different time zone just
for to execute a few lines of code?
in my case i am in the time zone "Santiago/Chile" which is GMT-04, but for
to execute a few lines of code that demand time zone "GMT 0"
i ... more >>
datagridview column order problem...
Posted by trint at 6/8/2007 11:59:59 AM
Hello professionals,
I have a datagridview that displays columns based upon my sql select
statement.
I have additional columns that I want displayed in the datagridview I
wish to append
to the end of the last column named in the select statement sql
script:
string strSQL0 = "Select code, na... more >>
How to Handle 'enter' key in a form
Posted by sravan_reddy001 at 6/8/2007 11:28:12 AM
i had designed a win app(an address book)
when the user wants to enter the contact he will type in all the
details and "HE SHOULD CLICK ON THE ADDENTRY BUTTON PROVIDED"
i want to simplify this task for the user by allowing the data to bw
added in database when "HE PRESSED ENTER KEY AFTER ENT... more >>
How to obtain current user ID from AD?
Posted by Todd Jaspers at 6/8/2007 11:04:00 AM
Hey guys,
We have an intranet at the office. I typically do most of the forms in
Cold Fusion. With Cold Fusion I can easily define the #strUserID# as the AD
user value. I'm writing this new form in C# because it integrates better with
Microsoft CRM and for the life of me, I cannot rem... more >>
how do I create new SQL 2005 instances??
Posted by Rogelio at 6/8/2007 10:51:00 AM
hey, I wanted to programatically create a different instance on my local
computer instead of
(local)\SQLEXPRESS
I want the user to be able to type in an instance, and it will be created. I
've been reading about SMO, and although it can create tables, it can't
create instances.
how wou... more >>
help setting up VStudio help
Posted by LJB at 6/8/2007 10:43:18 AM
I just installed Visual Studio 2005 with a complete install of MSDN but Help
is not working properly. I keep getting error 407 - Proxy Authentication
Required for all the online sources. IE6 to Internet sites otherwise works
fine. I was looking in help for the shortcut keys for "go to definiti... more >>
Fastest way to resize bitmap with Picturebox
Posted by Jon Parry at 6/8/2007 9:54:01 AM
Hi,
I've got a Picturebox, into which I am putting a frame bitmap from a video
camera. The camera bitmap is larger than the picturebox, which has SizeMode
set to "Zoom" which causes the bitmap to be resized and correctly displayed.
My question is whether letting the Picturebox do the bitm... more >>
C# mover
Posted by Andy Summers at 6/8/2007 9:19:06 AM
Hi,
Does somebody have an example C# code of how to move items between two
lisbboxes? Or maybe a ready to go component. I found an ASP example, but is
there something for Windows forms project?
Thanks,
Andy
... more >>
from asp.net to COM object
Posted by Paolo at 6/8/2007 9:16:14 AM
Hi guys,
i try to convert asp.net to COM object but a find a problem, when i
convert dll with tlbexp.exe the risult says that ther's an error
during the elaboration the 'namespace.MyClassCollection, assembly'.
Maybe the collection is not supported in COM object? Anyone know
somthings? thanks a ... more >>
disable reflection thru .NET reflector
Posted by m_gell at 6/8/2007 9:09:02 AM
Hi, anyone know how to disable reflection on sensitive code?
Here is specifically what I'm trying to do. I have one method in a class
within an assembly I'm trying to prevent using reflection to see the code.
The code contains a hardcoded key word that I do not want to be seen in any
wa... more >>
How does .NET property databinding work?
Posted by cjard at 6/8/2007 8:15:45 AM
I ask, because I have a textbox bound to a bindingsource, which is
bound to a datatable(row)
The datatable is typed, and hence exports a Property called Column1
I added another property to the datatable by editing the partial
class, and Called it ColumnX - it simply returns "Hello World" all t... more >>
Casting to double in C#
Posted by kanepart2 NO[at]SPAM hotmail.com at 6/8/2007 7:52:42 AM
Hi guys, I am having a problem with the following code snippet:-
double x = (myReader["TimeStamp"]);
double y = (myReader["YAxis"]);
Resulting in the follwing compilation error:
Cannot implicitly convert type 'object' to 'double'. An explicit
conversion exists (are you missing a cast?)
... more >>
ref keyword
Posted by eusebiu at 6/8/2007 6:18:54 AM
Hello...
I have an unaswered post on MSDN forum.... maybe you can help me...
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1625992&SiteID=1
Thanks
... more >>
mciSendString - length of a track
Posted by _nabuchodonozor at 6/8/2007 5:13:04 AM
HI
The mciSendString returns different value of tracks length than
winamp. The value is longer about 20 seconds and I don't know why.
Here is a code:
public void SetTime() // I tried to set time format as it is said in
MSDN help but it dosent work
{
sCommand = "set Med... more >>
Difference, == and Object.Equals
Posted by Jesper, Denmark at 6/8/2007 4:33:00 AM
What is the difference of == and Object.Equals()
If I want to query werther to pointers are pointing to same instance, do I
use == or Objects.Equals?
foo a,b;
if ( a == b ) ... or
if (a.Equals(b))
... more >>
how to use directx.capture in asp.net and c# code behind
Posted by pampululu NO[at]SPAM hotmail.com at 6/8/2007 3:05:09 AM
hello, I try to use directx.capture in my web application, I use
visual studio web developper 2005 express with c# for code behind.
I can list the webcam available on computer, no probem,
my probem is to capture and display webcam in a control
I tried like this:
protected void Page_Load(o... more >>
Cannot access disposed object
Posted by Amit Dedhia at 6/8/2007 2:56:35 AM
Hi
I am having problem working with Timers in C++/CLI (the .NET version
of C++)
I have an application which has several forms with pictureBox controls
on it. There is a background timer executing every 250ms and it
generates a display image (using some real time data) and pastes those
on t... more >>
InvalidOperationException appeared after introduction of WebBrowser control
Posted by Jeroen at 6/8/2007 2:18:31 AM
We are experiencing a tuff-to-debug problem ever since we introduced a
WebBrowser control into our failry large application. I'm not sure if
the problem description below contains enough details, so if I need to
elaborate on something please ask for it.
We have a UserControl with a WebBrowser ... more >>
C#) How to keep drawing graphics by GDI
Posted by cty0000 NO[at]SPAM gmail.com at 6/8/2007 1:14:14 AM
I have some quiestion...
I want to draw line,point,rectangles and etc... on the from
So I code like this..
public update()
{
g = this.CreateGraphics();
g.FillRectangle(Brushes.White, x1, y1, x2, y2);
}
But the rectangle is removed after window update (minimizer or overrap
by o... more >>
compiler warnings for unconditional recursive calls
Posted by cody at 6/8/2007 12:52:57 AM
Why doesn't the compiler give me any warning if it encounters code like
the following:
void foo()
{
// some code here
// foo() ist not nested in a pre-condition loop, some if- or
else- // block and no return statement appears before it.
foo();
}
The compiler should re... more >>
How to create an owner drawn tooltip for NotifyIcon?
Posted by kirk at 6/8/2007 12:39:17 AM
I am trying to make a crafty tooltip, like the ones that popup when
you hover over the tray icons for Windows Vista, such as the "battery
meter", "network connectivity", "speaker volume" ...I am really
unhappy that NotifyIcon cannot be used with ToolTip.SetToolTip().
-- example --
myToolTip.S... more >>
help
Posted by kalikoi NO[at]SPAM gmail.com at 6/8/2007 12:18:20 AM
Hi All
I had a table with 5 columns...i have to display all the data in the
table in a datagrid programmatically...but the problem is grid display
should be in the follwoing manner
first row of the grid should contain first 4 columns of the first
record obtained from the table
and the seco... more >>
already used in a 'child' scope to denote something else
Posted by valentin tihomirov at 6/8/2007 12:00:00 AM
{
int i = 2;
}
int i = 1;
There is no 'i' defined in the 'parent' context from the moment of
declaration on. So what is the problem? They tell us they pursue language
simplicity. The rule "do not define a variable more than once in the same
context" is natural, and simplest ther... more >>
VistaDB Database
Posted by Johnny Jörgensen at 6/8/2007 12:00:00 AM
Hi all
I just saw an ad in the latest ComponentSource newsletter for a database
engine called VistaDB 3.0.
http://www.vistadb.net/default.asp
It looks very interesting as a database engine for smaller applications
where you would normally use access. Plus it can be embedded into the exe... more >>
MSDN help in in pdf/doc format?
Posted by nospam NO[at]SPAM nospam.sss at 6/8/2007 12:00:00 AM
Is there a way to convert a section of the MSDN .NET help to pdf format? I
would like to read these on my eReader.
John Dalberg... more >>
The problem in WMI access to remote server with Windows Credentials
Posted by Vadim Malishev at 6/8/2007 12:00:00 AM
Hello,
Can anybody help to solve the following problem?
My Windows Service trying to access remote machine to get WindowsDirectory
Property over Win32_OperatingSystem WMI class. Both servers are in the same
Active Directory domain, so I create special active directory user and
impersonate t... more >>
Newbie Q: DLL class Inaccessible due to protection level.
Posted by Wake-Up-Jeff at 6/8/2007 12:00:00 AM
My goal is to create a C# DLL which I can use in other C# applications.
I have built a simple C# DLL which contains:
namespace MyFunctions
class MyClass
public static int Function1(). . .
I include the DLL as a reference in my target Windows Application project.
I also include the statemen... more >>
how to antialias text on buttons and other winform controls
Posted by Peted at 6/8/2007 12:00:00 AM
Are there any options to enable an antialias function on standard
winform controls ?
things like the displayed text on buttons , radio buttons and other
standard controls look a bit jagged and stuff, is it possible to
antialis the text that gets entered into the text property of the
controls ... more >>
can lineargradientbrush be used to paint a button
Posted by Peted at 6/8/2007 12:00:00 AM
is it possible to use a lineargradientbursh to paint a gradient onto a
button control, but have the button keep all its functionality, and
visual functions, so that it still looks like a "depressed" button
when clicked on ?
thanks for any help
peted... more >>
eula and deployment
Posted by Doug at 6/8/2007 12:00:00 AM
HI
I am ready to deploy my application but would like to include an EULA for
users to accept or reject prior to installation of my applicaiton.
How can I include this in the VS2005 setup project process, and are there a
set of standard word to use for freeware?
Doug
... more >>
|