Literal percentage symbol in rowfilter
I have a dataview that accepts input from the user before being applied.
That's fine except where the text they want to search for includes the %
character. How do I do Fullname like '*a%b*' where I want the % handled as
an actual character?
Thanks Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81291
how to check/uncheck the checkbox in datagrid
I have datagrid with 5 items. Out of which 1 items are checkboxes. The bool
column(checkbox column ) in added in datagrid. The rest of Data is binded
dynamically to the datagrid
Based on some values from the database I have to check or uncheck the
checkbox in the datatgrid.
i am not able to change the value of checkbox at runtime. Does any one know
how to do this in windows form? Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81287
Serial Communications - Threading
I have written an winform application (c#) that uses serial communication to
transmit and receive data to a device that users respond to by pressing
various proximity sensors. The data is transmitted and received correctly
and all works well.
A part of the application is to flash LEDs on the device when the it has not
been used for some while, in the meantime the UI goes into a form of a Screen
Saver. The device then waits for a sensor to be touched and if so, then
returns into life. Unfortunately, when i transmitt the commands to flash the
LEDs the application hangs until the transmitt has completed and as it
transmits upto 10 flashes, this is very slow (app does not respond until
transmits are complete). Can anyone reccommend a method for transmitting
(perhaps on a thread) and not having to wait for the transmitt to complete
i.e. so that UI does not freeze. Thank you for your help Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81286
Inline custom editor in PropertyGrid
Hi,
Currently, possible values of UITypeEditorEditStyle is either model,
dropdown or none.
Is there no way to have a custom editor displayed inline within the
PropertyGrid?
Could be useful for custom editors such as mask edit etc.
Thanks,
Anita Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81278
windows db appliation
This is a multi-part message in MIME format.
------=_NextPart_000_0044_01C4D7C1.3EEF59F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I am working on developing window application using vb.net, application =
is ms-sql data driven, I have different windows groups will have to =
access / permission to different menus and icons from tool bar.
any suggestion on good practices / sample application used as reference =
about securities and setting .
Thanks
Tim
------=_NextPart_000_0044_01C4D7C1.3EEF59F0
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.1476" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>
<DIV><FONT face=3D"Times New Roman" color=3D#000080>I am working on =
developing=20
window application using vb.net, application is ms-sql data driven, I =
have=20
different windows groups will have to access / permission to different =
menus and=20
icons from tool bar.</FONT></DIV>
<DIV><FONT face=3D"Times New Roman" color=3D#000080>any suggestion on =
good practices=20
/ sample application used as reference about securities and setting=20
.</FONT></DIV>
<DIV><FONT face=3D"Times New Roman" color=3D#000080></FONT> </DIV>
<DIV><FONT face=3D"Times New Roman" color=3D#000080></FONT> </DIV>
<DIV><FONT face=3D"Times New Roman" color=3D#000080>Thanks</FONT></DIV>
<DIV><FONT face=3D"Times New Roman" color=3D#000080></FONT> </DIV>
<DIV><FONT face=3D"Times New Roman"=20
color=3D#000080>Tim</FONT></DIV></DIV></BODY></HTML>
------=_NextPart_000_0044_01C4D7C1.3EEF59F0-- Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81268
Populating a Combo Box with instances of a class - problem
Hi! I'm feeling the burn of .NET; Still getting used to it :)
I'm trying to populate a combo box with instances of a class:
Public Class Shortcut
Private Name As String
Private RealLocation As String
Public Sub New()
Me.Name = "unknown"
Me.RealLocation = "unknown"
End Sub
Public Sub New(ByVal Name As String, ByVal Path As String)
Me.Name = Name
Me.RealLocation = Path
End Sub
Public Function getName() As String
Return (Me.Name)
End Function
Public Function getRealLocation() As String
Return (Me.RealLocation)
End Function
Public Overrides Function toString() As String
Return (Me.Name)
End Function
End Class
My problem is the following code:
With cmb
.ValueMember = "getRealLocation"
.DisplayMember = "toString"
.Items.Add(New Shortcut("Label1", "Full Path1"))
.Items.Add(New Shortcut("Label2", "Full Path 2"))
.Items.Add(New Shortcut("Label3", "Full Path 3"))
End With
When the combo list isn't activated, the combo box shows the results of the
toString function, for the specific instance that is selected. However, when
I click the drop-down button, it shows a list of blank entries. Selecting a
blank entry again shows the results of the toString function of the instance
I apparently selected.
How can I make each entry have a value whent he combobox drop-down list is
showing, not just once a specific item in the list is selected. It's hard to
make choices when there's only blank options =/.
Thanks again! Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81267
ListView, IComparer & column-re-ordering...
Hi All!
I use a special ListViewItemComparer-class to sort items in a listview for
any column, and I have also allowed column-reordering.
So far so good, but if I click the columnheader of any column, and the
columnorder is not 'default', the listview 'forget' my column-re-ordering
(i.e 0 2 1), and sets column-order back to default (i.e. 0 1 2).
Is there anyone that might know what I have forgot to code in my
ListViewItemComparer-class?
Some info:
- I use VS 2003, framework 1.1
- I use SendMessage with LVM_SETCOLUMNORDERARRAY to set the columnorder at
startup.
TIA
Per Rollvang Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81266
Threading Part 2
Hello and thank you for your assistance.
I have attempted to accomplish what I need using delegates with no success.
i.e.
//Button Click//
Dim PollThread As Threading.Thread
PollThread = New Threading.Thread(AddressOf PollThreadAddress)
PollThread.Start()
End Sub
Private Sub PollThreadAddress()
frm1PollDatabase.TopMost = True
frm1PollDatabase.ShowDialog()
End Sub
//Button Click inside frm1PollDatabase that raises an event inside the
Parent Form//
Delegate Sub FromMyPage()
Dim MyDeleg As FromMyPage
Private Sub ApplyMyPage
MyDeleg = New FromMyPage(AddressOf DelegateFromMyPage)
MyDeleg.Invoke()
End Sub
Private Sub DelegateFromMyPage()
frm1Modify.showdialog
End Sub
** frm1PollDatabase is created inside a new thread and must always be on
top, which works fine. But when the user wants to send that data from this
form to a new form (frm1Modify) the form is displayed but frm1PollDatabase
becomes disabled because of the Showdialog method. I cannot use show for
this form to be displayed. If the original thread (Main) displays this form
wont it prevent this problem? The above code did not keep frm1PollDatabase
from being disabled.
Thanks Again,
Chuck Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81256
Accessing data on main form from another form
Can someone tell me how I would go about setting up a form the accesses the
controls on another form in VC.NET? I have a graph set up on the main form
and would like to open another form that has formatting options for the
graph. Changes on the options form will update the properties of the graph
on the main form.
Thanks in advance for your help.
Dave Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81252
Window subclassing and mouse events
VS.NET 2003, VB.NET, .NET 1.1
I'm working on a part of a project that is re-creating the Office 2003 mail
notification window. I have almost everything done except for one part. I
need to allow the user to move the window by clicking and dragging anywhere
in the window (the window has no title bar.)
Per many different sources, I have overridden the WndProc() method of my
window thusly:
---------------------------------
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
Call MyBase.WndProc(m)
Select Case m.Msg
Case WM_NCHITTEST
If m.Result.ToInt32 = HTCLIENT Then m.Result = New
IntPtr(HTCAPTION)
End Select
End Sub
---------------------------------
When I run the form, all is well - almost. I have found that when I do
this, I don't get any of my form's mouse events.
I am doing a lot of hand-work here, so I have MouseEnter, MouseLeave, and
MouseDown events coded. These perform various functions that simulate
functionality I would normally get by using controls (buttons, linklabels,
etc.) but chose not to use. My reasons for not using them is because of the
functionality I am trying to simulate:
1. The form fades in to 20% transparency when it's shown. It then begins a
timer for fade-out (time set by the user, with an application default
provided.)
2. If the mouse moves into the form, it goes to 0% transparency (opaque).
3. If the mouse leaves the form, it returns to 20% transparency.
4. The form will fade away at the first opportunity - either when reaching
the fade-out time, or when the mouse leaves the form, whichever happens
*last*.
Using controls caused MouseEnter and MouseLeave events to fire on the
controls and form multiple all over the place, and I wasn't able to handle
them in any sort of satisfactory way. So I dumped the controls and wrote it
all by hand.
Since I don't get the mouse events, nothing happens when the mouse moves
within the form. The form does not go opaque, and the fade-out will happen
even if the mouse is within the form. I suppose I could re-create the
functionality within the WndProc() method, but I don't understand why I have
to - since my custom WndProc() is not trapping mouse events, and the first
thing I do is call the base method, those should still fire - right?
What am I missing? Any help would be appreciated.
TIA
- Scott Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81249
Parental Filter
I am looking to create our own Adult Filter using VB.Net. Any
suggestions???
Thanks,
Mark Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81247
Strange exception in windows forms
Hello,
In windows applications I sometime get this starnge exception:
System.ObjectDisposedException: Cannot access a disposed object named "q".
Object name: "q".
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
It never happens on development computers only on clients.
I don't have object named "q".
Does anybody has any idea what may lead to this exception?
Thanks
Mark Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81245
InputBox in VC#.net?
In VB, we have InputBox to allow a user to input text. Do we have a similar
one in VC#.net? Obviously, MessageBox can not do it.
Thanks. Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81242
XP Themed Selection Rectangle for Listview Control
Does anyone know how to get that blue selection rectangle that is in the
windows explorer Listview control. In my listview controls it is just a
dotted focused rectangle.
Etan Bukiet Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81241
Looking of Free and facny treeview control
I am looking for fancy shareware treeview control like one available from
Softeldvm.com (costs $500). Does anyone know?
--
Thanks for your help.
Harshad Rathod Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81240
OnKeyDown in modeless form
I have an application that displays a modeless form. On this form i
want to trap certain keys. For example ctrl-right, ctrl-left, ...
I have these keys already working on the main form of my application,
but know i need to trap them in a seperated modeless form, but the
onkeydown event is not being fired.
How do i go about trapping these keys. Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81239
Multiple minimize and maximize buttons appering on MDI menu contro
Below is text of the simillar problem we are facing allready posted by
another user on the net...
I have created an MDI application. When the first child form is opened and
maximized one set of minimize, restore and close buttons are displayed on the
menu bar. After closing the child window a set of minimize, restore and close
buttons remain even though the child form has been closed.
EXAMPLE:
http://novasolution.net/Error2-2.jpg
When a second set child form is opened and closed a second set of minimize,
restore and close are shown on the menu bar.
Each time a child form is opened and closed, another set of controls appears
on the menu bar. When I open a new child form the multiple sets of buttons
disappear. When the child form is maximized, only one set of buttons displays
in the menu bar. When the child window is closed another set of buttons is
displayed on the menu bar.
some how we are unbale find a solution to this problem..
Any ideas..
Example Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81234
Forms pseudo MDI support
While trying to implement a MDI Application I found that the Windows.Forms
classes that implement this functionality don't actually use the WIN32 MDI
API.
Using Spy++ I found that the MdiClient class does not use the 'MDICLIENT'
window class. I also hooked up a Messagefilter to look at the MDI messages
send to the mdiclient, the only messages I saw were WM_MDISETMENU and
WM_MDIREFRESHMENU.
Can anyone confirm this or does anyone know why this was done? Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81233
UPDATE SQLTABELLE
VS2003 C#
Ich habe einen SQLDATAADAPTER erstellt und ein DATSET generiert.
Diese Dataset stelle ich in einem DATAGRID dar.
In der Tabelle ist das Feld UKID als Primärschlüssel definiert und damit
werden keine Nullwerte zugelassen.
Num füge ich im DATAGRID einen Satz hinzu und update den
SQLDATAADAPTER(DATASET).
Die neuen Sätze stehen in der SQl-Tabelle.
Nun möchte ich aber im DATAGRID das Feld UKID (Primärschlüssel) nicht mit
anzeigen und somit
bei kann ich bei einem neuen Satz auch keinen Wert im DATAGRID dafür
eintragen.
Betätige ich dann den Button zum Update des SQLDATAADAPTERS
erhalte ich folgende Fehlermeldung "Spalte UKID läßt keine Nullen zu ..."
Wie kann ich dem Feld UKID einen Wert im Code zuweisen, damit ein neuer Satz
im DATAGRID
akzeptiert wird?
Das heist, der Nutzer soll bei einem neuen Satz im DATAGRID nicht die UKID
eintragen können,
die soll im Programmcode mit einem Wert belegt werden.
Mit freundlichen Grüßen
Hendrik Petzold Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81232
Control layout problem with system large fonts
I have seen many people stating that they have the same problem.
I have the font DPI setting set to 125% normal size (from the Display
Properties dialog when you right-click on the Desktop). If a Windows
Form is more than simle (has many controls), then the most chance is
that when the Form is shown in runtime, the layout is somewhat in right
condition (Some controls might position beyond the visible client area).
I am not sure if Microsoft noticed this problem. I think it is a very
*BAD* problem, based on that Microsoft/Windows have been strong in user
friendly GUI since their beginning.
My $0.02. Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81231
Threading
Hello,
I am making a app that creates a thread to show a clipboard. If the
clipboard is double clicked, another window is displayed, the event is
handled inside the main app. What I would like to do is have the clipboard
use the main thread of the application that called it to handle the new
window. Is this possible and if so how would this be accomplished.
ie.
Form1 creates a thread and the thread displays Form2.
Form2 when double clicked raises an event that creates a new form (Form3).
The event is handled inside Form1.
How can I get Form3 to be managed by the main thread (Form1)?
Thanks,
Chuck Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81225
thread safety
Can anyone suggest a good (cheap) tool that will detect when a worker thread
calls directly in to a control on the UI thread?
Thanks for your help
Graham Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81220
Auto Expanding TextBox/Controls
Hi there,
I've googled this problem, and not found a suitable solution yet. I was
wondering if anyone has made any progress?
Basically, I want to make a textbox automagically adjust it's height to show
all the text it contains. So, if I add text then it grows, and it shrinks if
I remove text. This is similar to the CanGrow property in MS Access
controls.
I'm willing to purchase a control if anyone knows of any, I'd just like to
get this cracked without spending *too* much time "fiddling" about!
Any help much appreciated
Tobin Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81217
Add user control to winforms Toolbox
I created a user control which I signed and added to GAC. Users add the
control to the toolbox by navigating to the dll.
However when they drag and drop the control from the toolbox onto the
winform they get an error, which basically means they need to manually add
references to other dlls which are referenced by my user control dll.
Is there a solution to this? Thank you Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81214
using the modem directly
hi
I need my Win App to connect with my WS
But when the App need to stablish a connection I want it to be transparent
to the user
MyQuestion:
How can I use the modem directly passing the phone number etc from the win
app?
I dont want the Dialup networking windows to apear neverr.
any sug
--
Kenny M. Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81213
Transparent control
Hi,
I have to write transparent control - simple red rectangle. When I mouse
move control should change position(left and top). The problem is when
red rectangle is moving over other controls such Buttons, PictureBoxes
it flicker.
Below is code of rectangle control :
public class TransRectangle : System.Windows.Forms.UserControl
{
public TransRectangle()
{
InitializeComponent();
}
protected override CreateParams CreateParams
{
get
{
CreateParams cp=base.CreateParams;
cp.ExStyle|=0x00000020; //WS_EX_TRANSPARENT
return cp;
}
}
//Override the OnPaintBackground event. This is ecessary //to
prevent the background to be painted.
protected override void OnPaintBackground(PaintEventArgs e)
{
// do nothing
}
protected void InvalidateEx()
{
if(Parent==null)
return;
Rectangle rc=new Rectangle(this.Location,this.Size);
Parent.Invalidate(rc,true);
}
protected override void OnMove(EventArgs e)
{
this.InvalidateEx();
Graphics g = this.CreateGraphics();
g.DrawRectangle(Pens.Red, 0, 0, this.Width - 1,
this.Height -1);
g.Dispose();
}
protected override void OnPaint(PaintEventArgs e)
{
e.Graphics.DrawRectangle(Pens.Red, 0, 0, this.Width - 1,
this.Height -1);
}
protected override void OnMouseMove(MouseEventArgs e)
{
this.Left += e.X;
this.Top += e.Y;
base.OnMouseMove (e);
}
public void pInvalidate()
{
this.InvalidateEx();
}
}
Regards,
Olo Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81208
How to print AxWebBrowser control?
Hello,
how do I submit AxWebBrowser control to print?
Thank you Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81205
User Control's Load event fires when the Dispose method executes
I have a user control which is used as a data entry form and it is
instantiated on a window form. When the windows form is closed via clicking
on the top right red-X close button, the user control's Dispose method
executes. When it executes the load event fires.
Here's the dispose method:
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
'WHEN THE NEXT LINE EXECUTES, the controls Load Event Fires.
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
This user control also created instances of some other user controls used as
sub-forms. I don't know if this has anything to do with it, but when the
user clicks on the red-X close button of the parent form and things began
to close, no cleanup code ran to kill the instances of these user controls.
I will eventually have the proper cleanup code in place, but right now I
want to understand why this load event fires when "components.Dispose()" is
called.
Thanks.
--
moondaddy@nospam.com Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81204
Post-Mortem Debugging
Does anyone have advice about ways to obtain information about errors
that occur in Windows Forms applications at a user site? I am
currently sending exception.ToString back to me. I am not
distributing the .pdb files for size reasons so I do not get line
numbers in the stack trace. I have researched mini-dumps but have not
been able to find a good solution for using mini-dumps in a fully
managed application.
I would appreciate any advice or links to information.
Kerry Jenkins Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81201
DateTime Bound to TextBox
Hi,
I have bound a DateTime field in a DataTable to a TextBox field. Other
String and Numeric fields are also bound to separate TextBoxes. If a new
DataRow is created and a DateTime value is entered no problem. However,
after the row is saved, I am unable to clear the date from the textbox.
I do not have this problem when binding to a DataGrid. But a DataGrid is
far from user friendly and just plain impractical in many situations.
In its place I am loading the DataRow into a class and using unbound fields
on the form. Bound controls seem great for strings. But thats about it.
Does anyone have a better solution?
Thanks Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81194
Is there any way to stop autoscroll to modify autoscrollpos value
hi all am using a panel , now i want to programitally set the
thumb of autoscroll. for tht i have override wndproc()
and try to set it .. ant it does ..
but after that autoscroll too modify value of autoscrollpos
..
for ex say i make auotscrollpos to 30 . then after the call
is over , it becomes say 40 .
wht to do pls help
--
amit bharadwaj Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81193
How to simply load a freeekin bitmap from a resource?
I'm coming over from a background in VC++, and in general I've been
pleased with the simplicity of the .NET environment. Not here.
I've done google searches on this subject (loading bitmaps from a local
resource) and always come up with complex solutions. This can't be right.
Everyone packs bitmaps and other graphics and resources, integral to small
executables, right?
Setting up a local resource folder, loading in graphics, and setting their
properties to 'Embedded Resource' would seem to incorporate them, as
expected.
Then what? It's tough to make 'FromResource' happy. There's got to be
some simple solution to this. Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81191
Help MDI Child forms move smoothly?
Again, I'm writing a smart client application using VB.NET. I've been
writing web applications for the last few years and am new(ish) to
Windows Forms programming using .NET.
I have some MDI forms that move smoothly when being dragged and others
that don't refresh/aren't redrawn nearly as well when being dragged.
I've no idea what causes the difference in behaviour. Any idea what
might cause the latter?
Thanks
Daft.Geezer Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81189
Problem with the scroll position of the Windows panel control
Hi all,
i am currently developing an application in which i am using the
windows panel control.
the panel controls contains lots of User controls which are populated
dynamically in the same. and also i have set the auto scroll postion
of the panel control to true.
but the problem is that, whenever i minimize the forms, i just loose
my scroll position. the scroll get shefted to the control which has
the focus.
can any body help me out how can i maintain my scroll position
Thanks
Vikash Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81186
Cannot create dataset with wizard
I just loaded vb.net and haven't been able to create a dataset using the
wizard. I get the eror message: "There were problems generating dsMyDataset.
To resolve this problem build the project, fix any errors, and then generate
the datatset again."
I'm out of ideas... Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81182
Deployed simple C#.NET single form application to Windows server 2003 and the form will not display, but application appears in the the task bar.
I have a very simple C#.NET (Framework 1.1) application that is one form
with standard .NET controls on it. The application requires a CONFIG file
to work. When I install the application to Windows 98/2000/XP, I simply
install the .NET framework and copy the EXE and CONFIG files to the
workstation and double-click the EXE. This has worked fine for those
Operating Systems. When I deployed this to a Windows Server 2000 machine, I
just needed to do the same to get it to work (.Net was already installed).
However, when I copy the EXE and CONFIG file to the Windows Server 2003
machine and double click the EXE, the form does not display any User
Interface (the single form), however, an application block appears in the
Task Bar (toolbar that contains the start button and system tray). I do not
know what is causing this, and I have no idea how to fix this. I have
searched the Microsoft Knowledgebase and googled some searches, but have
found no information that has been helpful. I have tried to use the
"Microsoft .NET Framework 1.1 Configuration" tool, but no luck. Any ideas
or suggestions?
Thanks,
Roger Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81169
ScrollableControl Scrolling by Itself
I have a UserControl with AutoScroll set to true. When my application loses
then regains focus, the control scrolls itself to make ActiveControl visible.
This also happens when I dynamically add or remove child controls. Is there
any way to make the scrollbars stay put?
Here's some sample code demonstrating my problem. Run the application then
scroll down and right as far as possible. Button one will be scrolled out of
view and button two will be visible. Switch to another program then come back.
The scrollbars will move to make button one visible again.
----
using System;
using System.Windows.Forms;
using System.Drawing;
public class TestScroll
{
public static void Main(string[] args)
{
Application.Run(new TestForm());
}
}
public class TestForm : System.Windows.Forms.Form
{
public TestForm()
{
this.ClientSize = new System.Drawing.Size(400, 400);
this.Text = "TestForm";
container = new ContainerControl();
container.Dock = DockStyle.Fill;
container.AutoScroll = true;
this.Controls.Add(container);
btnTest1 = new Button();
btnTest1.Left = 0;
btnTest1.Top = 0;
btnTest1.Width = 50;
btnTest1.Height = 50;
btnTest1.Text = "One";
btnTest1.Click += new EventHandler(this.OnBtnClick);
container.Controls.Add(btnTest1);
btnTest2 = new Button();
btnTest2.Left = 500;
btnTest2.Top = 500;
btnTest2.Width = 50;
btnTest2.Height = 50;
btnTest2.Text = "Two";
btnTest2.Click += new EventHandler(this.OnBtnClick);
container.Controls.Add(btnTest2);
}
private void OnBtnClick(object sender, EventArgs args)
{
container.ActiveControl = (Control)sender;
}
private ContainerControl container;
private Button btnTest1;
private Button btnTest2;
}
----
Apologies if this is a common question. A quick Google search shows that
it's been asked before, but I didn't find any answers.
Thanks,
Ravi. Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81168
find process by processname
I wanted to find a process by the ProcessName property, but I discovered
that if the executable name changes, the ProcessName reflects that. Is
there some way for me to identify a process by something that may not
change? Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81166
prevent Multi line select on DataGrid?
How I can prevent Multi line select on DataGrid? Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81164
Creating VS Studio like control
How do you create controls like Toolbox and Solution Explorer that expands
OnMouseOver and lsides back when looses focus? Also, it has bookmark.
--
Thanks for your help.
Harshad Rathod Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81163
creating VS Studio like controls
How do you create controls like Toolbox and Solution Explorer that expands
OnMouseOver and lsides back when looses focus? Also, it has bookmark.
--
Thanks for your help.
Harshad Rathod Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81162
Setup project and Windows 2000
I have a Windows Forms .NET application that I've built a Setup project for
that includes the installation of the .NET Framework and MSDE (using the MSDE
Deployment Toolkit). The install & uninstall works fine when the O/S is
Windows XP. The installation works on Windows 2000 as well, but the
application doesn't appear in the list in "Add/Remove Programs" so that it
can be uninstalled. What am I missing?
Thanks in advance! Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81161
Hidding a window and preventing Alt-Tabbing to it
I'm trying to hide the main form of my application, as I want all of the
user interaction with my application to come from interacting with a notify
icon with a context menu in the system tray (which I have working). I've
figured out how to hide the form easy enough, set the WindowState to
Minimized and ShowInTaskbar to False.
What I can't figure out is how to prevent the user Alt-Tabbing to the
window, as its still visible in the Alt-Tab menu. I can set the windows
FormBorderStyle to FixedToolWindow or SizeableToolWindow and it will no
longer show up in the Alt-Tab menu but now it will now minimize to the
bottom left of the desktop just showing the windows title bar instead of
being completely hidden!
Does anyone know of any way to completely hide a window visibly(so no part
of the window is visible anywhere), with no icon on the task bar or on the
Alt-Tab menu? All I really want is to be able to run a notify icon in the
system tray and a context menu for the icon but I'm don't know of any other
way to do it other than to run it in a enclosing form.
I've been wondering if making my application a service make things easier
but I've no experience with programming services and it seems a bit of
overkill for what I'm wanting to do!
Any advice would be most appreciated!
Cheers,
Danielb Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81159
Hello, Japan?
My application is so successful that it needs to go global.
The only problem is that that means Japanese. I don't know the first thing
about making a Japanese language application. I know I have to use Unicode,
but that's about it.
In case it matters, the user will be presented with a dialog, and he can
choose, dynamically, which language it should be rendered in. So, it isn't a
matter of linking a particular resource file for Japanese on one machine, and
a different one for English on a different machine. Both must be available,
based on user choice.
Is there a simple "Hello, World" application for the .Net framework, but in
Japanese? Or any sample applications that make use of Japanese? I don't
even know where to find a Japanese font.
Any help would be appreciated. Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81155
Closing all instances of an application
I start up several instances of an application I've written. From one of
the applications I'm trying to close all of them, but it's not working. I'm
doing this by registering a message and broadcasting it. but when I put a
breakpoint in my overridden WndProc, It never seems to get the message.
public class frmMyApplication : System.Windows.Forms.Form
{
public const int HWND_BROADCAST = 0xFFFF;
[System.Runtime.InteropServices.DllImport("user32.dll")]
public static extern int RegisterWindowMessage(string strMessageType);
[System.Runtime.InteropServices.DllImport(strUSER32DLL,
CharSet=CharSet.Auto, SetLastError=true)]
public static extern int SendMessage(IntPtr
hWnd,[MarshalAs(UnmanagedType.U4)] int iMsg, int iWParam, int iLParam);
int iCloseAllMessage_m;
public frmMyApplication()
{
iCloseAllMessage_m = MediScript.RegisterWindowMessage("_CloseMyApps");
if (iCloseAllMessage_m == 0)
{
throw new Exception("RegisterWindowMessage returned 0");
}
}
protected override void WndProc(ref Message m)
{
if (iCloseAllMessage_m != 0 && m.Msg == iCloseAllMessage_m)
{
Application.Exit();
}
else
{
base.WndProc (ref m);
}
}
private void mnuiCloseAll_Click(object sender, System.EventArgs e)
{
SendMessage((IntPtr)HWND_BROADCAST, iCloseAllMessage_m, 0,0);
}
} Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81154
Obtaining system appearance settings.
How do I find out what the Systems's appearance parameters are such as the
window border width or color? Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81152
Maximize
Hello,
I have an application that starts notepad.exe from a button click in VB.NET.
I am looking for a way to make the window maximize or minimize from the vb
app.
Any suggestions (if at all possible, detailed) will be greatly appeciated,
Thanks,
Chuck Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81149
GroupBox disables event handlers in the user control it contains.
Hi, friends,
In my VC# windows program, when I put a user control in a GroupBox, all the
event can no longer be handled, for example, DoubleClick. However, if I
remove this GroupBox and put the same user control in the Form directly,
everything works fine.
I do not know what is wrong here. Any ideas? Thanks a lot. Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81148
Excel Add-In InvalidCOMObjectException On Shutdown
Hi Guys,
I've created an Office.CommandBarPopup Add-In for Excel that launches a
Windows Form as a modal dialog when a button within the CommandBarPopup is
clicked.
However, when Excel is shut down I am receiving an InvalidCOMObjectException
error. This is even happening even though the form has no embedded controls.
It doesn't happen if the dialog isn't instantiated.
Is there a procedure that needs to be followed when destroying forms from
Excel add-ins?
Best regards,
Jim... Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81144
Monitor Dial-up Connection
I am writing a smart client application that needs to monitor the users
dial-up connection status. If the user disconnects, I need to prompt them to
reconnect, or quit the application. I tried using the following WMI query
wmiDialupDisconnect = New ManagementEventWatcher("SELECT * FROM
MSNDIS_NotifyAdapterRemoval")
but it does not work. Does anyone have any ideas how I can monitor a users
dial-up connection status? Tag: How to change the datagrid row text color??? --- URGENT!!! Tag: 81143
Hi there!
I need to change the datagrid row text color, but I don't know how can I do
it?
Re: How to change the datagrid row text color??? --- URGENT!!! by Herfried
Herfried
Thu Dec 02 14:58:54 CST 2004
"Marcus VinÃcius M. Montezano"
<MarcusVinciusMMontezano@discussions.microsoft.com> schrieb:
> I need to change the datagrid row text color, but I don't know how can I
> do
> it?