ANN: Bob Powell's Beginners Guide to GDI+
Many of you use the GDI+ FAQ or Windows Forms Tips and Tricks site every
day. There are also hundreds of people who have mailed me asking for a
totally basic beginners guide that assumes minimal knowledge of .NET to get
started.
In response to these requests I have created a new series of articles. The
Beginners Guide to GDI+.
The guide is an on-going work and will be updated frequently. If you're
interested in recieving notifications about new articles there is an RSS
feed associated with the site.
Code for the articles are in Visual Basic.NET and C#. You can choose the
flavour as you read.
If you know anyone at your work, school or university who might be
interested in this free, no-strings attached service please be sure to pass
this URL along.
http://www.bobpowell.net/beginnersgdi.htm
To subscribe to the RSS feed associated with this service use:
http://www.bobpowell.net/beginnersgdi.xml
--
Bob Powell [MVP]
Visual C#, System.Drawing
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article. Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87310
IDocHostUIHandler Help!!
Hi All,
I'm having some problems getting this working, i have the interfaces
defined, i have a form with a web browser control on it, and i have a web
page which i want the context menu disabled and when a button is clicked to
callback to the application throught external.SomeMethod
Now, the following code is where i am setting the client site of the
browser:
public void SetClientSite(IOleClientSite clientSite)
{
object obj = webBrowser.GetOcx();
IOleObject oc = (IOleObject)obj;
oc.SetClientSite(clientSite); // clientSite is the form that contains the
bbrowser
}
This runs fine and does not produce any errors, but the problem is that when
i right click the page the ShowContextMenu method of the IDocHostUIHandler
interface is not fired even though it is implemented in the class:
uint IDocHostUIHandler.ShowContextMenu(uint dwID, ref tagPOINT ppt, object
pcmdtReserved, object pdispReserved)
{
return Convert.ToUInt32(this.enableContextMenus);
}
And the GetExternal method is likewise not being fired.
Can anyone help, what am i doing wrong?
Thank in advance
Neil Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87298
Starting up application from dll.
Excel can be started up throw automation like:
Excel.Application myExcel = new Excel.Application()
How can I create this functionality for my own application?
Kind regards,
Sebastiaan. Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87296
minimise console app window?
This is a multi-part message in MIME format.
------=_NextPart_000_0677_01C4D170.8104BC10
Content-Type: text/plain;
charset="windows-1255"
Content-Transfer-Encoding: quoted-printable
Hi,=20
i have a vb.net console application.
can i control the console window appearance to be minimized?
can i control the window position when i configure the executable to run =
minimized when i run it from the windows task scheduler?
TIA, z.
------=_NextPart_000_0677_01C4D170.8104BC10
Content-Type: text/html;
charset="windows-1255"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1255">
<META content=3D"MSHTML 6.00.3790.218" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi, </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>i have a vb.net console =
application.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>can i control the console window =
appearance to be=20
minimized?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>can i control the window position =
when i=20
configure the executable to run minimized when i run it from the windows =
task=20
scheduler?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>TIA, z.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_0677_01C4D170.8104BC10-- Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87291
need help
Hi
After I have finished my web application project I wanted to upload it, or
to put it on a server for a local network, is there any way to avoid putting
the code on the server. Mean am I able to transform it to file that will not
be open so no one can see the code.
Thank you Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87287
w3wp.exe locking DLL and PDB files.
This is a multi-part message in MIME format.
------=_NextPart_000_063D_01C4D14E.2A5CDE00
Content-Type: text/plain;
charset="windows-1255"
Content-Transfer-Encoding: quoted-printable
Hi,=20
i have an ASP.NET project that is using a (Class Library Project) VB.NET =
DLL.
for some reason after running some pages on the web server, and trying =
to compile the Class Library DLL, it can't compile because the DLL is in =
use (and the PDB too), and the w3wp.exe process is the process locking =
the DLL (as viewed with Sysinternals - Process Explorer).
this is a huge problem. i need to do IIS reset in order to free the DLL!
1. why is the w3wp.exe process is locking a class library dll and not =
locking the asp.net DLL?
2. what will be in production environment, if i have to stop the web =
server in order to replace the DLL, it is unacceptable.
3. with asp-dot-net DLLs i only have to replace the DLL and the web =
server is updated. now with shared Class Library project I should have =
more problems?
please help it's urgent.
TIA, z.
------=_NextPart_000_063D_01C4D14E.2A5CDE00
Content-Type: text/html;
charset="windows-1255"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1255">
<META content=3D"MSHTML 6.00.3790.218" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi, </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>i have an ASP.NET project that is using =
a (Class=20
Library Project) VB.NET DLL.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>for some reason after running some =
pages on the web=20
server, and trying to compile the Class Library DLL, it can't compile =
because=20
the DLL is in use (and the PDB too), and the w3wp.exe process is the =
process=20
locking the DLL (as viewed with Sysinternals - Process =
Explorer).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>this is a huge problem. i need to do =
IIS reset in=20
order to free the DLL!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>1. why is the w3wp.exe process is =
locking a class=20
library dll and not locking the asp.net DLL?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>2. what will be in production =
environment, if i=20
have to stop the web server in order to replace the DLL, it is=20
unacceptable.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>3. with asp-dot-net DLLs i only have to =
replace the=20
DLL and the web server is updated. now with shared Class Library project =
I=20
should have more problems?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>please help it's urgent.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>TIA, z.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_063D_01C4D14E.2A5CDE00-- Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87282
Multithreading and RollBacks
Hi
I have a multi-threaded application that is of Parent-Child relation. For
example App1 will run and on completion fire App1.1, App1.2 and App1.3 which
can run in parallel. App2 depends on the successful completion of the last
three. If App2 fails or any of the three, I want the whole thing to
rollback.
How can I accomplished the rollback in multi-threading environment? Each App
writes to the db.
regards
walterd Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87273
How to read Outlook attachments in .NET ?
I have tried Jet.OLEDB with OleDbDataAdapter(sqlText, connectionString), but
this doesn't seem to let me identify or more importantly open attachments. Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87270
Reverse usage of public/private RSA encryption keys for licensing?
The way that RSACryptoServiceProvider works is that we encrypt with a
public key and decrypt with a private key. This architecture works
great for people sending messages to me. However, I now have the
opposite application:
I want to put a license file on a destination computer and be sure
that it remains unaltered. It would be great if I could encrypt it
with a private key at our office and transmit the public key and the
encrypted file to the destination computer, where anybody can decrypt
it and read it, but not change it because we have the private key at
our office.
I've read posts to "simply reverse the public and private RSA keys"
but tried several variations of switching RsaParameters.D, DP, P, DQ,
Modulus and others, to no avail.
I'm sure that a solution exists, just that I do not know it.
How do I, in C# .NET, send a license file to a destination computer,
with a public key, anybody can read it, but only we can change it?
Thanks. Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87269
regex puzzle!
The objective is to extract the first n characters of text from an
HTML block. I wish to preserve all HTML (links, formatting etc.), and
at the same time, extend the size of the block to ensure that all
closing tags are recovered.
For example, simply extracting the first 400 characters of a HTML
block may result in an <i> opening tag being including, but its
closing tag being excluding. Or a link may get chopped halfway - [...
blah blah <a href="ht] may be the last few characters of the recovered
phrase.
Ideally, if any html opening tag is included in the first n
characters, then any number of extra characters should continue to be
extracted from the source block until all paired closing tags are
found.
We can assume that the source block is well-formed HTML, and every
opening tag has a closing tag (whether optional or not). Furthermore
(if it makes any difference), we can assume that all tags are given in
their simplest forms with no attributes (e.g. <p>, <ul>, <li>, <b>),
except for anchor tags, which have the href attribute of course.
Can anyone suggest a regular expression to do this? Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87268
Windows compound files
Are windows compound files supported under .NET?
Compound files are like a directory - there are several streams in a
single file. I have C++ code for some object classes that use compound
files and
am having difficulty getting it to compile under .NET because some standard
windows header files create compiler errors. Even classes that simply use
IStream to
read and write themselves will not compile, with errors found in files
supplied
with Visual Studio.
Any suggestions or help would be appreciated.
Steve Strommen Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87267
Anyone have info on the dreaded Q316146 bug? ... (i.e. There is no Original data to access)
I'm absolutely baffled why Microsoft has decided to give so little
information about this issue. We here (as with many other's I'm sure)
have wasted countless hours of time finding, researching and
redesigning around this issue. I wish someone would clarify
Microsofts position on this.
For example, it would be nice to know
a) Yes we are aware of it, it's fixible and is a high priority
b) Yes we are aware of it, but it would require a rewrite of
ADO.NET so it's taking a long time but a fix is coming
c) Yes we are aware of it, but it will not be fixed until .NET 2.0
d) Yes we are aware of it and it's not being fixed. good luck
fools!
Now let's analyze what this bug really means. Microsoft has banked
it's entire future on .NET (which I might add has been a success so
far). With that in mind, most medium to large size applications
utilize some form of database and DataSets, DataTables, etc... is the
new defacto way in .NET to represent this data in memory. This bug is
very easy to get as your application get's more complicated. With
this line of thinking, shouldn't this be one of Microsoft's highest
priororities!!!
-Dave Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87265
url parameter
hello
how can i get the parameter "param" from the url
http://localhost/myapp/webform1.aspx?param=p1 in the serverside c# code?
thank you Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87262
xml posting
I am developing two asp.net web projects.
When the last page of the first project is done, it redirects to the first
page of the second project.
However, I need to transfer some data to the second project and I want to
use xml data for this not query strings.
Anyone know how to achieve this?
Thanx in advance Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87260
Icons on .Net FW
Hi,
I am developing an application for pocket pc 2002, but I want to attach an
icon image to the .exe file. Anyone knows how to do it? Ive already created
the cab file, but does not work, it just copies the image files but the
application is still as an standar .exe
Thanx a lot!
--
Cheers! Silviuxa ;) Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87258
Framework 1.1 Service Pack 1 Question
I am addressing this message to Microsoft directly.
Recently this service pack was released, and it has fixed many issues.
However, one glaring bug fix, for some reason or another, was left
out of this service release. The VersionNotFoundException which will
occassionally rear its ugly head when using expression columns in
datatables. This bug has been known for a while. For some reason,
the release of Framework 1.1 didn't fix it, and yet another
opportunity to fix it has come and passed. What is the deal? Does
Microsoft not know where the cause of this error is? Is it not a
priority? I have a large project which uses expression columns on a
rather large scale. The only workaround I have ever seen documented
is simply "don't use expression columns." For some of us that is just
not an option.
Does anyone have a workaround?
Will someone at Microsoft please look into this and give us developers
some advice as to how to work around this bug? Would that same person
give us some kind of time frame as to when this will be fixed. I
don't care if VS.2005 fixes it. That is years away from being a
development solution for some of us. And would that same person
please express our frustration to somebody there at Microsoft so this
will get fixed ASAP.
Thank you. Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87250
aspnet_wp.exe Problem
I have performance issues with aspnet_wp.exe. Some time I got the following
errors on the production server and hang-up the server until I killed the
process. Please advice!
aspnet_wp.exe (PID: 3648) stopped unexpectedly.
aspnet_wp.exe (PID: 4136) was recycled because it was suspected to be in a
deadlocked state. It did not send any responses for pending requests in the
last 180 seconds. This timeout may be adjusted using the <processModel
responseDeadlockInterval> setting in machine.config.
aspnet_wp.exe (PID: 1320) was recycled because memory consumption exceeded
the 613 MB (60 percent of available RAM).
--
DotNet Guerrilla Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87249
No touch deployment and non assembly files
I want to deploy an application using no touch deployment. I've used no
touch a few times before and it worked allright. This time the app i need to
deploy is bigger and we'd like to include an help file with it and maybe a
txt file to be shown inside the application.
I'd like to know if anyone has been succesful in deploying non assembly
files using no touch deployment.
If this is not possible, what would you suggest to deploy the help file ?
Thanks a lot Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87246
windows service interact with desktop
Hi,
Im writing a widnows service and i want the service to interact with the
desktop. However, I do not want to go to control
panel->services->properties->logon and then selec the check box "Allow
service to interact with desktop". How can i do this in code. I know this
could be done in VC6. How do i do this in .NET.
I found the following code on the web and it sets the flag right but my
installer auto starts the service the service runs and the check box is
selected but when i try to open a messageboxes the service throws an exception
"It is invalid to show a modal dialog or form when the application is not
running in UserInteractive mode. Specify the ServiceNotification or
DefaultDesktopOnly style to display a notification from a service
application."
--CODE--
Microsoft.Win32.RegistryKey ckey =
Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Services\service1", true);
if(ckey != null)
{
if(ckey.GetValue("Type") != null)
{
ckey.SetValue("Type", ((int)ckey.GetValue("Type") | 256));
}
}
--CODE--
Also i get the following error when trying to enumerate all shellwindows
"COM object with CLSID {9BA05972-F6A8-11CF-A442-00A0C90A8F39} is either not
valid or not registered."
What could be the problem??
--
Regards,
M i s b a h A r e f i n
.NET Programmer
En Pointe Technologies
Reply to : marefin@enpointe.com
www.enpointe.com Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87239
Dispose Question
Just a quick question on implementing the Dispose pattern.
The .NET Framework SDK documentation states that an ObjectDisposedException
should be thrown from instance methods (other than Dispose) when resources
for the object have already been disposed. This would include any
non-shared property procedures as well, right? Seems logical. Just looking
for verification.
Thanks! Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87238
Question with despair - will buy movie tickets for the first one who helps
Hi,
I have spent my entire weekend trying to solve this, now I have to admit I
need your help.
Here is my code:
Dim cred() As DataSourceCredentials
Dim cc As New DataSourceCredentials
cred(0) = cc
cred(0).DataSourceName = "198.87.87.6"
cred(0).Password = "XXX"
cred(0).UserName = "YYY"
It crashes with the error message:Object Reference not set to
an instance of an Object
What am I missing? Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87233
dotnet framework 1.1, 2.0
hi all,
I have two questions.
1. My application with launch condition checking the client PC has .net
framework 1.1.4322, but i have tried that if there are .net 2.0 installed
it seems not work well as expected. I still prompt and require 1.1 framework
to be installed. How to solve it so that my version could pass the launch
condition when framework 2.0 is installed as well as 1.1
2. how should i setup the dependency on a deployment project so that .net
framework will also included inside my setup file.
Thanks a lot.
Rena. Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87232
WSE support in framework 2.0
Is there plans to have any of the WSE classes supported in version 2.0 of the
.NET framework?
Thanks,
Oldman Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87229
Problem in developing newsreader in vb.net
Hello,
I am developing a Newsreader in vb.net and i am getting a problem in posting
article to newserver for a particular set of newsgroups. i developin g this
newsreader using nntp commands.I need vb.net code for posting a article . I
getting a problem in defining a article format.
Kindly , Send me code for posting article in vb.net using nntp command
"post".
Please send code only in vb.net but not c#
with regards,
balu. Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87222
Operator Overloading -- Inherently Thread Safe?
Hi all,
If an overloaded operator method contains multiple lines of code does it
need to be synchronized at the class level or is it inherently thread safe?
TIA
Cole Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87220
C++ and .NET compatability
Hi,
Is it possible for a non-.net C++ application to use a .NET DLL file?
Thanks in advance,
Tim. Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87211
"master" attribute not recognized
Hello,
I'm trying to define a default master page in web.config
for my web application lihe this:
<appSettings/>
<system.web>
<!--
Set the default master page
-->
<pages master="Templates/MasterAdvertising.master"/>
<!--
Set compilation debug="true" to insert debugging symbols
into the compiled page.
Because this affects performance, set this value to true
only during development.
-->
<compilation debug="true"/>
<!--
The <authentication> section enables configuration of the
security authentication
mode used by ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration of what
to do if/when an unhandled
error occurs during the execution of a request.
Specifically, it enables developers
to configure html error pages to be displayed in place of
a error stack trace.
-->
<customErrors mode="RemoteOnly"
defaultRedirect="GenericErrorPage.htm">
<!--
<error statusCode="403" redirect="NoAccess.htm"/>
<error statusCode="404" redirect="FileNotFound.htm"/>
-->
</customErrors>
</system.web>
</configuration>
At the compilation i get this error
D:\projects\cal\online\SRC\CalOnline2005UI\Templates\MasterHeader.master:
ASP.NET runtime error: Unrecognized attribute 'master'.
(D:\projects\cal\online\SRC\CalOnline2005UI\web.config line
17)D:\projects\cal\online\SRC\CalOnline2005UI\Templates\MasterHeader.master
Anybody knows how can be fixed?
Thanks,
Nidi Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87210
regular expression for comma delimit
hi all,
i'm trying to retrieve contents that are comma delimited like the following.
aaa, bbb, ccc, ddd
how would my regular expression match string look.
also what if there are whitespaces (cr,lf,tab) how would like ignore them ?
aaa(cr,lf, spaces), bbb, ccc.........
thanks, Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87203
Problem with asp-net apps
Hi,
I'm new to .Net. I've installed visualstudio.net 2003. There were no
problems in set up. But my asp.net web applications are not running properly.
Sometimes, the Page_load event doesn't fire properly and sometimes the
changes in teh web page are nort getting reflected. I've tried to debug. But
I'm unable to debug the application too. (Windows apps are getting debugged).
CAn anyone help me out.
Note: I've installed the IIS after installing the .Net.Does it cause any
problem?
I've included myslef in the Debuggers' list too. I tried uninstalling and
reinstalling the software. But it didn't work out. But there is no problem
with s\w as otehrs have successfully installed it. My OS is win 2000 prof.
I've tried reregistering asp_net . But I encountered teh followign error.
"The web server reported the following error when attemptinh to create or
open the web project located at the following URL:
'http;\\localhost\WebApllication2', 'HTTP\1.1403 Access Forbidden'."
I've also set teh execution permissions to 'Scripts only' in the Home
Directory Tab.
But still the problem is persisting. Can anyone help me out Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87197
I found this great little site
I found this great little site. I signed up two weeks ago and got 2 Disney tickets and this week they are sending me 2 Universal Studios tickets. Here's the link http://66.219.102.40/ and by the way I am a real person, this is my real email address. I'm not a spammer and didn't appreciate the nasty email I got last time I tried to post this link.
Thanks, Lisa
http://66.219.102.40/
http://66.219.102.40/ Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87190
framework 2 requirements
Hello!
I'm building an application using VB 2005 Express. Will it run on
Windows 98/Me systems?
thx,
Dimitris Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87187
changing permissions of a network share using .net
Hi@all,
how can i change the permissions (ace, securitydescriptor, etc.)
of a network share using .net (c#)? exists a .net api for this task?
thanks a lot
thorsten Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87183
copy reference to XmlDocument
This is a multi-part message in MIME format.
------=_NextPart_000_0563_01C4CFE3.DF7E03C0
Content-Type: text/plain;
charset="windows-1255"
Content-Transfer-Encoding: quoted-printable
Hi,=20
i'm using VB.NET and creating an XMLDocument object inside a class.
i want to copy the reference to the object to a local variable using =
xmlList =3D MyObj.XmlObj
when xmlList is of type XmlDocument and MyObj.XmlObj also.
for some reason i get an empty reference (nothing) while the original =
object had real value.
why? must i use Close ( i don't want to - it's redundant )
please supply with information regarding this.
TIA, z.
------=_NextPart_000_0563_01C4CFE3.DF7E03C0
Content-Type: text/html;
charset="windows-1255"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1255">
<META content=3D"MSHTML 6.00.3790.218" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi, </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>i'm using VB.NET and creating an =
XMLDocument object=20
inside a class.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>i want to copy the reference to the =
object to a=20
local variable using xmlList =3D MyObj.XmlObj</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>when xmlList is of type XmlDocument and =
MyObj.XmlObj also.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>for some reason i get an empty =
reference (nothing)=20
while the original object had real value.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>why? must i use Close ( i don't want to =
- it's=20
redundant )</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>please supply with information =
regarding=20
this.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>TIA, z.</FONT></DIV>
<DIV> </DIV></BODY></HTML>
------=_NextPart_000_0563_01C4CFE3.DF7E03C0-- Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87179
Mistake in MSDN
Hello,
I think I have found a mistake in MSDN.
I have visual Studio 2003 with MSDN. My problem is very simple: I have a
webform with a HTML button control as:
<INPUT id="Button1" type="button" value="Button" name="Button1"
runat="server" onclick="alert('df');">
So its an HTMLServer control which does not submit.
I have this code for the button in code behind:
private void Button1_ServerClick(object sender, System.EventArgs e)
{
int h=0;
h++;
}
Now according to MSDN: (Section: ASP.NET Server Control Event
Model->Handling a Click Event in Client and Server Code)
***********************************************************************
All other HTML controls (those that do not submit a form by default)
Include an onclick attribute in the HTML syntax for the control, but follow
it with a semicolon (;):
<INPUT Type="Button" Runat="Server" Value="caption"
onclick="clientfunction();" ...>
This causes your function to be called first, before the client-side submit
script is called.
*************************************************************************
Now in my case, its always the client side script which calls first, no
matter what I do, even after using the semi-colon.The control still submits,
but first
the Javascript fires. So how can we make sure that our server side event is
executed first and than the client side script
runs (without using RegisterScriptBlock etc).
Is the above example a mistake in MSDN??
Vivek Thakur
www.vivekthakur.com Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87177
project security issue
This is a multi-part message in MIME format.
------=_NextPart_000_052E_01C4CFC1.1F658080
Content-Type: text/plain;
charset="windows-1255"
Content-Transfer-Encoding: quoted-printable
my development environment is windows 2003 server.
when i open a project on the visual studio IDE that is located on =
another server i get the message
"
The project location is not fully trusted by the .NET runtime. This is =
usually because it is either a network share or mapped to a network =
share not on the local machine. If the output path is under the project =
location, your code will not execute as fully trusted and you may =
receive unexpected security exceptions.
"
every time i open the project
what can i do to make it disappear?
TIA, z.
------=_NextPart_000_052E_01C4CFC1.1F658080
Content-Type: text/html;
charset="windows-1255"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1255">
<META content=3D"MSHTML 6.00.3790.218" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>my development environment is windows =
2003=20
server.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>when i open a project on the visual =
studio IDE that=20
is located on another server i get the message</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>The project location is not fully =
trusted by the=20
.NET runtime. This is usually because it is either a network share or =
mapped to=20
a network share not on the local machine. If the output path is under =
the=20
project location, your code will not execute as fully trusted and you =
may=20
receive unexpected security exceptions.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>every time i open the =
project</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>what can i do to make it =
disappear?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>TIA, z.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_052E_01C4CFC1.1F658080-- Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87175
Detect IE update version or service pack number
Hi all,
I'm building a website which provides contents that only work for some
browser types and versions. I know I can get most of the client browser
information using HttpBrowserCapabilities class, but I can't find a way to
determine IE update version or service pack number. Any ideas?
TIA
Henry Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87174
How do we turn a 'user control' into a dll?
We have developed a number of user controls in VB in 'Windows Control
Libraries' that we wish to use in other projects. How do we convert these
into a 'portable' dll?
Sorry if this is out there somewere, already, but we've tried searching all
over the place, and can't find anything relevant!
Glyn Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87164
Any free eBooks on .NET
Hello,
is there any where i could get a free eBook on the .NET technology ?
thanks Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87163
Visual Studio 2002, framework 1.1 and Oracle
I have a problem and I need to know if anyone can assist in solving it. Our
database of choice is Oracle. When we attempted to do some VB.NET coding
with .NET 2002 and framework 1.0, whe had problems accessing our Oracle
database correctly. When we upgraded to Framework 1.1, the Oracle access
problem whent away, however, we can no longer use the VS Designer. We must
hand code everything. We do not want this. We want to use .NET as it was
intended. We are using Visual Sudio Enterprise Architect. We were using
Oracle 8i but are in the process of upgrading our databases to 9i. If there
is anyone with any suggestions, please let me know. Also, please feel free
to ask any questions to get more info if you need to. Thanks in advance for
any help. Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87155
Winform destructor not being called
Hi:
I'm sure this will be a very simple question to answer, but I can't see the
solution.
I am launching a modal WinForm from my main form via:
using(frmChildForm frm = new frmChildForm())
{
frm.ShowDialog();
}
The frmChildForm class is *very* simple:
public frmChildForm()
{
Trace.WriteLine(">> C'tor frmChildForm");
InitializeComponent();
}
~frmChildForm()
{
MessageBox.Show("This is the destructor");
Trace.WriteLine(">> D'tor frmChildForm");
}
My problem is that the MessageBox (and Trace) never get
called when I close the child form. Why?
TIA,
Martin. Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87153
System Hibernation
What kind of event raises whe system is about to hibernate? I have tried
SystemEvents.PowerModeChanged but it oly works for Stand By.
Is there any .Net method which can be used to Shut Down or Restart computer
or I have to use Win32 API functions? Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87151
Set culture for a DLL (class library) referenced from web application
I am developing a DLL (class library) for a web application of mine.
In the web.config of the web application I have set: culture="en-GB"
uiCulture="en" in order that the date format will be dd/mm/yyyy.
I also changed the regional settings to that date format.
When I am using the Now() function in the DLL I get the date format in
mm/dd/yyyy instead. Why the date format in the DLL is different? Shouldn't
it take the culture settings from the web application he is referenced from?
How can I control the date format of the DLL (class library)?
Thanks for your time
ra294@hotmail.com Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87146
Scrape text from browser surface (not HTHML)
I need to do the equivalent of 'select all' and 'capture' on a browser
screen. I just want the text as it appears on-screen. Is there a simple
way to automate this?
The thing that may make it a bit awkward is that the browser windows
appear as popup-style windows, with no navigation buttons. That part
may not be so easy to automate. Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87137
MIDI in C#
.NET/C# doesn't seem to have much support for MIDI interface and music
playback in general. Are there any good references on it? Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87136
ANN: WinFX SDK Preview
For MSDN-Subscribers now available:
http://msdn.microsoft.com/subscriptions/
( Tools, SDKs, and DDKs | Platform Tools, SDKs, DDKs )
Microsoft WinFX Software Development Kit (SDK) "Avalon" Community Technology Preview Edition
http://msdn.microsoft.com/Longhorn/understanding/pillars/avalon/avnov04ctp/
Important: this is a 'Community Technology Preview', thus still pre-Beta.
Don't install it on production systems!
Some parts will also run on Windows XP Service Pack 2 and Windows Server 2003!
http://msdn.microsoft.com/longhorn/letters/20040827/default.aspx
MSDN documentation:
http://winfx.msdn.microsoft.com/
Longhorn Developer Center:
http://msdn.microsoft.com/Longhorn/
FAQ:
http://msdn.microsoft.com/Longhorn/Support/lhdevfaq/
http://msdn.microsoft.com/Longhorn/understanding/pillars/default.aspx
--
Thomas Scheidegger - MVP .NET - 'NETMaster'
http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/ Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87132
Help on Regular Expression
I am new in Regular Expression. Could someone please help me in following
expression?
1. the string cannot be empty
2. the string can only contains AlphaNumeric characters. No space or any
special characters are allowed
3. space characters at the end of string is ok
4. the string cannot contains only numeric characters, in other word, the
string must contains a least one alpha character
I need to put a RegularExpressionValidator on the form and use the Regular
Expression to validate a textbox on the form
Thanks for the help Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87130
How to use DTE to get at a *specific* instance of VisualStudio.DTE
Hi,
I am for the first time touching the EnvDTE namespace and need to open not
just any instance of VisualStudio.DTE.7.1 but a particular one - I commonly
use several IDEs open at the same time so just executing
-----------
EnvDTE.DTE dte = (EnvDTE.DTE
)System.Runtime.InteropServices.Marshal.GetActiveObject(
"VisualStudio.DTE.7.1" );
-----------
does not quite cut it.
The existence of the above Marshal class's method makes me think that there
must be a way to get at the other instances. It must be just a matter of
using the correct class/method.
Can anyone help?
--
Thanks in advance,
Juan Dent, M.Sc. Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87126
Excel using ado.net - operation must use an updateable query
This is driving me nuts. I'm trying to update an Excel spreadsheet
using ADO.Net and Oledb in VB.Net. The connection is open, the
adapter is connected and the dataset is loaded. Here's the code in
question:
myDataRow = myDataSet.Tables(0).Rows(RowNum)
myDataRow(ColumnCount) = Ailment
Adapter.UpdateCommand = New OleDbCommand("UPDATE [" &
SheetName & "] SET F" & ColumnCount & " = '" & Ailment & "' where F1 =
" & RowNum & "", Conn)
Adapter.Update(myDataSet, "[" & SheetName & "]")
The query sent is:
"UPDATE [Drugs cleaned up$] SET F6 = 'Test Ailment' where F1 = 1"
In the spreadsheet, F1 = 1. It's a uniquely numbered column and I
assume, the primary key. F6 is also a valid column. The Sheet name
is also correct cause it's open. I figured, and am told from MS
documents, that a unique column is required to make it an updateable
query. That's what I've done but I can't get anything but:
"operation must use an updateable query"
Every article I find with a solution says it's a permissions issue
with ASP.Net. But this is VB.Net, everything running from a machine
with Administrator privs. The C drive and the file have Full Access
to Everyone and the sheet(s) are not protected.
Any ideas?
Thanks! Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87122
Any way to interpret javascript functions?
I have an application with a windows form that I am currently embedding an
AxWebBrowser object on so that I can have it navigate to a web page. This
web page contains simple javascript code which takes two parameters that I
pass to it via the URL, and opens a new window with varying characteristics
(eg size, toolbar visibility, etc) depending on the data that I pass it.
However, the AxWebBrowser places an enormous load on the memory - its
footprint runs about 8Meg I think. I'd like to be able to just read the
javascript that is returned by the (ASP) web page and let it do its thing
directly.
Any suggestions on how I can parse the javascript to allow it to work
without having to write a javascript parser? Alternatively, any better way
to include a slimmed-down browser??
Thanks!
-mdb Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87115
Synchronize mthd
I'm trying to figure out how to implement a static Synchronized() method
(like those supported in many of the classes in the Collections namespace).
I'm deriving from CollectionBase for a strongly typed collection. I think I
understand how to use the SyncRoot property to safeguard operations:
lock(this.SyncRoot)
{
// do the operation... add or remove or whatever
}
When I run Object.ReferenceEquals(o1, o2)
//where
o1 = new ArrayList();
// and
02 = ArrayList.Synchronized(o1);
I get false. So there's an entirely new arraylist object created,
presumably with an internal flag saying do only synchronized operations. But
they must share the same internal data structure.
So when I implement Synchronized(o), do I do this....
1. Create a new instance of the CollectionBase-derived class.
2. Set a bool flag saying do only thread-safe operations
3. Copy the IList from the 'o' passed in to the new CollectionBase-derived
class Tag: What is the expected Socket.Receive behavior when using SocketFlags.Partial Tag: 87111
Could someone explain to me what behavior I should expect from
Socket.Receive when I pass SocketFlags.Partial?