build context menu from menu strip
Hi,
I build the menu strip using the designer.I want the context menu of
the form to be same as children of one of the top leven Menu strip
item.
Items["actionToolStripMenuItem"] gives me a ToolStripItem object but
it does not have a hierarchy, no parents no children.
What do i do?
TIA Tag: Dock Window to an external application Tag: 117365
Expired certificates in the clickonce manifest
When a certificate expires, what options are available?
- use an internal certificate authority where you can renew a
certificate with the same private key
- delete the clickonce cache from each computer
- any others?
Background:
The ClickOnce technology requires every application update to be
signed using the same private key. When a certificate expires most CAs
like Verisign and Comodo will generate a new private key with the
renewed certificate. ClickOnce will throw up an error when this occurs
and will not download the update.
http://groups.google.com/group/microsoft.public.dotnet.framework.windowsforms/browse_thread/thread/64a15850347c32df/3b85d27a8b28c451?lnk=st&q=certificate+clickonce+linda+liu+expired
Thanks,
Brian Tag: Dock Window to an external application Tag: 117350
Need example of custom combobox inside DataGridView
I'm looking for a tutorial, example, or source code sample which shows how to
host a custom ComboBox control inside a DataGridView.
In other words, I have a new control "MyComboBox" which inherits from
ComboBox, then I create a an EditingControl for this class, which implements
IDataGridViewEditingControl, as well as associated classes which inherit from
DataGridViewComboBoxCell and DataGridViewComboBoxColumn.
I have my code basically working, with the following exceptions:
- the displayed text being shown after a selection is made is not correct
- the initial drop-down is not entirely shown correctly, but all subsequent
drop-downs are
Anyone with suggestions or (better yet) a sample of how to do this would be
great! Tag: Dock Window to an external application Tag: 117349
Setup project - add uninstall
In the Setup/deployment projects, how can you add an icon to the Programs
menu, to uninstall your application or dll? Tag: Dock Window to an external application Tag: 117347
Main form doesn't repaint until mouse moved
I've got a c# desktop app with various menu items that display modal dialogs
for changing app settings, etc.. Standard stuff.
After a particular dialog is closed, the main form doesn't repaint the area
that was covered by the child form until the user moves the mouse.
I can't see how this one form is different from the others, or what I may
have done to prevent the main form from repainting. Any suggestions on things
to check would be appreciated. Tag: Dock Window to an external application Tag: 117346
Native Chart support
Hi,
Does anybody know a native .net framework class for display GDI
charts? Like Component1 or Interop, but it need to be .Net native.
Thanks for any appointment
Thiago Tag: Dock Window to an external application Tag: 117345
Distinguish TerminalServer session versus XP RDP session
vb.net 2005 windows app with .net framework 2.0
On Windows XP,
System.Windows.Forms.SystemInformation.TerminalServerSession is
returning True when connected to Windows XP via remote desktop using
the /console switch.
I confirmed in an XP running in VirtualPC 2004 ... Task Manager (users
tab) that the session shows as "RDP-Tcp#blah" rather than console.
Is this expected behavior?
If this is expected behavior, how does an application distiguish if it
is running in terminal services versus a windows xp remote desktop
session? Tag: Dock Window to an external application Tag: 117344
PostScript font support in GDI+?
Is support for PostScript fonts planned, or possible through a workaround?
Only TrueType fonts and OpenType fonts containing TrueType outlines can be
picked for WinForms forms and controls; Type 1 and OpenType with Postscript
outlines don't show up in the font selector.
I'm working on a kiosk app for which part of the layout (background etc.)
was designed by a graphic agency, who used a font from Adobe for textual
elements. Now I'm expected to use the same font in software, but it's only
available in PS and OpenType-PS.
I did find a close look-alike in TTF format at URW++, but even I (not a
graphic designer by art&heart) found some small differences, and I'd like
to have the exact same typeface.
There are tools that convert PS to TT outlines, but the results look so bad
(choppy, pixelated) that they're useless for all but very large font sizes.
Funny though: those PS-to-TTF converted fonts look just perfect under
Linux, it's only under Windows that they get that choppy look.
[I'm on Vista now, I haven't tried how they look on XP.] Tag: Dock Window to an external application Tag: 117343
XP DISC SCRATCHED
IF YOU HAVE ORIGINAL XP DISK WITH PRODUCT KEY CAN YOU DOWN LOAD FROM NET THE
PROGRAM ? FROM MICROSOFT Tag: Dock Window to an external application Tag: 117340
Datagridview conditional formatting using separate column
Hi,
I want to conditionally format a column in a datagridview according to the
value in a different of my datasource. So if col 1 is true, then display col
2 in a different colour.
I know that I can use the cell formatting event if I want to conditionally
format the cell according to the value in that same column but is that the
best method to use if I'm using a different column for the condition?
Is this the best way of doing it, or is there something better?
In cell formatting event...
if dg.columns(e.columnindex).datapropertyname="ConditionColumn" then
if e.value=conditionvalue then
dim cell as datagridviewcell=dg(hard-coded column number,
e.rowindex)
cell.style.... do whatever formatting required
end if
end if
Would be a bit of a kludge having to hard code the 'target' column number
but I would actually replace that with a find on the datacolumns of the grid.
In my case, I don't actually need the column that is being looked at for the
condition on the grid. Does it HAVE to be there? Problem there is that if I
add it and make it invisible then the formatting event doesn't kick in. Tag: Dock Window to an external application Tag: 117339
Problems hosting a custom control / cell / column in a DataGridVie
I'm having trouble hosting a custom control in one of the columns of a
DataGridView object.
The custom control is a multi-column combo box, which behaves almost
identical to ComboBox, except that it shows multiple data columns when
dropping down, similar to old MS Access style combos.
The MultiColumnComboBox control can be found here:
http://www.edneeis.com/control.aspx?ID=7
Based on the info in this article
(http://msdn.microsoft.com/en-us/library/7tas5c80.aspx), and a little
experimenting, I have it basically working. The control is being shown as a
combo box in the data grid, it is being bound correctly, and is displaying
properly. To get that far, I had to create a a hosting
DataGridViewEditingControl control (implementing the
IDataGridViewEditingControl interface), a DataGridViewComboBoxCell cell, and
a DataGridViewComboBoxColumn specific to the new control.
The one issue I'm having is with the drop-down event. I keep getting the
following exception:
Object reference not set to an instance of an object
at
System.Windows.Forms.DataGridViewComboBoxCell.ComboBox_DropDown(Object
sender, EventArgs e)
at System.Windows.Forms.ComboBox.OnDropDown(EventArgs e)
at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
at System.Windows.Forms.ComboBox.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef
hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr
wparam, IntPtr lparam)
at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr
hWnd, Message& m)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr
wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmMouseDown(Message& m,
MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ComboBox.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&
msg)
at
System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at WindowsApplication2.Program.Main() in C:\Documents and
Settings\jarmstrong\My Documents\Visual Studio
2005\Projects\Solution1\WindowsApplication2\Program.cs:line 17
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[]
args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
DataGridViewComboBoxCell.ComboBox_DropDown is hidden from me, so I'm not
sure what's going on.
The complete, compilable and runable source as a sample project can get
retrieved here: http://cowtowndance.com/temp/Solution1.zip
Any help would be greatly appreciated! Tag: Dock Window to an external application Tag: 117333
DataGridView bound to BindingList<myObj> -- how to update immediately when they click a checkbox?
I have a DataGridView bound to a BindingList<myObj>.
In my DGV I have two checkbox columns. Right now, the user can check these,
and if he clicks on another row or clicks on one of the buttons of the form,
it will fire the EndEdit event, in which I have embedded a Save().
Is there a way to get it to save when they click on it, rather than waiting
for the row to lose focus?
I'm also going to have to make one of the textbox columns editable, so will
the same solution work for that case as well?
Thanks,
RobinS.
GoldMail.com Tag: Dock Window to an external application Tag: 117332
Automating interactions with a web site
Consider the following scenario:
1) User goes to a web site (.aspx page) and logs in
2) User enters various values in controls, clicking on NEXT buttons to
go to a sequence of pages, until they get to a page that displays,
among other things, a table showing 10 rows, each with a checkbox at
the far left (i.e. first column). In addition, at the bottom of the
table, there are little "links" that can be clicked on to go to the
next/prior page, showing the next/prior ten results in a table.
Lastly, in case it helps, there is, to the right of the "links", a
text box in which the user can type a specific "page" of results to go
to.
NOTE: Unfortunately, the little "links", and Go To text box, slightly
move from page to page, making mouse movement/click recording/playback
not a viable option.
3) User puts check mark in all ten checkboxes, then clicks on link to
go to next page of results.
4) After user has clicked on a total of 1,000 checkboxes (i.e. 100
pages' worth), they are done (for purposes of this discussion).
What I want to do is automate Step 3 above 100 times.
So, what I'm imagining is having a Windows form, with a web browser
control on it that brings the user to the initial website. Then, the
user would do stuff outlined in Step 2. Lastly, there'd be a button on
the form (below the web browser control somewhere) that the user could
click on to perform Step 3 100 times. Then, the user could just
interact with the web browser again, clicking on whatever they need to
click on.
Is there a way to do something like this? Tag: Dock Window to an external application Tag: 117328
Question about Help Files/systems
My boss has asked me to look into the possibility of creating one central
help system that can be used by both the windows and web apps on our
intranet. (Assume for now that all the applications are written in Dot Net
2.0 and the only db server available is SQL Server 2000.) It stands to
reason that simply downloading an entire chm file everytime a web app needs
help sounds rather inefficient.
What are my options? Suggestions anyone? (Don't want to reinvent the wheel.) Tag: Dock Window to an external application Tag: 117327
access-based enumeration doesn't work
on the windows 2003 server service pack 2 , I installed abe but users who
don't have rights to folders under the shared folder can still see
everything. Can you please help Tag: Dock Window to an external application Tag: 117326
RichTextBox very slow
I'm using a RichTextBox in a protocol analyser I'm developing. However
as the amount of data gets large, e.g. 500000 lines, the control
becomes very slow.
For example if I load in a saved file it can take 30 seconds just to
transfer data from a StringBuilder to the RichTextBox, even with
updates turned off with WM_SETREDRAW.
Also I highlight a line when the users clicks on it and this can be
slow, as can be highlighting all instances of a string match.
Is there any way to make actions like adding text to a RichTextBox or
highlighted portions of text any faster?
TIA,
KK Tag: Dock Window to an external application Tag: 117325
Application Settings and Form Location & Size
I'm trying to use Application Settings with From Location & Size. I have
created the property binding from the Designer in Visual Studio.
ClientSize = MainFormClientSize
Location = MainFormLocation
I also have the following code:
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
{
Properties.Settings.Default.MainFormClientSize = this.ClientSize;
Properties.Settings.Default.MainFormLocation = this.Location;
Properties.Settings.Default.Save();
}
The code seems to work fine. I can start the application, change the size
and location and close the application. And the next time I open the
application, the size and location is correct from the last time the
application was closed.
But something strange happens if I try to minimize and restore the
application. If I already have a size and location saved, do a minimize and
restore, then the initial default value are set on the form.
Do I need additional code to addresse minimize / restore scenarioes ?
Best of regards... :-) Tag: Dock Window to an external application Tag: 117324
windows xp
i have a computer that will not boot up at all i need to know how to get it
to boot up.. i can not get in windows at all... when i turn on the computer
it will not show any thing.. i was looking for a boot up disk but i can not
find one .. can some one help me.. Tag: Dock Window to an external application Tag: 117323
unhandled exception in the designer
Hi,
I am using VS 2008 and .net cf 3.5. I have form which is derived from
other form (BaseForm). BaseForm has just three buttons on it. When
ever I try to open my derived form I get following pop up message.
After hitting OK button, It asks me debug or send/don't send error to
Microsoft. If I click on debug, it goes to malloc.c file and breaks at
line # 10.
---------------------------
Microsoft Visual Studio
---------------------------
The control BaseForm has thrown an unhandled exception in the designer
and has been disabled.
Exception:
The checkout was canceled by the user.
Stack trace:
---------------------------
OK
---------------------------
The break/continue pop up on devenv.exe gives following information.
------------------------------
A buffer overrun has occurred in devenv.exe which has corrupted the
program's internal state. Press Break to debug the program or Continue
to terminate the program.
For more details please see Help topic 'How to debug Buffer Overrun
Issues'.
-------------------------------
Breaks on line # 10.
1void * __cdecl _malloc_base (size_t size)
2{
3 void *res = NULL;
4
5 // validate size
6 if (size <= _HEAP_MAXREQ) {
6 for (;;) {
8
9 // allocate memory block
10 res = _heap_alloc(size);
// if successful allocation, return pointer to memory
// if new handling turned off altogether, return NULL
if (res != NULL)
{
break;
}
if (_newmode == 0)
{
errno = ENOMEM;
break;
}
// call installed new handler
if (!_callnewh(size))
break;
// new handler was successful -- try to allocate again
}
} else {
_callnewh(size);
errno = ENOMEM;
return NULL;
}
RTCCALLBACK(_RTC_Allocate_hook, (res, size, 0));
if (res == NULL)
{
errno = ENOMEM;
}
return res;
} Tag: Dock Window to an external application Tag: 117322
TB_HITTEST?
OK, still trying to figure out how to determine which tray icon button was
pressed.
I'm at the point where if I can just get TB_HITTEST to return valid data
then I should be in good shape.
My question is can I use TB_HITTEST given the hwnd of the tray toolbar
window and the client coordinates of the tray button? Doing so always seems
to yield -10 or there abouts. I believe this reflects the total count of
buttons added vs. the current count.
Is there some trick to getting TB_HITTEST to work when I'm sending to the
tray window???
--
Grant Schenck Tag: Dock Window to an external application Tag: 117321
NotifyIcon screen coordinates
Is there any way to determine a NotifyIcon's screen position and size?
--
Grant Schenck Tag: Dock Window to an external application Tag: 117320
Play Medai Whilst Updating Tags and FileName
Hi All,
I'm developing a small utility which will allow me to take my ever
growing list of Mp3's and update the tags and cover art to upload to
my Mp3 player.Most of my mp3's don't have any tags to go on, and some
don't even have filenames to indicate what they are. To this end I'm
developing and application that will let me browse a list of mp3
files, and one by one:
1) Let me play the mp3 (and provide transport controls to skip
around), so I can identify the track / artist and at least start to
search out the detail.
2) Search for the track information using MusicBrainz web server (done
this bit already).
3) Get any artwork from Amazon Web Service (done this bit already).
4) Write the tag information away and the art work to the mp3 file.
5) Rename the file [Artist] - {TrackName].mp3.
I don't have any experience using media controls - so I wondered how I
would go about playing an mp3 in a WindowsForm, but still be able to
write to the underlying file and rename it?
Is there any way I can load the file into memory and play it from
there? Alternately I could allow the user to search out the details
and then at the point of saving - stop the playback.
Thanks All, Tag: Dock Window to an external application Tag: 117313
Localization in Classes
Hi,
I'm using VB.NET with VS.NET 2005. I'm using the standard localization to
localize my Forms and UserControls, which works perfect.
BUT: I also want to localize the (error)messages I'm using in my CLASSES.
But there isn't a .resx file created for my classes. Is there any way to
generate somewhere such a set of files to be able to handle easily
localization inside classes? Or what is the best practice to do this?
Thanks a lot in advance,
Pieter Tag: Dock Window to an external application Tag: 117312
How to fix the AutoGenerateColumns
I was also being driven crazy by this problem of reappearing columns in the designer even though I had sub classed the DataGridView control and set base.AutoGenerateColumns = false in the constructor.
After analysing ones that seemed to be OK vs ones that were having the problem, I found the corruption to be in the resx file for the datagridview. At the bottom of the file (open with an xml editor), there will be a number of <metadata > elements. Keep the one for your binding source and delete all the ones for the columns.
Now regenerate your solution and then try re-opening your designer. If you are as lucky as me, then your problem should have disappeared.
Good Luck. Tag: Dock Window to an external application Tag: 117310
GridView click
I would like to capture the event when the row selector is clicked in a grid
view.
Which event would that be?
--
Arne Garvander
Certified Geek
Professional Data Dude Tag: Dock Window to an external application Tag: 117305
Progress bar sometimes refuses to refresh (but works OK with DoEve
I have a .NET 3.0 (VS2005) Winform app. The UI invokes a long-running BRL
process (synchronously, on the same thread). The BRL raises events
periodically to tell the UI to update a progress bar. Works OK, most of the
time. But if the user does something as simple as clicking on the form, the
update of the progress bar stops.
I found that calling DoEvents (rather than just doing a Refresh) in the
event handler that updates the Progress bar "fixes" the problem. But I've
read posts saying that DoEvents is evil. And I can see why. But simply doing
a Refresh in my event handler doesn't suffice. So is there another way ?
(short of reworking the app to run the BR process on a separate
thread...which introduces a different can of worms)
Here's the event handler in the UI which exhibits the problem.
Private Sub ProgressEventRaised(ByVal sender As Object, ByVal e As
ProgressEventArgs)
If e.recordsProcessed > Me.uiProgressBar.Maximum Then
Me.uiProgressBar.Value = Me.uiProgressBar.Maximum
Else
Me.uiProgressBar.Value = e.recordsProcessed
End If
Me.Refresh
End Sub
===> Replacing Me.Refresh with Application.DoEvents "fixes" it. <===
BTW: testing InvokeRequired and re-invoking the event handler doesn't fix
the problem either:
If Me.a-control-on-the-form.InvokeRequired Then
Dim d As New ProgressEventCallback(AddressOf
ProgressEventRaised)
Me.Invoke(d, New Object() {sender, e})
Exit Sub
End If
But since my UI and BR code is running on the same thread, I would have been
surprised if doing this helped.
TIA ! Tag: Dock Window to an external application Tag: 117304
Wrong size of UserControl
Hello
I have a UserControl sized to 100; 200
When I drop it in my form the initial size is 100;200 (as I prefer). Then I
decided to change the size of my UserControl to 200;200 but although I have
not set any value to the size of the dropped control in my form, recompiling
the project does not affect the new size of the user control in my form.
Surprisingly if I reset the Size property of my user control in the form,
the size changes to 150; 150! It seems some how, there is a DefaultValue for
Size property.
How can I solve my problem? I prefer when I resize my UserControl in form
designer, it affects all places it is used. another statement is I want my
default size affects from the main UserControl class.
Thanks in advance.
Hamed Tag: Dock Window to an external application Tag: 117301
Using a default login dialog
I have noticed that several applications (Internet Explorer, Remote
Desktop Connection) uses the same user credentials dialog.
There is a screenshot here:
http://www.due-net.dk/images/LogonBox.png
Is this some internal Microsoft dialog, or is it available for use
with other applications? I need a user credentials dialog for an
application I am writing, and although I could easily make my own, and
even duplicate the look of this one, I was wondering if it is
available for general consumption.
Regards,
Thomas Tag: Dock Window to an external application Tag: 117300
Signing WinForms ClickOnce app with Certificate Chain
Hello all,
Now this is a bit involved, so please bear with me :o)
I have a Thawte code signing certificate and I am trying to use it to sign
C# WinForms project for ClickOnce deployment via the signing screen in VS2008.
I was issued PVK and SPC files by Thawte which I used to create a PFX file
including the full certification path. The PFX file can then be used with
Visual Studio. Thawte use an intermediate certificate for code signing so my
certificate is chained to the Thawte root certificate via their intermediate
certificate. Creating the PFX file with the full chain embeds the
intermediate certificate which is necessary as client machines will only
include the root.
Our build server includes the full certification chain in its store in order
to complete the signing process and performing a fresh install of the built
application on this machine correctly shows the 'green tick' for a valid
certificate.
Unfortunately when I try and perform a fresh install of the click once
application on a client machine it shows a 'yellow warning' instead as it is
unable to complete the certification path. The machine does not have the
intermediate certificate installed but it should be included in the signature.
Now, if you check the digital signature for the setup.exe file (right click
-> digital signatures) then you can see that the signature is valid and that
the certification path is complete, indicating that the certificate included
the full path as intended.
This leads me to believe that there may be two types of 'code signing' going
on, one a 'normal' authenticode type signing and another xml signature of the
manifest, that are working inconsistently. It seems that the signature on
the setup.exe includes the full chain, but when trying to install the
application it indicates the chain is broken.
From googling this (see
http://www.eggheadcafe.com/software/aspnet/32016113/clickonce-certificate-ca.aspx
and
http://groups.google.com/group/microsoft.public.dotnet.framework.windowsforms/browse_thread/thread/8c46df2acf25d54/4c1c4221f69fa09e)
it looks like this was confirmed as an issue with VS2005 that was intended to
be addressed.
Any suggestions on how I can get the ClickOnce installation to find the
intermediate certificate? Note that getting our clients to install the
intermediate certificate as a one-off step is not an option...
Thanks very much,
David Tag: Dock Window to an external application Tag: 117299
ContextMenu handle to Hmenu does not fire event
Hello,
Environment: Visual Studio 2005. / Framework .NET 2.0
I am using a ContextMenu converted to Hmenu in a wrapped library. The
menu is displayed but does not fire event on Popup or item clicked.
Does anyone has an idea how to perform it if it is possible?
I am using Managed C++ and I can't use PInvoke.
Regards Tag: Dock Window to an external application Tag: 117298
ContextMenuStrip: ToolStripScrollButton = unrecognized control???
Hi there,
I'm trying to create a custom ContextMenuStrip. Everything's (basically)
fine, but when the vertical space needed to display all items is less than
required, those ScrollButtons show up at the top and bottom of the menu.
Digging into how to paint these I found out that these buttons are made up
from System.Windows.Forms.ToolStripScrollButton. However, .Net doesn't seem
to actually publish these controls.
I'd like to:
a) paint the background in a different color
b) increase the vertical space the buttons are consuming
c) paint a border around them
While a) and b) are not all too important, I need to somehow draw a border
around the buttons. Also, if the ScrollButtons appear, they seem to be
drawn over the control AFTER it has been painted. That is, if I paint a
border around the menu itself, that border is replaced by the white area of
the ScrollButton.
Any pointers ..?
Cheers,
Olaf
[f'up to microsoft.public.dotnet.framework.windowsforms.controls] Tag: Dock Window to an external application Tag: 117297
Uninstall linux
I am attempting to uninstall linux and it's bootloader from my desktop. I
attempted to use the fdisk/mbr command from my xp install disk. I enter
restore and get to the admin password which it does not accept. I cannot get
pate this point. Any help or another method to accomplish this would be
appreciated.
Thanks. Tag: Dock Window to an external application Tag: 117294
Using flow breaks in a context menu
I am trying to create a context menu strip (ContextMenuStrip object) that has
labels and textboxes (similar to the 'Filter For:' menu item when right
clicking on a record in a table view in MS access 2003).
Iâ??ve written the following code, but it doesnâ??t do the trick:
ContextMenuStrip mnu=new ContextMenuStrip();
mnu.AutoSize = false;
mnu.Width = 400;
mnu.Height = 100;
mnu.LayoutStyle = ToolStripLayoutStyle.Flow;
FlowLayoutSettings fls = mnu.LayoutSettings as FlowLayoutSettings;
fls.FlowDirection = FlowDirection.LeftToRight;
//
// label1
//
ToolStripLabel label1 = new ToolStripLabel("Label1");
label1.Name = "label1";
mnu.Items.Add(label1);
//
// textbox1
//
ToolStripTextBox textbox1 = new ToolStripTextBox("textbox1");
textbox1.BorderStyle = BorderStyle.FixedSingle;
mnu.Items.Add(textbox1);
fls.SetFlowBreak(textbox1, true);
//
// label2
//
ToolStripLabel label2 = new ToolStripLabel("Label2");
label2.Name = "label2";
mnu.Items.Add(label2);
//
// textbox2
//
ToolStripTextBox textbox2 = new ToolStripTextBox("textbox2");
textbox2.BorderStyle = BorderStyle.FixedSingle;
mnu.Items.Add(textbox2);
fls.SetFlowBreak(textbox2, true);
Note that I am trying to set a flow break after each text box, but no flow
breaks actually happen, all the controls appear side by side on one line.
What am I doing wrong? Am I applying the flow break on the wrong object?
Iâ??ve tried to apply it to textbox.Control and textbox.TextBox to no availâ?¦
Thanks,
Aviad. Tag: Dock Window to an external application Tag: 117293
Developing media player GUI
I start developing a commercial media player. Most of the form would contain
a picture or a video rectangular(the data and its representation do not
matter here-just the frame and the control buttons). Some other rectangular
areas are devoted to information data (one can see Windows Media Player as a
model, but certainly not as a replica). The external panels should be unique
and also all the control buttons.
What technologies should I consider to the GUI(I mean like WFP or other
commercial libraries)?
Thanks for any reference
Greg Tag: Dock Window to an external application Tag: 117286
Change the image of 3-state checkbox in datagridview
Hi,
I would like to change the image of indeterminate state of a checkbox in
datagridview from green square to red check.
Can anybody tell me how to do it? Thanks a lot.
Dan Tag: Dock Window to an external application Tag: 117285
datagridview.rowheaders are not repainted
Hi All:
Sometimes rowheaders in datagridview are not repainted as should. In following code I tried to show it's example.
Sub MarcinArmedWithMouse shows few simple steps which sholud be done manually (use mouse, please).
If I run it (WinXpProSp2 dotent 2.0), rowheaders are not repainted when vertical scrollbar vanishes, and cells of the
last row fills it's area - only cells are moved down and repainted:
'VS2005; Windows Application: datagridview should repaint rowheaders
'************************************************************************************
Public Class Form1
Friend WithEvents datagridview1 As New DataGridView
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Controls.Add(datagridview1)
Me.Width = 300
Me.Height = 150
Me.datagridview1.Dock = DockStyle.Fill
Me.datagridview1.AllowUserToAddRows = False
Dim P As Point() = {New Point(1, 1), New Point(2, 2), New Point(3, 3)}
Me.datagridview1.DataSource = P
End Sub
Private Sub MarcinArmedWithMouse(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
'You can comment this sub and repeat all steps manually...
Dim HScrollBar As ScrollBar = Me.datagridview1.Controls(0)
Dim VScrollBar As ScrollBar = Me.datagridview1.Controls(1)
MsgBox("Marcin grabs mouse; his first step: decreasing width (slowly) ...")
While Not HScrollBar.Visible
Me.Width -= 5
sleep()
End While
MsgBox("... Horizontal ScrollBar shown; Marcin starts decreasing height ... ")
While Not VScrollBar.Visible
Me.Height -= 5
sleep()
End While
MsgBox("... Vertical Scrollbar is visible; now Marcin moves to last record " & _
"(or scrolls Vertical Scrollbar down to the end)...")
Dim i As Integer
For i = 0 To (Me.datagridview1.RowCount - 1)
SendKeys.SendWait("{DOWN}")
sleep()
Next
MsgBox("... finally Marcin reduces width of first column ... ")
For i = 0 To 10
Me.datagridview1.Columns(0).Width -= 1
sleep()
Next
MsgBox("That's all: now Marcin says: ROWHEADERS LOOKS STRANGE")
End Sub
Sub sleep()
System.Threading.Thread.Sleep(80)
Application.DoEvents()
End Sub
End Class
'************************************************************************************
Problem disapears when I add to projects with datagridview sth. like this sub:
'************************************************************************************
Private Sub datagridview1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles
datagridview1.Paint
Static HS As HScrollBar = Me.datagridview1.Controls(0)
Static vis As Boolean = HS.Visible
If vis = True And HS.Visible = False Then
Me.datagridview1.Invalidate()
End If
vis = HS.Visible
End Sub
'************************************************************************************
It is possible I missed sth. while googling, or have sth. wrong with system, or framework..., if not - maybe someone has
better solution for this small problem.
Thanks
Marcin Dzióbek Tag: Dock Window to an external application Tag: 117283
VB low level IO
I'm using VB 2005 and want to build and use a counter file. It will be used
as an autonumber field for a database application. It will be hit 10 - 15000
times a day. Naturally I want to lock all reads - writes while the number is
incremented. The file can be read - incremented and be rewritten. I can
cludge something together but I'd like to learn the "correct" method.
Thanks
Paul Tag: Dock Window to an external application Tag: 117280
Odd runtime error
(I've already fixed this. I'm just curious exactly what happened.)
I have a Dot Net 2.0 solution with a main winforms project and multiple
class libraries. The main winforms project and one of the class libraries
both have a reference to an external dll, which is compiled in a separate
solution and which I've also been tweaking on recently. It is possible that
the 2 projects may have been referencing different versions of the same dll
during the time of this problem.
What happened was this. The main project calls a method of that class
library. That method in turn calls a method of the external dll. Even
though everything was compiling normally, the program crashed in the winforms
code on the call to the class library, with a MissingMethodException. I was
unable to step into the class library's code, even though everything was
compiling normally and the method obviously exists.
When I detached and reattached the external dll reference in both projects
and recompiled, the problem went away.
Anyone else ever see anything like this? Tag: Dock Window to an external application Tag: 117279
Can't add user control in a separate assemly
I manage to add a class in my project namespace, add UserControl inharitance
and after compilation I see its usercontrol representation in the toolbox.
On the other hand if I create the class in a separate project and assembly
which I added to the solution, it doesn't appear there.
Can someone advise please.
Regards
Rami Tag: Dock Window to an external application Tag: 117276
Windows explorer on Vista keeps not responding
I have run every help program out there but there is no soulotions the
problem that im having it doesn't matter what im running windows explorer
just locks up and keeps not responding and i have to end the process and run
it again, i need some help on this please thank you.
my computer specs are:-
P4 3.2
2Gb DDr2 ram
Nvidia Gforce 8400GS 256Mb
Windows Vista Home Basic with SP1
Current system rating of 4.3 Tag: Dock Window to an external application Tag: 117275
ClickOnce Start Folder Name keeps getting overwritten
Hello,
I've figured out how to use Mage to update the manifest to change the
name for the Startup folder. However, every time I build the project,
this information just gets overwritten again. So for example I want it
to be Company Inc and after the build it becomes Company NA. I'm not
sure where the NA comes from. I think it comes for the certificate or
something, but just don't know. So if someone could enlighten me I
would appreciate it.
Thanks,
Gary Tag: Dock Window to an external application Tag: 117274
Form Truncation Vertically when shown in a Virtual Machine
I have a form that works fine 99% of the time. Occasionally when run in a
Virtual Machine (VMWare or Virtual PC) the height of the form is truncated
about 8%, hiding buttons at the bottom. The form is
FormBorderStyle.FixedSingle, AutoScaleMode=Font, AutoSize=False (not being a
Forms expert I'm listing these only because I am guessing they might be
relevant). I haven't found any docs or articles describing this, so I'm
looking for whatever magic form attribute I need to correct this ;=) .
--
Phil Wilson
Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972 Tag: Dock Window to an external application Tag: 117273
Resizing controls embedded in a composite user control
I have a composite control consisting of a textbox and label. When i place
the custom composite control on a form I would like to allow the user to
resize the individual controls within the composite control using the
standard drag and alignment hints Visual Studio creates for all of the other
Windows controls. I haven't had any luck googling this topic...what is the
secret to doing this?
Thank you for any assistance,
Ron Tag: Dock Window to an external application Tag: 117271
Connecting to WebService using Proxy Server
We have a windows application built using .net 2.0 & c#
This application has a web reference that allows us to connect to a web
service.
This application works fine except in some cases....
We have clients who use a proxy server to connect to the internet. Our
application is unable to connect to the webservice in this case.
Thanks in advance
Sanjay
Here are the details of the error:
EXCEPTION OCCURRED
~~~~~~~~~~~~~~~~~~
System.Net.WebException: Falha na solicitação com status HTTP 407: Proxy
Authentication Required.
em
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)
em System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
em RR.Client.UploadService.UploadService.RequestUpload(String
sourceInstallationID, String sourceUrl, String workloadIDString, String
encryptionProtocolName, String userName, String password, Boolean isBinary)
em RR.Client.PLL.UploadDocumentWorker.OnDoWork(DoWorkEventArgs e) Tag: Dock Window to an external application Tag: 117265
How do I create Forms that behave like the Visual Studio layout?
You'll notice that forms in the Visual Studio interface automatically
resize when a form is deleted or resized, or when a new form is added.
Is there a simple way to accomplish this? (the SplitContainer will not
accomplish this behavior). Thanks for your help. Tag: Dock Window to an external application Tag: 117264
Theory question: What sets the default references for a class lib
Just noticed this. I'm writing a Winforms VB Dot Net 2.0 app.
The app is a solution with a main winforms project and multiple class
libraries. By chance I noticed that I was unable to add a user control to
one class lib but was able to add it to a new one. The difference was that
the newly added class lib had a reference to System.Windows.Forms. The old
class lib didn't, even though I've done nothing to change the basic default
references set by Visual Studio in this solution. (I'm sure that I did not
remove any references to Forms.)
What's going on here? Tag: Dock Window to an external application Tag: 117263
Selecting a row in a Win DataGridView
I am dumping a third party Grid product and going to Microsoft's
DataGridView in my vs2008 C# Windows projects. In converting my code I
can't seem to find a way to select a specific record (i.e. the first one) in
the DataGridView.
Any help is greatly appreciated. Tag: Dock Window to an external application Tag: 117262
How to do single click selection for mousedown in selectionService_SelectionChanged function?
Hi,
I am creating a custom form designer. In this I am taking a windows form
at runtime on which I am droping controls like label, textbox etc. But I
am not able to drag these controls anywhere on the form. They ar not
getting selected in single click, I have to double click them for
selecting. But after doble clicking also they not dragable.
On double click it is calling selectionService_SelectionChanged(object
sender, EventArgs e) function which is handling events.
Thanks,
Akshay
*** Sent via Developersdex http://www.developersdex.com *** Tag: Dock Window to an external application Tag: 117261
ANN: VintaSoftAnnotation.NET Plug-in v1.0 has been released.
VintaSoftAnnotation.NET is a developer's tool that allows to annotate
images: create, process, delete, save to XML or TIFF file, merge the
annotations with image. Supported annotation types: rectangle,
ellipse, image, text, rubber stamp. Individual annotation features:
moving, resizing, rotate and mirroring of annotation, change the
background color of annotation, set transparency, add or remove border
to annotation, edit text of text or rubber stamp annotation, change
text parameters of text or rubber stamp annotation.
Library was tested and has examples of use for VB.NET, C#, ASP.NET.
You can read more info here: http://www.vintasoft.com/vsannotation-dotnet-index.html. Tag: Dock Window to an external application Tag: 117257
ANN: VintaSoftImaging.NET Library v1.0 has been released.
VintaSoftImaging.NET is a powerful and easy to use imaging toolkit
for .NET developers. Library allows to load, view, process, annotate,
print and save images, work with multipage TIFF files directly, split
multipage TIFF file to many image files. View images in scrollable and
zoomable image viewer with magnifier and select image tool. View
thumbnail images in multi-threaded thumbnail viewer. Supported
processing functions: despeckle, deskew, border detection, blank page
detection, rotation, mirror, crop, invert, color conversion.
Library was tested and has examples of use for VB.NET, C#, ASP.NET.
You can read more info here: http://www.vintasoft.com/vsimaging-dotnet-index.html. Tag: Dock Window to an external application Tag: 117256
Hi,
I'd like to dock my WinForm app to other applications. What is the easiest
approach for this?