article ID: 838534 - Form icons are displayed as generic code modu
Form icons are displayed as generic code module icons in the Visual Studio
.NET 2003 IDE.
It is not possible to download the files.
Somebody in Microsoft can sand me them? Tag: ListView Scrollable Tag: 83188
Questions regarding hidding vs closing forms
I have a few questions regarding hidding vs closing forms. Is it bad
practice to close the current form when openning a new form? Does it create a
lot performance and memory issues? Is it better to use the Hide method
instead? And if I use the Hide method, is it true that I have to create
global variables for these forms, so that I could Show the hidden form from
another form? Tag: ListView Scrollable Tag: 83182
Problem/Bug: poor C# windows forms accessibility for disabled?
Hi,
Because the blind are unable to use a mouse, keyboard navigation is
key. A major difficulty is that not all windows forms controls are
keyboard 'tab-able' or 'arrow-able' or have "tab order".
The application is built and the next step is to create the custom JAWS
(Freedom Scientific)screen reader script to read the application. The
application uses the accessibility properties for controls provided by
C#. JAWS reads properties these fine --using a mouse for access. For
example, JAWS can read ComboBoxes and DateTimePickers that are placed
into DataGrid cells without any problem. The problem is the lack of
keyboard access.
Using Microsoft's accessibility SDK 2.0 tools: AccExplorer32,
Inspect32, AccEvent32, I can gather a great deal of information. It
appears that C# controls can not be given individual unique IDs. JAWS
can navigate to IDs. Is there something that can act like a unique
identifier? Different classes/objects are simply labeled
WindowsForms10.Window.8.app3. This is too ambiguous. JAWS has a
limited number of recognized classes it understands, but a substitution
could be made if an unknown class was unique.
What about custom controls? Is there a way to uniquely ID C# custom
controls? There are many very interesting controls being developed in
the .NET world, that could be read if there where more identifiers.
Looking for help at MSDN and the Knowledge Base it seems that there is
a significant difference between C# and C/C++ functionality in this
context.
How can I have keyboard access to my C# windows forms application?
Can anyone offer any tips, or code samples?
Thanks,
Walt
My environment: C#, Windows Forms, Framework 1.1, VS.NET 2003, Windows
2000 & XP, JAWS 5.0 Tag: ListView Scrollable Tag: 83181
Embedded Control in IE, control loads but get System.Security.Permissions.SecurityPermission request error in IE...
Hello, I have been posting lately on my embbeded control. I have made
some progress.
My control is strong names, with allow partially trusted callers
attribute. I have created a custom code group with full trust for my
assembly.
Before, my control would not load at all due to security issues. I
would get exceptions outputed into my IEDebug log. Now i get no errors
in my IEDebug log but in Internet Explorer (Exclamation mark at the
bottom left of IE), I get an error:
Request for the permission of type
System.Security.Permissions.SecurityPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089 failed.
I do not even know where to begin if I need to assert. What calls
would require me to Assert a SecurityPermission??
Thanks,
Marco Tag: ListView Scrollable Tag: 83180
ExceptionManagement Application Block strange behavior
I am seeing a strange bug when using the Exception Managament Application
Block with a No Touch Deployed WinFroms application. Who can I contact at
MS on this? Tag: ListView Scrollable Tag: 83174
call a button's click event from another procedure
Hello,
Is it possible to call a button's click event from another procedure? If
so, what needs to be supplied as the Object , and SysEventArgs parameters for
the click procedure?
Thanks. Tag: ListView Scrollable Tag: 83172
Forms with no title bar - Microsoft Money 2005
Hello folks.
I´d like to build a application with the same look and feel of the Microsoft
Money 2005. As you can see, the first screen is maximized with the control
buttons (minimize, maximize, close window) but the title bar, of the window,
is not showing blue, as Windows standard, it´s showing a part of a background
image, giving to the user the sensation that it has no form title. How can I
do that in C#? Is it possible to do that? Do you have a sample?
Thanks a lot
Henrique Tag: ListView Scrollable Tag: 83171
HELP! - MessageBox in FullScreen app
Is it possible to show a messagebox within an application
running in full-screen mode? .Net does not seem to like
this concept at all, as it is impossible to bring the
messagebox to the front, even if I implement it as a form
in its own right.
Help! Tag: ListView Scrollable Tag: 83170
Drag an Drop in MDI child forms
Hi,
I have to Drag an Drop data between 2 listviews in MDI child forms. How do I
activate the target child form, if the mouse is over.
Tia
Torsten Tag: ListView Scrollable Tag: 83168
Array of Class
Hi,
I must design a method that receive a Control object and return a single
value if it is a TextBox object, another value if it is a ComboBox object
and so on.
If I try a "if-else-if" loop, this will be very unhappy! Can I use a foreach
to make that? How declare and create the array for use in the operator "is"
(for test a Control, like "cont is TextBox")?
Thanks,
Max Tag: ListView Scrollable Tag: 83166
Current record of datatable in dataset
Hi
I have a datatable which I have linked to a combo control, via the
datasource property of the combo control.
I have also set the displaymember property of the combo, to ensure that my
description is shown in the combo.
However, I want to have another value of the same row of the datatable (as
selected in the combo), displayed in a text box. ie. so that when I change
the value in the combo, a text box displays a value from another field in
the same datarow.
Can anyone offer any tips, or code samples?
Thanks Tag: ListView Scrollable Tag: 83164
Creating a dynamic grid
Hello,
I have a question about creating a dynamic grid layout.
The grid should have the following:
- a rowheader(12 columns). (0)
- a detail row with also 12 columns (contains the data). (1)
- a second row with 3 columns where the first column is empty, the second
column has a description in it like the rowheader above and a third column
with the value of this row. (2)
- a third row which has the same layout as the second row. (3)
row (1), (2) and (3) should be created multiple times depending on the data.
Is this possible to create this within C#.
At the moment I draw this "grid" with seperate labels. I do this when I
retrive the data for it. The data can change when clicking an other row in a
different grid.
My "label-grid" works fine but it is to slow when redrawing it when
selecting other data because the labels must be removed from the form and
created again within the code.
I have also a screenprint how it must look but can not attach this.
Thanks Tag: ListView Scrollable Tag: 83163
Howto trigger validation of a form
Hello
The ContainerControl.Validate() method is documented to:
"Validates the last invalidated control and its ancestors up through, but
not including, the current control."
How to I, from a form (more precisly a base form) trigger the validation of
the form itself.
I want to ensure that the Validation events is triggered and all values
transferred (trough databinding) before I peform a Save operation, however,
calling the Validate() method does not cause the validation events to be
triggered on the form itself. But it does case all data to be transferred
for the controls on the form.
Regards, TEK Tag: ListView Scrollable Tag: 83162
Problem with indexed pixel format/
I know alot of people have the problem with indexed pixel format. I hope
someone can show me the solution to this.I am have problem with graphics
with the following code giving the error:
"A Graphics object cannot be created from an image that has an indexed pixel
format."
'My code
<%@ Page Language="vb" %>
<%@ import namespace="system.drawing" %>
<%@ import namespace="system.drawing.imaging" %>
<%@ import namespace="system.drawing.drawing2d" %>
<%
' initialise the web object
Dim webC As New System.Net.WebClient()
' set the URL
Dim strFilename as string
strFilename="http://www.domain.com/graph.gif"
' create a bitmap based on the image from the URL
Dim g = New System.Drawing.Bitmap(webC.OpenRead(strFilename))
response.contenttype="image/gif"
dim gr as graphics = graphics.fromimage(g) ' create a New graphic object
from the above bmp
gr.smoothingMode = smoothingMode.antiAlias ' antialias objects
'' draw the number on the image canvas in verdana 10pt font bold
gr.drawString("ABC", New
font("verdana",14,fontstyle.bold),systembrushes.windowtext, New pointF(2,2))
' send the image to the viewer
g.save(response.outputstream, g.rawformat)
' tidy up
g.dispose()
gr.dispose()
webC = Nothing
%> Tag: ListView Scrollable Tag: 83155
Remove datagrid scrollbars
I have a datagrid on which I want to completely remove the scrollbars. At
present I'm just deriving a DataGridNoScrollBar class...
Public Class DataGridNoScrollBar
Inherits DataGrid
Public Sub New()
Me.HorizScrollBar.Height = 0
Me.VertScrollBar.Width = 0
End Sub
End Class
Am I missing something or is this the best way? Tag: ListView Scrollable Tag: 83151
Docked panels and Z-order problem.
Hallo=2E
I have two panels docked on the right of the form (p1 on the left=
and p2 on the right) and I want third panel to slide from right=
to left into a view between p1 and p2 (Just like Solution=
Explorer window in Visual Studio ? if it is in auto hide mode=
its slides to left when mouse is over it), but when I put my=
third panel on Controls list of the form, set it child index=
between those two and start to slide I have opposite effect ?=
the p1 is visible and p2 is hidden ? it is a way to do this=
right ???
--------------------------------
From: Dominik Jeske
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>XoRs7wjAy0C1fCkdrWtVmA=3D=3D</Id> Tag: ListView Scrollable Tag: 83150
Problem with Z-ordering !!!
Hallo !!
I have two panels docked on the right of the Form (z order index=
p1: 0, p2: 1) and I want to third panel slide from the right=
between those two panels (just like in Visual studio when you=
put mouse over autohided SolutionExplorer its slides to view)=
but because of z-ordering when I put my control on the form and=
set his ChildIndex between those two I have opposite effect ? p2=
is hided and p1 is visible ? any idea how to do this right ?=
?????????
--------------------------------
From: Dominik Jeske
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>XdApU3lP3UWOFieLdyEK1g=3D=3D</Id> Tag: ListView Scrollable Tag: 83149
Form transparency issues
Recently I wanted to create a small little program that could sit=
on the desktop and not block the desktop wallpaper=2E There are=
two methods to accomplish this ( that I am aware of )=2E
1) create a solid color bmp as a background image and set the=
transparency key to match its color
2) specify the form's background color with a matching=
transparency key
Now my issues with both methods, but first it should be known=
that I have set the forms to have no border or title bar and=
have implemented code that allows me to click-and-hold anywhere=
( with exceptions listed below ) on the form and move it=2E The=
data actually displayed on the form is just text and one=
rectangle, all drawn by me ( there are no controls on the form=
itself )=2E
1) I have two issues with this method, although it is what I'm=
prefering to use at the moment=2E The first seems to be the=
discrepancy between how the program is handled when the=
computer's Color Depth is 32bit or when it is less than 32bit (=
16bit )=2E When the color depth is 32bit then I am able to click=
on the entire area the form inhabits ( even that which is=
transparent ) and move it, but if the color depth is less than=
32bit ( 16bit ) then only the drawn text or rectangle outline (=
since it has no fill ) can be clicked to drag the program=
around=2E Clicking on the transparent areas just passes the click=
through the form to whatever is below ( even when I know the=
form has focus )=2E I'd like to be able, regardless of the=
desktop's color depth, to click anywhere within the form area=
and move the application=2E
The second issue I have with this method occurs when I take my=
executable and put it on another PC ( my PC is XP Pro, the other=
PC is XP Home=2E=2E Both SP2 )=2E The problem is similar, but a=
little different=2E When the 2nd PC's color depth is at 32bit,=
the transparency does not work=2E The green/lime ( that's the=
transparent color I'm using ) background shows=2E Needless to say=
this is not acceptable=2E When I change the color depth to less=
than 32bit ( 24bit this time ), the transparency actually works,=
but I come across the same issue of clicks on the transparent=
areas just passing through=2E
2) With this method I have not tried it on a 2nd PC yet ( I don't=
have it available where I am atm )=2E Its basically the same=
"issue" as mentioned above with color depth less than 32bit,=
except it does it with a color depth of 32bit and 16bit=2E Clicks=
on the transparent areas just pass right through=2E I'm tempted=
to just go with this method and possibly make one area on the=
form that is meant to be used to drag it around ( similar to the=
idea of the box that appears to move tables in MS Word ), but=
I'm hoping there's a solution I'm unaware of before I do that=2E
Anyways, all of this brings up some interesting questions=2E
-What does color depth have to do with transparency handling?
-Does the version of XP ( Home or Pro ) handle transparency=
differently?
Probably some more questions also=2E
Not sure if it matters, but I'm doing all of this in C#=2E
So any ideas to get pass any of these issues?
Thanks in advance=2E
--------------------------------
From: othell m=2E
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>HN0Y7xO4H0+DVomkdJq1vA=3D=3D</Id> Tag: ListView Scrollable Tag: 83148
Newbie: Using forms VB vs VB.Net
All my experience is in VB5/6 and I am now learning VB.Net. I have a
sophmoric question about proper use of forms.
In VB5/6 I designed a form and to use it from a menu item I simply did
the following
myForm.show vbModal
unload myForm
In the form, my exit button would simply do the following
unload me
What would the equivalent code look like in .Net? Do I still need to
do an unload or will it unload when the menu subroutine ends due to
scoping? How should my form terminate and return to the menu
sub-routine? etc.
TIA
John Tag: ListView Scrollable Tag: 83147
Datagrid Scrollbar Capture
Hi,
How do I stop the datagrid's vscrollbar from capturing mousewheel messages?
Seems they don't reach the grid's wndproc -where are they handled ? I need
to use the wheel to increment values in grid cells.
Thanks for your help
Jon Tag: ListView Scrollable Tag: 83144
c# listbox onselect
is that there is no onselect for listbox in c#?
if i want to trigger an event when i select an item in the listbox
what can i do?
thanks a lot!!! Tag: ListView Scrollable Tag: 83141
How to implement an notification window like "MSN messenger friends online notification"
Hi,
I'm developing a notification application using winform.
It is shown as a tray icon when running, and when a message arrive (such as
new mail alert), it should pop up a notification window in the right-bottom
of the desktop, just like msn messenger's friends online notification.
Anybody can tell me how to implement this?
Some sample code or reference document will be much appreciated!
Regards,
William Li Tag: ListView Scrollable Tag: 83139
Embedded WinForm Control in IE crashes...
Hello,
I have a WinForm control embedded in IE that crashes everytime I close
my browser. If i click on a link in IE when the control is loaded and
brings me to another page, IE also crashes. I don't get any debug
errors from IE itself (via IEDebug). Does anyone have any idea why
this would happen? As a standalone App, my control works fine. Is IE
treating my control any differently?
Thank you in advance,
Marco Tag: ListView Scrollable Tag: 83138
Intercepting text a RichEdit/Textbox control in another application?
Hi,
Anyone know how to intercept the messages/text to a textbox control in
another application using .Net? I know that Spy++ can do this, how is
this accomplished?
Been trying to avoid using global hooks to do this, but i don't know of
any other way.
As a workaround, I've been able to use the SendMessage with WM_GETTEXT
to poll the control on a timer to retrieve the text, but ideally I'd
like to intercept the messages to the textbox instead, if at all
possible.
Any advice?
Thanks,
kc Tag: ListView Scrollable Tag: 83137
User Control binding
Hi, i´ve created a user control that contains a TextBox and a Label, lets
call this control CText.
CText has properties like Value and Text, where Text is used to display
formatted Value.
Well, i´m trying to create a new databind using:
cText1.DataBindings.Add("Value", wDataTable ,"TableField1" );
_CM = (CurrencyManager) this.BindingContext[wDataTable ];
_CM.AddNew() ;
Then, when submitting the form (winform), i call
_CM.EndCurrentEdit();
...where it is supposed that the bindingcontext datasource should be
updated..., but this is not working as expected.
-> Tried the same with a TextBox and it works....
-> MSDN : You can simple-bind to any object that derives from the
System.Windows.Forms.Control class...., and UserControl does, so what´s the
problem??
any suggestion?
ErickG Tag: ListView Scrollable Tag: 83135
Wheres system.windows.forms?
Hi All... I'm trying to us a control that requires using
system.windows.forms. I'm getting a compile error tho - it doesnt understand
system.windows.forms. I installed VS .Net 2003 pro. What am I missing? Do
I need to download somethign else? Thanks for the help. Tag: ListView Scrollable Tag: 83129
Hiding non-databound hyperlinks in a DataGrid
I am brand new to ASP.NET and am now required to take over maintenance of a
.NET/C# web application. On one of the pages I'm working on there is a
DataGrid which has multiple columns. One of the columns is not databound and
instead has up to three hyperlinks in it (Edit, Award, and Cancel). A couple
of the hyperlinks should not be shown in certain cases. Now, mind you, I
don't know if it's being done in the way that's best to do it. It looks like
there is a "panel" being created to contain the hyperlinks that may not be
visible. I don't know why though (i.e. why not just set hyperlink's Visible
property and be done with it without a panel?). That being said, I want to
change the page so that one of the hyperlinks does not show (i.e. Visible =
False) based on a certain value for a session cookie. It's the Award link in
the code shown below from the .aspx file in question.
--- CODE BEGINS ---
<asp:TemplateColumn HeaderText="Actions">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<ItemTemplate>
<asp:HyperLink id="hlEdit" runat="server" NavigateUrl='<%#
"Edit.aspx?id=" + DataBinder.Eval(Container, "DataItem.PersonID") %>'
CssClass="link-text"> <!--onMouseOver='<%# "javascript:toolTip(\"" +
DataBinder.Eval(Container, "DataItem.PersonToolTip") + "\");" %>'
onMouseOut="javascript:toolTip();">-->
Edit
</asp:HyperLink>
<asp:Panel ID="Panel1" Runat="server" Visible='<%#
Convert.ToBoolean(Convert.ToInt32(Request.Cookies["core"]["sl"]) <= 9)%>'>
<asp:HyperLink id=hlBids runat="server" Visible='<%#
Convert.ToBoolean(Convert.ToInt32(Request.Cookies["core"]["sl"]) <= 9)%>'
NavigateUrl='<%# "Award.aspx?id=" + DataBinder.Eval(Container,
"DataItem.PersonID") %>' CssClass="link-text">
Award
</asp:HyperLink>
</asp:Panel>
<asp:Panel ID="panAction" Runat="server" Visible='<%#
Convert.ToBoolean(DataBinder.Eval(Container,
"DataItem.PersonStatusCancel"))%>'>
<asp:HyperLink id="hlCancel" runat="server" NavigateUrl='<%#
"Cancel.aspx?id=" + DataBinder.Eval(Container, "DataItem.PersonID") +
"&op=cancel" %>' Visible='<%# Convert.ToBoolean(DataBinder.Eval(Container,
"DataItem.PersonStatusCancel"))%>' CssClass="link-text" >
Cancel
</asp:HyperLink>
</asp:Panel>
</ItemTemplate>
</asp:TemplateColumn>
--- CODE ENDS ---
Now, the value of the cookie, when I bring up this page, is 1, which
satisfies the condition...yet, the link still shows. I guess my question is
two-part:
1) What is the best way to accomplish something like this? Do I have to use
a DataList instead or can it be done using a DataGrid?
2) If this is best way to do it, then what's wrong with code above? Tag: ListView Scrollable Tag: 83128
Using Usercontrol on form
I created a usercontrol in one project. I want to place the same usercontrol
on more than one form in the same project. How do I do this?
--
Thanks for your help.
Harshad Rathod Tag: ListView Scrollable Tag: 83127
Send a user defined message/event to form controls
HI,
it's possible to "send" a custom message/event to a form, so the
controls that "implements" an handler to this event process it?
As an example,
I definied a custom list view, that after an item select raise a custom event
"UpdateText"
In a form i have
- custom button control
- custom label control
- custom textbox control
that should update their text, with the one selected in LIstView.
Thanks in advance
Best Regards
Massimo Tag: ListView Scrollable Tag: 83122
File.CreateText fails
I am developing a Windows application. The source is stored on a
network share, probably 6 directories deep.
When I say:
File.CreateText("G:\temp\" & _dataSourceInfo.Csv_filename)
the file is created OK on the local disk G in directory temp. However,
when I say:
File.CreateText("%temp%\" & _dataSourceInfo.Csv_filename)
it fails with a Directory not found, and is trying to create:
\\networkShare\...\Application\bin\%temp%\CSV_Filename
Why is this happening? Something to do with security?
TIA Lars Tag: ListView Scrollable Tag: 83120
problem with Timer (WinForm)
I have a Winform running and a timer (winform) firing each 3 min to make a
transmition of data..I'm ok about the UI stoping for a while, the problems is
that the timer fires two times in every interval, even if I use Timer.Stop.
It seems that the stop instruction is not stoping the timer associated counter
Private Sub TimerTransmite_Tick(....)
TimerTrans.Stop()
Transfer()
TimerTrans.Start()
End
Any Sug?
--
Kenny M. Tag: ListView Scrollable Tag: 83118
setting the parent property from MDI child form in c#
How can I enable/disable Main Menu Item on MDI Parent Form
when a Child form is loaded?
Is it possible?
In one child form i the code below on the button click event.
The first line of code has error. I also dunno why may be it is not possible
to instantiate the parent form while it is active?
frmParent mdiParent=new frmParent();
mdiParent.mnuFileNew.Enabled=false;
Thanks. Tag: ListView Scrollable Tag: 83117
Warning: The event 'Application.SAMPLETableAdapter.RowUpdated' is never used
In my applicaton I attend the RowUpdated event for retrieving the
autonumber IDENTITY from Access Database (no stored procedure support) of
new inserted row from one of my tables (SAMPLE). I did accordantly to the
microsoft's tutorial:
1) I declare:
public event OleDbRowUpdatedEventHandler RowUpdated;
in the body of definition SAMPLETABLEAdapter (object of this class is the
gSampleTableAdapter for SAMPLE table, in which RowUpdated event I want to
detect, when I insert new row)
2) I Placed this line of code:
gSampleTableAdapter.RowUpdated += new
OleDbRowUpdatedEventHandler(OnRowUpdated);
and below mentioned line i placed the code which can invoke this event:
gSampleTableAdapter.Update(dataSetSample.SAMPLE);
3) and finally I define OnRowUpdated function:
protected static void OnRowUpdated(object sender, OleDbRowUpdatedEventArgs
args)
{
OleDbCommand command = new OleDbCommand("SELECT @@IDENTITY",
oleDbConnectionDlaID);
if (args.StatementType == StatementType.Update)
{
IDnewAddedRow = (int)command.ExecuteScalar();
MessageBox.Show("Database retrieve ID:" + IDnewAddedRow);
args.Row["ID_SAMPLE"] = IDnewAddedRow;
}
}
Everything compliles OK, except this one Warning:
Warning: The event 'Application.SAMPLETableAdapter.RowUpdated' is never used
what it's mean ???
When I checked the sample table in the access, I see, that the new rows are
propery added, but is something wrong with this mechenism...
Where is the case !! Please help me, because i'm starting to get nuts..... Tag: ListView Scrollable Tag: 83112
Validating of control data on Windows Forms
My question is there any way to trigger controls validation from the
code?
I have a form where user can enter some query parameters and execute
the query. Each control (TextBox, DateTimePicker etc.) has Validating,
Validated handlers. If the user edits query parameters manually
validation code is executed upon leaving control which is just edited.
The application can also read default data from config file/command
line. Such data is used to populate form controls upon form
creation/loading but it does not trigger validation process.
Is there any standard way to cause the Form to perform validation for
all controls on the form? For all controls on particular panel? Tag: ListView Scrollable Tag: 83106
Embedded Control in IE keeps crasking...
I have an embedded control that works find when its in a standalone
application (executable) but when it is embedded in IE it crashes
everytime i close IE with it loaded or click on a link to another
page.
Any ideas?
Thanks in advance,
Marco Tag: ListView Scrollable Tag: 83105
Windows XP ComboBox bug when using "Windows Classic Style"
I found a very odd bug while developing a Forms app with Visual Studio
2003. If you have a ComboBox with no items in it, when you click the
arrow, an empty drop down list is displayed which is the height of 1
item. In Windows XP, this all works fine if you have your "Windows and
Buttons" Display Setting to "Windows XP Style". However, if you change
it to "Windows Classic Style", when you click the arrow in your
combobox, it does not show the empty drop down list. Worse yet, the
system "thinks" it is displayed so the UI is "locked" (just like when a
drop down list is displayed) and your next click on the app will do
nothing, because this is what would normally close the drop down list.
A couple things to note:
-If the combo box is not empty, it always properly displays the drop
down list
-It is not limited to .NET, I built a C++ app with Visual Studio 6.0
and get the same behavior
-There are rare circumstances where it does work correctly in "Windows
Classic View." Sometimes an empty combobox DOES display the empty drop
down list, but it seems to be very rare. I can not explain why
sometimes it does and sometimes it doesnt. I have not been able to come
up with a scenario where I can consistanly get the empty drop down list
to display in "Windows Classic View", in fact, I have only gotten it to
happen a couple times.
Here are the steps to reproduce (Must be running Windows XP):
-Set your style to "Windows Classic Style" by right-clicking empty
space on your desktop, select Properties, click the Appearance tab and
select the "Windows Classic Style" in the "Windows and buttons" drop
down list
-Open Visual Studio and create a simple Windows App. Drag a ComboBox
onto the Form. Press Ctrl + F5 to build and run the app.
-You *should* see that when you click the arrow in the ComboBox, it
does not display the drop down list.
-Change your style to "Windows XP Style"
-Now when you run the app you will see the drop down list DOES appear. Tag: ListView Scrollable Tag: 83104
Set 'RunAs' property programmatically for WinForms VB.Net applicat
Hi,
in a .Net 1.1 WinForms application I have a dialog that lets the user set
new network credentials.
Question: How can I assign the new credentials - say nc, defined by
Dim nc = New System.Net.NetworkCredential(M_User, M_Password, M_Domain)
- to the running (VB.Net -) application, so that the application behaves
like being started in 'RunAs' dialog?
Thanks for help in advance!
--
Best regards
Henry Tag: ListView Scrollable Tag: 83102
print top 1/3 of A4 paper in C# winform application
Hi,
In my application, I need to print bank checks. The height of check is
about 1/3 of the A4 paper and I use dot matrix printer for printing. Since
my printable bank checks are in a roll, I need to stop printing when one
check is printed, i.e. the printing job must stop in the middle of paper.
I'm using a hidden web browser control for presenting the bank check to
print. How can I do this?
Thanks.
Sung. Tag: ListView Scrollable Tag: 83100
Datagrid calculations
I have a windowsform datagrid with a tablestyle and a columnstyle. I need
to calculate a value from two of the columns and place it a third column.
This needs to happen as leave the column this the last value needed to make
the calculation or when I leave the row. How can I do this using VB?
JD Tag: ListView Scrollable Tag: 83097
font color in child window applicaiton
Hi,
Recently I took a test in .NET windows application. I had to create a window
application in C#. The application has a dropbox with four items (people's
names)
The next question that I couldn't do figure out is:
pick up a name in the drop box list then hit control + L. I should open a
window applcation (form) with that name in the textbox with the assigned font
color...It means I must open four window forms with four different names in
its unique font color for example: dave (red), Jenna (blue), Bob(green),
Ginny (purple).
Please help,
Thanks,
david c. Tag: ListView Scrollable Tag: 83096
ColumnHeadersVisible property failing
I''ve got a datagrid on a windows form that I'm formatting using a custom
table style. Within the code that sets the style up I have
tsName.ColumnHeadersVisible=false.. but they are still displaying. Any
ideas why that might be?
Thanks Tag: ListView Scrollable Tag: 83095
Anyone know how to emulate this behavior
I have been asked to create and application that basically
visually emulates the relationship builder in Access and Sqlserver.
Are there any examples out there that show how to do this?
Thanks
Nick Tag: ListView Scrollable Tag: 83094
BUG: Nested groupbox in .NET 1.1 SP1 shows corrupted caption in themed
Hello,
.NET 1.1 SP1 contains a nasty bug (.NET 2.0 beta as well) which makes
nested groupbox controls to show a corrupted caption text (in bold,
which is chopped off) if the windows forms application is run on a
themed XP system (i.e.: with windows themes turned on) and flatstyle is
set to System (to enable visual styles).
This affects all applications written for .NET and which use windows
forms and nested groupbox controls, applications which used to work
perfectly on .NET 1.1 but are now showing corrupted caption.
See for a screenshot:
http://weblogs.asp.net/fbouma/archive/2005/01/20/357210.aspx
See for a repro case:
http://weblogs.asp.net/fbouma/archive/2005/01/21/358006.aspx
As the bug is pretty severe, and requires ISV's to change their
applications to make them work on .NET 1.1 SP1 while there is nothing
wrong with their code, I'd like to ask Microsoft to fix this a.s.a.p.
I tried to contact PSS / online support but apparently I have to pay (!)
for sending this information to MS, so I try to get your attention
through the newsgroups.
Please fix. Thanks.
Frans.
--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------ Tag: ListView Scrollable Tag: 83089
Scrolling Problems in a Form
Hi everybody,
I have a little problem, no two. First my english is not quiet good so
please try to understand what I want and help me, please ;) And second:
I habe a Form. In this form is a ScrollableControl (modified, so it could
raise scroll events), containing another Control painting an image. Okay,
everything works fine, but if I deactivate the Form (it's a mdi child form)
and activates another Form and than go back, the scrollbars are reseted to
the default settings, very top and very left! I will get the same behavior,
when I deactivate the hole application an than activate it again. If the
mdi-child Forms are deactivate, there are showing the right scrollbar
positions and the correct clipping of the image. Only when I activate the
form, the form resets the scrollbarpositions :(
Me first solution is, receiving the activate Event raised by the form and
than set the scrollbar positions. This dosn't work! Than I try the receive
all window messages to get the WM_ACTIVATE, WM_MDIACTIVE, WM_NCACTIVATE,
WM_SETFOCUS and the WM_IME_SETCONTEXT messages. If I acted on these messages
I got a really funny behavior of me application. I have deactive (by
clicking to no application on taskbar) and than have activate (by clicking
the taskbar icon), than the scrollbar shows again the wrong position, but
when I moved the mouse of the form, the scrollbar reposition them self and
show the correct positions.
Now I react on every message posted throu the WNDPROC function and set the
scrollbar positions. This works, BUT if I do a large/small de/in-crement
scroll with one mouseclick the scrollbar do the de/increment and immediately
set them back to the previous position. This isn't good :(
Maybe some of you know the correct window message, so I can set me
scrollbars I the form will activate by clicking the nonclient or client
area, or the application and so on.
Have many, many thanks
Robert Groß Tag: ListView Scrollable Tag: 83082
Datagrid with colored columns pausing during setup
I have a windows form that contains a datagrid with columns given coloured
backgrounds via the DataGridColoredTextBoxColumn class. Data is loaded, and
the table style set up, during the load event of the form. At present, the
form half displays, then pauses, then completes. Is there any way of
telling it to complete the set up _before_ displaying anything?
Thanks. Tag: ListView Scrollable Tag: 83081
2 Simple Questions
Hi everyone,
I have what I think are 2 pretty simple questions. I know I have done it
before, but can't remember how I did it.
#1: I have a windows form with a textbox. The textbox is getting filled
from within a function. I need to have the scroll buttons on the text box
accessable at all times, not just when the loop that fills it gets back
around to the application.doevents line. I'm pretty sure there is an easy
way to do this with threading.
#2: This one is really dumb, but I'm having a slow day. How can I get the
text box to autoscroll to the bottom everytime & add text dynamically to it?
Thanks all in advance,
Matt Tag: ListView Scrollable Tag: 83073
ListBox: How to only fire SelectedIndexChanged if the an item is directly selected.
I would like to only fire SelectedIndexChanged if the an item is
directly selected.
example:
I have a listbox with a few items in it. These items only half fill the
listbox. If I click in the listbox, but not directly on an item (that
is in the bottom half of the listbox), the bottom item is selected.
Any ideas?
Thanks!
Felix Tag: ListView Scrollable Tag: 83072
Creating a Form From A Non-UI Thread
I have a non-UI assembly that contains a Form similar to the MSN Messenger
pop-up that appears when a user comes online. I have a Timer in this assembly
that on regular intervals goes and looks for new information and if it finds
any, displays the Form to the user right above the System Tray.
My problem is that the Form comes up alright, but it seems to not be getting
any Windows events like Paint and Click. Also, when I put my mouse over the
Form an hour-glass displays. I am assuming that there is a problem with the
Form being called from the Timer thread and have been trying to figure out a
solution with no luck. One note, Iâ??m trying to design this assembly to be
called from a normal WinForms application and an application that starts in
the System Tray so it might or might not have a Form running. Any help would
be greatly appreciated! Iâ??m done with this project except for this one
â??majorâ?? problem.
Thanks,
David
=====================
David McCarter
www.vsdntips.com Tag: ListView Scrollable Tag: 83070
FileSystemWatcher fails
I have an app (that should really be a service, but I haven't got round to
it yet) that just monitors a network folder via a filesystemwatcher for new
files and then does its thing. Generally, it works fine, but it fails about
once a month - which is about one every 2-3 hundred files. No error message
or exceptions... it just fails to notice that the file has appeared. After
that, any other new files are also ignored.
I'm thinking of switching to a dir function running every ten seconds or
so....but was wondering if anyone had any ideas about the situation. Tag: ListView Scrollable Tag: 83068
Colour schemes
Has anyone done any research (or even just any ideas) on the best colour
scheme to use for forms? I don't like the default grey background.... but
is it the best?
Thoughts? Tag: ListView Scrollable Tag: 83067
LS,
Is it possible to scroll the listview with the property ScrollAble = false;