all groups > dotnet windows forms > january 2008
Filter by week: 1 2 3 4 5
Windows Forms Interop with WPF Question
Posted by JT at 1/31/2008 6:53:01 PM
Hi,
I have a WPF User Control that essentially encapsulates a WPF Window. The
user control is hosted in an element host on a Windows Form. How can I tell
the Windows Form to close based on events that occur in my WPF User Control?
One major limitation... I cannot reference my Windows Forms... more >>
How to play a Windows sound?
Posted by nvx at 1/31/2008 2:07:40 PM
Hello,
I would like to play at a certain moment the exact sound that Windows
play when an information message box is shown (the one with blue "i"
in the bubble). I know I could find the .wav file and play it somehow,
but I'd like to play the sound that is assigned to the info message
box in the... more >>
Unslect a row in DataGridView
Posted by Stephen Hatfield at 1/31/2008 11:36:05 AM
I have a Windows Forms application consisting of several main level
TabControls and each of these controls has two or more TabControls within
them.
I have a method which calls all the LoadDataGridViews methods which I call
in the form's constructor. The last line in each method is
datagri... more >>
Why all instances share the same window?
Posted by Andrew at 1/31/2008 9:52:00 AM
Hello, friends,
I created a class library (c#.net 2005) in which it may instanciate multiple
window forms to display images: One window for each image file.
It worked fine except that if more than one instance were created, all
instances will share the same window although you can see mult... more >>
VS 2008, Web service and Extremely Slow Build
Posted by Chris Botha at 1/31/2008 3:07:41 AM
I have a Web Service with approx 90 functions.
I had, or still have, a VS 2005 Windows app that has a reference to the Web
Service and when building the Windows app it takes a few seconds to build
the release or debug.
Create a VS 2008 Windows app with only 1 form and a "hello world" button ... more >>
Why is DataGridView.AutogenerateColumns not exposed in designer
Posted by Crazy Cat at 1/30/2008 8:37:59 AM
Does anyone know why this is not exposed in the designer?
Is it just me or is this a really stupid oversight?
I turn it on in code, but that doesn't prevent the designer from every
once in a while autogenerating columns on my datagridview. I can't
seem to predict when this'll happen -- for e... more >>
Problem setting color of ListView items
Posted by kelvin.koogan@googlemail.com at 1/30/2008 5:54:02 AM
Using C++ in VS2005
I am setting color of ListView items (there is only a single column)
using the following code:
ListViewItem ^pItem = gcnew ListViewItem(pName);
pItem->ForeColor = Color::Blue;
this->List->Items->Add(pItem);
But all the items stil... more >>
GZipStream give error Arithmetic operation resulted in an overflow.(more then 3 GB file)
Posted by harshad at 1/29/2008 3:50:07 PM
Dear All,
I use System.IO.Compression namespace for compressing file
give me overflow for streamObj.Length when file size more then 3 GB.
following my code:
Dim streamObj As Stream = File.OpenRead(GZipFileName)
Dim buffer(streamObj.Length) As Byte
streamObj.... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How can I pass a parameter to a new thread?
Posted by rkbnair at 1/29/2008 1:46:01 PM
How can I pass a parameter to a new thread?
Thread t = new Thread(new ThreadStart(ThreadProc));
t.Start();
Thread.Sleep(0);
... more >>
Can control properties on base Form be changed on derived Form?
Posted by Peter Rilling at 1/29/2008 1:33:42 PM
Hi,
When I have a base Form that I add controls to, then inherit that Form, when
the derived class is viewed in the designer, the controls that were placed
on the base are visible, but all the properties are locked.
What I would like to do is to use controls in the base that act like a
t... more >>
How to connect two systems in java
Posted by pmalli123@gmail.com at 1/29/2008 12:28:49 AM
How to connect two systems in java and
one system can send information to another system viceversa
please friends give any suggestions to me as early as possible
thanking you... more >>
Group box border color
Posted by Craig at 1/28/2008 5:14:26 PM
I am trying to find the border color for a group box so I can create
some additional lines within the group box that match it. I can't find
any reference that says which system color it maps to. I have tried a
few different colors but some match on XP but not in Vista so if I can
find the system... more >>
Failed to enable constraints
Posted by Crazy Cat at 1/28/2008 2:29:12 PM
I've created a dataset that includes a tableadapter and table for
countries. Here is the table schema
CREATE TABLE [CAT].[Countries](
[CountryID] [smallint] IDENTITY(1,1) NOT NULL,
[RegionID] [smallint] NOT NULL,
[CountryCode] [varchar](12) NULL,
[CountryName] [nvarchar](100) NOT NULL,
... more >>
Displaying characters on a form from another code page
Posted by adiel_g@hotmail.com at 1/28/2008 1:25:42 PM
I am trying to display some data that I received into a form. The
form is in english. The data is in cyrillic (russian) which uses
codepage 1251. I am trying to change the button text to russian. For
example:
cmdCancel.Text =3D "=CE=F2=EC=E5=ED=E8=F2=FC"
Those are garbage characters whi... more >>
What form event fires after user controls are loaded?
Posted by Charlie@CBFC at 1/28/2008 12:07:36 PM
Hi:
Need to get access to user control properties when loading host form. Which
form event fires after controls are loaded?
Thanks,
Charlie
... more >>
How to select items in a ListView control through code?
Posted by Andrew at 1/28/2008 7:48:05 AM
Hello, friends,
I tried to select all the items using (c#.net):
private void ButtonSelectAll_Click(object sender, EventArgs e)
{
for (int i = 0; i < this.ListViewPageNumber.Items.Count; i++)
{
this.ListViewPageNumber.Items[i].Selected... more >>
How to requery w DataGridView and maintain context?
Posted by RBarryYoung@gmail.com at 1/28/2008 6:53:34 AM
I have a DataTable/DataSet from SMO that is being displayed in a
DataGridView. I need to periodically requery the DataTable and
refresh the DGV display with the updated results. This much I can do.
However, I also need it to retain its user context. That is, what
row the user is on (wha... more >>
Recommended db app strategy
Posted by John at 1/27/2008 1:38:34 AM
Hi
I have an access backend database to which I need to give a vb.net front
end. I created db connection and data source in vs 2008., I then dragged the
fields onto a form which created the app for me. The app works ok but my
question is; is this the correct/acceptable way to cerate an app or ... more >>
Problem trying to "replace" an Object in a List(Of Object)
Posted by BobRoyAce at 1/26/2008 5:01:15 PM
I have a class, MerchantList, which has a property, Merchants which is
a List(Of Merchant). I am trying to figure out how to "replace" one of
the Merchant objects in the Merchants List with another new one. I
created a simple test, coded as follows:
Dim oList As New MerchantList
Dim oMe... more >>
StackOverflowException when Control added to Form
Posted by MaxGruven at 1/25/2008 2:43:01 PM
The control added is derived from TabControl with 5 Tabs each of which has a
DataGridView on it. The DataGridViews are DataBound to a BindingList
Collection of Business Objects.
The really interesting part is it only happens when the DataGridView on
TabPage0 has 2 rows. Also, if I take th... more >>
Focus at the right spot
Posted by Arne Garvander at 1/25/2008 2:17:00 PM
I use
Mytextbox.text = "Default"
mytextbox.focus
How do I focus on the first character in the text box?
--
Arne Garvander
Certified Geek
Professional Data Dude... more >>
ListView control problem.
Posted by Andrew at 1/25/2008 1:22:00 PM
Hello, friends,
I know this sounds stupid, but I could not figure it out. So, help please.
I have ListView control in Details view and I need to populate. I used the
following code
for (int count = 1; count <= 50; count++)
{
ListViewIt... more >>
Windows form designer generated code being misplaced
Posted by BobRoyAce at 1/25/2008 6:59:21 AM
Let's say that I have a form, called Form1. It could have three files
associated with it, which I have listed below together with my
understanding of what "should" be in each:
Form1.vb -- should contain any custom code I've written for the
form
Form1.Designer.vb -- should contain all wi... more >>
VS 2008 control settings not persisting problem
Posted by John at 1/24/2008 10:42:22 PM
Hi
I have noticed this problem with vs2008.
I change settings for controls then I run the app and I don't see the
changes at runtime. I stop the app and the changes are there in design mode.
I close vs2008 and re-open app in vs2008 and app did not persist those
changes and I have to do t... more >>
Calling the parent
Posted by Arne Garvander at 1/24/2008 9:47:01 AM
I have a user control inside another user control.
Is there a way for a Child Control to call back to the parent, raising an
event in the parent or anything such?
--
Arne Garvander
Certified Geek
Professional Data Dude... more >>
Autoscroll madness
Posted by Backwater Geezer at 1/24/2008 8:18:58 AM
This is a problem from 23 Jan 2002
====================================================
Pierre Shirvan
I have a form with a Panel with the autoscroll property set to true and
a command button, on the form, that adds a usercontrol to the panel's
control collection when I click it. I add se... more >>
Reusable Windwows Design in C#
Posted by Sujay Ghosh at 1/24/2008 1:23:00 AM
Hello.
Environment : VS 2005/ VC# / .NET 2.0
By default Windows Form provides a window. One can programatically change
the look and feel of the windows .
But I want to create a reusable Window , so the user does not need to
program the window .
Approach 1
Create a wizard whi... more >>
DataGridView calculated field
Posted by Aleksey Timonin at 1/23/2008 6:23:06 PM
Hi guys,
I have a DataGridView binded to DataTable.
In the DataTable I have an "ID" field.
How can I create calculated column in the DataGridView that gets as value
object (string) from my list, where item index in the list is equal to value
in "ID" field?
Thanks a lot
Aleksey
... more >>
Binding to Nullable(Of T) properties
Posted by Jack Jackson at 1/23/2008 6:06:17 PM
In VS2005 VB, is it possible to bind a Nullable property to a data
source (e.g. DataTable) property that is not Nullable? My goal is to
be able to convert DBNull to and from Nothing for Value data types.
I created a derived Binding object with Format and Parse handlers. In
the Format event I... more >>
events from child to parent form.
Posted by Ibrahim. at 1/23/2008 4:34:00 AM
Hello,
I have a user control which is dynamically added to a Form object (mdi
child). and mdi child parent is mdi main.
usercontrol->mdi child -> mdi form.
i want to raise event in "usercontrol" and notify to the "mdiform" as shown
above.
any suggestions?
thanks.... more >>
Z-order not working for stacked panels
Posted by Ruben L at 1/22/2008 6:35:01 PM
I'm upgrading/rewriting an apllication written in VB6 to VB2008.
The main form had an outlook-like navigation with a vertical buttonbar in
the left side of the form and a bunch of frames with controls on them in the
main area. All these frames were placed exactly on top of each other, and
pus... more >>
changing properties of progressbar
Posted by rkbnair at 1/22/2008 6:08:45 PM
How can I set the value of a progressbar in a wait window?
frm (it contains the progressbar) is a form that is called from another
program.
I get a compilation error at the first line below.
System.Windows.Forms.ProgressBar prgrs=
frm.Controls["progressBar1"];
prg... more >>
Button event handler
Posted by Arne Garvander at 1/22/2008 6:06:26 PM
I need to dunamically create buttons on a windows forms depending on the data
that is requested.
How can I create an event handler on the fly for this buttons?
--
Arne Garvander
Certified Geek
Professional Data Dude... more >>
passing back null to a database field if textbox is blank
Posted by Wishing I was skiing mom at 1/22/2008 5:54:04 PM
I have a text box that represents Hours worked, I also have a text box that
represents Adjusted Hours worked. If user wants to override the Hours worked
they enter a value in the Adjusted Hours worked text box. In doing so the
Adjusted hours worked field in the database would then be updated... more >>
Lock the OS or any other application.
Posted by DotNetDev at 1/22/2008 5:49:03 PM
Hi,
I have been developing web applications. Now I have got a task to implement
an application to simulate an exam. I'm thus thinking to make it a windows
Forms app. as one of the requirements could be to stop students from using
any other application on the computer.
How can I stop stud... more >>
Preload MDI childeren to improve performance
Posted by Luc at 1/22/2008 5:30:11 PM
Hi all,
Does anybody have code snippet which I can use to PRELOAD a list of MDI
childs, to improve the load (avoid flickering) event?
FYI, during the child load event, all comboxes are filles with data from the
database....
Thx for your response !!
--
Best regards
Luc ... more >>
How to preload forms
Posted by Luc at 1/22/2008 4:56:21 PM
In my application I use an mdi form in which I display several forms,
What is the best way to preload this forms ? during the load event I goto
the database to fill my comboxes....
thx for your quick response!
--
Best regards
Luc ... more >>
Display Priview PictureBox from web cam but how to capture image and save in DataBase ?
Posted by harshad at 1/22/2008 3:57:58 PM
Hello,
I try this link http://weblogs.asp.net/nleghari/articles/webcam.aspx
following code I try:
this.picCapture.Image.Save("test",
System.Drawing.Imaging.ImageFormat.Jpeg);
My Problems is how to get image in jpg format and store in database.
Thanks,
Harshad Prajapati
... more >>
Anchoring question
Posted by Elmo Watson at 1/22/2008 12:46:15 PM
I need to add some textboxes to a form, programmatically
Dim ctl As New System.Windows.Forms.TextBox
ctl.Top = iTop
Me.Controls.Add(ctl)
iTop = iTop + 25
I need them to anchor on the left and the right - but I can't seem to find
how to do it
When I try to programmatically anchor them, I ... more >>
Hiding Tabsheet Tabs?
Posted by Joe at 1/22/2008 7:09:26 AM
Hi
I want to build a form that will function as a wizard. I want
to use a tab control and two buttons for Back and Next. Pressing the
Back and Next buttons will switch the active tabsheet.
But I can't figure out how to hide the tabsheet tabs. There
doesn't appear to be an... more >>
Enable one Active window at a time
Posted by arora.dipti@gmail.com at 1/21/2008 10:25:10 PM
Hi
We are working on a Health Contact Center Application in which a
patient is able to contact using either Chat Application or Phone Call
with the Doctors.
When the doctor is contacted using either of these means, a popup
appears at the Doctor's End and he is able to communicate with the
pati... more >>
How do I know over what element of ListBox is cursor?
Posted by Alexander Vasilevsky at 1/21/2008 9:02:09 PM
How do I know over what element of ListBox is cursor?
http://www.alvas.net - Audio tools for C# and VB.Net developers
... more >>
Accelerators
Posted by Matthew Ireland at 1/21/2008 2:59:01 PM
How do you create Accelerator behavior for a Windows Form exe with a menu
(i.e. <ALT> + O to call an Open File method). The property on the Menu Item
doesn't seem to do anything except display some text indicating an
accelerator is present. There is no way to connect the key sequence to a
... more >>
DownloadFileAsync via Command line
Posted by Bedwell at 1/21/2008 1:03:01 PM
Ok, I’m using the method DownloadFileAsync to download a large file and I
also use the DownloadProgressChanged event to show users how far along they
are in downloading the file. I put this into a WinForms application, make a
call to the download file method (behind a button click event) an... more >>
Deployment and InstallerClass
Posted by Brian Kitt at 1/21/2008 11:23:03 AM
I don't know if this is the appropriate newsgroup, but not sure which one
would be.
I have a custom dialog that I added to the UI of the deployment package.
That dialog asks for special installation options.
#1. Depending on the users configuration, I may want to suppress that
screen e... more >>
how to display resizeable rectange
Posted by Gregory Khra at 1/21/2008 10:45:04 AM
I need in my Windows Forms application to allow user to enter a rectangle and
later resize it. In the other words, I need to display a rectangle that (if
selected) shows control points that user can grab (with mouse) and drag to
resize the rectangle. Can you recommend an appropriate control?
... more >>
SVN Class for .NET
Posted by martin.zugec@gmail.com at 1/21/2008 9:01:19 AM
HI guys,
I think many of you are using subversion, however do you have some
projects that directly involves subversion (e.g. checkout from your
application)??
I was looking for some components, however I was not successfull and I
would like to know if there is anyone that was fighting with ... more >>
DatagridView
Posted by Arne Garvander at 1/21/2008 6:37:04 AM
I have a dataset with one table, which I build from scratch (not using SQL
server).
It displays fine on the web with a datagrid.
I use the same dataset and apply it to a DataGridView in a windowsform. My
datagridview does not display at all. What am I doing wrong?
HistoryGrid.A... more >>
Is tag property ByRef or ByVal?
Posted by martin.zugec@gmail.com at 1/20/2008 8:10:51 AM
I have project where I am assigning forms to Tag of different form
(therefore creating some kind of relationship)...
My problem is quite simple - when one of forms is disposed, tag still
contains that object.
So my question is quite simple - is Tag ByRef or ByVal???
Thanks,
Martin... more >>
Show class in Toolbox
Posted by martin.zugec@gmail.com at 1/20/2008 6:52:27 AM
Heya,
I am writing my own class, that is inheriting from Form and only adds
few additional properties. However question is how to add this custom
class to toolbox??
Thanks,
Martin... more >>
|