Forms and Labels
I wonder if you could help.
The event handler code below, will allow the user to change the phone number
and write it on a label of a message box. I want to replace the message box
with a dialog box.
Can anybody help me replace the message box below to a dialog box. In other
words. I want to write the new phone number on a label (named "labe1")of a
dialog box (named "dialog2),instead of writing the new phone number on the
label of a message box.
private: System::Void dialogBtnItem_Click(System::Object * sender,
System::EventArgs * e)
{
// Create the dialog
MyDialog* box = new MyDialog();
//Fill in the initial data
box->Phone = S"(650)123-3456)"; // <------ This is the phone number to be
changed
//Show dialog
if (box->ShowDialog() == DialogResult::OK)
{
MessageBox::Show(box->Phone); //<-----I tried to change this line
}
} Tag: Outlook Express Newsgroups Tag: 110713
Catching Ctrl + Click on a checkbox
Is it possible to identify when the Ctrl Key is down whilst clicking on a
checkbox on a windows form?
I have a checkbox on a User Control on a Tab on a windows form. Tag: Outlook Express Newsgroups Tag: 110712
What are my options in this Windows App?
I am creating a Windows Forms app that will use SQL Server as the database.
The app will be used in the following ways.
1. It will be used in the Clients office where the app will sit on the
clients desktop pc and connect to the database on the server.
2. It needs to be used by those outside of the office network. ex. a
remote office that is not a part of the network where the database is
residing.
3. I might have users on the road that with wi-fi access need to connect to
the office database.
I don't want to create a browser based app using ASP.Net. I don't want to
use Citrix.
Here's what I think are my options. Am I missing any? which would you
recommend?
1. Create a windows forms app that sits on the client and a web service that
sits on the server that connects to the database. The user does something
on the client and a call is made for data to the webservice which returns
data to the client.
2. The app creates an opens up a port upon startup and accesses data
directly and then closes the port upon exiting the app???????????????????
Any other suggestions or recommendations?
Bill Tag: Outlook Express Newsgroups Tag: 110709
SelectedNode
Hi everyone again,
How to check SelectedNode's child? There is ->SelectedNode->Parent, but how
to check/control a child?
Thanks in advance,
gmb Tag: Outlook Express Newsgroups Tag: 110704
Menu Control ( 2.0)
Is there any way I can make the main menu bar for a MDI windows forms
application, floating and hidden.. anybody know of the trick? Tag: Outlook Express Newsgroups Tag: 110697
Accessing a forms control menu
I've got some base classes I'm creating with a specific set of functionality
that needs to be present throughout our app. I'm not finding any way to
programmatically get to the control menu in the upper left of each window.
I've always been able to add to this in the past. How do I get access to
this now?
We're using VStudio Team Suite .NET 2.0....
Thanks! Tag: Outlook Express Newsgroups Tag: 110696
Detecting a tray control
Hi there,
I need to determine if an arbitrary control appears on a form's design tray
or the actual form itself (or other parent container). Is the following
check reliable or is there an official way (or something cleaner). Thanks.
public static bool IsTrayControl(Control control)
{
return (TypeDescriptor.GetProperties(control)["TrayLocation"] != null);
} Tag: Outlook Express Newsgroups Tag: 110694
is there a 'flush' type method in VB.Net
Here's the scenario -
I'm iterating through a directory, dynamically adding picturebox controls to
a container, with a For Loop
On screen, you don't see anything until it actually fully populates
In ASP.Net, there is a command - Response.Flush - you can put this before
the end of the loop, to make the page show what's just been done.
Is there anything like this in VB.Net?
(I hope I've fully explained the need) Tag: Outlook Express Newsgroups Tag: 110690
ReportViewer and Terminal Services
I have an application with vb.net using reporting services local (rdlc). When
I run under windows, it prints fine. When I run under Terminal Services,
sometimes it takes 3 times to print. Print, and it looks like it did, but it
never appears. Notepad, office apps seem to print fine.
I was able to trace it. I click the Print button on the dialog box. I see
the print entering the print queue, but it immediately is deleted.
I print a second time, and it works.
It is reproducable under terminal services.
It works fine under normal Windows. Tag: Outlook Express Newsgroups Tag: 110682
copying an event handler in vb.net
I am using vb.net and basically I am trying to build a series of buttons at
runtime based on menu entries created at design time on a ContextMenuStrip
What I would like to do is make the Click event of a button created at
runtime execute the same event handler as the Click event of the
ToolStripMenuItem.
so in pseudo code
newButton.OnClick = menuItem.OnClick
I wondered is this possible via reflection to get the event handlers address
to use in an AddHandler call for the button, but I am not sure how to go
about this.
Thanks Adrian Tag: Outlook Express Newsgroups Tag: 110674
Prevent a window from moving when taskbar gets autohide disabled.
I have a windows form that shifts position when the taskbar autohide property
is disabled. The windows does not move back to the original position when
the autohide property is turned back on.
I have not been able to catch the position changing anywhere in my code and
so I am thinking that it is taking place inside the Form class. I have tried
the Locked property for my form but it doesn't make a difference.
Any suggestions?
Thanks,
Ken Tag: Outlook Express Newsgroups Tag: 110673
Internal error in ToolStrip
Please help!
System.ArgumentOutOfRangeException: Index was out of range. Must be
non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at System.Windows.Forms.ToolStripItemCollection.get_Item(Int32 index)
at System.Windows.Forms.ToolStrip.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e,
Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.StatusStrip.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam) Tag: Outlook Express Newsgroups Tag: 110672
DGV CellValidating event not letting new forms be focused
I have a form with a DataGridView in an MDI application that handles the
CellValidating event. If I set DataGridViewCellValidatingEventArgs.Cancel to
true, I can't navigate off the cell within the form as expected. However, If
I use the MDIParent to create a new instance if the child form, the focus
remains on the error cell in the first form even with the new form in the
foreground.
The behavior that I would like to create here would be for the focus to
remain in the error cell when that form is in focus, but for new forms to be
able to be created and focused on their own. What is the best way to achieve
this?
Thanks in advance. Tag: Outlook Express Newsgroups Tag: 110671
DataGrid Binding / Threading Slow Updates
I have a VB.NET Windows Form that contains a datagrid control that uses
databinding to an object. I have tried using threading and updating the
databound object (by marshalling to the UI thread) by using a separate thread
however there are still delays when 32000 rows / items are added. It stops
other windows from responding for a brief second. I also have an animated
gif on the form and that stops responding.
Is is possible to have the datagrid run completely within a separate thread,
or have two UI threads run in the form so that the form and animated gif is
not affected when the datagrid updates?
Any help with this would be appreciated Tag: Outlook Express Newsgroups Tag: 110665
DataGridViewComboBox required two times click to select item
hi guys
I put DataGridViewComboBox in datagridview .but its
required two times click. i want such that when user click once on
DataGridViewComboBox cell, dropdown should comes.I tried but didn't
find the exact way to do that.
U have any idea plez mail .
Thanks
Neeraj Tag: Outlook Express Newsgroups Tag: 110664
Validating bound text box
I have a windows form (.net 2.0). On this form I have a BindingSource. I
set the DataSource to a dataset that is created in code then "built" using
the ReadXMLSchema method.
I have have bound a textbox to one of the fields in that BindingSource that
is of type int. If I type anything but an int, I cannot do anything. I
cannot close the form, I cannot set focus on another control. No exception
is thown. The DataError event on the BindingSource doesn't fire.
The Validating event on the TextBox fires and in fact I have had to check
the value so that I can raise a message if the item is not a number. But I
would rather catch whatever it is that is stopping me from leaving that
control and displaying an error at that point.
--
Russel Loski, MCSD.Net Tag: Outlook Express Newsgroups Tag: 110660
Dynamically Adding Controls to Forms
Hi ,
I am required to create a Table like structure in Windows forms to
which i need to add controls dynamically.
what is the best control available for this requirement.
i tryed using TableLayoutPanel but failed coz each row is accepting
only one control.
Thanks in Advance
Happy programming
KS. Tag: Outlook Express Newsgroups Tag: 110657
How to show the standard call log winform through code??
I have developed a pocket pc 2005 application in C#,which basically search
from the call log entries and shows those entries. Now i want to list down
the certain calls e.g. i want to list down all the calls of a particular
contact.
My first query is that can i sort the call log entries by that parameter?
Secondly if i am able to do that then can i display it like the same way WM
5.0 shows it.(means standard call log display form)??
Is there any shell API to do that??
Please help. Tag: Outlook Express Newsgroups Tag: 110656
clickOnce (more instances of installation)
Hi,
I have created a basic application, which is deployed as clickOnce and has
some dll and one config file.
Application 1 = main .exe file + dlls + one specific .config file
Application 2 = main .exe file + dlls + another specific .config file
...
What do I need to set to install them as completely independent ?
I tried to change everything in ClickOnce Deployment Manifest file, but one
application still updates the second one...
In ClickOnce Application Manifest file, it seems that there is nothing
specific changeable, but maybe I'm wrong.
(I need also have two shortcuts in Start/Programs, but as I said, one
installation always replaces the another... )
Thank you very much for any answer or idea
Ondrej Dobecka
ondradocasny@community.nospam
ondrej.dobecka@tietoenator.com Tag: Outlook Express Newsgroups Tag: 110655
clickOnce (more instances of installation)
This is a multi-part message in MIME format.
------=_NextPart_000_002F_01C78282.8822A640
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
Hi,
I have created a basic application, which is deployed as clickOnce and =
has some dll and one config file.=20
Application 1 =3D main .exe file + dlls + one specific .config file
Application 2 =3D main .exe file + dlls + another specific .config file
...
What do I need to set to install them as completely independent ?
I tried to change everything in ClickOnce Deployment Manifest file, but =
one application still updates the second one...=20
In ClickOnce Application Manifest file, it seems that there is nothing =
specific changeable, but maybe I'm wrong.
(I need also have two shortcuts in Start/Programs, but as I said, one =
installation always replaces the another... )
Thank you very much for any answer or idea
Ondrej Dobecka
ondrej.dobecka@tietoenator.com
------=_NextPart_000_002F_01C78282.8822A640
Content-Type: text/html;
charset="iso-8859-2"
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=3Diso-8859-2">
<META content=3D"MSHTML 6.00.2900.3059" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DVerdana size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2>I have created a basic application, =
which is=20
deployed as <STRONG>clickOnce </STRONG>and has some dll and one config =
file.=20
</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2><STRONG>Application =
1 =3D</STRONG> main=20
<STRONG>.exe </STRONG>file + <STRONG>dlls=20
</STRONG>+ one =
specific <STRONG>.config=20
</STRONG>file</FONT></DIV>
<DIV><FONT face=3DVerdana =
size=3D2><STRONG>Application 2 =3D</STRONG> main=20
<STRONG>.exe </STRONG>file + <STRONG>dlls </STRONG>+ another=20
specific <STRONG>.config </STRONG>file</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>...</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2>What do I need to set to install=20
them<STRONG> </STRONG>as<STRONG> completely independent=20
?</STRONG></FONT></DIV>
<DIV><STRONG><FONT face=3DVerdana size=3D2></FONT></STRONG> </DIV>
<DIV><FONT face=3DVerdana size=3D2>I tried to change everything in=20
<STRONG>ClickOnce Deployment Manifest </STRONG>file, but one application =
still=20
<STRONG>updates </STRONG>the second one... </FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>In ClickOnce Application Manifest =
file, it seems=20
that there is nothing specific changeable, but maybe I'm =
wrong.</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2>(I need also have two shortcuts in=20
Start/Programs, but as I said, one installation always replaces the =
another...=20
)</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2>Thank you very much for any answer=20
or idea</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2>Ondrej Dobecka</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2><A=20
href=3D"mailto:ondrej.dobecka@tietoenator.com">ondrej.dobecka@tietoenator=
.com</A></FONT></DIV></BODY></HTML>
------=_NextPart_000_002F_01C78282.8822A640-- Tag: Outlook Express Newsgroups Tag: 110653
Change the Internet Explorer Window Title in C#
HI
I am using Visual Studio.Net 2003 and using C#
I would like to know how is it possible to change the Internet
explorer window title?
ie. i want to get rid of "Microsot Internet Explorer" that appears
after my application name on the title bar and if possible, get rid of
the IE logo at the start of the address bar. Tag: Outlook Express Newsgroups Tag: 110652
System.Configuration.ConfigurationErrorsException saving config file after encrypting with RsaProtectedConfigurationProvider
Hi,
One of my users is getting a
System.Configuration.ConfigurationErrorsException when my Windows
Forms application tries to encrypt and save the application config
file, but it only happens for him and no other users!? I don't really
know anything about the security classes so don't have any idea where
to start looking, but would love some suggestions.
He gets the exception when running the application on other users'
machines for whom it works fine, and other users are able to log in on
his machine and use the application. So I'm guessing it's something
to do with his profile but I have no idea where to look. He and all
other users have the same .NET version; I installed it as part of the
application install and noone had previous .NET runtimes on their
machine.
In my live application I get a standard windows box saying the program
had a problem and had to be closed, do I want to send info to MS.
(That's despite having set a ThreadException handler which normally
logs and shows a message for all unhandled exceptions, which is
slightly odd in itself.)
I created a test app to determine where it's failing, and it crashes
in this method:
private void btnProtectConfiguration_Click(object sender,
EventArgs e)
{
string provider = "RsaProtectedConfigurationProvider";
Configuration config = null;
config =
ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
ConfigurationSection section = config.ConnectionStrings;
if ((section.SectionInformation.IsProtected == false) &&
(section.ElementInformation.IsLocked == false))
{
// Protect (encrypt) the "connectionStrings" section.
section.SectionInformation.ProtectSection(provider);
// Save the encrypted section.
section.SectionInformation.ForceSave = true;
config.Save(ConfigurationSaveMode.Full);
}
MessageBox.Show("ok");
}
The info in the standard .NET exception handler is at the bottom of
this post.
In my test app he is able to save the config file fine without
encryption, using this code:
private void btnSaveConfig_Click(object sender, EventArgs e)
{
// Same stuff as ProtectConfiguration, but without the
protection.
// Checks if we can open and save the config file.
Configuration config = null;
config =
ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
ConfigurationSection section = config.ConnectionStrings;
section.SectionInformation.ForceSave = true;
config.Save(ConfigurationSaveMode.Full);
MessageBox.Show("ok");
}
He's also able to do RSA encryption and decryption using the
RSACryptoServiceProvider class; I included in my test app the sample
code here:
http://msdn2.microsoft.com/en-us/library/system.security.cryptography.rsacryptoserviceprovider(VS.80).aspx
If anyone can suggest why this exception could be occurring and why
it's attached to just this user I'd greatly appreciate it!
fyi the reason I'm doing this is that during application install my
application opens and encrypts the config file so connection details
can't be read by the casual observer. Not perfect security but good
enough, providing it runs!
many thanks,
- Rory
************** Exception Text **************
System.Configuration.ConfigurationErrorsException: An error occurred
executing the configuration section handler for connectionStrings. ---
> System.Configuration.ConfigurationErrorsException: Failed to encrypt
the section 'connectionStrings' using provider
'RsaProtectedConfigurationProvider'. Error message from the provider:
Object already exists.
---> System.Security.Cryptography.CryptographicException: Object
already exists.
at
System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32
hr)
at System.Security.Cryptography.Utils._CreateCSP(CspParameters
param, Boolean randomKeyContainer, SafeProvHandle& hProv)
at
System.Security.Cryptography.Utils.CreateProvHandle(CspParameters
parameters, Boolean randomKeyContainer)
at
System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType
keyType, CspParameters parameters, Boolean randomKeyContainer, Int32
dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle&
safeKeyHandle)
at
System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair()
at
System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32
dwKeySize, CspParameters parameters, Boolean useDefaultKeySize)
at
System.Security.Cryptography.RSACryptoServiceProvider..ctor(CspParameters
parameters)
at
System.Configuration.RsaProtectedConfigurationProvider.GetCryptoServiceProvider(Boolean
exportable, Boolean keyMustExist)
at
System.Configuration.RsaProtectedConfigurationProvider.Encrypt(XmlNode
node)
at
System.Configuration.ProtectedConfigurationSection.EncryptSection(String
clearXml, ProtectedConfigurationProvider provider)
at
System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.EncryptSection(String
clearTextXml, ProtectedConfigurationProvider protectionProvider,
ProtectedConfigurationSection protectedConfigSection)
at
System.Configuration.Internal.DelegatingConfigHost.EncryptSection(String
clearTextXml, ProtectedConfigurationProvider protectionProvider,
ProtectedConfigurationSection protectedConfigSection)
at
System.Configuration.Internal.DelegatingConfigHost.EncryptSection(String
clearTextXml, ProtectedConfigurationProvider protectionProvider,
ProtectedConfigurationSection protectedConfigSection)
at
System.Configuration.MgmtConfigurationRecord.GetConfigDefinitionUpdates(Boolean
requireUpdates, ConfigurationSaveMode saveMode, Boolean forceSaveAll,
ConfigDefinitionUpdates& definitionUpdates, ArrayList&
configSourceUpdates)
--- End of inner exception stack trace ---
at
System.Configuration.MgmtConfigurationRecord.GetConfigDefinitionUpdates(Boolean
requireUpdates, ConfigurationSaveMode saveMode, Boolean forceSaveAll,
ConfigDefinitionUpdates& definitionUpdates, ArrayList&
configSourceUpdates)
--- End of inner exception stack trace ---
at
System.Configuration.MgmtConfigurationRecord.GetConfigDefinitionUpdates(Boolean
requireUpdates, ConfigurationSaveMode saveMode, Boolean forceSaveAll,
ConfigDefinitionUpdates& definitionUpdates, ArrayList&
configSourceUpdates)
at System.Configuration.MgmtConfigurationRecord.SaveAs(String
filename, ConfigurationSaveMode saveMode, Boolean forceUpdateAll)
at System.Configuration.Configuration.SaveAsImpl(String filename,
ConfigurationSaveMode saveMode, Boolean forceSaveAll)
at System.Configuration.Configuration.Save(ConfigurationSaveMode
saveMode)
at
DotNetTester.frmDotNetTester.btnProtectConfiguration_Click(Object
sender, EventArgs e) in C:\code\CAP\DotNetTester\DotNetTester
\Form1.cs:line 39
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
DotNetTester
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/Ravi/Desktop/DotNetTester%20v1.0/DotNetTester.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Security
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Security/2.0.0.0__b03f5f7f11d50a3a/System.Security.dll
---------------------------------------- Tag: Outlook Express Newsgroups Tag: 110651
System.Configuration.ConfigurationException: Child nodes not allowed
Hello everyone,
I have a small windowsforms app developed for framework 1.1 that uses a
configsection in the .config file. Everything works ok on most boxes...
On one particular pc i get the error
"System.Configuration.ConfigurationException: Child nodes not allowed" while
trying to read the configuration session using:
Dicto = CType(ConfigurationSettings.GetConfig(SECTION_NAME), IDictionary)
Dicto is an IDictionary...
Seems an installation issue, but have googled a lot finding nothing...
Thanx in Advance
Paolo Tag: Outlook Express Newsgroups Tag: 110650
Form.Closing event not fired always when i call Form.Close method
Hi,
Form1 form1 = Form1; //Form2 is created and closed inside Form1.
When I call form1.form2.Close() method the following method is called
when I run the application in few machine but not in others.
private void Form2_Closing(...)
Any clues on this?
Thanks in advance. Tag: Outlook Express Newsgroups Tag: 110648
How to install a font in VB.Net?
How can you 'install' a font, using VB.Net?
I tried System.IO - just copying it, but it didn't add it to the system's
list of installed fonts immediately. when my app loads, it populates a
combobox with the installed fonts - then, I need to install a font, clear
the list, and then fill the list again, including the new font. Tag: Outlook Express Newsgroups Tag: 110647
Get computer's Windows or Windows Fonts directory
In vb.net 2005 - I know that to get the system directory, it's
system.environment.systemdirectory.
I need to find the fonts directory - - which is normally inside the Windows
directory - so how can I locate either or both of these (if I find the
windows directory with a global variable, then I can at least concatenate
'\fonts' to it)? Tag: Outlook Express Newsgroups Tag: 110643
Application.Run questions
I need create winForm application with this architecture
I have code
[STAThread]
static void Main()
{
Application.Run();
}
Now I need show Icon in tray bar and attach some "context menu strip"
to this icon. So when user select one menu item - for example with name
"settings"
I need show Settings window and after user change it and close window
I need get it on "tray bar thread" (my main thread) and keep wating some
other action from user.
So. I don't need main window for this app and I have some question here
1) The first question can I show icon in tray if I didn't create form?
2) How show notify icon without creating form?
3) as I see after main thread run this Application.Run()
this thread became frozen. So How I can continue work with it? Tag: Outlook Express Newsgroups Tag: 110642
ClickOnce broken
One of our users has a problem reinstalling ClickOnce after running
System Restore and uninstalling our ClickOnce application. They get
the following error when trying to reinstall the ClickOnce
application. Why does this problem happen and how can I fix it?
PLATFORM VERSION INFO
Windows : 5.1.2600.131072 (Win32NT)
Common Language Runtime : 2.0.50727.42
System.Deployment.dll : 2.0.50727.42 (RTM.050727-4200)
mscorwks.dll : 2.0.50727.42 (RTM.050727-4200)
dfdll.dll : 2.0.50727.42 (RTM.050727-4200)
dfshim.dll : 2.0.50727.42 (RTM.050727-4200)
SOURCES
Deployment url : file:///M:/Releases/Head%20Office/Willis/ClickOnce/AscentTechnologyLimited.Willis.application
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed
later in the log.
* Activation of M:\Releases\Head Office\Willis\ClickOnce
\AscentTechnologyLimited.Willis.application resulted in exception.
Following failure messages were detected:
+ The referenced assembly is not installed on your system.
(Exception from HRESULT: 0x800736B3)
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [19/04/2007 10:16:46 a.m.] : Activation of M:\Releases\Head Office
\Willis\ClickOnce\AscentTechnologyLimited.Willis.application has
started.
ERROR DETAILS
Following errors were detected during this operation.
* [19/04/2007 10:16:46 a.m.]
System.Runtime.InteropServices.COMException
- The referenced assembly is not installed on your system.
(Exception from HRESULT: 0x800736B3)
- Source: System.Deployment
- Stack trace:
at
System.Deployment.Internal.Isolation.IStore.GetAssemblyInformation(UInt32
Flags, IDefinitionIdentity DefinitionIdentity, Guid& riid)
at
System.Deployment.Internal.Isolation.Store.GetAssemblyManifest(UInt32
Flags, IDefinitionIdentity DefinitionIdentity)
at
System.Deployment.Application.ComponentStore.GetSubscriptionStateInternal(DefinitionIdentity
subId)
at
System.Deployment.Application.SubscriptionStore.GetSubscriptionStateInternal(SubscriptionState
subState)
at
System.Deployment.Application.SubscriptionStore.CheckAndReferenceApplication(SubscriptionState
subState, DefinitionAppId appId, Int64 transactionId)
at
System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore
subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState&
subState, IDownloadNotification notification, DownloadOptions options,
ServerInformation& serverInformation)
at
System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore
subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState&
subState, IDownloadNotification notification, DownloadOptions options)
at
System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri
activationUri, Boolean isShortcut)
at
System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object
state)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available. Tag: Outlook Express Newsgroups Tag: 110640
windows program deploy question
Hi, I did a batch build on a 2005 .net windows app and copied the exe file to
a machine running windows windows 2000. When I tried to run it I got the
error missing dll mscoree.dll. I then tried to run it on another machine
with windows xp and the error was missing .net frame work. Just wondering to
install on the windows 2000 machine should I do a project installer and if I
do this will I still need to install the .net framework on the 2000 machine?
thanks.
--
Paul G
Software engineer. Tag: Outlook Express Newsgroups Tag: 110631
Activation context generation failed
Hello
When i add new resource files to my usercontrol project and i compile the
project a i get a error message in the event log
Activation context generation failed for
"C:\Windows\Microsoft.NET\Framework\v2.0.50727\AL.exe". Dependent Assembly
Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.20129.4864"
could not be found. Please use sxstrace.exe for detailed diagnosis.
i am running Windows Vista en VS2500 + SP1+Vista SP 1 update
is this a know problem ?
kind regards
Dieter Tag: Outlook Express Newsgroups Tag: 110630
Activated and Enter events not called on MDI children
I'm having trouble with the MDI activate chain of events that happen as a
result of a Ctrl+Tab event in my client's MDI application. A mouse click on
an inactive MDI child executes normally but Ctrl+Tab event processing
handling is only partially handled. The active MDI child window is changed
but this is not being reflected in the MDI parent because the Activated and
Enter events attached to the MDI children are not being called. Even though
the next MDI child has been activated by the Ctrl+Tab, the MDI parent is
unaware of the change. The application itself is pretty complicated with a
number of third party controls involved to obfuscate the issue. In Win32,
I'd simply intercept the WM_ACTIVATE or WM_MDIACTIVATE message and I suspect
that the Activated event is attached to that message. Since the MDI child is
properly changing its Z state and painting itself in a fashion consistent
with activation, I'm pretty sure that the Ctrl+Tab is being at least partly
processed. What can I do to narrow down the location of the failure or
otherwise circumvent the problem by detecting the mdi activation event
upstream?
--
Richard Lewis Haggard
www.Haggard-And-Associates.com Tag: Outlook Express Newsgroups Tag: 110628
Shared settings
I have a solution with multiple projects, each with its own EXE, and its own
Properties.Settings.... They are all part of the same solution.
I want to have a set of settings that are shared by all of the EXEs. That
is, each project will have its own set of settings that are a superset of the
solution settings.
Under 1.X with appSettings, I could do this with by specifying a file=
attribute (KB article ID 555396) and the target was integrated into the
settings of all referencing projects.
Under 2.0, appSettings is replaced by applicationSettings and the file=
attribute is gone. http://www.devx.com/dotnet/Article/34273/1954?pf=true
discusses how to distribute settings in multiple files, but the resulting
files must be stored in the Properties folder of the project and therefore
can't be shared by multiple projects.
Can each project's settings be set up so as to derive from the solution
level settings?
I'm sure that there must be a way to handle this under 2.0, but I can't find
it.
Thx
Marc Tag: Outlook Express Newsgroups Tag: 110623
How to find Internet IP address from vb.net
Please give me some advices.
I know how to find my machine IP address, but don't know how to find
Internet IP.
Please help me.
Thanks, Tim Tag: Outlook Express Newsgroups Tag: 110622
Crystalreportviewer Continuous Pages?
I am using the crystalreportviewer on a windows form, works great, but my
question is I want to view the report using continuous pages, not having to
go to the toolbar to say next page. how can this be done? i see in the web
version of the viewer a "seperatepages" boolean property, but don't see this
in the forms version. Tag: Outlook Express Newsgroups Tag: 110621
Hexadecimal displayed instead of Integer
Hello all,
I have a c# project, while debugging I get the object values in Hexadecimal
format, how do I get it Integer format by default, in debugging mode.
I dont want to see it in Hexadecimal format.
do I have to make any setting in visual studio.net 2005
Thanks, Tag: Outlook Express Newsgroups Tag: 110619
SHGetFileInfo
I am using SHGetFileInfo to get the list of icons for a bunch of
files, and taking those icons and putting them in an ImageList. The
ImageList is then being used with a ListView control to display the
list of files and their associated icons.
Unfortunately the alpha transparencies appear as black in the icons.
To resolve this I tried (as per the microsoft article:
http://msdn2.microsoft.com/en-us/library/aa289524(VS.71).aspx) to add
a manifest to the exe file, I also changed the colordepth of the
ImageList to: ColorDepth.Depth32Bit.
The icons still have a black border.
I am using VS2005, .NET framework 2.0 on an XP machine.
The manifest I used is below.
Can anyone suggest anything else I can do to get the icons without the
black border?
Thanks.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="Microsoft.Winweb.WindowsApplication6"
type="win32"
/>
<description>.NET control deployment tool</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly> Tag: Outlook Express Newsgroups Tag: 110615
dual hard drive
i was trying 2 insall windows on a intenal haeddrive for my laptop. i gave up
on it because i keep getting a error message, so i took off the harddrive.
now when it trys to boot up it gives me the option of booting up from two
windows how do i take that off? Tag: Outlook Express Newsgroups Tag: 110607
Error when calling a webservice from a windows service
Hi,
I am trying to call a webservice from a windows service application. It
works only if I launch the windows service app from VS.Net 2005 (Worked
around from Main()) or from a winform test application. However, it
generates a kind of security error after I install and start the service in
my Window Server machine. I believe that it is related to authentication.
The following is the sample code:
HttpWebRequest obj = (HttpWebRequest)WebRequest.Create(webServiceUrl);
obj.Method = "POST";
obj.ContentType = "application/x-www-form-urlencoded";
obj.Headers.Add("Authentication", Password);
StreamWriter sw= new StreamWriter(obj.GetRequestStream());
sw.Write(Query);
The exception returned:
"System.Net.WebException: Unable to connect to the remote server --->
System.Net.Sockets.SocketException: No connection could be made because the
target machine actively refused it at
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress
socketAddress) at System.Net.Sockets.Socket.InternalConnect(EndPoint
remoteEP) at System.Net.ServicePoint.ConnectSocketInternal(Boolean
connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address,
ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, ...."
I did some research online. Many people got similar errors. However, I have
not found a solution yet.
Any solution or suggestion is appreciated.
GD Tag: Outlook Express Newsgroups Tag: 110600
Visual Studio 2005 and XAML
Hey guys,
I've never used WPF/XAML and would like to start playing around with it. Am
I able to do so using VS 2005? If so, can someone tell me what I need to
download/install to be able to develop apps using XAML?
Thanks a lot. Tag: Outlook Express Newsgroups Tag: 110599
Two-layered image control
Hi to all.
I need to create a custom control which does the following:
- It should contain a first, fixed image.
- It should manage a second image, which will change programmatically.
- It should display the second image on top of the first one, updating it in
response to user events; the second image will of course have a transparent
background.
- The second image should be accessible outside the control, and wil be used
for printing on some paper forms which are, as you probably guessed, the
same as the first image; this is the reason for having two separate images.
I'm trying to develop this, but I'm quite confused about the various
System.Drawing classes and which Windows Forms control is the best to use as
my control's base class. I don't thoroughly understand the process of
painting a control, and the relationships between an Image, a Drawing object
and the control.
My initial guess was to use a PictureBox, set its BackGroundImage property
to the fixed image and use the Image property for my drawing... but I don't
know how to do manual drawing this way.
Is this a good approach, or there is a better one?
Also, I know very little about printing with Windows Forms. What do I need
for printing? An Image? A Graphics object? What else?
Can someone please help?
Thanks
Massimo Tag: Outlook Express Newsgroups Tag: 110598
Using Win32 API to track file changes with username
I am trying to write an app that uses the FileSystemMonitor class. I
can successfully track changes but have now been asked to add the
username associated with the change. I have used DLLImport to add
Netapi32.dll to the project and I can successfully get the username
for create and change events but it does not return anything for
delete events. After debugging the code I believe it is because the
file is gone before the NetFileEnum function can get the information.
Does anyone know of another place I can hook to get the information I
need that may be more reliable? I am not locked into using the
NetFileEnum or even the Netapi32.dll library at this point.
Thanks in advance for any help!
Gary Tag: Outlook Express Newsgroups Tag: 110597
Global Variable
I have a handfull of variables that I'd like to make Global to my
application
In the old VB6 days, I'd create a Module, and put them there, accessible
from any form in the application
However, in VS.Net 2005, I added a module, and it acts somewhat like a
class, in that, to access a Public variable, there, I must precede the
variable name with the module name, like:
mdlVars.MyVar
Is this pretty much how it's done, or, if not, what's a more acceptible
approach? Tag: Outlook Express Newsgroups Tag: 110595
Winform blinks when Java application is activated.
Hello,
We are having an unusual issue with a .NET 1.1 Winforms application. There
is one particular Winform within the application that blinks, or quickly
diappears and reappears on the screen, when a Java application is maximized
and sharing the screen with the Winform. It almost looks like a timer, with
each second causing the Winform to quickly disappear and reappear. This only
occurs when the Java application is also sharing the desktop screen with the
Winform. When the Java application is minimized, the Winform stops blinking.
What is interesting is that this is one of three Winforms that are open and
visible from the same Winform assembly, but only one has the blinking issue.
So far we are able to give the users a temporary fix by changing the refresh
rate on their displays to anything, then back to their original refresh rate,
and the problem then completely goes away until the PC is rebooted or logged
out.
I've done some searches, and have found that there are bugs in the
transparency of Winforms, and that setting the Transparency Key property to a
Color usually resolves the issue. I tired this, and it didn't work.
I'm going to try and create a project with just this Winform, to see if I
can recreate the issue. Please let me know if there are any known issues
concerning this, whether there is already a resolution to this problem.
Thanks,
Dave Tag: Outlook Express Newsgroups Tag: 110590
problem with inherited Windows Form
I wrote a screen that has a grid on it and a few controls. Later I needed
the same screen but with a few more controls...but I still needed the old
configuration. Since this was the case and since there was alot of code
driving the grid I created another windows form that inherited from my
original one. This worked great at the time. Today I went in to the
original windows form and made a change and when I tested it out I noticed
that if I open the inherited form that the grid wasn't right. In the
inherited form I had made the grid a slight bit shorter because I need some
room for the new controls. This size change is being ignored now. If I
look at the window in the designer its showing the Grid as being locked.
Its the only control that is locked....and it was set to protected not
private on the original screen. This is the second inherited window that I
have had this happen. Does anyone have any suggestions?
Thanks,
Brandon Tag: Outlook Express Newsgroups Tag: 110589
ClickOnce Deployment in a Plug-in architecture context
Hi all,
I've been browsing through the different posts for a few days now but I
didn't found the answer.
We are considering the use of the ClickOnce deployment framework for a C#
application that has a plug-in architecture. Plug-ins are developed as
independent DLL projects. The plugins are loaded at run-time and are not
really known by the application. The plugins offer different services used
that can be used by other services registered to a service broker in our
application. Our main application can be easily deployed with ClickOnce but
we are wondering what to do with the DLL plugin projects?
I saw some posts talking about manualy updating the code with the deployment
API to get optional file groups for example. Those groups of files would
have been added via the MAGEUI.exe tool for example. I understand how this
could work. But, what happens if we want versionning also on the DLL
projects? Each time a DLL is modified, the manifest files needs to be
updated and our main application version incremented? Causing software
update on our users computers for the whole application eventhough only a DLL
has changed? Our plug-ins are role based also. Some users won't have
specific plug-ins because they don't need to. So triggering a full update on
the application would cause these clients to try to update for nothing right?
Is there a way to successfuly and easily manage DLL projects versioning? Is
this method the only way? Anybody successfully deployed this kind of project
architecture with ClickOnce? Any ideas on how to resolve this? Should we
still consider ClickOnce?
Another question we have, is it possible to create an MSI deployment that
includes all external components (databases, etc..) and that would be able to
update the application via ClickOnce updates? Is it only to provide manifest
files during the installation? Does someone has documented such process?
I hope my questions are clear enough to inspire you answers! :)
Thanks!
Frank Tag: Outlook Express Newsgroups Tag: 110588
Generated Program.cs uses special way of disposing native resource
Hi,
To properly clean up native resources, one should always use "using (Blah
blah = new Blah())" for types "Blah" that implement IDisposable. It seems to
me that the code generated by Visual Studio in Program.cs doesn't live by
this rule? A form is always IDisposable, so who calls the .Dispose() method
on the form?
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MyForm());
}
And what about, if I change the code into this (below):
[STAThread]
static void Main()
{
MyForm myForm = new MyForm();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(myForm);
myForm.DoSomethingThatUsesTheFormObjectExtensivly();
}
The reason why I'm asking about this is because I'm having trouble with
system tray icons that are left after my application exits. Normally this
works fine, but when I stopped using Application.Run() things got hairy. I'm
not sure the normal Application.Run() because I'm trying to use
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run()
instead, in order to get a clean implementation of "single instance
application".
My question is, why isn't the Form1() instance in the generated code wrapped
into some kind of "using" statement? Is there some kind of special case going
on here?
Regards,
Martin Tag: Outlook Express Newsgroups Tag: 110583
datagridview multiselect without keyboard !
howdy....
in a datagridview - the user can select multiple rows by holding the
Control key down as they click with the mouse.
I am looking for a way to achieve the same result without the use of
the keyboard (I have a touchscreen application).
any ideas? - I'm a bit stuck :)
thanks,
Oli. Tag: Outlook Express Newsgroups Tag: 110580
Forms and labels
Hi Everybody,
I am new to Famework Programming and I need your help.
In Visual C++ .NET
Forms.
Labels.
If I want to add XXXX to the label, I can do that through the "Text"
property in the property editor. But I want to add the XXXX during run
time. In other words I want the label to be written during run time.
void InitializeComponent(void)
{
//
// label2
//
this->label2->Location = System::Drawing::Point(32,16);
this->label2->Name = S"label2";
this->label2->Size = System::Drawing::Size(208, 23);
this->label2->TabIndex = 6;
this->label2->Text = S"XXXX";
} Tag: Outlook Express Newsgroups Tag: 110576
Open File Dialog problem
I have a combobox, listing file extensions (JPG, BMP, etc)
in my OpenFileDialog, I have:
Const sFilters As String = "JPG (*.jpg)|*.jpg|GIF (*.gif)|*.gif|BMP
(*.bmp)|*.bmp|PNG (*.png)|*.png|TIF (*.tif)|*.tif|Wmf (*.wmf)|*.wmf"
Dim ofd As New OpenFileDialog
ofd.DefaultExt = ComboBox1.Text.ToLower
ofd.Filter = sFilters
ofd.Title = "Open Image File"
If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then
....etc
No matter what I change ComboBox1's filter to, the OpenFileDialog never
selects it in the list of Filters - it just comes up with the first file
listed in 'sFilters'
What am I missing here? Tag: Outlook Express Newsgroups Tag: 110572
How do I download all messages in a newgroup?
--
Nick Haury