SendMessage doesn't work when window has ShowInTaskbar set to false
I have two applications, one is sending a message, one is receiving.
The sending app's code is as follows:
------------------------------------------------------------------------
private void Main()
{
Process p = Process.GetProcessesByName("MyApp")[0];
SendMessage(p.MainWindowHandle, 0xA123, IntPtr.Zero, IntPtr.Zero);
}
[DllImport("user32.dll", CharSet=CharSet.Auto, SetLastError=true)]
private static extern IntPtr SendMessage(IntPtr hwnd, uint Msg, IntPtr
wParam, IntPtr lParam);
------------------------------------------------------------------------
The code for the window receiving the message is as follows:
------------------------------------------------------------------------
protected override void WndProc(ref Message m)
{
if(m.Msg == 0xA123)
{
MessageBox.Show("Called");
}
base.WndProc(ref m);
}
...
this.ShowInTaskbar = false;
------------------------------------------------------------------------
Messages are not received when ShowTaskbar is set to false. Any ideas
on solving this issue?
Thx Tag: Form Location Question Tag: 75757
Outlook Security and VB.Net
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C47C03.D8314430
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
All - I have a program that gets the address book. The user then selects =
a person and that value is loaded in a textbox and saved to a database. =
Everything works fine except for the virus protection feature. I get the =
expected message:
A program is trying to access e-mail addresses you have stored in =
Outlook....
Where is a good place to figure out how I can work with this, mainly by =
using a secure way to publish my app to Outlook or trust it or something =
so my users do not receive the message box and have to respond to it.
Thanks,=20
BRIAN HAMMER
------=_NextPart_000_0008_01C47C03.D8314430
Content-Type: text/html;
charset="iso-8859-1"
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-1">
<META content=3D"MSHTML 6.00.2800.1458" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>All - I have a program that gets the =
address book.=20
The user then selects a person and that value is loaded in a textbox and =
saved=20
to a database. Everything works fine except for the virus protection =
feature. I=20
get the expected message:</FONT></DIV>
<DIV><SPAN class=3DOTATtl>A program is trying to access e-mail addresses =
you have=20
stored in Outlook....</SPAN></DIV>
<DIV><SPAN class=3DOTATtl></SPAN> </DIV>
<DIV><SPAN class=3DOTATtl><FONT face=3DArial size=3D2>Where is a good =
place to figure=20
out how I can work with this, mainly by using a secure way to publish my =
app to=20
Outlook or trust it or something so my users do not receive the message =
box and=20
have to respond to it.</FONT></SPAN></DIV>
<DIV><SPAN class=3DOTATtl><FONT face=3DArial =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3DOTATtl><FONT face=3DArial =
size=3D2>Thanks,</FONT></SPAN><FONT=20
face=3DArial size=3D2> <BR>BRIAN HAMMER</FONT></DIV></BODY></HTML>
------=_NextPart_000_0008_01C47C03.D8314430-- Tag: Form Location Question Tag: 75749
Custom Components, Threads, and Invoke
I've created a custom component that is derived from the Component
class. This component can be added to a form. What I've noticed is
that I run into problems if I call methods on the component from a
different thread than the one in which it was created.
I'm aware that you should never access a windows form control from
another thread but should call the parent form's Invoke or
BeginInvoke methods passing them a delegate they can call that will
in turn access the control.
Does this apply to custom components as well?
If so, is this documented any where? Tag: Form Location Question Tag: 75746
Overflow or underflow in arithmetic operation in CrystalReportView
I am boggled by this. I have a form that calls another form that runs a
crystal report viewer in it. My program was running fine. I modified it a
little bit and try to run it again and now I get the error "Overflow or
underflow in arithmetic operation" everytime the form trys to load because in
the InitializeComponent() function in .net when it is trying to create the
crystal report viewer it crashes and throws that error. I do not know what
causes this error. I'd appreciate a way to troubleshoot this thanks.
David Tag: Form Location Question Tag: 75745
ExecuteCommand on Windows Service
I have a windows forms app that interacts with a windows service that I
made.
My windows forms app can iteract with the windows service well. It can
start & stop the service, etc.
But one thing it cannot do is call the ExecuteCommand method of the windows
service.
I get an "access denied" error message when I try.
I've come to understand that the service must somehow have the correct ACL's
set to allow this. But I don't know how to set up the correct ACLs. I'd
like to do it programmatically if possible, but even a manual solution would
be better than nothing for now.
Any suggestions?
Thanks,
Steve Tag: Form Location Question Tag: 75742
ApplicationContext for multiple forms and SaveFileDialog
I created an ApplicationContext class to allow my application to have
multiple top-level forms. The code is similar to the MSDN sample
ImageBrowser article (Chris Anderson) to provide the MDI like behavior
not found in Windows Forms. (I've extended it a bit so I can get any
command line arguments off of subsequent invocations.)
This seems to work very well for maintaining the open forms and exiting
the application when the last window is closed.
However, I am seeing an issue that is easy to reproduce even in a
smaller sample application.
1. Start the application, see Form1
2. Create Form2 (from a button on Form1)
3. Close Form1
4. Select File.Save on Form2 which creates a default SaveFileDialog.
5. Select a file that already exists and press Save.
This throws an ObjectDisposedException siting Form1 as disposed. This
occurs when the SaveFileDialog is trying to display the overwrite prompt
(messagebox). A stack trace shows EnumThreadWindows to disable all top
level forms, retrieves the disposed form and tries to create a handle.
(If I turn off the SaveFileDialog.OverwritePrompt property, it just
overwrites the file but no exception is thrown).
My guess is that there is a bug in the framework so I'm looking for a
work around to this.
Thanks for any help.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: Form Location Question Tag: 75741
No-touch deployment question
I want to launch a smart client application using no-touch deployment
through internet explorer with a web browser window inside the windows form
app which is loaded using no-touch. I am able to accoumplish this with
simple applications WITHOUT the ie window. Here is what my ultimate goal is:
I need to launch a windows form application using no-touch deployment
through IE. Windows form app must contain an IE window inside. I can build a
windows app with the IE window inside, however it operates using a COM call
to shdoccvw.dll. and i don't know how to allow it to use it during no-touch
deployment. Any way to get around this issue?
Thank you Tag: Form Location Question Tag: 75739
Invisble controls
Please, Help!!!
When a control is visible=false, or is used in a tabpage that is not the
current one, de value is not updated in the control.
For examples, use a tabControl, place two tabpages, in the tab 2 place a
textbox control, in the tab 1 place a button that set a text to de textbox in
the tab 2, when running, click the button and go to the next tab, and you
will see no value in de textbox.
Expand AllCollapse All
Manage Your Profile |Rules of Conduct
--------------------------------
From: Carlos Caraballo
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>0fnaOTQs/UK634jh2l3byA==</Id> Tag: Form Location Question Tag: 75738
Directory Selection Dialog
How do I invoke the standard windows dialog which allows the user to browse
the filing system and choose a directory or a file ? Tag: Form Location Question Tag: 75721
Event used to change pages in a page form?
I have a multi page form, and in some processing I need the user to switch
to a different page.
This code doesn't seem to get the switch to happen.
this.dsVehicle = this.oSingle.GetVehicle(lnKey); // update dataset for
editing
this.VehiclesPage.Show(); // switch page Tag: Form Location Question Tag: 75720
Property grid navigation
I have implimented a custom data grid and property gid on several of my
forms. I find it really nice when updating multiple record. I select a
dozen record or so and the property grid gives me the fields to change and
the ones I change affect all.
The problem is I have several customer complaining about the property grid
navigation. I guess most people have gotten use to the tab key for field
changing.
Is there maybe some directions on property grid navigation I could refer to?
I can only assume I am doing it wrong.
Regards,
John Tag: Form Location Question Tag: 75717
How to embed old C++ window into .NET form?
I have a drawing application written in C++, and want to use it in a
framework written in C#. Since the amount of C++ code is very large, it's
unpractical to translate them to C#. So I want to use the window in C++ as a
control in C#. It seems there are a lot of method to do this :
1. Rebuild the C++ code in C++/CLI, and try to call it in managed world.
2. Pass the HWND of a C# form to the C++ code, and attach it to a C++ Window
and draw on it.
3. Pass the HWND of a C++ window to C# code, and attach it to a C# form and
draw on it.
4. Pass the HDC of the C# form to the C++ code, and draw on that DC.
5. ...
I think this is a common problem in porting old C++ code to C#, so there
must be someone has already solved this problem. Could anyone give me some
advice?
Thanks! Tag: Form Location Question Tag: 75705
Screensaver with WinForms on multiple screens
Hello,
I have a question about how to display a single windows form on multiple
monitors at the same time.
I took the C# 2005 Express - demo project for the screen saver as an example
- but in case you have multiple monitors this screen saver is only displayed
at the main screen and not on the secondary display.
Is there an easy way to display exactly the same output on both screens or
to modify the form in a way that it spans over both (or even better: any)
available screens?
Thanks in advance,
Sebastian Gingter Tag: Form Location Question Tag: 75704
Windows RadioButtons Group
Hie
Can you please assist me on how to automatically select/check a radiobutton
depending on a value from a SQL Server database. I have several groups of
windows radiobuttons in VB.Net. This is easier done in a web application but
not so obvious in a windows application.
Thank you
--
Aleck Tag: Form Location Question Tag: 75696
create an instance of type 'System.Attribute'
I created a BindingListView that subclasses from ListView ... when switch to
designer mode I get ...
The designer must create an instance of type 'System.Attribute' but it
cannot because the type is declared as abstract.
Poor designer. Anyone know how I can help him out? Tag: Form Location Question Tag: 75692
DataGrid array
Greetings,
I have an array of DataGrid classes. Each DataGrid in the array needs to
handle the SizeChanged event.
How do I dynamically accomplish this using vb.net? In other words, how do I
programmatically set a handler for each DataGrid in the array?
Thanks!
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.732 / Virus Database: 486 - Release Date: 08/01/2004 Tag: Form Location Question Tag: 75691
Justifying Text in a RichText control
I'm attempting to format rich text with C# by sending messages to the
underlying richedit control.
The text can be formatted by sending an EM_SETPARAFORMAT message.
However, when I set the wAlignment to be PFA_JUSTIFY, it doesn't work.
I know that this option only works with Rich Edit 2.0 or later
version. Wouldn't VS .Net 2003 be using at least that version of the
control (or newer)? Has anyone gotten this to work?
Thanks in advance! Tag: Form Location Question Tag: 75688
icons grouping with generic icon in XP toolbar
I have my XP configured to group icons if there is more than 1 icon (window)
associated with an application.
each of my .NET forms has a custom icon for the application but when they
are grouped on the XP icon they become a generic application icon (a white
box with a blue strip on the top). if i click on this icon then a sub-menu
opens up with each individual form *with* the custom icon correctly shown.
how can i ensure then when XP groups icons that they retain the custom icon
for my application ?
-simon Tag: Form Location Question Tag: 75684
Calling Function on other Form C#
Hello
I open a new form and do some stuff, and when I am done I want to call a
function on the original form... how can i do this? Do I need to send
in the calling form as a reference or something? if so, how exactly do
i do this? thanks.
**Form1:**
public void UpdateSchedule()
{
// do stuff
}
private void mnuSchedule_Click(object sender, System.EventArgs e)
{
frmSchedule fSchedule = new frmSchedule();
fSchedule.ShowDialog();
}
**frmSchedule:**
private void btnSave_Click(object sender, System.EventArgs e)
{
// do some stuff
frmSchedule.UpdateSchedule();
Close();
} Tag: Form Location Question Tag: 75676
Script passingstrings to form...
Hi,
please anyone could supply a piece of code in order to have in my c#
program the string links(i).href?
This script runs from Internet Explorer clicking on web page and supplies
all the link of that page.
I need an example on how the program receives the strings from the script.
My simple method would be : private void myurl(string aurl)
{ listview1.items.add(aurl)
}
in order to receive the string aurl....
Thanks....all.
<script language="VBScript">
set c_url = CreateObject("MyClass.url_to download")
set links =external.menuArguments.document.links
for i = 0 to links.length-1
c_url.myurl links(i).href
next
</script> Tag: Form Location Question Tag: 75674
Netadvantage Ultracombo & date time problem
Hi
I have this application that I am fighting with for days now. Here is the
whole project; www.infovis.biz/tasks.zip. Please run and press the new task
button to see what I mean. Much of the code is either form taskvision or
infragistics samples btw and requires netadvantage 2004 vol2.
I have the following problems with this and would appreciate any help I can
get;
1. When I click in the clients field, I then click on any other field the
cursor is stuck in the client field requiring an entry to be typed or
selected. How can I make it so I can leave this field blank if I want to?
2. When a value is typed in the subject, details etc. fields, the time part
of 'Remind date' disappears.
3. In any event, the remind date & time are not being stored properly in the
tbltasks table in the access database. Not sure where in the code these
values are lost even though I can see them on the screen when saving the new
task form.
4. When I type a value in any field apart from client field, a 0 appears in
the client field if it is blank. How can I avoid that?
Thanks
Regards Tag: Form Location Question Tag: 75665
How do I simulate a tab event in code?
I would like to trap TextChanged events and validate them for correct values
from values coming in from a pen panel. If the values are valid, I want to
automatically tab to the next control.
But.... How do I raise the tab event in software? Tag: Form Location Question Tag: 75664
Process.Start problems
I'm just starting to learn VB.Net (winforms) - having known classic vb for
years...
I was trying to build a 'dll compiler' just for grins, using the vbc.exe
that resides in the DotNet Directory.
I have a form that browses to that directory, and builds a string from it,
adding "vbc.exe", along with the proper arguments, like this:
vbcApp = txtDotNetDir.Text & "\vbc.exe"
Process.Start(vbcApp & " /out:" & sFinal & " /t:library " & txtCBDir.Text)
sFinal merely builds a string with a path and the name of the new dll to
save - -
It always stops on this line and says :
An unhandled exception of type 'System.ComponentModel.Win32Exception'
occurred in system.dll
Additional information: The system cannot find the file specified
I've double checked and each of the variables in the equation have valid
paths/filenames and if I used it all manually at the command prompt, it
would work just fine
What am I doing wrong here? Tag: Form Location Question Tag: 75662
Problem Persisting a nested control using the DesignerSerializationVisibility attribute
I have a progress bar which is nested control and I want to persist
the design time properties of this nested control. I thought all I
needed to do was mark it with the
DesignerSerializationVisibility.Content attribute, as below:
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public ProgressBar ProgressBar
{
get{return _progressBar;}
set{_progressBar = value;}
}
but for some reason the properies are not being persisted, has anyone
got any ideas what I doing wrong?
thanks
andrew
www.vbusers.com Tag: Form Location Question Tag: 75659
Find the DotNet Directory
How do I programmatically find the most recent DotNet Directory on the
machine of the app that's running?
Is there a variable/method/property? Tag: Form Location Question Tag: 75658
ContextMenuItem and shortcut
Hello
How do you get the control if the click event handler for ContextMenuItem
was invoked by the assigned shortcut? In this case the SourceControl
property may be incorrect if the context menu is shared by more than one
control. The SourceControl will be the last control that displayed the
context menu but the shortcut will not display the item.
Thanks Tag: Form Location Question Tag: 75656
Owner-Drawn Buttons in C#
Hello,
I need a button control that will allow me to display mutiple icons/bitmaps
simultaneously.
Say for example you had a standard Forms.Button with text "Device 1" and you
need to display
small icons in each corner of the button to show state/status of Device 1.
Is an owner-drawn button my only option? This sounds like a daunting task.
I am unable to find any code examples or 3rd party products that even come
close.
Its hard to believe that I am the only one that needs such an animal.
Please help if you can.
Thanks, Jeff Tag: Form Location Question Tag: 75655
performance problerm with custom control
I have a custom control A, that has two text fields and a datagrid object.
the datagrid is populated within the control, quering the information from
the database at the time of construction. Now I have a Form, with a tabbed
control, let's name it B. On the object B we need to display N instances of
object A with all the data filled. But for some reason, any time N gets
larger than 10 the program slows significantly and if we need to add 30 or
more instances of A the program gets a timeout exception. Any ideas? Tag: Form Location Question Tag: 75654
Frustration..
Hello,
Bitmap.MakeTransparent( ) causes some really wild graphical anomalies.
This must me a bug. Does anyone know a work-around?
Can anyone shed some light on this issue?
To see this in action just do the following:
1. Create a new Windows Application Project
2. Add two buttons to the form (make button2 bigger than button1).
3. Add the following three lines of code to Form1_Load( )
Bitmap img = new Bitmap(@"c:\test.bmp"); //use any .bmp file you desire
img.MakeTransparent();
this.button2.BackgroundImage = img;
Run it.
Thanks, Jeff Tag: Form Location Question Tag: 75653
Controls can't be deleted
I am trying to delete some controls from a windows form but the VS 2003
designer doesn't allow me to do that. Simply the Cut, Copy, Paste and Delete
options aren't available. The form isn't readonly. I am just hiding the
controls I don't want anymore but the form is getting clogged.
Any help will be appreciated. Thanks. Tag: Form Location Question Tag: 75651
System.InvalidOperationException: Failed to load ImageList
I get the following exception when I try to run a c# winform app that
includes an imagelist:
An unhandled exception of type 'System.Reflection.TargetInvocationException'
occurred in mscorlib.dll
Additional information: Exception has been thrown by the target of an
invocation.
Unhandled Exception: System.Reflection.TargetInvocationException: Exception
has been thrown by the target of an invocation. --->
System.InvalidOperationException: Failed to load ImageList.
at System.Windows.Forms.ImageListStreamer..ctor(SerializationInfo info,
StreamingContext context)
--- End of inner exception stack trace ---
at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object
target, SerializationInfo info, StreamingContext context)
at
System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Objec
t obj, SerializationInfo info, StreamingContext context)
at
System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder
holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(Head
erHandler handler, __BinaryParser serParser, Boolean fCheck,
IMethodCallMessage methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(S
tream serializatThe program '[3728] TestImageList.exe' has exited with code
0 (0x0).
ionStream, HeaderHandler handler, Boolean fCheck, IMethodCallMessage
methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(S
tream serializationStream, HeaderHandler handler)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(S
tream serializationStream)
at System.Resources.ResourceReader.LoadObject(Int32 pos)
at System.Resources.RuntimeResourceSet.GetObject(String key, Boolean
ignoreCase)
at System.Resources.ResourceManager.GetObject(String name, CultureInfo
culture)
at System.Resources.ResourceManager.GetObject(String name)
at TestImageList.Form1.InitializeComponent() in
d:\box\test\testimagelist\form1.cs:line 66
at TestImageList.Form1..ctor() in d:\box\test\testimagelist\form1.cs:line 26
at TestImageList.Form1.Main() in d:\box\test\testimagelist\form1.cs:line 108
Machine: Windows 2003 Advanced Server + Visual Studio .NET 2003 Enterprise
I have seen something like a bug from
http://support.microsoft.com/default.aspx?scid=kb;EN-US;813967
but it refers to .NET Framework 1.0 with SP2.
Any Idea? Tag: Form Location Question Tag: 75645
transparent .gif question
Hi,
I've got some custom control buttons created with circular gif images. When
I place them on top of a panel using a .wmf file as its background I see the
form's color poking through the transparent corners of my buttons instead of
the pretty .wmf image.
Any ideas why that would happen?
thanks,
Deanna Tag: Form Location Question Tag: 75637
Icon in Task Bar
Hi,
I have a VB.Net winforms program that monitors some report folder. All
works well in that respect.
I have the program start 'Minimized' and I also have the program
automatically start when the system starts. However, the program sits
Minimized as a big block in the Task Bar (Bar at bottom with the 'Start'
button). What i'd really like is to have it be displayed as just an Icon
with the collection of icons over on the right in the task bar near the
clock. Is there sosme simple way to do that in Visual Studio so instead of
just starting minimized, it just starts as an Icon?
Thanks,
--
John Tag: Form Location Question Tag: 75632
magical layout
A new form. Using the designer I add two panels with fixed 3D border: one
gets Top docking, the other Fill docking. Result: two panels with clear
borders.
Now I create a new form, copy & paste the exact code from the previous
form's InitializeComponent() method and... the panels' borders are messed.
What's going on?
Here's the code:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace WindowsApplication1
{
public class Form4 : System.Windows.Forms.Form
{
private System.ComponentModel.Container components = null;
public Form4()
{
InitializeComponent();
Panel panelTop, panelCenter;
panelTop = new System.Windows.Forms.Panel();
panelCenter = new System.Windows.Forms.Panel();
this.SuspendLayout();
//
// panel1
//
panelTop.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
panelTop.Dock = System.Windows.Forms.DockStyle.Top;
panelTop.Location = new System.Drawing.Point(0, 0);
panelTop.Name = "panel1";
panelTop.Size = new System.Drawing.Size(376, 100);
panelTop.TabIndex = 0;
//
// panel2
//
panelCenter.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
panelCenter.Dock = System.Windows.Forms.DockStyle.Fill;
panelCenter.Location = new System.Drawing.Point(0, 100);
panelCenter.Name = "panel2";
panelCenter.Size = new System.Drawing.Size(376, 233);
panelCenter.TabIndex = 1;
this.Controls.Add(panelTop);
this.Controls.Add(panelCenter);
this.ResumeLayout(false);
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.Size = new System.Drawing.Size(300,300);
this.Text = "Form4";
}
#endregion
}
}
lukasz Tag: Form Location Question Tag: 75631
folderBrowserDialog always shows the create new folder button
Hi,
I can't seem to get the folderBrowserDialog create new folder button to
die!
Does it have a bug or do I?
Also is there a way to get it to root to a non-special folder folder?
Thanks
Randy Tag: Form Location Question Tag: 75629
Button Click to switch pages in a pagframe?
I have a multi-page form where I need to switch the user to the second page
after I fetch it's data.
Here is my code :
this.dsVehicle = this.oSingle.GetVehicle(lnKey);
this.PropertiesPage.Show();
But it doesn't work. Any ideas on how to get the switch of page?
TIA. Tag: Form Location Question Tag: 75628
child form doesn't appear in the task bar
I have 2 forms Form1 and Form2
Form1 is the owner of Form2 and should activate it on Button1_Click
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
' Create another form and display it
Dim newForm As New Form2
newForm.Show()
newForm.Owner = Me
' Hide the owner
Me.Hide()
End Sub
in the Form2 we have:
Private Sub Form2_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Me.Owner.Show()
End Sub
Evrerything works fine but Form2 doesn't appear in the taskbar
and if it's minimized there is no way to get to it but with ALT+TAB or TASK Manager
Is there some workaround for this , except for removing the maximize minimize box?
I know it's a newbie question,Any help would be appreciated
Thanks
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>IjUT2klXjEuu20zSm9KfIQ==</Id> Tag: Form Location Question Tag: 75627
Seting Focus
Hi,
Is there any codes or functions for ASP.NET that can set the focus on a
control.
e.g. after i hit a Search Button to find an employees information, i want
the cursor to be on the control name of "LastName"
like LastName.Setfocus???
Thanks
Ed Tag: Form Location Question Tag: 75626
Sorting TreeView
Hello,
Standard Tree.Sorted property doesn't sort nodes like I want to. It just
place them in a specific place while adding new node. This is not suitable
for me, because during insertion I don't know node's name so it is placed in
the end of all nodes. To make things clear I will cover some source code.
Sorting works fine when I do like this:
TreeNode newNode = TreeNode("Title");
Tree.Nodes.Add (newNode);
This is my situation. As you see, when I add new node, I don't know its name
so the sorting doesn't work.
TreeNode newNode = TreeNode();
Tree.Nodes.Add (newNode);
newNode.Text = "Title";
I need to be my tree sorted at any moment. Even when I change any node's
name - it's place in the tree should be changed.
What would you suggest for me? Is there any standard solutions or I should
write my own sorting procedure? Maybe you could give me already written
treeview sorting procedure?
Thank you for any help.
Vycka
P.S. Visual Studio .Net C#
P.S.S. Sorry for my english - I'm not a native speaker:) Tag: Form Location Question Tag: 75621
User control disappears
I have created a usercontrol and added to the designer in VB.NET
The form also has Tab pages
When I tried to change the anchor settings for this user control, the User Control disappears from the application. I see the code for the user control but not visual.
Am I doing something wrong or do I need to know something more about User Control settings?
Thanks Tag: Form Location Question Tag: 75620
CheckedListBox control not drawing correctle when checkbox is clicked
I've a CheckedListbox control on a windows form which displays a=
number of items that I load dynamically=2E Now, when I go to=
select (i=2Ee=2E check) and item in the list, if I click on the=
actual text of the item, then the checkbox for that item is=
checked as expected=2E If, however, I click directly on the=
checkbox, then the image of the checkbox becomes blurred=2E There=
seems to be some problem drawing the control if you click=
directly on the checkbox of an item as oppised to the items=
text=2E Very strange=2E=2E=2E=2E
--------------------------------
From: Julian Anstes
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>a0fgaAE0YEC1/j/RmTPmwA=3D=3D</Id> Tag: Form Location Question Tag: 75618
UIProcess Application Block
Sorry for the cross-post, but I wasn't sure which group would be best.
I'm working with the UIProcess Application block in a C# WinForms
application. I was testing a first go at it when I came across this error.
I'm wondering if anyone has any ideas.
[Error Message]
"Error loading UIP config parameters. The original exception is: The
section for the UIP configuration does not conform to the XML Schema
provided, please check the document to fix the document. The validation
error message is: The element 'objectTypes' has invalid content. An error
occurred at ,(4,4).. at
Microsoft.ApplicationBlocks.UIProcess.UIPConfigHandler.ValidateSchema(XmlNod
e section)"
I get the error when I run the application. My initial form loads OK, but
when I click a linklabel to launch my second form I get the above message.
I've included my App.config file for reference:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="uipConfiguration"
type="Microsoft.ApplicationBlocks.UIProcess.UIPConfigHandler,
Microsoft.ApplicationBlocks.UIProcess,
Version=1.0.1.0,Culture=neutral,PublicKeyToken=null" />
</configSections>
<uipConfiguration>
<objectTypes>
<iViewManager name="WindowsFormViewManager"
type="Microsoft.ApplicationBlocks.UIProcess.WindowsFormViewManager,
Microsoft.ApplicationBlocks.UIProcess,Version=1.0.1.0,Culture=neutral,Public
KeyToken=null" />
<controller name="appController" type="ebmEnroller32.UI.appController,
ebmEnroller32.UI,Version=1.0.1.0,Culture=neutral,PublicKeyToken=null" />
</objectTypes>
<views>
<view name="setupCases" type="ebmEnroller32.UI.setupCases, ebmEnroller32.UI,
Version=1.0.1.0, Culture=neutral, PublicKeyToken=null"
controller="appController" />
</views>
</uipConfiguration>
</configuration>
David Young
BellGroup Financial
dyoung (at) bellgroup (dot) (com) Tag: Form Location Question Tag: 75617
Reset MouseHover trigger?
Greetings,
I have a large Paintbox control as the background of a form in=
VB=2ENet=2E This paintbox control has various shapes on it and I=
wish to detect when the mouse is hovering over a shape=2E
This works fine for the first mousehover event but once the event=
has been triggered, it will not trigger again until the mouse=
has been moved outside the limits of the Paintbox and back in=
again (ie the MouseLeave and MouseEnter events have been=
triggered)
How can I directly 'reset' the status of whatever variable holds=
the MouseHover status so that it will automatically trigger=
again without moving off the form?
Thanks,
Darren=2E
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>guw0o1UVEU62NUbvDe7/+Q=3D=3D</Id> Tag: Form Location Question Tag: 75602
Crash if I rename Column Name
Hello, there,
I am using DataGrid to bind an ArrayList of an user-defined class.
The user-defined class contains some public properties. Among these
public properties, one is of type ArrayList which is used to hold objects of another user-defined class.
If I don't define column name by myself, the program works perfect.
However, if I define the column name by myself, whenever I click
the "+" sign to see what are inside the second ArrayList, the program
crashes.
Would you please help me with this problem? Thanks.
The following are the sample code
public class A {
private string prop1;
private ArrayList al;
public A(){
prop1="test";
al=new ArrayList();
}
public string Prop {
get ....
set ....
}
public ArrayList InnerList{
get ...
set ...
}
}
public class B {
private string name;
public B(){
name="B";
}
public string Name {
get ...
set ...
}
}
The code using above user-defined classes
ArrayList listA=new ArrayList();
listA.Add(new A());
listA.InnerList.Add(new B());
...
DataGridTableStyle ts=new DataGridTableStyle();
ts.MappingName="ArrayList";
DataGridTextBoxColumn cs=new DataGridTextBoxColumn();
cs.MappingName="Prop";
ts.GridColumnStyles.Add(cs);
cs=new DataGridTextBoxColumn();
cs.MappingName="Name";
ts.GridColumnStyles.Add(cs);
dataGrid1.TableStyles.Clear();
dataGrid1.TableStyles.Add(ts);
dataGrid1.DataSource=listA;
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>x+Iefua4IUOwPid/Xl81BQ==</Id> Tag: Form Location Question Tag: 75601
Synchronising files
I want to synchronise files between directories as part of my .NET
application. Ideally I'd like to invoke an XCOPY-like operation which copies
only new and changed files from source to target. Is anything like this
available as part of the framework ? If not how do I invoke a windows
command from within a .NET application and capture the output ? Tag: Form Location Question Tag: 75597